Tuesday, 18 October 2011

Creating a Concave User Interface

This post is part of series of posts to help developers develop great user interfaces.  

One way to take your FireMonkey HD application into the the 3rd dimension is to make a concave user interface. This interface simply consists of several TLayer3Ds, arranged in a concave fashion. Each TLayer3D simply is the parent of a form on a different unit. Its that simple!

Well, not quite. You need this bit of code.


This function takes in an X,Y position of your concave user interface, along with other important info, and returns the position, width, and height of your TLayer3D!  All you need to do is fill your 3D interface with TLayer3D components, and call this function to set the positions!

For more great articles, check out LearnDelphi.com!
To convert your VCL/VGScene applications to FireMonkey, check out the FREE MonkeyGroomer tool!
Check out more information about 3D and Delphi at the Embarcadero Developer Portal
Follow me during my CodeRaging!

Monday, 17 October 2011

CodeRage 6 is ON!

I am proud to announce that CodeRage 6 is going on right now!  Here is how you can follow it!

And, be sure to watch my session tomorrow at 12:00 PDT, "FireMonkey FireStarter!"  See you there!

Wednesday, 12 October 2011

Announcement: MonkeyGroomer 0.1 Public Release!

I am proud to announce the public release of MonkeyGroomer 0.1!

Download Now for FREE!

MonkeyGroomer is a simple application that aims to help convert your Delphi projects to FireMonkey projects. Currently only VGScene is supported. It also supports VGScene style files.

  • MonkeyGroomer supports over 100 VGScene classes and components
  • In this release, components not supported in the selected project will halt the conversion. (with a helpful message)
  • In the final release, you will have the option of removing unsupported components.
  • Currently the VCL conversion converts specific properties for any component. In a future release the engine will be more discriminatory.
  • Most VGScene components have been tested. 

  • A wizard is planned, to make the conversion process simple and painless!
  • Most of the work was done on the form parser and conversion engine. Once support for VCL is complete this engine will be adapted to support other delphi platforms and components in the future, using Lua4Delphi! (donate now!)
Special thanks to Simon J Stuart!

For inquiries, please contact me at thestamp@gmail.com

Quoted from: http://tgr.ph/cjQUr2

MonkeyGroomer - Roadmap

The feedback from MonkeyGroomer has been tremendous! That, paired with the announcement of MonkeyGroomer having plans for LUA support, this aims to be a very important release for the Delphi community! Not only will you be able to migrate your VCL and VGScene applications, you will be able to script and convert your own custom components!  So, whats the plan?

This week:
  • Release MonkeyGroomer with Full VGScene support (stable) for public use for free!
  • Release an alpha version with limited VCL support, to test the VCL conversion engine.
Over the next month:
  • Release continual updates with additional VCL and other common controls
  • Set up a community for developers to discuss and share experiences on migrating their projects.
And when that's done:
  • Add Lua4Delphi support
  • Set up a community for developers to share and discuss migrating custom and third party components.
If you have any questions, feel free to contact me at thestamp@gmail.com, or follow me on twitter: @PascalCoder

Friday, 7 October 2011

Join me at my CodeRage Session: FireMonkey FireStarter

That's right! I will be doing a talk on some FireMonkey essential topics, named "FireMonkey FireStarter!"

Click here to register now!

Its my first time talking at CodeRage (or any event for that matter), so enjoy me stumbling around the virtual stage, making a fool of myself! I'll be in the official IRC chat as well (url and channel TBA), so we can chat as the session happens! It'll be a great time, see you there! 

Thursday, 15 September 2011

MonkeyGroomer - Action Shots and Component List

Update: MonkeyGroomer 0.1 has been released! Download here!

MonkeyGroomer is a simple application that converts your Delphi VGScene or VCL form files to FireMonkey form files. It will also support VGScene style files.

The upcoming release of MonkeyGroomer Alpha will have support for an incredible amount of components, both for VGScene, VGScene styles, and VCL.
  • MonkeyGroomer supports over 100 VGScene and VCL components
  • In this release, components not supported in the selected project will halt the conversion. (with a helpful message)
  • In the final release, you will have the option of removing unsupported components.
  • The final release will be available as a wizard to simplify migration.
  • Currently the VCL conversion converts specific properties for any component. In a future release the engine will be more discriminatory.
For more information, contact me at thestamp@gmail.com.

Action Shots

VGScene converted to FireMonkey

VCL Converted to FireMonkey

Supported Components (so far)

(preliminary list)

  • TLabel, 
  • TStringBox, 
  • TEdit,
  • TMemo,
  • TButton

