This page shows the source for this entry, with WebCore formatting language tags and attributes highlighted.

Title

Full Eiffel on .NET

Description

<a href="{data}/news/old_attachments/images/pdc_eiffel_fig6.gif" title="Eiffel debugging under Visual Studio.Net"><img src="{data}/news/old_attachments/images/pdc_eiffel_fig6_tn.gif" align="left" class="frame"></a><a href="http://msdn.microsoft.com/">MSDN</a> has published <a href="http://msdn.microsoft.com/library/en-us/dndotnet/html/pdc_eiffel.asp">Full Eiffel on the .NET Framework</a> by Emmanuel Stapf, Raphael Simon and Bertrand Meyer, all of ISE (though Meyer is identified as being at the ETH in Zurich, Switzerland, so perhaps he's teaching there now, which, for someone moving near Zurich, is pretty exciting). <bq>[It d]escribes the implementation and integration of the full power of the Eiffel language and method, including Design by Contract, multiple inheritance, genericity, and other advanced facilities, into the Microsoft .NET Framework, creating an environment that provides a best-of-breed solution for ambitious Internet software developers.</bq> The article starts off with a description of how .NET works and a description of the features found in Eiffel. It covers some history of Eiffel and .Net, in particular the short-lived Eiffel#, which gave way to full-fledged Eiffel under .Net. The developers at ISE are noticeably delighted to be able to <iq>compile a given project alternatively in EiffelStudio or Visual Studio .NET</iq> despite the fact that <iq>[t]he .NET Framework object model provides no native support for multiple inheritance (a class in the .NET Framework model may inherit from at most one other class), for genericity, for covariance, or for agents.</iq> <div style="text-align: center"><img src="{data}/news/old_attachments/images/pdc_eiffel_fig1.gif" title="Multiple Inheritance Hierarchy" alt="Multiple Inheritance Hierarchy" class="frame"></div> In the case of multiple inheritance (see diagram above), <iq>code using these classes in another language can see the inheritance hierarchy and benefit from it, for example, by declaring a variable of type A and assigning to it a value of type D (as Eiffel code can do through polymorphism).</iq> The news in the story basically begins under the section <iq>How Eiffel Runs Under the .NET Framework</iq>. As of version 5.1 of EiffelStudio, the .NET support in Eiffel allows users to use the full power of Eiffel, not a cut-down version; version 5.2 (as yet unreleased, but coming soon) allows compiling the same project in EiffelStudio or in Visual Studio.NET. Also, <iq>Eiffel is a .NET Framework extender, meaning that you can write Eiffel classes that inherit from classes written in other languages, extend them and then recompile them to IL, giving other environments the possibility of reusing the new type.</iq> This integration is complete, with Eiffel fully capable of handling objects from other languages (through an automatically-generated wrapper) and <iq>Eiffel for .NET is compatible with the debugging and exception mechanisms of the .NET Framework. A run-time error triggered and not processed in a non-Eiffel module will be handled by its Eiffel caller, and conversely.</iq> Finally, Eiffel can also be <iq>embedd[ed] ... into ASP.NET pages through the @language="Eiffel" directive</iq>. The .NET integration for Eiffel programmers is acheived through <iq>simply ... checking the appropriate option in the Project Settings</iq> and they <iq>...will be able to work the exact same way they did before the integration, while having access to all the mechanisms of the .NET Framework.</iq> This is really great because you can still build desktop applications and deploy it through .NET as well; This can be the same project or using a shared code base (which is more likely, but even more important). With code-interoperability like this, developers have access to <iq>EiffelBase (for fundamental data structures and algorithms) and EiffelVision 2 (for portable graphics) are the result of a decade and a half of continuous work</iq> and all of the ASP.NET, ADO.NET and .NET base libraries, all in one program library. They even show an example mixing a DataGrid control from the ADO.NET library inside an EiffelVision 2 window; even the GUI libraries are compatible! Eiffel handles this integration using the <span class="reference">Assembly Manager</span>. You use this tool to import .NET <span class="reference">assemblies</span>, written in any language, into a form that <iq>includ[es] enough information to let Eiffel classes access the assembly's classes as if they were Eiffel classes, whether from EiffelStudio (the Eiffel-specific environment) or from Visual Studio .NET</iq> The document goes on to discuss some of the implementation details of multiple inheritance, the assembly manager (which has to disambiguate overloaded functions, since Eiffel doesn't support them) and external functions, which can now be imported from IL code as well. If you're serious about .NET development, you should read this document and find out more about Eiffel. They have a full-working demo to download from their web site, <a href="http://www.eiffel.com/">Eiffel.com</a>. So far, they only have the EiffelStudio 5.1 version available for download, so you'll have to wait a little longer for Visual Studio integration, but the rewards, particularly Design By Contract, of using Eiffel for development should be worth it.