One benefits of the .NET framework is its open architecture which allows you to build applications that run on Windows and other platforms. Using Delphi Prism, Mono and MonoTouch, developers can leverage their .NET and Delphi programming skills and existing code to build applications for Windows, Linux, Macintosh OSX, iPhone, iPad, and iPod Touch. During this session you will learn how to design and create .NET based cross platform applications
Delphi Prism for iPhone/iPad and Linux with Mono and Monotouch
1. Andreano Lanusse | Developer Relations, Embarcadero
Blog: www.andreanolanusse.com
Building managed-code cross
platform applications with
Delphi Prism
2. Agenda
• Delphi Prism and Cross Platform development
• Mono
• Build/Deploy ASP.NET and Web Service on Linux
• MonoTouch
• Build/Run iPhone application with Delphi Prism
• Q&A
4. Delphi Prism XE
• Support for the latest .NET 4.0 and Silverlight Technologies
• New Language and Compiler Features
• Import or Copy and Paste C# Code as Delphi Prism Code
• Visual Studio 2010 Shell Based IDE Work with all your data sources
• Code Obfuscation
• CodeSite logging system
• Works with MonoTouch product from Novell to build apps for iPhone OS
5. Delphi Prism Cross Platform Development
Windows Linux Apple
Microsoft .NET 4.0 Mono for Linux Mono for OSX
Mono for iPhone/iPad
Windows
8. Mono
• Software platform designed to allow developers to easily create cross
platform applications
• Open Source implementation of Microsoft's .NET Framework
• FREE
• Mono runs on:
– Linux
– Microsoft Windows
– Mac OS X
– BSD
– Sun Solaris
– Nintendo Wii
– Sony PlayStation 3
– Apple iPhone
• It also runs on x86, x86-64, IA64, PowerPC, SPARC (32), ARM, Alpha,
s390, s390x (32 and 64 bits)
9. Mono Architecture
• Code Execute Engine
– Just in time compilation
– Ahead-of-Time compilation
– Full Static compilation
• Garbage Collector
• Class Library
• Common Language Runtime
• Common Language Specification
• Managed and unmanaged code
10. Mono - .NET Support
• Mono current version 2.6.7
• .NET 1.1
– Core Libraries 1.1: mscorlib, System, System.Xml
– ASP.Net 1.1 and ADO.Net 1.1
– Winforms/System.Drawing 1.1
– System.Management - does not map to Linux
– System.EnterpriseServices – deprecated
• .NET 2.0
– C# 2.0 (generics)
– Core Libraries 2.0: mscorlib, System, System.Xml
– ASP.NET 2.0 - except WebParts
– ADO.NET 2.0
– Winforms/System.Drawing 2.0 - does not support right-to-left
• .NET 3.0
– WCF - silverlight 2.0 subset completed
– WPF - no plans to implement
– WF - will implement WF 4 instead on future versions of Mono
11. Mono - .NET Support, cont.
• Mono currently supports everything in .NET 3.5 except WPF and WF,
limited WCF
• .NET 3.5
– C# 3.0
– System.Core
– LINQ
– ASP.NET 3.5
– ASP.NET MVC
– LINQ to SQL - Mostly done, but a few features missing
• The upcoming version of Mono will support:
– C# 4.0
– LINQ 4.0
– ASP.NET 4.0
12. Mono - Database support
• Provides ADO.NET Data Providers for many databases, like:
– PostgreSQL
– SQLite
– InterBase/Firebird
– MySQL
– ODBC
– Oracle
– SQL Server
– Sybase
– DB2
• Object Persistent Libraries and Object Databases
– NHibernate
13. Mono – Desktop and Web
• Web
– Mod_Mono Apache 2.0/2.2 module that provides ASP.NET support
for Apache
• Desktop
– Mono provide toolkit for desktop development
– Toolkit support:
• GTK#
• Windows.Forms
• Qyoto
• Qt4Dotnet
• Cocoa#
• wxNet
14. Demo
• Build and deploy .NET Web Service on Ubuntu
• Build and deploy ASP.NET database application on Ubuntu
16. MonoTouch
• Software development kit for Mac OS X
• Allows developers to use.NET programming languages to create native
applications for Apple iPhone/iPod and Apple iPad Touch devices.
• Based on the Mono framework and compatible with .NET 2.0
• MonoTouch "Apps" are compiled down to machine code targeted
specifically at the Apple iPhone.
17. MonoTouch SDK
• Static compiler that turns .NET executables and libraries into native
applications
• There is no JIT or interpreter shipped with your application, only native
code
• MonoTouch supports:
– garbage collection
– multi-threading
– many features of .NET 3.5, including LINQ, with some exceptions
• Database assemblies part of MonoTouch, like:
– Mono.Data.Sqlite.dll
– Mono.Data.Tds.dll
18. MonoTouch - Support
• MonoTouch current version 3.0.8
• Support for iPhone 4 SDK
• Platform Support
– iOS 4 (iPhone and iPod devices)
– iPhoneOS 3.2 (iPad)
– iPhoneOS 3.0 (iPhone and iPod devices)
19. MonoTouch – Requirements for
Development and Deploy
• DEVELOPMENT
– Mac machine
– Delphi Prism XE license
– MonotTouch SDK is FREE for development and testing against the
iPhone simulator only
• DEPLOYMENT
– Join the Apple Developer Program ($99/year), and must adhere to
Apple’s iPhone developer license terms
– Obtain a MonoTouch deployment license from Novell for distribution
on the Apple App Store
• Professional Edition
• Enterprise Edition
20. MonoTouch – How to start
• Download Novell’s MonoTouch
– http://monotouch.net/DownloadTrial
• Install MonoDevelop IDE – included in Delphi Prism ISO
– Don’t install or update for a different version of MonoDevelop
• Start developing iPhone and iPad applications in Delphi Prism language.
http://mono-project.com/Gui_ToolkitsGTK# is a .NET binding for the Gtk+ toolkitThe Qyoto/Kimono languages bindings allow C# and any other .NET language to be used to write Qt/KDE programsQt4Dotnet This is a port of the QtJambi java bindings to .net using IKVM.CocoaSharp is aimed at .Net/Mono developers that want to allow their users to have a native Mac OS X application experience. CocoaSharp allows developers to call Cocoa APIs in native C# code.wxNet is a .NET binding for the wxWindows cross-platform toolkit.