Microsoft Professional Developers Conference Orlando July 2000
Introduction
My thoughts and musings on the Microsoft PDC. This document does not
necessarily represent Microsoft's view in so far as a corporation of disparate
individuals can have a view. It is written soon after the PDC, before I have had
a chance to actually play with the preview code.
The general feeling, to some extent confirmed by talking to some of the MS
developer and attendees, is that the tools group have gone away for a couple of
year and rethought the whole approach to developing component based software.
Depending on when a particular group picked up, and bought into, the new stuff
depends on how integrated their products are with the new framework. Some of
these groups seem only to have become aware of the new stuff a few months before
the conference.
The key to the conference, for me, are the new framework and development tools.
I believe the tools profoundly affect the approach and productivity of the
development cycle and from what I have seen the new stuff looks very good.
The initial general
session were pretty tedious except for a good piece by Anders Hejlsberg (Turbo
Pascal, Delphi) on the framework and C#. The breakout sessions got into the real
meat.
The .net framework
I have always hated COM. The basic idea is pretty good but the hoops you had
to jump through to make it work and the shear amount of code you had to generate
which is nothing but glue always made me avoid using it if at all possible. Well
the good news is that COM is dead - long live .net. Well, no one actual said this
and I am sure COM will be around for ages but the framework gives you a
seriously easier way to develop reusable components and thoroughly embraces the
web (HTTP, XML, SOAP). I think it is fair to say that in the majority of cases
COM can be considered a deprecated technology.
The preferred
method for component development is the new common run time. The common runtime
is the framework of classes, JIT compiler and so forth which is the target for the new suite of compilers and development tools which collectively form Visual
Studio dot net. It is possible to
import existing COM components, as wrapped up second class citizens, into the framework.
It is also possible to expose new components as COM components but it is not
something you would want to do unless you absolutely had to work with
legacy code.
So what does the .net object model fix:
- Objects are first class citizens. A framework object is the actual object.
You can make a call to a method on an object over the net simply by adding
an attribute to the class method.
- Everything about an object (the code, the type library, the registry
settings) are stored in a single file. Installing consists of copy and run,
uninstall consists of deleting the file containing the object - wonderful!
- Language neutral. You can create a class in VB and derive from it in C#.
This comes at some price to the language, in the form of non standard
extensions, but is flexible enough to allow COBOL to be a supported framework
language. C++ is also supported with a few extensions.
- Sweet RPC using XML packets over HTTP protocol. Firewall friendly with
rich data typing of XML and the framework transparently generating all the
data definitions - no more IDL. Drag and drop object use in the form of web services.
Other framework features:
- Attributes available in all first class languages (C#, C++, VB). These
seem to be a very good idea. Essentially they provide a way of associating
additional data in the form of one or more class instances with an existing
item such as class or method. They are used to implement such powerful
features as exposing a method as a web interface.
- Single run time class library used across all languages - all features
available to all first class languages.
- Single debugger used across all language - the stack trace has a language
column :-o
- A concept called reflection which allows the framework to contain a set of
classes which can manipulate the meta data associated with all types in the
framework. This allows cool applications to be written which inspect
the class library and generate automatic documentation about all
classes/methods available and the types they take. Visual Studio uses this
stuff to do its auto completion - which of courses works on user defined
classes as well.
The new compilers
Visual studio .net supports three main compilers out of the box:
- C# pronounced C sharp not C hash :-)
- Visual Basic
- C++ with managed extensions
There are a bunch of third party compilers, which plug into the framework. We saw a demonstration of a COBOL compiler!
C#
This seems to be the new preferred language for pretty much anything. Sort of
a cross between C++ and Java without the law suit. I must admit it looks pretty
good and I would like to start using it. Some interesting features are:
- Automatic garbage collection. Supposedly incredibly fast. Figures of
40 CPU cycles were banded about as the average for deletes. Tricks such as
locking the garbage collector into L2 cache were also mentioned.
- Compilation to IL code. The IL code is Just In Time Compiled at load / run time. Caching of compiled code negates the cost of this on subsequent
runs.
- Everything is derived from a base object including ints longs etc. Some
cleaver tricks mean that there are few performance penalties for this. The
crux of this seem to be the division of types into structures which are
value types and classes which are reference types. Structures are allocated
on the stack, classes on the heap.
- No pointers. All classes are implicitly by reference and all structures
are implicitly by value.
- Very C++ like syntax. Exception handling - try, catch, finally - and a new
key word to iterate collections called foreach.
- Single inheritance from classes but multiple inheritance from interfaces (essentially
abstract classes).
- Properties are first class entities and are accessed via get set methods.
- Events are first class entities - way way better than COM's connection
points.
- Performance is expected to be similar to C++ code - maybe 10% slower.
- Can get dirty and drop into an 'unmanaged' code mode that allows the use
of pointers and the ability to pin garbage collected items down to non movable
real addresses.
- Some inheritance features I haven't got my head round yet but there seems
to be a way to change a base class in a derived class - you know fixing the
problem when you are using somebody else's class and they haven't made a key
method virtual so you can't override it.
VB
I am not a VB dude but they seem to have added everything needed to compete
with a real programming language such as C++. This included inheritance,
exception handling, data structuring etc etc etc. The difference between
languages seems to be getting narrower and narrower (bit like the parties in the
British political system) now that they all have to conform to a minimum set of
features to leverage the common class library.
Managed C++
It is still possible to compile code with the C++ compiler which generates
native Intel code, however the interesting bit is the ability to instruct the
compiler to generate managed code. Thru a set of new keywords it is then
possible to mark individual objects as garbage collected. Most importantly the
full power of the runtime class library can then be used by C++ code. The main
reasons for using C++ over C# then become:
- Migrating existing C++ code to utilize features in the managed
environment.
- Ability to get that last 10% of performance.
- Ability to write code for environments where the new run time isn't available
(device drivers?)
The IDE
The new IDE nice features:
- There is no separate Interdev part anymore. The HTML editor is part of the
standard language editing and includes all the good stuff like tag
completion for HTML and XML, to the point that a color picker dialog is an
option when completing an HTML tag with a color property.
- Ultra configurable, can make it look like C++ or VB development environment.
Easier to write code based wizards and deep extensions to the environment.
- Context sensitive help (all the help topics have been tagged with
attributes indicating their context).
- Winform based editor for dialogs replacing the old dialog editor.
- Start page - downloads latest news from web based on your language
preferences.
Active Server Pages+
The active server team seems to have got on board early with the tools team,
and bought in heavily, consequently integration is very tight. So what have they
fixed?
- You can use all the compiled languages that support the framework in
active server plus pages. No more yucky script languages :) The compiled
stuff runs a couple of times faster than the old interpreted scripts.
- There is now a proper document object model for server side programming.
This allows clean splitting of HTML from code. You can even stick the HTML
and code into different files.
- The range of server side controls is way better than the junk provided
with Visual Studio 6. Server side controls provide a nice way of abstracting
reusable functionality and they are build (or at least should be built) to
be browser aware.
- The server side controls are dragable from a pallet to allow the
creation of a webforms in the same way as a winfom (a sort of super dialog
box) for the windows environment.
- The HTML editor and form editor are integrated.
- Pagelets allow a chunk of a page to become a single reusable unit. The
pagelet can contain everything a page contains and is reusable through the
DOM it exposes. Great for things like page headers.
XML and ADO+
XML is deeply integrated into all the tools and a lot of the technologies.
Some points that come to mind:
- ADO+ introduces the concept of a dataset. A dataset is basically a mini
database consisting of record sets and the relationships between them. There
is a one to one relationship between XML and the dataset. The dataset is
transported over the net as its XML representation. You can work on the data
in its XML form or its relational form.
Web services
Bill seems to think the next stage for the web is the creation of lots of web
services. Web services are components served over the internet for consumption
not only by web clients but increasingly, as time goes on, other web service.
Applications will be constructed by calling upon these services to perform all
the back end work.
Microsoft intend to provide some of the infrastructure web services such as
passport, to confirm identity, scheduling for diary maintenance and preference
services to store user preferences.
Biztalk is the framework tool that is to the web service word what
transaction server is to the distributed database word. It seems to be a bit
'out on its own' however, it doesn't integrate with Visual Studio (it uses
Visio)
and has the feel of the old (in my opinion useless) 4GL tools. It does have a
good XML data description generation tool however.
Win Forms
The Win Forms framework seem to be the merged replacement for:
- MFC dialog applications
- VB applications
- Active X controls
MFC
Not much seems to have been done to MFC. All the new control in IE are being
wrapped for MFC. MFC still seems to be the way to generate a rich standalone
client ala Word or Photoshop, however the message from the PDC is that this
approach is dated. The idea seems to be to go for a more component based
approach to applications in general and run your ad hock combination of
components on a universal canvas. IE seems to be the prime candidate for the
universal canvas.
Internet explorer 5.5
We received the release version of IE 5.5 at the conference. This release has
seen few changes to the UI but has apparently had major changes under the hood.
Lots of work has been done to the printing engine although it still seems to
chop the right hand edge of documents that contain fixed positioning
information.... You can dive deep inside the rendering engine to do advanced
custom rendering stuff, but these interfaces seems to be old style COM. We will
have to wait for the new version before we see integration into the .net
framework.
Other stuff
- The live band which played at the start of the first couple of days was
pretty good.
- The room full of 400 workstation allowing you to check email, browse the
web etc. was cool to see in one room.
- The sea world party was well executed. The Kraken ride is intense. The
Shamu show was better than expected and there was free food and beer - say
no more.
Links
Photos Journal
Nick's initial Agenda
Nick's first C# program
More C# program (ettes)
Nick's notes about C#
Andrew's comments on the PDC
Microsoft PDC site