Title: Advanced Mono Development: Best Practices
1Advanced Mono Development Best Practices
- Miguel de Icaza
- CTO, Ximian
- miguel_at_novell.com
- Nat Friedman
- VP Software Development, Ximian
- nat_at_novell.com
2The one Net vision
3The one Net vision
4Mono Project Two Main Goals.
- Improve Linux Developer Productivity.
- ISV Migration path from Windows to Linux.
- An Open Source implementation of .NET Framework.
5The Two Stacks.
Java Compatibility
ASP.NET
iFolder
Evolution
ADO.NET
GTK
Gnome
Windows.Form
Novell.LDAP
ZipLib
MySQL/Postgress
Apache Mono
Microsoft Compatibility Libraries
Mozilla
6Compatible What Mono Will Run.
- Mono 1.0 will run Microsoft.NET code that uses
- mscorlib, System, System.Net
- System.Xml
- System.Web (ASP.NET Web Forms)
- System.Web.Services (ASP.NET Web Services)
- Remoting, and SOAP Remoting (compatibility
issues) - System.Drawing.
- Binary compatible
- Compile on Windows Deploy on Linux.
7Mono Has its Own Development Platform
- We have created our own development platform.
- Takes advantage of Open Source technologies.
- Takes advantage of Novell services.
- Novell.LDAP Works on Mono and Windows.
- Binaries produced by mono run on Windows
unmodified. - The community is creating an ecosystem
- And we get to reuse third-party components from
the Windows world for Desktop and Web
Applications.
8Mono SDK
- C compiler
- Supports V1 and some V2 features of the C
language. - Performs the task of compiler and linker.
- IL tools
- ilasm Intermediate Language assembler.
- monodis Library and executable disassembler.
- Debugger
- mdb low-level debugger
- Web Services
- wsdl generate stubs from a WSDL or Disco
document.
9MonoDoc
- The Mono Documentation Browser.
- Documentation for .NET Class Libraries
- Mono and Novell Specific class libraries.
- Wiki-like support
- People can edit, modify the documentation
- Upload contributions to centralized server.
- Sample
10MonoDevelop Integrated IDE
- MonoDevelop
- A port of the venerable SharpDevelop from
Windows. - Modified to use the Linux Desktop.
- Take advantage of Linux-specific features.
- Advanced editing features.
- Integrated Debugging Environment
- Uses the Mono Debugger Core Engine.
11Assemblies.
- Assemblies
- The deployment Unit.
- They end in .exe or .dll
- They contain IL code and any resources needed.
- There is no difference to the runtime
mcs hello.cs -rlibrary.dll mcs hello.cs
-rprogram.exe
mcs library.cs -targetlibrary mcs
program.cs -targetexe
12Sample Session.
- Compiling Software
- Running your software
- Behind the curtains
mcs program.cs
mono program.cs
monodis program.cs
13Disassembled code.
static int Add (int a, int b) return a b
// method line 2 .method private static
default int32 'Add' (int32 'a', int32 'b')
cil managed
.param 1 .param 2
// Method begins at RVA 0x20f4 // Code size
4 (0x4) .maxstack 8 IL_0000 ldarg.0
IL_0001 ldarg.1 IL_0002 add IL_0003
ret // end of method Xdefault int32
'Add' (int32 'a', int32 'b')
14Instrumentation.
- The Mono Runtime can instrument your program
- You can create your own profiling modules.
mono --profile program.exe
mono --profilecoverage program.exe
So far Internal call cost. Code Coverage
Analysis. Mono can call you at invoke/return time
15Developing a Sample Client Server
- We will develop a client and a server.
- Nat will be doing the client side.
- Using Gtk to write the GUI and Glade for rapid
prototyping. - Miguel will be doing the server side.
- Plain server-side development.
- We will use a web service.
16Demonstration
17Interop with Java
- Converting Java classes to .NET assemblies
- The ikvmc command
- Exporting .NET classes to be used by Java
- Using netexp.exe
- Running your Java applications
- Today Mono use GNU Classpath
- Limited in functionality to GNU Classpath
features - Eclipse, Jython run.
18Information.
- Mono
- http//www.go-mono.com
- Email
- miguel_at_ximian.com
- Blog
- primates.ximian.com/miguel/activity-log.php
19Questions Answers
20(No Transcript)
21(No Transcript)