Microsoft? Only Nice Dialog Boxes

About eleven years ago, I got involved in the development of my first “serious” client-server application using Visual Basic 3.0 and Oracle (using a data access API called Oracle Objects for OLE).

We were a small team of 3 developers working together for several months and, to be honest, I don’t think we actually knew what we were doing (well, I’m sure I didn’t! :-) ).

I really enjoyed those times and it certainly was a valuable experience.

Back then, I had the pleasure to work with Manlio R.

Manlio was essentially what I consider a pragmatic anti-Microsoft guy; someone who fundamentally dislikes Microsoft but earns a good living by using Microsoft technologies.

He was so funny though. Whenever we would find a bug in Visual Basic he would smile and say something like “Microsoft is only good at building nice dialog boxes; Oracle/Linux is the way to go!”

It didn’t matter if our bookshelf was full of Oracle manuals as the software wasn’t that user-friendly or bug-free either.

Even WinWord would not pass lightly his severe judgment as the VI editor was a way better tool in his hands.

I haven’t seen Manlio since then, and we only stayed in touch with the occasional emails in the first few years that followed. Then I totally lost contact.

Manlio now has his own family and he is an accomplished J2EE/Agile developer.

How do I know? He surprisingly found one of my posts and, after so many years, he dropped me an email to say hello.

Thanks Manlio, you are the man!

2 Comments

Tech-Ed and Domain Specific Languages

Wednesday’s session about the DSL tools for Model-Driven Development in VS2005 was truly fascinating. Actually, I think that it justifies the investment of my trip across the Atlantic alone!

After illustrating that domain specific languages are ways to improve effectiveness in communication, Jochen Seemann literally blew my mind by demonstrating what can be done today with the CTP release version of the upcoming Microsoft Domain-Specific Language (DSL) Tools.

This SDK allows you to easily build a graphical designer hosted by Visual Studio 2005 that is able to provide support for a custom domain-specific language.

What does it mean? Once the designer is built, a user can instantiate the designer, drag custom shapes from the toolbox, connect those shapes together (with validation support according to the language rules) and use the template engine to generate code/artifacts!

Building a DSL designer requires several steps, which basically involve the definition of:

  • the elements of our domain in a domain model (classes and relationships)
  • the notational elements (shapes and connectors) for the business entities
  • the legal rules (validation/constraints) from a notational perspective, and the mapping of the notation to the elements of our domain.

Once the designer is built and instantiated we can use template-based generators to generate artifacts from our model (e.g. code, HTML, XML, WordML, etc). The templates have a notation similar to CodeSmith or classic ASP, and in the future some form of Intellisense (to query the model) is likely to be provided.

Some of these steps currently require the editing of an XML file. However Jochen said that this is really an “alpha” version of the toolkit and that better support will be provided in further iterations (indeed, the textual generator engine, code named T4, is only 6 weeks old!).

He plans to release incremental versions of the toolkit every 2-3 months, maybe even after version 1.0 will be shipped.

Currently I have only a few random observations/considerations on DSL designers that I want to dump here for my reference and eventually refine in future posts as I become more experienced in this field:

  • We can build multiple designers to generate different parts in our systems, so we can (and probably should) start small.
  • 2-Way synchronization (e.g. graphical model – to generated code – back to graphical model) is probably not going to be provided with version 1.0. It is a difficult problem to solve and I agree with Jochen’s pragmatism that it would be a fundamental feature only in a relatively small number of cases.
  • Template/designer versioning and deployment are going to be difficult issues. We will need a defined structure and guidelines to avoid dealing with a total mess.
  • A DSL designer is likely to work effectively in areas when the domain entities are very well understood. I can see how the use of a ubiquitous language would be core in this context.
  • DSL designers could be used for requirements; however I have some reservation in this direction as the domain model is likely to be refined and changed way too quickly in a real world scenario. Use cases, CRC cards, and UML drafts are still likely to be my preferred option in the short term. I might be totally wrong on this, and I hope somebody can change my ideas soon (any volunteers?).
  • There is a space for graphic tools and a space for code. A guy asked if Microsoft was going to provide basic notational elements that would give us very fine grained control capabilities (ifs, whiles etc). I think that writing code using shapes is insane. This is not a new idea (companies have been trying for years to propose solutions in this direction) but when you get pages and pages of icons you quickly realize that you are in the wrong space.
  • Code generation driven by a designer is very cool. However writing templates is a pain and it feels like going back to messy scripting languages.
  • Aspect Orientation could have a major role in this type of development. You add an attribute to a shape and (with the right template) your code magically gets to be generated. Jochen is not totally convinced by the feasibility of the AO approach as many people got burned. After talking to the guys in Avanade, however, I’ll be willing to take a serious shot in my problem space.
  • It will be fundamental to maintain a clear separation between generated code and custom code. Use of partial classes that can be regenerated would be an option, separate classes and aggregation/inheritance another.
  • I wish we could have several injection points in the designer and even a link to MSBuild, so that separate tasks could be executed upon code generation.

