Gregor's Ramblings
Home Patterns Ramblings Articles Talks Download Links Books Contact

Microsoft TechEd 2005 Digest

June 7, 2005

ABOUT ME
Gregor Hohpe
Hi, I am Gregor Hohpe, co-author of the book Enterprise Integration Patterns. I like to work on and write about asynchronous messaging systems, service-oriented architectures, and all sorts of enterprise computing and architecture topics. I am also the Chief Architect at Allianz SE, one of the largest insurance companies in the world.
RAMBLINGS
Here I share my thoughts and ideas on a semi-regular basis. I call these notes "ramblings" because they are typically based on my personal opinions and observations as opposed to official "articles".

Celebrity Hunting

Conferences are a great place to connect or reconnect with other people who like to talk about technology but who are notoriously busy. This time I managed to spend a few late nights with Ingo Rammer and Christian Weyer from Thinktecture and Beat Schwegler from Microsoft EMEA. It was not until this TechEd it became apparent to me for the first time how many of the foreign speakers at TechEd are German. It was good to see Ingo, Christian, Beat, Clemens, and Jochen speak -- it is nice to hear a familiar accent :-)

I also got to hang out with a lot of the Indigo guys like Steve Schwartz, Shy Cohen. These guys are always fun to hang out with. Coming in from the West Coast provided the distinct advantage that 3am feels more or less like midnight to me. Naturally, I have little to report about the 9am keynote talks :-)

Best Quotes

Conferences are a great place to steal sound bites from other speakers. The best part is -- we have most of them on tape! Here the best ones I can remember:

"It all sucks" - Don Box (summarizing his talk)

"Integrating = Hooking Shit Together" - Pat Helland via Don Box

"People who write XSLT really ought to be killed" - Clemens Vasters

"We don't need faster cars but wider bridges" - Clemens Vasters (talking about throughput of messaging systems)

"I am glad my alias is scohen and not shyc, which would be pronounced "Scheisse" - Shy Cohen

"I think the people who designed the MOF had a bad childhood and were hit by their mothers" - Don Box

"Why should people be in this session? Because they are confused!" - Don Box

"You like to go above the call of duty" - My hand writing analyst

"Oh, I did not realize you are the Gregor who wrote that patterns book. That guy seemed so... smart" -- Yumai Chang

"Gregor, I don't think you are desperate enough." - Yumai Chang

"You want to have fun, you come to my room. You don't want to have fun, you don't come." - unidentified drunk woman at the hotel bar at 2am.

"His T-shirt is printed in Braille. You have to touch it to read it" - Gregor (talking to Beat and attractive lady).

Web Services Contract First

Christian Weyer is working on a quite interesting tool called WSCF - Web Services Contract First. This tool addresses a specific issue with the apsx Web services development approach that can be summarized as "design message schemas first, but let ASP.NET generate the WSDL". This approach is commonly used and is definitely preferable to the "code first" approach. We actually outline the process in the Implementing Service-Oriented Integration with ASP.NET pattern in the Integration Patterns book that I wrote with the Patterns & Practices folks in Redmond. The issue with this approach is that the schemas referenced by the WSDL are not the real schemas you created at the beginning to define the message formats. Instead, .Net generates classes from the schema and then inspects these generated classes to render schemas to be included in the WSDL document. This works OK only as long as you trust .NET that this round-trip is 100% loss-less. Unfortunately, loss-less bidirectional conversion between the world of documents and the world of objects is a tricky proposition -- anyone who has taken a closer look at the XmlSerializer can tell endless stories about this subject. Additionally, if someone modifies the classes in the generated service code, your WSDL has magically changed without any corresponding changes to the originally design message schemas. WSCF corrects this whole round-tripping issue by modifying the WSDL generated from .Net to include the original schema files rather than using the schemas generated from the classes by the ASP.NET infrastructure.

Book Ego

