Morfik for Delphi Developers
From Morfikwiki.com
For quick tips go to: Tips For Delphi Developers
[edit] Welcome
If you are an experienced Delphi developer and you thought of writing an application or utility which would work in a centralized model, for which a web application would be great, but shied away from writing them due to lack of familiarity with Web development tools, Morfik AppsBuilder is just the right tool for you.
This lack of familiarity is for many the result of rejection of these tools, in general, due to their concepts and usage principles which do not help developers to be productive. Let’s be honest. After working with Delphi for years, text editors with HTML syntax highlighting and some help with the HTML tags are quite disappointing.
Morfik 1.x looked a lot like MS Access and it worked very much like Delphi. Not only that but it allowed me use Object Pascal to program not only the server side of a Web application, but its browser side as well. Morfik R2 tools have a much more sophisticated interface and add a large number of design-related features to its visual editors.
Actually programming a Morfik application is, in many ways, very similar to programming a Delphi application. The Morfik Framework uses many concepts which will be immediately familiar to any Delphi developer, from high-level objects such as Forms to the smaller helper classes such as string lists.
In order to better illustrate the familiarity a Delphi developer will feel when working with Morfik AppsBuilder the source code of a simple form is included bellow. This is the basis of the Morfik version of the famous Hello World project.
Unit Form1;
Interface
Type
Form1 = Class(Form)
Button1 : Button;
TextLabel1 : TextLabel;
Procedure Button1Click(Event: TDOMEvent); Message;
Private
{ Private declarations }
Public
{ Public declarations }
End;
Implementation
Procedure Form1.Button1Click(Event: TDOMEvent);
Begin
TextLabel1.Caption := 'Hello Delphi World';
End;
End.
This application presents a single button in an HTML page and when the button is clicked it changes the caption of a TextLabel control, the equivalent of Delphi’s TLabel, to “Hello Delphi World”. That is all that it takes to create a Web based application which uses Ajax techniques to change its interface at run time.
Though a careful examination of this source code will immediately reveal some differences to the source code of a Delphi Form, it should be obvious that there are many more similarities.
Morfik AppsBuilder compiles a web application into JavaScript for the browser side and into a binary executable (or plug-in module) on the server side. A Delphi developer who wants to create a Web application with Morfik can choose to use his own licensed Delphi as the backend compiler for Morfik. In this case, instead of using Morfik's default backend compiler (FreePascal) we can use the Delphi compiler. Morfik is compatible with Delphi 5.0 up to Delphi 2007 for Win32. No changes to an application’s source code is necessary in order to switch back and forth between backend compilers so the user can freely choose which ever one suits his/her needs at the time. This makes it easy to use - for example, Delphi 2007 to compile an application for Windows and FreePascal to compile the same application for Linux.
AppsBuilder allows Delphi developers to become immediately productive in creating sophisticated Web applications, Web Services and even browser-only applications.
In fact, Morfik AppsBuilder is the easiest, most powerful path a Delphi developer can choose to create Ajax Web applications while retaining all his/her familiarity with language constructs, Framework and environment.
[edit] See also
Copyright 2000-2007. Morfik Technology Pty Ltd. All Rights reserved. Morfik, Morfik AppsBuilder, Morfik Scriptor and their respective logos are trademarks or registered trademarks of Morfik Technology Pty Ltd. All other regsitered or unregistered trademarks referenced herein are the property of their respective owners and no trademark rights to the same are implied. To view a full list of third-party products that are used in conjunction with Morfik AppsBuilder, click here.

