<<

CrossPlatform ASP.NET with

Daniel López Ridruejo [email protected] About me

ò Open source: Original author of mod_mono, Comanche, several Howtos and the Teach Yourself Apache 2 book ò Company: founder of BitRock, multiplatform installers and management About this presentation

ò The .NET framework ò An overview of Mono, a multiplatform implementation of the .NET framework ò mod_mono : run ASP.NET on Linux using Apache and Mono The .Net initiative

ò Many things to many people, we are interested in a subset: the .NET framework ò environment ò Comprehensive set of class libraries ò As other technologies, greatly hyped. But is a solid technical foundation that stands on its own merits The .NET Framework .NET Highlights (1)

ò Common Language Runtime : Provides garbage collection, resource management, threads, JIT support and so on. Somewhat similar to JVM ò Common Intermediate Language, multiple language support: #, , , C++, JavaScript, , Python, Eiffel, Fortran, Scheme, Pascal Cobol… They can interoperate and have access to full .NET capabilities. Similar to Java .NET Highlights (2)

ò Comprehensive Class : XML, ASP.NET, , Web Services, ADO.NET ò Microsoft wants .NET to succeed in other platforms: standardization effort at ECMA, Rotor sample implementation. ò P/Invoke: Easy to incorporate and interoperate with existing code ò Attributes, delegates, XML everywhere Mono Project

ò Open Source .NET framework implementation. Covers ECMA standard plus additional technologies: Windows Forms, ASP.NET, ADO.NET ò Started by , looking for better development tools for Linux desktop ò Incredible progress in short amount of time, hundreds of contributors What does Mono provide?

ò C# ò Runtime ò Class libraries ò Tools: debugger, documentation browser

Supports Linux, FreeBSD, Windows, Mac OS X, IBM mainframes and many more on the works Related Projects

ò GUI development: ò System.Windows.Forms (/GTK) ò Gtk# ò # ò SharpWT ò JScript, Visual Basic bundled with Mono, other third party, IKVM project ò MonoDevelop IDE Why Mono for Linux development?

ò Ease desktop development ò Reuse of existing code libraries, extend applications. ò Ease Windows migration. Develop on Visual Studio, deploy on Linux. ò Multiple language support and seamless interoperability ASP.NET

ò Server side development with .NET languages, mainly C# and Visual Basic. ò Component based development ò xcopy deployment ò Data binding ò Two approaches: ò Traditional: code intermixed with HTML ò Code behind Why ASP.NET?

ò Unified approach to server side development ò Languages ò Tools ò Libraries ò Simplified development and deployment ò Event model ò Configuration ò Shadow copying Http Pipeline

ò Similar to Apache hook / filter system ò Create a handler or a module and register interest in events during the life of the request (BeginRequest, AuthenticateRequest, ResolveRequestCache, and so on) ò Important classes: HttpApplication, HttpWorkerRequest, HttpRequest Caching

ò Output Caching: caching full page, fragments ò Possible and easy to implement custom caching modules ò Data caching engine available to developers State management

ò Application ò Session : HttpSession ò In memory ò State server ò Database ò Cookie ò View Demo Time! mod_mono

ò Allows running ASP.NET on Linux using Apache and Mono ò Apache handles the HTTP protocol, creates HttpWorkerRequest and passes it to the ASP.NET pipeline for processing ò ASP.NET processes the request and produces a result that Apache returns to the client mod_mono features

ò Supports Apache 2 and 1.3 versions ò Portable, should run on any platform that Apache and Mono support, including Windows. Current support Linux, FreeBSD, OSX ò Processing model, tradeoff reliability, session support, scalability, performance ò Multiple processes ò Purely threaded ò Out of process Multiple processes

Child process Apache Child process mod_mono Parent process Mono runtime Child process Threaded Apache

Apache

Worker Worker Worker thread thread

mod_mono

Mono runtime Out of process

Apache Child process Parent process Mono runtime Child process Mono Misconceptions

ò Always playing catch up ò Patent enforcement ò C# / Java ò License issues Advantages of Mono ASP.NET for Enterprise environments

ò Reuse current Windows expertise, code ò Component based development ò Develop on Windows, deploy on Linux/ ò Windows have better development tools ò Linux regarded as more secure, scalable, reliable ò Avoid license fees ò Interoperate with other open source technologies ò Reduce costs and prevent vendor lock-in, providing a migration path Related Projects

ò mod_haydn ò Apache 1.3 ò Mono ò mod_aspdotnet ò Windows ò .NET The future

ò Mono ò Mono 1.2 ò Support for newer releases .NET ò mod_mono ò ASP.NET 2.0 support ò Windows support ò Additional processing models ò Get involved! Q&A

Thanks for Attending!

More info: http://www.go-mono.com http://www.apacheworld.org/modmono/

You can reach me at: [email protected]