I stopped by the conference book store and realized that Enterprise Integration Patterns is now in its 5th printing :-) We also had an interesting discussion about the title of the book. Why is the book called Enterprise Integration Patterns when 90% of the content is about messaging? Well, when we were dciding on a title we put our marketing hat on :-). Since it was going to be the first book about patterns in the integration space we wanted to put the broadest possible footprint down. If there was one book about integration and patterns, we wanted it to be ours. Therefore the name "Enterprise Integration Patterns". It's analogous to the infamous "Design Patterns", which is also not called "Object-oriented design patterns using C++ and SmallTalk." The book defined a whole new category and underlined that fact with a short and broad title. Either way, it seems that our title has not hurt book sales all that much :-)

My book signing event went surprisingly well, which means that either people liked our talk so much that they rushed to get the book or they were more confused than before and felt they need to read the book to get anything out of the topic. I hope it was the former :-)

New Track - CSI

This year's TechEd featured a new track, CSI. No, not the tv show, but the Connected Systems Infrastructure. This term is the new umbrella for all things SOA, distributed systems and business processes. Most interesting talks related to BizTalk, Indigo and Web Services are now hosted under this track. In fact, there is only one Indigo talk at the whole show because most of that material is being saved for PDC in Fall. Interestingly, Clemens' async talk ran under CSI while Ted and my talk ran under ARC. I hope there won't be too much overlap. On a related note, the BizTalk Server2006 Beta is being handed out at the show.

C# 2.0

Anders Hejlsberg gave a nice overview over the new C# language features. While I am a little worried that the language is becoming bloated, most of the new features seem useful. On top of the list are obviously the generics. Generics allow types to be used as parameters to define methods and classes. These type parameters are instantiated at run-time. However, the type checking is performed at declaration time. The main difference between C# generics is that C# generics are a platform feature, i.e. the CLR is aware of them. In the Java world they are a pure language features, i.e. they are compiled into regular JVM byte code through a process called type erasure. This difference can be explained with the longer legacy of the Java platform, which severely limits their ability to change the JVM and the libraries. On a more subtle note, Java generics are also limited to reference types whereas C# can handle both reference and value t\ypes.

C# 2.0 will also have anonymous methods, something very similar to "blocks" found in other programming languages. Blocks are very useful when you would like to pass a piece of code to a method, something that is difficult to do with the current C# syntax. The best example is a method that can iterate over a collection and allows you to pass in a piece of code to be executed for each collection element. You can accomplish this today with delegates but it requires a fair amount of typing plus a "home" for the delegate method. With anonymous methods you can pass in a method body as a delegate without actually having to declare the method:

