Addressing the Developer Challenges
The .NET Platform is designed not only to deliver more robust, feature laden solutions in new and improved ways but it addresses both the challenges that developers have long faced and those that confront end-user's, especially corporate customers. Chapter 2 highlighted some of the more demanding issues of pre-.NET development; this chapter will show how .NET addresses them.
Three of the challenges pressing development are:
Operating System centric development
Restrictions and limitations of development language
OS-centric and language-centric limitations of development tools
Perhaps you have heard reports that .NET is not tied to Windowsthat it can run on different OSes. The fact is that at the time of printing, .NET is expected to be available only in the following Windows flavors: 95, 98, Me, NT, and 2000. However, the .NET framework is indeed platform agnostic by design. A good portion of the .NET framework libraryan OS-independent subsetwas submitted to ECMA on October 31, 2000 by Intel, Microsoft, and Hewlett-Packard for standardization. It is therefore possible that you will see one or more non-Windows versions in the near future.
Actually, the submission included both the C# Programming Language (ECMA TC39/TG2) and the Common Language Infrastructure (ECMA TC39/TG3). If you are interested in the official submission visit, the ECMA Web site at http://www.ecma.ch or Microsoft's ECMA page at http://msdn.microsoft.com/net/ecma.
The few OS-dependent parts of the .NET architecture might need rewiring to make them run on some OSes but because these parts are isolated, the work required to move .NET to other platforms should prove minimal compared to the gain. Given Microsoft's staunch position that Windows is central to the future of computing coupled with the fact that Windows generates billions a year for Microsoft, it is astounding that they took such great pains to design .NET with platform-neutrality in mind.
Third party companies are trying to port .NET to other platforms without Microsoft help. One such effort is driven by Southern Storm Software, Pty Ltd (http://www.southern-storm.com.au) with their Open.NET initiative.
In October 2000, Microsoft had not committed to making a version of .NET available on any other platform than Windows, although it had taken pains to make the platform portable. In a press release, however, Corel Software announced:
"Microsoft has purchased 24 million non-voting convertible preferred shares at a purchase price of $5.625 (U.S.) per share or a total purchase price of $135 million (U.S.). The companies will also work together to support the development, testing, and marketing of new products related to the .NET platform. Joint-marketing initiatives will include participation in product launches and trade-show events and representation on mutual Web sites. In addition, both companies have agreed to settle certain legal issues between Corel and Microsoft."
Corel Corporation Press Release October 2000
In view of the fact that Corel competes with Microsoft not only in the productivity suite market but also in the operating system market, it was hard to fathom why Microsoft would invest in such a competitor if not for the reason of migrating .NET to other competing platforms (especially Linux) without doing the work directly.
Since then, Microsoft has announced that Corel Software will indeed work towards bringing .NET to at least one non-Windows operating systemnamely FreeBSD Unix.
Microsoft certainly picked a strong partner when you consider the vast amount of Unix/Linux know-how Corel Corporation possesses. They not only have a Linux operating system offering but also have created Linux versions of their flagship products: CorelDraw and Corel WordPerfect. Couple this with the fact that in the late 1990s Corel created a Java version of WordPerfect that, although short lived, certainly gave the development team proficiency with creating large platform-agnostic, Internet-based applications. Certainly the Web and Web services aspects of .NET make delivering to any device possible but coupled with the possibility of running non-Web based applications on Linux makes "any device" take on even more meaning.
For a great read on the birth of .NET and how it was a non-Windows initiative, read the October 30, 2000 cover story, "Microsoft's Big Bet," from Business Week.
As you learned in Chapter 2, development tools are more often than not bound to a specific OS, supported a limited number of programming languages (usually one) and come with a framework that is specific to the supported language and operating system.
Although languages themselves are not platform specific, they require tools (such as a compiler or interpreter) to transform them into an executable application and, unfortunately, more often than not these tools target one or a few specific operating systems. For instance, Microsoft Visual C++ compiles (transforms) programs written in the C or C++ language into running applications, but only for Microsoft Windows. It is not capable of targeting IBM AIX, MacOS, or any of the Linux flavors. The same follows for the class libraries (a.k.a. frameworks) that either come prepackaged with these tools or are available as add ons.
Sometimes you cannot even use class libraries across platforms. For example, frameworks targeted at a specific flavor of Unix, such as AIX, cannot run on another version of Unix, such as SCO or Solaris. The same can also hold for the different versions of Linux: RedHat, Corel, SuSe, and the like.
.NET shines in that the platform's framework, while written in C#, is designed with cross-platform and cross-language support in mind. As you will learn in Chapter 6, "Common Language Runtime," .NET defines rules that when adhered too make it possible for the platform to run programs not only written in one of many different languages but programs whose parts are written in different languages.
In the .NET world, however, the programming language is not specialized for a tool or operating system. Developers will be able to use one or more languages of their choosing, without having to interpret multiple dialects of the same languages. This means the developer can capitalize on existing programming language skills. If your company has invested heavily in Visual Basic, a Windows only language, it now becomes possible with .NET to create a solution that will run on a variety of devices. Perhaps you might even see Visual Basic applications running on Palm OS PDAs in the future!
In addition to the multi-language ability of the platform, you have cross-language compatibility. This does not just mean that developers can use their languages of choice but also that programs written in one language can call programs written in a different one.
Consider, for example, a project with 10 developers. Unfortunately, in this more than real scenario, the company does not have 10 available programmers with the same backgroundsome have VB, a few C++, and others Java. In a non-.NET world you certainly can divide the team along development language skills, but this requires a lot of planning and effort. Part of this has to do with how objects are constructed, handled, and behave in different languages. Some of it has to do with the different interpretations of types. Part has to do with how methods are invoked and how memory is allocated and deallocated. Lastly, there is the issue of pointers, which exist in C++ but not in Java, for instance. This is where .NET shines! The common runtime and its components, which you'll learn more about soon, handle all these issues between languages seamlessly. Therefore, if the team writes its components in different languages and then ties them together, the pieces will fit as if they were written in the same language.
Now, that is powerful stuff. .NET provides native, seamless integration between data types, as well as use of objects and method calls across module or process boundaries. This is unique on such a broad scale. You cannot only find new ways to deliver current solutions but you can also create new ways to do so.
.NET addresses the delivery challenges that face developers and corporations. Because .NET applications are not dependant on dynamic link libraries (DLLs) that are or may be shared between solutions, it avoids the DLL Hell common to Windows solutions today. .NET solutions are delivered as an "assembly" and do not have external dependencies in the same fragile and conflicting way as DLLs. Because they are nothing more than self-contained packages, this also means that you can install and run multiple versions of the same application without worry of conflict. For the developer this obviously means reduced testing and maintenance to address interactions with other software. For the corporate user this means that there is less of an issue when installing new .NET solutions.
Because the .NET platform makes developing, delivering and consuming Web services possible, which you will learn more about in the coming section, you can produce solutions whose feature list is as extensive as you like without the need to physically deliver all of them. Try to envision applications, such as Microsoft Office, that no longer ship with hundreds of megabytes of seldom-used features or features aimed at a niche market. Consider if these fat solutions came in slimmed down versions containing only a basic set of most commonly used functionality, whereas all the extra functionality is made available on demand, either free or at an additional cost. This concept of offering flexible, customizable solutions by leveraging the Web is a vision for software that Microsoft .NET delivers. This might even go as far as to deliver a CD version only to business customers, and only offering a downloadable subscription version to consumers.
Furthermore, delivering a smaller application with core features that are extended on demand will make electronic delivery more attractive to customers with low bandwidth Internet connections. It also makes it possible for you to more easily create one solution which targets different marketsthe differentiation might be in what services come free at what price point, for example. From the end user side, this is also advantageous in that you can purchase or subscribe to a solution that meets your needs without the bulk and confusion of a "fully functional" solution packed with features you do not require.
Stability is one by-product of the assembly, as you learned. Another way that .NET facilitates more stable applications is the common language runtime. As you will learn more in Chapter 6, the runtime lets you forget about the memory issues such as access violations that often make producing stable software a challenge. The beneficial by-product of this is that it is not only easier to produce a more stable product but you get it in less time saving development costs. From a corporate perspective, increased stability is an obviously welcomed quality.
As with stability, you will learn more about security in the Chapter 6, including the ability for developers to set system requirements within the software, which is a significant benefit. In .NET you can specify at code-level the operating system services your solution needs, such as hard disk access or Internet access. It is also possible to define what rights your solution grants other software that might make requests of it.
On the corporate side, an IT department is also able to set security policies for each assembly, tailoring security to corporate policies. You can, for example, designate that downloaded software from a certain company can access the local disk of a user but cannot do so with network disks or resources. These are just some of the stability and security benefits that managed execution brings to both developers and customers.
As you learned, .NET makes it possible for you to deploy different versions of the same solution. For developers, the versioning of assemblies makes it easier to support solutionsno question can arise as to whether a solution is using the correct version of a component it shipped with. From the end-user perspective, you gain the opportunity to test a new version while continuing to run your existing, tried-and-true solution.
On the other hand, by using Web services you can produce software updates that require no user intervention. The choice of manual or automatic maintenance is something that might depend on development organization and/or the corporate customer. .NET does not require automatic updates but simply facilitates them.