(final list)

  • TvgBackground,
  • TvgBitmapAnimation,
  • TvgBitmapListAnimation,
  • TvgColorAnimation,
  • TvgColorKeyAnimation,
  • TvgFloatKeyAnimation,
  • TvgGradientAnimation,
  • TvgButton,
  • TvgStringListBox,
  • TvgFloatAnimation,
  • TvgTreeViewItem,
  • TvgTextBoxClearBtn,
  • TvgTextBox, 
  • TvgMemo,
  • TvgCalendarTextBox,   
  • TvgComboTextBox,
  • TvgPath,
  • TvgImage,
  • TvgShadowEffect,
  • TvgInnerGlowEffect,
  • TvgGlowEffect,
  • TvgAngleButton, (now TArcDial)
  • TvgTabItem,
  • TvgRadioButton,
  • TvgListBoxItem,
  • TvgCheckBox,
  • TvgCalendarBox,
  • TvgBevelEffect,
  • TvgGroupBox,
  • TvgPopupBox,
  • TvgBlurEffect,
  • TvgCornerButton,
  • TvgReflectionEffect,
  • TvgSpeedButton,
  • TvgDropTarget,
  • TvgImageViewer,
  • TvgGrid,
  • TvgStringGrid,
  • TvgGridLayout,
  • TvgArc,
  • TvgCalloutRectangle,
  • TvgCircle,
  • TvgEllipse,
  • TvgLine,
  • TvgPaintBox,
  • TvgPie,
  • TvgRectangle,
  • TvgRoundRect,
  • TvgText,
  • TvgComboTrackBar,
  • TvgNumberBox,
  • TvgSpinBox,
  • TvgStatusBar,
  • TvgToolBar,
  • TvgTreeView,
  • TvgSizeGrip,
  • TvgFramedVertScrollBox,
  • TvgPlotGrid,
  • TvgCalendar,
  • TvgSelection,
  • TvgSelectionPoint,
  • TvgGridLayout,
  • TvgLayout,
  • TvgScaledLayout,
  • TvgAniIndicator,
  • TvgCalloutPanel,
  • TvgExpander,
  • TvgFramedScrollBox,
  • TvgImageControl,
  • TvgLabel,
  • TvgPanel,
  • TvgProgressBar,
  • TvgScrollBar,
  • TvgScrollBox,
  • TvgSmallScrollBar,
  • TvgSplitter,
  • TvgTabControl,
  • TvgLayout,
  • TvgTrackBar,
  • TvgVertScrollBox,
  • TvgAlphaTrackBar,
  • TvgBWTrackBar,
  • TvgColorBox,
  • TvgColorPanel,
  • TvgColorPicker,
  • TvgColorQuad,
  • TvgComboColorBox,
  • TvgGradientEdit,
  • TvgHueTrackBar,
  • TvgTrack,
  • TvgBrushObject,
  • TvgBitmapObject,
  • TvgPathObject,
  • TvgListBox,
  • TvgThumb


Monday, 12 September 2011

Announcement: MonkeyGroomer - Convert VCL Forms to FireMonkey!

Update: MonkeyGroomer 0.1 has been released! Download here!

I am proud to announce MonkeyGroomer!

MonkeyGroomer is a simple application that converts your VGScene or VCL form files to FireMonkey form files. It will also support VGScene style files.

  • An alpha version will be available shortly! Available now!
  • Most VGScene components have been tested. 
  • Initially, VCL support will be limited, but quickly expanded.
  • A wizard is planned, to make the conversion process simple and painless!
  • Most of the work was done on the form parser and conversion engine. Once support for VCL is complete perhaps this engine will be adapted to support other delphi platforms in the future, possibly using Lua4Delphi! (donate now!)

Special thanks to Simon J Stuart!

For inquiries, please contact me at thestamp@gmail.com

Syndicate: Firemonkey Styles

TLDR: Felix Colibri has posted a good tutorial on how to use Firemonkey's styles.

  • abstract : FireMonkey Styles tutorial : changing styles for all or for some selected components.
  • key words : FireMonkey Styles - Style Designer - .STYLE files - StyleLookup - StyleName - FindComponentResource - Predefined Styles - Delphi XE2
  • software used : Windows XP Home, Delphi XE2
  • hardware used : Pentium 2.800Mhz, 512 M memory, 140 G hard disc
  • scope : Delphi XE2
  • level : Delphi developer
  • plan :

Saturday, 10 September 2011

Syndicate: Embarcadero Insider Reveals Update Schedule for Firemonkey