I hope this post gave you a sense of what this technology can provide. As I said at the beginning, I’ve been totally fascinated by it.

Finally let me just say that this technology gave me a fantastic idea that promises to provide an incredibly elegant solution to a huge problem in Innerworkings’ domain. Unfortunately I’m only teasing you guys because I can’t tell you what it is, as probably Fran (my CEO) would literally kill me if I did :-)

2 Comments

Extreme Service-Oriented Architecture

SOA is an architectural approach to creating systems built from autonomous services. – Ron Jacobs, Tech-Ed 2005

While this is certainly true, it does not fully explain why so many “experts” and practitioners debate and, sometimes, disagree about what constitutes a well factored SOA-based distributed system.

For some strange reason, SOA reminds me of Kent Beck’s description of how he came to devise the Extreme Programming methodology.

Kent had the mental picture of a control panel with knobs; each knob would represent a practice that, from his experience, he knew worked well.

He then imagined turning those knobs all up to 10 to see the consequences.

The same analogy helps me to capture what I believe is the true spirit of SOA.

I see it as being an architectural model that mainly limits to the extreme the assumptions we make about the services that we create and consume in terms of reliability, communication protocols, network latency, implementation platforms, resiliency, versioning, security, coupling, etc.

I like to think that people around the world are simply attempting to define what “turning a knob to 10” means, evaluating implications, and eventually devising practices that work.

This oversimplification helps me to understand why, for example, some experts suggest that message exchange between services should be fundamentally asynchronous; synchronicity would mean taking for granted certain assumptions about the responsiveness of the services we consume which for some are simply unacceptable.

0 Comments

Tech-Ed, Software Fortresses, and EAFs

After the code generation session, I attended Roger Sessions’ talk about the next generation of SOAs. I thought that the speech was very interesting as Roger described the challenges that companies will face in the next 3 years. He sees three main challenges: technical, regulatory and competitive. From the technical point of view, it’s clear that the standards are moving from the basic point-to-point Soap model (where a message is “simply” encapsulated in an envelope) to the point-to-intermediary-to-intermediary-to-point WS-* model, where headers are used more heavily and limit the body of the message substantially.

Roger calls this model WS-SCRAM : Secure, Coordinated, Reliable, Asynchronous Messaging and went into the details of describing each aspect. Nothing really new to me, but he also illustrated how to model collaborations within software systems describing the concept of a Software Fortress. He actually wrote a book about it so I will definitely investigate further.

One serious aspect that is often ignored in the field is the necessity for systems to comply with ever increasing and stringent regulations. This is something that us Italians are very familiar with (well, Italy is very strict with data protection laws). Essentially, in several business fields, data has to be traceable, auditable and lockable. Fail to do that and your CEO could go to jail… actually, that might not be my problem after all, what do you think Fran :-) ?

In the afternoon I went to other talks. I was particularly interested in the “Design Considerations for Enterprise Application Frameworks” session given by Kyle Huntley of Avanade. He heavily collaborated to the development of the “famous” patterns & practices Enterprise Library.

