************************************* * * * DB/C Newsletter * * November 2002 * * * ************************************* News and Comments Thank you to all who responded to last month's questionnaire. I've read each response at least a couple of times. There is a lot of useful information in them. Many of the features requested in your responses will be added to DB/C DX and DB/C FS in 2003. A reminder - the lower price for upgrading from DB/C 9 to DB/C DX expires at the end of next month. So if you still have a DB/C 9 license that you may want (or need) to upgrade in the future, now is the time to purchase the upgrade to take advantage of the lower price. In writing this newsletter each month, many of my opinions are exposed. Sometimes this is good; other times it is not. This month's article is one of those that shows my negative opinion of Microsoft. That's why I've put my byline on the article - to clearly take credit for the opinions espoused in the article. If you believe that Microsoft is an innovator in the computer industry and that its software should be embraced because of its excellence, this article might not be to your liking. This month's article is about .NET, the all-encompassing moniker for all future Windows client, server and related software. When I asked the question in last month's newsletter about whether or not DB/C DX should integrate better with the .NET framework, I didn't know exactly what I was asking or the answers I would receive. Most responses professed ignorance as to what the .NET framework was. Though it can only be superficial in this short of a space, I'll try to provide a summary of what .NET is and how it may affect your existing DB/C software. Your feedback, either directly to me or on dbctalk, is always welcome. don.wills@dbcsoftware.com ****************************************************************************** Elegance is Everything by Don Wills Microsoft has introduced many technologies under a variety of names during its twenty-five year history. Some of these technologies were substantial, while others (like its 1997 DNA introduction) were just marketing fluff. .NET is a quite substantial technology - arguably the most substantial that Microsoft has introduced since the introduction of Windows NT in 1993. In a nutshell, .NET is Java with many appendages. The core of .NET is its engine - the Common Language Runtime (CLR). The CLR is an exact analogue of the Java Virtual Machine (JVM). The CLR executes class files that are created by compilers. The .NET Framework Class Library (FCL) is the class library that contains the base functionality above the level of the CLR. The FCL provides the same capabilities that the Java Class Libraries provide. The CLR and FCL are the two requisite parts used by the rest of what constitutes .NET. The other aspects of .NET are all optional in one way or another. .NET Studio is Microsoft's development environment for compiling source programs into executable class files. Although other companies may provide development tools for compiling programs for execution by the .NET CLR, the complexity of .NET and Microsoft's market control mean that most development for .NET is done and will continue to be done with .NET Studio. With .NET, Microsoft has tried to alleviate many of the shortcomings of Windows. One of the biggest problems that .NET tries to fix is what is commonly called DLL hell. DLL hell is what users get into because of the shared library 'feature' of Windows where applications built with various APIs and toolkits use different versions of the same DLLs. DLL hell results in all sorts of havoc for completely unrelated software whenever a DLL version mismatch occurs. Another major headache that .NET addresses is the replacement of COM with a more comprehensive and less arcane object model. A third major problem that .NET addresses is to reduce the number and scope of security flaws that exist in a typical Windows installation. Other objectives that Microsoft set for .NET include: . making all Microsoft languages interoperate better . reducing the number of APIs used to accomplish the same function . making the future transition to non-x86 architectures easier . provide for easier implementation of initiatives like web services All in all, these are noble objectives for .NET. Unfortunately, Microsoft has bit off more than it can chew. I first heard it many years ago and I don't know its source, but I've always regarded the principle embodied by the phrase Elegance is Everything to be one of the basic principles of software design. That principle is so important to me that I had the phrase inscribed on a plaque that has hung in my office for many years. In the context of software, 'elegance' means these qualities: . simplicity . completeness (no need for other stuff) . intuitiveness (what you expect is what actually happens) . durability (amenability to change) . frugality (lack of extraneous parts) .NET lacks all of these qualities, except it is fairly complete. .NET is not simple or frugal is any sense of the words. It is a huge system of many interconnected parts. Instead of building a simple new executable file format (as Sun did with Java .class files), Microsoft has shoe-horned .NET executable classes and groups of classes inside of the tired old .EXE file format that has been around since the early days of MS-DOS. The interaction of modules (classes), assemblies, managed code, unmanaged code, portable bytecodes (IL), architecture- specific executable code, and legacy stuff like DLLs, ActiveX controls, COM and COM+, all of which are EXEs, is mind-boggling. It didn't have to be that way, but Microsoft just couldn't bring itself to make a clean break from the past. C# (pronounced 'C sharp'), the primary language of .NET, is just a bad imitation of Java. Microsoft has taken many of the very clean features of Java and bastardized them. For example, in Java variables are either primitives or references to objects. When a reference needs to be made to a primitive value in Java, you use one of the related wrapper classes and then manipulate a reference to the wrapper object. It's all very clean and simple. C# has primitives and references to objects, but Microsoft has added a feature called 'boxing' which boxes up a primitive for use by other code. It's hard to describe, but the impact of this feature adds complexity and the programmer must understand and deal with the concept. The benefits are far out-weighed by the additional complexity. Microsoft has added several other concepts, such as events and delegates, which are also unnecessary overkill. I date myself here, but C# reminds me of PL/1, the language that IBM invented in the late 60's to be the end-all-be-all replacement for COBOL, FORTRAN and other languages. Look at where PL/1 is today. According to Microsoft, one of the major benefits of .NET is that it is not based on a single language - that different programming languages can run on it. That's a lie. VB6 can't run on it. For a programming language to work under .NET, it must be isomorphic with C#. That is, it must be based on the same primitive design elements - it must essentially be the same language, but can have a different syntax. Thus to make Visual Basic work in .NET, Microsoft had to completely re-engineer the language. Ask any VB programmer about the differences between VB6 and VB.NET and he'll probably just walk away shaking his head. VB.NET is essentially a brand new language. Which begs the question - if, as a VB6 programmer, you are going to be learning and using a new language, why not just move to C#? And to make things more complex, Microsoft has recently introduced J# which is essentially C# with a syntax that is more similar to Java than C#. Why did Microsoft do this? Why didn't they just introduce J# as the base language for .NET instead of creating C#? Confused by the choices - C#, J#, C++ managed, C++ unmanaged, VB.NET? You aren't alone! Microsoft has an amazing ability to succeed in spite of its lack of technical leadership. It is hard to say whether or not .NET will be a great success or just another technology that Microsoft builds and later abandons for something better. Regardless of its ultimate fate, .NET is coming. .NET is today where Java was in 1995 - it is in its infancy. The first release of .NET can be downloaded and added to Windows 98 and later operating systems. Windows .NET Server, due out in 2003, will be the first operating system that has .NET pre-installed in it. There will be an impact on the internals of DB/C DX and DB/C FS. For example, the internals of the DB/C DX GUI interface will need to be reengineered to use the .NET FCL to take advantage of new controls and other features. Future releases of DB/C DX will be able to call methods in the .NET FCL. As always, when we design and implement these changes, we will not break existing DB/C programs. If you need to learn the details of .NET, I highly recommend the book 'Applied Microsoft .NET Framework Programming' by Jeffrey Richter, Microsoft Press 2002. ****************************************************************************** DB/C DX Class Schedule Class: DB/C DX Fundamentals Date: January 13-15, 2003 Location: Oak Brook, Illinois For information, send email to admin@dbcsoftware.com. ****************************************************************************** Subscribing to the DB/C Newsletter If you don't already have the DB/C Newsletter delivered to your email address and would like to have it emailed to you monthly, just send an email message to 'dbcnews-subscribe@dbcsoftware.com'. The newsletter will be delivered to the email address from which the message was sent.