Simon Bisson takes a look at the first public appearance of Microsoft’s next-generation development environment.
Microsoft’s recent Professional Developers Conference introduced the key components of the next generation of Windows, in the shape of the .NET framework. As part of the conference attendees pack Microsoft included the first public preview of the next generation of their Visual Studio IDE. When it is finally released sometime in 2001 Visual Studio.NET will be most developers’ introduction to the biggest shift in Microsoft’s architectural framework since the move from DOS to Windows.
Before we take a look at Visual Studio.NET, it’s important to understand the central architectural features of the .NET environment. Instead of applications compiling directly to processor dependent binaries Visual Studio.NET improves on the Common Executable Format developed to deal with the many processors used in Windows CE devices, by compiling to an Intermediate Language (IL). The final compilation is carried out using a JIT compiler at run-time, with two possible compilation modes, a slow compilation that produces optimised code and a fast “dirty” compiler.
The JIT used in the .NET framework is based on the Common Language Runtime. The CLR is the foundation of the whole .NET framework. It allows multiple languages to work together in the same object framework, so that a Visual Basic program can call a C# component that itself works with objects written in Eiffel or COBOL. The CLR provides a strongly typed environment that developers can build languages on, and a common object model that means that all components inherit from the same base classes, so it is even possible for objects written in one language to inherit from objects developed in another. With multi-skilled development teams working on large component-driven application architectures these technologies will give project managers the ability to use their developers most effectively, hopefully reducing the enterprise application development cycle.
At first sight there’s little difference between Visual Studio 6 and Visual Studio.NET – in fact it was going to be called Visual Studio 7 until Microsoft finally decided to name their proposed Next Generation Windows Services (NGWS) environment .NET. In fact looking through the documentation on the Preview CD-ROMs, there are still plenty of references to NGWS and Visual Studio 7. In fact there’s actually one really big difference between Visual Studio 6 and .NET – there’s now only one IDE. Instead of different components having very similar but separate development environments, Visual Studio.NET has a single environment ready for any Microsoft, and third party, development tools to use.
The Visual Studio.NET IDE is well designed, and gives you an open framework that can be configured to fit in with the way you work. Key areas are a tabbed development area that allows you to switch between components and forms quickly and easily, no matter which language they are written in. C#, C++ and Visual Basic components can all exist in the same application. If you’ve got a small screen, Visual Studio.NET has components that can be hidden and opened as required, including the new Server Explorer and the familiar Visual Studio Toolbox.
The Technology Preview comes with FoxPro as well as the three core Visual Studio languages: Visual Basic, Visual C++ and C#. If you’ve been using earlier versions of Visual Studio you’ll find substantial changes in Visual Basic and Visual C++, all resulting from the move to the .NET framework. These include the introduction of “managed C++” in addition to the familiar version. Managed C++ is designed to deliver code to the .NET Common Language Runtime, and so shouldn’t be used where direct compilation to native binaries are required. You can still use Visual C++ to create native code for drivers and the like, but developers wanting to create distributed applications in C++ may prefer to work with managed code – which will reduce some development time, by operating in a specific object framework.
Visual Basic.NET will surprise Visual Basic developers. Not only does it take advantage of the Common Language Runtime to allow you to create components that inherit from objects written I other .NET languages, it also introduces a new exception handling model. Similar to that used by Java, Visual Basic.NET now adds try/catch exception handling to help you deal with errors. This is essential in distributed application development, where network problems may affect application operations. It’s also important when working with SOAP-based web services, as these are likely to be operated by third parties, leaving you with no control over critical components of your applications.
Probably the most publicised feature of Visual Studio.NET is a whole new language, C# (pronounced C Sharp). This is a member of the C and C++ family of languages, and is designed for component development in a managed environment. Unlike C or C++, C# is a strongly typed garbage-collecting language, and can be compared closely to Java. It’s possible to see C# as Microsoft’s response to the Sun Java lawsuit, but there are many architectural differences between the two languages. However, it is best seen in light of the overall distributed computing model at the heart of .NET, as a tool designed from the ground-up to create web-accessible services and components. The Visual Studio.NET implementation of C# has several interesting features, including the ability to turn inline comments into an XML formatted document, speeding up documentation. It’s also possible to include a simple command in the description of a method to allow it to be automatically exposed as a SOAP interface, ready for use in a web service. C# is designed to treat everything as an object, and so everything you implement will need to inherit from the base object class. Events are very important in a distributed application, and C# is able to handle events via a publish and subscribe method, setting delegates to ensure that events are consumed.
These three aren’t the only languages that can be supported by Visual Studio.NET. Microsoft has opened up the Visual Studio IDE to third party language developers and several have already been announced. These include Fujitsu’s COBOL and ActiveState’s implementations of Perl and Python. Other languages that will be supported when Visual Studio.NET is launched include Eiffel and Camel. Microsoft won’t be offering a Java initially – though Rational are expected to offer their version to Visual Studio.NET users.
Visual InterDev developers may wonder where InterDev has gone. There’s no need to worry here, as what’s happened here is that Visual InterDev is now Visual Studio itself. All applications can now be web applications, and all installed languages can be used to create Web Forms using the new ASP+ technologies. Microsoft has updated the Active Server Pages used to create Windows web application considerably, separating the design of pages from the associated business logic using what are now called Web Forms. Similar to Visual Basic 6.0’s web classes, Web Forms associate code with HTML content, keeping layout in the Form, and the required code in an associated component. ASP+ also allows you to use compiled code in your pages, rather than VBScript or Jscript. This makes ASP+ much more flexible, and easier for developers unfamiliar with web design techniques.
If you’re working with WAP phones or PDAs you’ll want to take advantage of another ASP+ feature, Mobile Forms. Mobile Forms are very similar to Web Forms, though here they don’t target PC-based web browsers. Instead, they include support for server-based browser detection, and automatically generate the correct display for the devices accessing your applications. This is a very useful feature, but does rely on Microsoft having developed detailed device capability information in order to manage content negotiation effectively.
Visual Studio.NET is a tool for the creation of distributed applications. Where earlier versions were focussed on client-server development, this version is able to develop and debug across the classic three-tier application model, where components are distributed between databases, application servers and web servers. You’ll find that it now includes tools that allow you to develop middle tier business logic, as well as giving you a single place to manage the resources used in your applications.
Microsoft has made a large commitment to working with XML, especially with its work on the open SOAP standard. The Simple Object Access Protocol is a simplified form of RPC designed for use over HTTP connections, with information transferred in the form of XML documents. Whilst this allows methods to be called and results delivered over a common protocol, the first generation of SOAP is dependent on explicitly advertised services and on a reliable network – as it lacks a discovery mechanism, and is not designed to handle failed connections. SOAP is a key to the Visual Studio distributed application model, especially when used to create what Microsoft calls “Web Services”, applications that interact only through SOAP interfaces and that offer services and information to third parties.
Microsoft has provided Visual Studio.NET with the ability to create XML descriptions of the available SOAP connections on any web service, with the SOAP Contract Language (SCL). A developer importing an SCL description of a Web Service into Visual Studio will find that the auto-completion features are aware of the web services being used in an application, but will have to develop error-handling facilities of his own to cope with network problems or failures of the remote service. Before using SOAP connections to third party services, including Microsoft’s planned .NET building blocks like Passport, organisations will need to treat its relationships with web service providers as it would with any ASP – including the negotiation of service level agreements.
One key tool for use in the middle tier is the .NET upgrade of the familiar ADO (Active Data Objects). ADO+ works in a similar manner to ADO, however the datasets used in ADO+ applications are XML documents, and can be shared between components. The ADO+ dataset differs from the ADO recordset, as it allows you to work with a collection of tables without needing to use a SQL JOIN. It will also contain relationship information, helping you with complex data manipulations. ADO+ can also work with richer data than the COM-based ADO, as there’s no limit to what can be included in an XML document. Visual Studio.NET will help you work with ADO+, and you can drag database tables directly into the IDE’s design view to create XML data descriptions.
One of Visual Studio.NET’s key features is its integration with online resources. When you launch the IDE, you’ll find a new Start page that gives you access to online information at the MSDN Online service, as well as links to relevant newsgroups (initially on Microsoft’s beta programme news server). This is intended to allow Microsoft to extend their existing developer community, allowing you to tap into a distributed knowledge base. Working with a dedicated news server should also keep the signal to noise ratio high, unlike using Usenet groups.
Other features in the start page include access to the latest relevant news, and information about training. You can apply filters to the information, based on what you’re developing in. Different profiles are available for Visual Basic, Visual C++ and C#, among others – including one specifically for developers new to Microsoft products and Visual Studio. There’s not much scope for customising the look and feel of the Start page as yet, but the vision of a central dashboard for developer resources is a compelling one. Whether it is as powerful as the Outlook 2000 Digital Dashboards remains to be seen, but we’d certainly hope to see the same technologies in use in the final version – especially if it means that the new web components in Project 2000 can be used to help manage large project teams.
The Technology Preview also includes a sample MSDN Library for Visual Studio.NET. Whilst it’s not complete by any means, there’s plenty of information in here for the developer wanting to get to grips with key .NET technologies like Web Forms or C#. Developers who received the Technical Preview at the PDC can also download sample applications from a closed web site. One of the more amusing (and interesting) samples is an online store – for spies. IbuySpy.com has been developed in both C# and Visual Basic.NET, and demonstrates a database-driven catalogue web site. If you aren’t using Visual Studio.NET, you can still try out IbuySpy, as it’s actually a live web site. One key feature of the system is access to the source code – so you can see how an ASP+ application is put together.
So is Visual Studio.NET worth waiting for? With release not scheduled until the second half of 2001 there’s still quite a wait ahead. We were impressed with the work that’s gone into it so far, and found the technology preview stable – surprising since it is best described as alpha code. There’s a lot for developers to learn, especially if they are to be working with the Common Language Runtime. New techniques and technologies together will make for a steep learning curve, especially when mixed with new languages and major reworkings of old favourites. Visual Studio.NET is a critical component of the next generation of Windows applications, and of the future of Microsoft itself. However, despite the promise of this first public preview, only the release version will show if Microsoft is going to be successful with .NET.
