Thomas Beale <[EMAIL PROTECTED]> wrote: > > Tim Churches wrote: > > > > > However, there is lttle hope that a single programme written in > >Eiffel.NET or IronPython (a promising implementation of Python under > .NET) will > >also be able to run unchanged on other Eiffel or Python > implementations - at least > >not without a whole lot of #ifdef's conditional code. But at least > core algorithms > >and business logic could be shared between the Microsoft .NET > managed code > >implementation and the Free World implementation. > > > not sure what you mean here Tim - we have only one code base for the > archetype reference parser - we build it in two different builds, > one > for .Net, one for classic mode. There is a single class which we > added > for the .Net version, with about 20 lines of adapter code (it allows > C# > 'delegates' to be passed through the .Net interface and be called as > if > they were eiffel functions). There is no such thing as #ifdefs in > Eiffel, nor are they needed for this purpose. We literally changed > nothing in the code base to make it work on .Net. We expect to be > able > to hand-build something less spectacular, but nevertheless functional > > for Java - with a few wrapper classes no doubt. But certainly no > ifdefs, > or changes to the core code base.
I was using "#ifdef" figuratively, and I should have made it clear I was talking mostly about the interface layer of applications, whether that be a GUI interface or a Web app interface or a Web service interface. My understanding is that .NET offers a whole raft of proprietary ways of implementing such user/agent interfaces, and Java via J2EE offers a different set of ways of acheiving the same, and then there are envirobments like KDE/Qt, Gnome/GTK, wxWidgets, Zope etc etc. All of these can share core business logic code written in a single language of choice, but each interface environment will necessarily require separate code - there is little prospect of being able to write unencumbered .NET/Mono code to provide a GUI or Web service interface on all platforms, given Microsoft's patent coverage of the .NET framework. That's all I meant. Of course, this makes it all the more important to engineer applications so that there is a clear separation between business logic and interface/presentation layers, using the Model-Viewer-Controller or related paradigms. Tim C
