DOT NET (or Mono) and Web Services
Novell Cool Solutions: Feature
By Richard Smith
Digg This -
Posted: 2 Jun 2004
DOT NET (or more properly .NET) and The Mono Project will be referred to in this article as .NET for simplicity. In areas where they differ it will be noted and the differences explained.
|What .NET offers developers|
.NET encompasses the many standards being widely adopted as portions of a Web Services deployment strategy and is packaged to provide developers with easy to use interfaces to those services. From Microsoft along with the .NET Framework (detailed later) what may interest developers most is the tools offering. Microsoft provides a full-featured development environment in Visual Studio .NET (VS .NET) that makes the development and deployment of .NET applications much easier than in previous versions of their tools. VS .NET provides wizards for many of the tasks required to build Web Services and enterprise-class applications. From auto-creation of interfaces to data sources to the building of stubs based in the WSDL for a web service, VS .NET abstracts many of the more mundane tasks and creates an interface to web services that will enable more developers to consider using the technologies. While the open source Mono Project does not include a tool of VS .NET's capabilities, new tools are being created to provide some of this functionality for Mono running on Linux. Of course developers can use VS.NET to develop and compile applications that target Mono on any platform Mono supports. This feature of Mono enables developers to easily create applications from a single source code base to run on multiple host platforms.
The fundamental foundation of .NET is what Microsoft calls the .NET Framework. The .NET Framework works in much the same way as the Java runtime in a J2EE implementation. This framework contains hundreds of services that simplify an application's access to the underlying operating system. By placing these services within the .NET Framework, Microsoft provides standard interfaces for programs to communicate with the OS. The Mono Project began life as an implementation of this framework that would be portable to multiple platforms. At this time the Mono Project includes framework components for a significant portion on the .NET Framework. We'll look more closely at the Framework later on in this article.
For developers a very important aspect of .NET revolves around the Common Language Runtime (CLR). It is the CLR that enables the use of multiple languages to create .NET applications through its interface with the Common Language Infrastructure (CLI). Microsoft released a subset of the CLI specifications as Shared Source through ECMA International to encourage the development of language interfaces other than those provided by Microsoft. It was through this release that the Mono Project came to be as the brainchild of Miguel de Icaza, one of the founders of Ximian and GNOME.
The languages included as part of VS.NET are Visual Basic, C++, Java and C#, a new language developed for .NET that combines Visual Basic, C and Java. C# draws on the strengths of each of these languages and opens up .NET to developers with a wide variety of backgrounds. It is expected that many other programming languages will provide .NET development interfaces. Currently a large amount of the CLR is COM objects encapsulated with the Runtime. Microsoft plans to migrate all of these older COM objects to native .NET objects in the future while maintaining the current interfaces which will enable upgrades in the Runtime without affecting written code.
As you can see, there is a lot about .NET that should be exciting to developers and we'll detail even more as we go along.
|Building a framework|
With the .NET Framework in place the deployment of solutions on .NET is significantly simplified. In response to the many concerns regarding application security, Microsoft has designed the .NET Framework to determine how much access an application has to the system dependant upon how the code is written and deployed. Code written for and deployed in the .NET environment may be ?managed? by the .NET Framework, thus insuring that the code should not be able to perform any malicious actions. Code may be written and used from ?un-managed? sources but that code's access is also controlled by the Framework.
Forming an interface
Running .NET on updated Windows installations and leveraging existing development strengths, Microsoft enables development of Web Services with a shorter learning curve than that of J2EE. Also the Windows User Interfaces are well recognized and Microsoft provides developers with many tools to shorten development cycles when building Windows-based solutions. These strengths in the area of client-side development make .NET a very good choice for building applications that require more feature-rich client capability that a web browser provides. This Windows Forms component of .NET draws heavily from Microsoft's Visual Basic to enable the rapid creation of applications that provide an easy-to-use interface with languages other than VB.
In addition to Windows Forms a new aspect of .NET is Web Forms. Web Forms enable applications that are designed to be viewed through a web browser to have many of the same user interface elements that we find in client-based applications. Web Forms allow a web page to contain many of the same types of interface items, text boxes, drop down lists and radio buttons, that we use on Windows forms. These controls can also be controlled programmatically using any of the .NET supported languages.
In the area of development interfaces, Microsoft has taken many of their existing technologies and either put new faces on them or re-written them to take advantage of the new Framework. For accessing databases, ADO has become ADO.NET. Long a sore spot with their developers, database access has changed too frequently for most developers to accept. For ADO.NET to really succeed, Microsoft must resist changing it once it is adopted. For web developers, ASP.NET is a big move forward. Development and deployment is simple and robust and Microsoft has addressed many of the limitations of ASP.
Now one thing I haven't mentioned is all of the standards mentioned previously, XML, SOAP, WSDL, etc. The good news is that .NET is built with these standards as the fundamentals of how .NET creates, uses and passes data. Basing communications on these web services standards is what enables .NET to participate in a heterogeneous environment and interact with web services built on other standards or platforms.
How does Mono stack up?
Mono overcomes the single biggest drawback to using .NET from Microsoft for many developers, the requirement to run on the Windows platform. By bringing the shared source release of the .NET Framework to multiple platforms and then building an open source project around extending it, The Mono Project has made the strengths of .NET available to a wide range of developers. The ability to develop using a variety of languages, all using a common interface and deployable on a number of platforms is a very compelling development strategy.
As far as the web services aspects of Mono are concerned, nearly all of the Framework is complete meaning a developer can begin developing web services today using Mono. Mono features nearly complete implementations of ASP.NET, ADO.NET and Web Forms, along with almost all of the SYSTEM namespace. For more a detailed look at Mono, check out these articles on Cool Solutions for Developers:
In a future article we will illustrate the creation of a web service using .NET/Mono and also how to interact with J2EE-based services.
Where to go for more!
The Mono Project http://www.go-mono.com/
Novell Forge has a number of Mono-based projects (Search finds 324 with Mono as a key word)
Profile Viewer http://forge.novell.com/modules/xfmod/project/?monoprof
Microsoft's .NET Framework, tools and technologies http://msdn.microsoft.com
DOTNET Junkies http://www.dotnetjunkies.com/default.aspx
Search SourceForge.net at http://sourceforge.net
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com