MonoTouch and Delphi Prism

by John 8/16/2009 2:56:00 AM

MonoTouch is the Mono edition for Apple's iPhone and Touch devices. I've only had the preview for a couple of days but I'm extremely impressed by what I've seen. I never imagined I would be able to leverage my .Net skills to develop iPhone applications.

The preview provides integration and developer tools for C# with the MonoDevelop IDE on OSX but I wanted to try with Delphi Prism.

The screenshot below shows Visual Studio running inside a Parallels session, the iPhone emulator and a terminal window.



I started off with a Mono console application and converted an existing sample application from C# to Delphi Prism.

Once compiled, I switched to a terminal window on OSX and ran MonoTouch tools against the compiled to exe to produce the application package. The final step was to launch the application inside the emulator. 


Currently rated 4.0 by 3 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


MonoTouch | iPhone | Delphi Prism

Delphi Prism WPF Model View ViewModel Template

by John 7/3/2009 1:16:00 AM


I'm currently exploring WPF Futures. In particular I wanted to investigate the Model-View-ViewModel pattern, an example of which is provided as a project template from the download page.

Apparently this is the preferred pattern when developing WPF/Silverlight applications. It's worth googling "model view view model" to find interesting links regarding this.

Since its C# and I wanted to explore using Delphi Prism I decided to convert the provided template. I used the C# to Oxygene converter which can be found here. Considering the current download is marked as 0.2, it was a pretty painless job which required minimal code changes to the converted Oxygene code.

I have uploaded the source code to the template here . A Subversion client is required, I'm using TortoiseSVN.

Having downloaded the code you need to create a zip file containing the package. 

Assuming you had installed the templates into C:\develop\DelphiPrismTemplates, the 7Zip commandline from the C:\develop\DelphiPrismTemplates\WpfModelViewApplication\WpfModelViewApplication folder would be

7z.exe" a -r ..\ *

The resulting zip file then needs to be copied to the Oxygene Visual Studio project template directory, this is

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates\Oxygene\Windows (WPF)\1033 

You then need to make Visual Studio aware of the new template, from the folder C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE, you can run the commandline devenv.exe /setup

Assuming everything worked ok, when you do a File New Project in Visual Studio you should have a WPF Model View Application project in the WPF section. This is shown in the screenshot below.



I used the template to follow a tutorial which can be found in the in the download from codeplex which can be found here. There a couple of documents included and they are informative.
The complete tutorial application can be found at CodeCentral at this location;
A screenshot of the running application is shown below
A word of warning, if you start an application using the template and run it unchanged, it doesn't display anything. Its worth looking at the supplied example, in particular app.xaml.pas to see what is being performed at startup. 

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Delphi Prism | WPF

Powered by BlogEngine.NET
Theme by Mads Kristensen

About the author

Name of author John Moshakis
I'm a software developer living in Toronto..

E-mail me Send mail


<<  June 2022  >>

View posts in large calendar


    Recent posts

    Recent comments



    Don't show


      The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

      © Copyright 2022

      Sign in