TLDR; Embarcadero employee Michael Swindell reveals that updates will be done for Firemonkey several times per quarter now, then quarterly later.


The product matrix shows that Firemonkey currently supports iOS 4.2. Apple will be introducing iOS 5 shortly. Will Firemonkey be updated to support newer iOS features periodically (eg., iOS 5 and possibly other things)? Or just once-a-year when Delphi is updated?  
Michael Swindell: Yes, since Firemonkey is 1.0 we're going to be updating early, often, and regularly. The first update is well underway, will address a lot of great feedback, and should be out before the end of the month. We are planning updates on a regular cadence, initially several quarterly.   

 (I'd love to see quarterly updates.)  
Michael Swindell: We'll start out updating more often than quarterly, and settle into quarterly updates eventually. Embarcadero is behind FM in a big way, there is a lot of ongoing investment going on into this release, updates, performance enhancements, and future platform/feature support.

Friday, 9 September 2011

Syndicate: TeeChart & Delphi XE2 Support Announcement

TLDR; TeeChart "TeeChart Standard" for VCL and "TeeChart Lite Chart" for FireMonkey. "TeeChart Pro" available soon.

Time we mentioned what we're doing with TeeChart and Embarcadero's RAD Studio XE2!

Steema has been working with the new IDE for some time, preparing both VCL and FireMonkey versions of TeeChart for inclusion in the new programming environment. Agreed versions of RAD Studio XE2 will ship with TeeChart Standard VCL and TeeChart Lite Chart for FireMonkey. Steema are preparing installers for TeeChart Pro that we expect to be ready very soon. We'll be announcing availability of the new installers here; please watch this space. To review the current different versions of TeeChart and how they relate with XE2 please see the Feature Matrix.

Steema team

Your "Reliable" Source for Delphi Technology News

Lately a lot of information about Delphi has been flying around on Twitter, the news, Delphi Feeds, and other news sites. I noticed that although you can get information about Delphi, its pretty hard right now. To help alleviate the issue, I'm going to start a series of reposts that simply serve as a single source for news and information for Delphi.

To follow, simply favorite this link!  http://pascalcoder.blogspot.com/search/label/Delphi Syndicate

Monday, 5 September 2011

Delphi XE2 Released!

Delphi XE2 has finally been released!  Very exciting times are ahead, with 64bit, FireMonkey, Moc OS X, and iOS applications!

It is incredibly easy to develop for iOS thanks to FireMonkey. I managed to port a Windows FireMonkey application in a short few hours!

Here is what I have found so far:

  • When you rotate the iOS device, the OnResize event is fired.
  • Without any extra installations, Indy does not work.  Can't find the units in the fpc install.
  • 3D is pretty slow on the iPad 2. Will run a benchmark.
  • No idea how to access iPod library, or pictures, or any other library functionality. 
Ideally extra iOS functionality would be wrapped into different components, and emulated in Delphi. Perhaps this calls for a 3rd party component? 

To celebrate Delphi XE2's release, I am making a series of videos showcasing some new features available in Delphi XE. This first video focuses introduces FireMonkey.

Tuesday, 2 August 2011

Delphi XE2: Announcement, World Tour, and a Giveaway!

Embarcadero has announced Delphi XE2, and its expected to be their best Delphi release since.. Delphi 1! To celebrate this they are hosting the largest world tour ever held, with over 70 locations! Gratz to the folks in New Zealand for being the first to use Delphi XE2! Unfortunately, the closest tour city to me is over 12 hours drive to Calgary. Phooey. Check out the world tour here: http://www.embarcadero.com/world-tour

But thats not all! Embarcadero is giving away a copy of RAD Studio XE2 (which includes Delphi XE2, Delphi Prism XE2, and more) to 1 lucky developer! Sign up for it here: http://forms.embarcadero.com/forms/RADStudioXE2WinBeforeYouBuyPromo

What I find very exciting is their announcement of 64 bit, FireMonkey, and building Mac application support included in Delphi XE2. Being a developer that loves to create beautiful applications for clients FireMonkey sounds very promising, with the GPU being used to drive the UI. Deploy applications to Mac? Yes please!

Armed with their flexible IDE, fast compiler, and now 64 bit and FireMonkey support, Delphi is set to be the premier native application IDE for Windows.. and Mac!

Monday, 1 August 2011

Developing a Messenger Client - Part 1

A Messenger Client
Are you looking to develop a messenger client for you company, or friends? Developing a client and server seems simple on the outside, but once it becomes popular, there are some things you really need to consider, otherwise your server WILL become overloaded.  Take my word for it, it happened to me.

At Baselan 20, lanHUB was first used as the official tournament software. It had lots of bells and whistles that gamers and tournament organizers wanted.  Tournament organizers had a complete solution to organize and notify attendees, and gamers had a "player" list, with which they can chat together.  There are tons of other features, but that's a story for another day.

I had the server on a AMD Athlon II X2 3.2 ghz processor, 4gb corsair ddr2 on a miniITX board. And it went without a hitch.. almost.

How it Failed
I developed along the idea that "everyone should know immediately who is online, away, playing games, or signed off," which is the holy grail of instant messaging.  I used RemObjects SDK's brilliantly implemented event push technology to run this. However, as I stared at the server CPU monitor showing 100% utilization right before a large Starcraft tournament,  the technology can't get me all the way to my goal. I need to slimline my product.

As I arrived, the server was already slow as molasses. Asking the tournament organizer about how it came to be so slow, he said that "it was fine, but then it got slower.. and slower.. then it just stopped."


Behind the Scenes
When someone calls the server, its nicely threaded. Every call gets its own thread, and is squared away without a problem. However, if part of that call requires to take a peek at the player list that thread needs to finish looking at that player list before the rest of the server can continue.As long as I get my player list quickly to allow the app to continue, everything should go smoothly.

When someone signs in, the server broadcasts to that person the list of available players, and to everyone else that the person is now online. There was a bit of a bump in CPU when clients logged in, but not too much to be considerable.

The problem was that I was not there when people signed up.

At the time, when someone signs up for the first time, everyone who is signed in gets a nice fresh list of players. If 10 people sign up, its sending hundreds of player lists around event. The poor soul who signed up first would receive 9 updated player lists! Clearly that's not efficient.

And to top it off, the player list was threadlocking the server application while it was broadcasting the playerlist.

It was the perfect storm.

The Big Night
So, lets look back at the event. On night one, I noticed a 15% CPU usage, but since it was the first large scale run, I have insufficient data to compare against, and 15% wasn't bad. However, the next day right before the main Starcraft tournament, 30 people signed up within a span 2 minutes. You guessed it, it went down faster than.. well it was pretty gradual (according to the tournament organizer).

The service is designed to restart if there are multiple errors within a minute, to prevent a single error from stopping all services. So, as everyone signed up, the server slowed down, and the services restarted automatically (as a failsafe). Everyone auto-logged in, system slowed down, rinse and repeat. It appeared that people signing in was a catalyst to lock the server. During the event, I disabled the "send broadcast when someone logs in" and the rest of the event went without a hitch, albeit with limited player visibility support.

The Drawing Board
One of the biggest concerns I had was how to address this "signing in" issue. First thing I did was create a macro application that opens the client, auto-creates an account, and then signs in. All I need to do is say how many, and it will open that many clients on the same computer.  Here was the results from my first test:

Attempted: 50
Number of clients opened in 30 seconds: 15
Notes: Workstation went to a crawl after 10 clients opened

Excellent! I finally have this bug reproduced!  Its exactly as he said, after several created an account and signed in, the system went to a crawl!  Now, to find and squish this bug...

Stay tuned for Part 2!

Tuesday, 21 June 2011

Delphi Starter Edition - Pave Your Own Road

Delphi XE Starter Edition is the ideal IDE for those who want to develop native applications, but don't have a ton of cash.. *almost*

Don't get me wrong-- Delphi XE Starter Edition is a fantastic IDE! No limitations on 3rd party components (I have VGScene, UniDac, and RO SDK on mine), the full breadth of the pascal language at your fingertips, but theres just one crucial hole that was left open: class completion and templates.

For those of you who are new to Delphi, this makes the difference between spending dozens of minutes frustratingly re-researching the class structure and syntax, or doing a few keystrokes and Delphi doing it for you.

In Delphi XE Pro, Enterprise and Architect SKUs, all you need to do is begin typing your class (or Ctrl-J, and select "class") and Delphi almost paves the road for you.  In Starter, it seems as if the tools are there, but turned off; sitting at the side of the road as you shovel the concrete from the truck onto the gravel. Not a fun experience let me tell you.

Since Starter is a new release, no such tool to fill the void Class Completion filled exists. Hopefully that will be addressed. Other than this issue, Delphi XE Starter can suit most of every developer's needs in Delphi!

Friday, 10 June 2011

New blog!

Stick around for a great technology discussion, code snippets, and to chill!

Hopefully this time my host won't go out of business.