delegate bool Predicate<T>(T item);
public List<T> FindAll(Predicate<T> filter) {...}
...
accounts.FindAll(delegate(Account a) { return a.Balance < 0; } 

Nullable types are another feature that should bring some relief to code that has to deal with optional XML elements or attributes. We now can declare any variable type as nullable:

int? foo = null;

You can check whether a variable has a value via the HasValue() method. This is definitely nicer than having to use Integer types and comparing them against null all the time. It also does away with the clunky [XmlIgnore]public bool fooSpecified; construct that would indicate to the XmlSerializer that the bool should be set to true if and only if a value for foo was specified.

Web Services Support in Visual Studio 2005

John Bristowe gave a great talk on the new features in VS 2005 that make developing Web services with ASP.Net 2.0 easier. Some of the highlights:

  • IXmlSerializable came out of the shadow and is now officially supported. By implementing this interface you can process incoming and outgoing SOAP messages via XmlReader and XmlWriter without having to hold the complete object model in memory. This is very useful for large messages or if you want to have direct access to a small subset of document elements. The "official" alternative so far was to declare your webmethod with a XmlElement parameter but that approach does in fact build a whole DOM tree. Even better news is that even if you implement IXmlSerializable you can still specify a schema to be used for the WSDL generation. As a result, your operation looks to the outside just like a method that takes a strongly typed parameter.
  • The new client libraries support automatic proxy discovery, which should alleviate the need to configure app.config with the proxy information.
  • Enhanced network libraries allow you go get a lot more information about the status of the network connection. For example, you can find out on which ports your machine is listening. You can also register your application to be notified when the network connection becomes available or unavailable.
  • A number of folks have already described the new event-based asynchronous client proxies that are generated by wsdl.exe or the IDE. Referring back to my previous rambling it is important to realize that this asynchrony is a client-side only asynchrony. Still it is a nicer programming model than the old BeginFoo and EndFoo methods.

WSE 3.0

I like the Web Service Enhancemets (WSE), commonly referred to as "wissie". WSE includes a set of SoapExtension filters that provide support for WS-Addressing and WS-Security. It also provides a nice programming model that supports both an RPC as well as a message-oriented view of the interaction between a service provider and service consumer. Mark Fussel gave a great talk on WSE 3.0. Contrary to earlier claims there will be a 3.0 release of WSE. The Community Technology Preview (CTP) release has just been made available. To me the most notable additions are:

  • The WSE team created a set of common security scenarios (e.g., "Username over Certificate") and has created a wizard that helps configure all the pieces according to the scenario. I am sure everyone who has played with certificates and WSE configuration will appreciate this new feature.
  • WSE 3.0 will also have a MSMQ transport built-in. A number of people had built this function on their own so it is nice to have it as part of the official stack now. Obviously I am a big fan of MSMQ because it provides a very nice asynchronous messaging infrastructure.
  • WSE 3.0 will also make it easier to host .asmx Services outside of IIS and support alternative protocols (such as MSMQ). The independence of IIS and therefore the independence from the transport protocol is a great step into the right direction. On our last project we had to build quite a bit of code to allow services to be invoked synchronously and asynchronously.

Don Box and DSLs

Don Box wowed a large crowd with his funny yet insightful presentation style. This time he mused about metadata, models, and DSL's (Domain Specific Languages). BTW, he defined the verb "to model" as "write stuff down". I share Don's view (I guess if I didn't I would not be dumb enough to publicly disagree with him...) that models are something extremely useful but that a lot of the current OMG stack of meta-meta-models is far too much for most developers [more on my view on models]. According to Don, some of these folks "have simply gone meta". He suggests that there are only two levels: the concrete level and the other level. What we are therefore looking for is an easier way to model our systems and use transformations to convert these models into something executable. The Visual Studio 2005 DSL tools are definitely heading in that direction but I think we are still pretty early in the cycle.

I think that it will become more and more common for systems to be developed in more than one language. This multi-language phenomenon has little to do with C# vs. Java but with the advent of more Domain Specific Languages. Especially in the area of Web Services and integration a lot of new languages have already arrived. We have XSLT for document transformations, XPATH and XQuery to extract data from XML documents; we use rules engines that are based on new languages and use BPEL for orchestrations. Many times, these languages are hidden behind some visual veneer to shield the user from the (sometimes cumbersome) syntax. Nevertheless, the general adoption of these languages is pretty low (maybe the low number of XSLT programmers is a result of Clemens following through on his opinions about XSLT programmers... ). Seriously though, the new languages are often powerful and expressive but require the developer to adapt to a whole new programming model. Also, since many of these languages are based on standards or are embedded in commercial tools they have to be fairly general purpose to maximize their applicability.

Domain Specific Languages try to provide the benefits of purpose-built languages but aim to make it much easier to define them and to use them. They plan on accomplishing this by providing better tools and by making the languages smaller in scope. For example, one would not create a language that can transform any XML document but more likely a language that can deal with specific XML documents that are used by the application at hand.

Jochen Seemann gave an early preview to the Domain Specific Language tools in the upcoming Visual Studio 2005. This is a bigger topic than fits into this rambling but here is my quick summary. VS 2005 focuses solely on visual languages by using a meta-model that is based on a directed graph. You can define nodes and connectors and equip them with specific attributes, visuals and composition rules. Then you can write code generation classes for each type of node and connector you defined. This allows you to programm (some might say "doodle"...) in a Visio-like environment but with a vocabulary and constraints that you define.

Update: Martin Fowler posted an excellent article on Language Workbenches -- tools to design DSLs.

MORE RAMBLINGS    Subscribe  SUBSCRIBE TO GREGOR'S RAMBLINGS


Gregor is the Chief IT Architect of Allianz SE. He is a frequent speaker on asynchronous messaging and service-oriented architectures and co-authored Enterprise Integration Patterns (Addison-Wesley). His mission is to make integration and distributed system development easier by harvesting common patterns and best practices from many different technologies.
www.eaipatterns.com