Kyle classified frameworks in two main categories: helper frameworks (for example, the Logging and Instrumentation Application Block) and structural frameworks (for example the User Interface Process Application Block). I found this distinction particularly helpful as there are very distinct benefits and issues. Usually helpers are easy to consume, can evolve with relatively low impact and they usually have low resistance in their adoption among developers. Structural frameworks have usually a much greater impact, they have a higher learning curve, and their adoption have higher costs, depending on the type of organization. There were a lot of insightful ideas and “tricks” that I will certainly consider once I’ll be back in the office. In my organization we work really hard to continuously enhance and improve our internal framework, so I was very familiar with the issues and practices that Kyle illustrated.

I actually met Jacob Croft (also of Avanade) a couple of hours before at the Innerworkings booth and, among other things, he managed to get me interested again in Aspect Orientation.

I know, it is a topic that often raises doubts as it is very hard to design aspects properly in order to avoid interdependencies. Jacob is pretty confident that with a bit of lateral thinking you can really obtain huge gains, and he confirmed that Avanade has been really successful in its implementation within their internal ACA.NET framework.

By the way, if you haven’t used the Enterprise Library yet (and you develop non trivial applications) stop reading my post and download it now!

After other talks, I ended the evening going to (not one but) two parties (VSIP and MSDN)! Wow, I really drank too much yesterday, but I had so much fun!

1 Comment

Tech-Ed and Code Generation

My second day at Tech-Ed has been pretty intense.

After the announcement of the expected release date for Visual Studio/SQL Server 2005 and BizTalk 2006 by the week starting Nov 7 in Paul Flessener’s keynote, I went to a fairly interesting session about code generation.

I’m not too sure I agree with all the implementation details exposed by the speaker, but it was definitely worth listening. The scenario involved creating a sophisticated fa?ade on top of a big application written years before in C++.

The legacy application implemented a rather poorly written interface which included late bound calls and string concatenations. Building this fa?ade involved creating a DSL (Domain Specific Language…just in case you live in another planet and you haven’t heard about it yet :-) and using it as a starting point for code generation.

The point was to use this approach with today’s technologies without having to wait for the sophisticated designers provided by, say, Visual Studio .NET 2005. So, he pretty much used XML schemas and WSDL files to define the language and operations and then used code generation tools (CodeSmith, XSD.exe and others) to generate assemblies, documentation etc. I found interesting that he used WSDL even if web services weren’t involved (effectively, you only need to replace the bindings).

In general, this year I found that there is a disproportional push for code generation, templates and DSLs. It kind of weird as these concepts are definitely not new.

I will write about the other past sessions later on today as I must run now.

4 Comments

Tech-Ed and Keynotes

After a long (and troubled) flight from Dublin, I finally arrived to Orlando last night, ready to participate to Tech-Ed FL. Cool eh? InnerWorkings is also involved as exhibitor, which means that I get to talk to lots of developers whenever I get a chance to hang around the booth. I am now towards the end of the first day and I’m just wrapping up before going to Sea World tonight for some party (eh eh, are you jealous?…well you should!).

How has been the day so far? Well I’m pretty sure that you already got the few announcements that Steve Ballmer made this morning in his keynote. The speech was centered on Microsoft helping developers and IT pros to work together, to connect people and information independently from their location. So we’ve been tortured with a list of Microsoft products and marketing info…Bah, and I haven’t slept in 24 hours “to be part of this”? Maybe I was sleeping too much, but it looks to me that the only announcement of “some” interest to developers was the Visual Studio Tools for Office support for Outlook add-ins. In reality it’s my fault, I’m just not a fan of keynotes… actually, I hate keynotes. I especially hate them when they are very product centric, regardless on who the speaker is.

Afterwards, I went to the Architecture Certification Chalk Talk which turned out to be a very instructive Q&A session about the upcoming program that aims at creating an elite group of highly regarded professionals. Our group was very small, there were no more than 10 of us asking questions. Gregor Hohpe was among us. Unfortunately I didn’t have a chance to talk to him as he had to run away. Lately, I have been discussing the finer details of a particular messaging pattern with a collegue of mine, and I hoped that Gregor could clear some our doubts. Sorry Jeno, I will try to talk to him later this week!

I also went to the “Building and Using a Software Factory” session. This is something that is definitely in my radar as currently we have about 400 solutions at InnerWorkings and we would certainly provide a good platform for automation.

Oops, it’s getting late… I must go to the party!!

2 Comments