NET Is Coming Programming the .NET Runtime
Total Page:16
File Type:pdf, Size:1020Kb
SOFTWARE TECHNOLOGIES the focus of the technology—it’s simply the means to an end, the basic notation for .NET Is Coming programming the .NET runtime. Technically, C# looks very much like Java, with extensions similar to mecha- Bertrand Meyer, Interactive Software Engineering nisms found in Delphi and Microsoft’s Visual J++. These extensions include “properties”—an attempt to remedy This month’s contribution to Software Technologies discusses the emergence of Java’s information-hiding deficiencies— Microsoft’s .NET platform for Web services. While it is significantly longer than the and an event-driven programming model standard for the department, I argued that the additional length is warranted because using the notion of “delegates”—object this technology promises to have significant, wide-ranging effects on software devel- wrappers around functions—that are opment, and the editorial staff concurred. We all hope that readers will be as inter- appropriate for graphical user interface ested in this development as we are. and Web applications. Michael Lutz, Area Editor While it is likely to become a serious competitor to Java, C# is not an attempt nnounced in July 2000, .NET, connected bike at the gym, you can effort- to replace all existing languages. In fact, Microsoft’s platform for lessly change both your evening’s restau- Microsoft’s own investment in Visual XML-based Web services, is rant reservation and babysitter while Basic (recent estimate: 6 million devel- A currently undergoing a succes- pedaling away without missing a beat. If opers) and C++ would make such a goal sion of beta versions for a pro- the aim is to set lofty ideals for the next self-defeating. jected release late this year or early in 2002. .NET has a central role in Micro- soft’s strategy to integrate the Internet, .NET, an open language enterprise and Web services, building block services, numerous tools for developers, and Web development platform, has the many other features. Curiously though, this next generation potential to dominate the computing of software hasn’t grabbed the comput- industry for years to come. ing world’s attention as Java did in its heyday. Yet, in many respects, .NET is a more important phenomenon. The busi- ness press, for its part, hasn’t missed the generation, this example is admittedly Instead, a distinctive characteristic of technology’s significance. Both Business underwhelming, but since when are tech- .NET is its language neutrality. In addition Week (cover story, 30 Oct. 2000) and nical journalists supposed to judge new to Microsoft-supported languages, .NET The Economist (January 2001) have technologies by press releases? is open to many others including Cobol, devoted major coverage to .NET. Others have been more perspicacious. Eiffel, Fortran, Perl, Python, Smalltalk, For example, the Patricia Seybold Group and a host of research languages from ML A FAILURE OR THE FUTURE? wrote that “.NET is a leading example to Haskell and Oberon. Unlike others in Perhaps it is .NET’s breadth of cover- of what we believe will be the dominant the industry, Microsoft isn’t trying to con- age that has puzzled some technical architectural model for the third genera- vert the world to a new language. observers and made them wonder tion of Internet applications” and that it whether there was anything beyond the has “ominous implications for a large .NET ARCHITECTURE hype. One observer who doesn’t think so number of Microsoft competitors.” So what is .NET? A general definition is John Dvorak, who in his November might be: “An open language platform 2000 PC Magazine column wrote that WHAT .NET ISN’T for enterprise and Web development.” .NET is “surrounded by too many buzz- In describing .NET, it’s useful first to The aim is to provide an abstract words and generalities to be under- point out what it is not. It’s neither an machine for professional developers, cov- standable. I’m not sure the company operating system nor a programming lan- ering both traditional IT—client-server, knows what .NET is, or whether any- guage. Microsoft operating systems con- n-tier—and Web-oriented applications. body does. It has the onerous smell of tinue their own evolution—Windows Figure 1 shows the six layers of the plat- failure about it already.” 2000, Me, XP, CE for embedded devices— form’s overall structure. The basis for this indictment seems to although you can expect more .NET bits Web services. The top layer provides be a Microsoft public relations document to filter down into the base OS. As for pro- .NET users—persons and companies— describing an exciting future in which— gramming languages, .NET has intro- with Web services for e-commerce and thanks to .NET—from your Web- duced a new one, C# (C-sharp), but it’s not business-to-business applications. 92 Computer Frameworks and libraries. A set of frameworks and libraries provides the most immediately attractive aspect for Web services developers. These include ASP.NET, active server pages for developing smart Web Frameworks and libraries: sites and services; ADO.NET, an XML- ASP.NET, ADO.NET, Window Forms based improvement to ActiveX Data Interchange standards: Common development tools: Objects, for databases and object-rela- SOAP, WSDL Visual Studio.Net tional processing; and Windows Forms for graphics. Altogether, .NET contains Component model thousands of reusable components. Object model and common language specification Interchange standards. XML-based interchange standards serve as a plat- Common language runtime form-independent means of exchanging objects. The most important are SOAP (simple object access protocol), an Figure 1. Elements of the .NET architecture. Microsoft’s Web development platform consists of increasingly popular way to encode six layers from the user-visible Web services to the internal object model and common language objects, and WSDL (Web Services runtime. Description Language). Development environment. The new set of mechanisms for executing .NET drag and drop to input validation, Visual Studio.Net provides the tool of programs regardless of their language of Web controls facilitate building Web most direct use to developers: A common origin: translation to machine code (judi- pages that look like a modern non- software development environment offer- ciously incremental translation, or “jit- Web GUI. ing facilities for development, compila- ting”), loading, security mechanisms, • The Web controls, handled by de- tion, browsing, and debugging shared by memory management (including garbage fault on the server side, yield many languages. This environment, an collection), version control, and inter- browser-dependent rendering—out- outgrowth of Visual Studio extended facing with non-.NET code. put that is automatically tailored to with an application programming inter- .NET provides these capabilities over the browser. Some operations can be face, not only supports Microsoft-imple- a broad spectrum of hardware and soft- processed on the client side—for mented languages such as Visual C++, ware platforms, ranging from very high- example, if the Web site visitor is Visual Basic, and C# but also allows end servers and Web farms to PCs, using a recent version of Internet third-party vendors to plug in tools and phones, PDAs, other wireless devices, Explorer or the browser supports compilers for other languages. and Internet appliances. dynamic HTML or JavaScript. In Component model. Before .NET there the default case, the server handles were already three major contenders for .NET BENEFITS the interaction and renders every- leadership in the field of models and stan- Users and developers can expect thing as plain HTML. dards for component-based development: numerous benefits from the spread of • ASP.NET accomplishes one of the Corba from the Object Management .NET. For many, the most impressive most delicate aspects of Web request Group, J2EE from Sun, and Microsoft’s component will be the ASP.NET frame- processing: maintaining a client’s COM. .NET brings in one more model, work. ASP.NET is not an incremental state. HTTP is a stateless protocol, based on object-oriented ideas: With update of the ASP (active server pages) but any realistic Web interface—a .NET you can build “assemblies,” each technology available on Windows. It is a shopping basket, for example—must consisting of a number of classes with new development that provides tools for retain client information from one well-defined interfaces. The model is quite building smart Web sites with extensive page display to the next. ASP.NET different from COM, although it provides associated programming facilities. An maintains session state without stor- a transition path; its major attractions are ASP.NET demo at http://dotnet.eiffel. ing client information on the server, its simplicity and the absence of an IDL com, Interactive Software Engineering’s thereby freeing developers from (Interface Description Language). Web site devoted to Eiffel under .NET, using cumbersome manual tech- Object model. The object model pro- illustrates some of the framework’s most niques such as URL encoding, hid- vides the conceptual basis on which attractive aspects. den fields, and cookies. It can everything else rests, in particular, .NET’s accomplish this both on a single OO type system. The common language • ASP.NET’s Web controls provide a server and across Web farms. specification defines restrictions ensuring user interface similar to what is pos- • Through its connection to ADO. language operability. sible in today’s non-Web GUI envi- NET, which handles database con- Common language runtime. The com- ronments and far beyond what nections, ASP.NET enables setting mon language runtime provides the basic HTML offers as a default. From up part of a Web page to reflect the August 2001 93 Software Technologies contents of a database table directly, of .NET assemblies (program elements), all .NET code is subject to verifica- without manual intervention.