Monday, June 06, 2005 - Posts

Sessions at Tech-Ed today: Exception handling, Mobile Development, Software Factories and Smart Client Architecture

I went to a number of Tech-Ed sessions today of course, some more interesting than others. DEV320, about Exception Handling Best Practices, I found really rather basic (of course it was a level-300), talking about the obvious practices of avoiding having to throw and catch exceptions when they're not really necessary, the cost of exceptions, rethrowing exceptions etc. The presenter did a good job of explaining these basics. He should know them pretty well, as exception handling is one of his priorities in the CLR development group.

Windows Mobile Development

Then there was the Windows Mobile development cabana talk -- a soft of informal talk targeted to a smaller audience -- which was kind of interesting. A couple of topics were covered such as developing using the emulator images (you can develop for Windows Mobile 5.0 now here at Tech-Ed; the emulator images for this new OS are available in the Hands-On Labs), using mobile controls in ASP.NET applications and the use of SQL Server Mobile (the new name of SQL CE) for database-oriented smart device applications. The coolness here is that you can synchronize and replicate SQL Server databases between your desktop/server and smart devices directly via ActiveSync.

Software Factories

One of my favorite topics as of late: software factories. The basic idea is that you find patterns in your software projects and pour them into a “factory,” i.e. a collection of code templates, configuration presets, reusable blocks etc. so that you can generate parts of your new applications automagically. The talk gave an introduction to software factories and there was a live demonstration of using a factory. If you're going to one of the international Tech-Ed events and you're into software architecture, this session is not to be missed!

The way Microsoft envisions software factories in Visual Studio 2005 is by using that tool's support for DSLs (Domain-Specific Languages and the upcoming Guidance Automation Technology, or GAT.

DSLs are abstractions of given problem domains and the solutions to those domains -- or rather, your solutions. You can compare this roughly to UML in sense of notation (class diagrams, use cases etc.) of the problem and the solution, through patterns. Visual Studio 2005 comes with designer support for DSLs and you can even create them programmatically using the DSL SDK. GAT then provides a “recipe“ infrastructure for building your apps step by step, as a set of Visual Studio extensions.

Basically, you open an application recipe (a software factory) in Visual Studio, you design the flow of your solution as a state machine on a drawing canvas in Visio/Rose style, and you connect the missing parts by filling in the code that does actual work. Some of the code will be generated by the DSL system based on templates (compare to CodeSmith and ASP.NET, because you're embedding code that must be run at code generation time between <# ... #> and <#= ... #> tags).

The speakers demo'ed building an application that allows users to complete an order. The code they generated used the UIP Application Block to manage how users navigate from one screen to the next, which is of course the smart thing to do. When data needed to be retrieved from a back-end system -- a web service of course -- they created a Web Reference proxy as usual and added a caching Service Agent on top. Data would only be retrieved from the back end if it was not already in the service agent instance's cache. And, yes, the service agent was auto-generated too, again based on a code template and some input from the developer. The generated code used the Caching Application Block. As Darth Vader would say, “Impressive... Most impressive!“

Yes, you can do it with other tools too

Of course, the basic ideas here are not new. You can use Visio templates today to come up with reusable general designs; you can use tools such as CodeSmith to generate code based on templates, including code that uses the Enterprise Library and the other Application Blocks. But in Visual Studio 2005 and the extensions these gentlemen demonstrated, it's all so nicely integrated with the IDE and wizards and designers make it much easier, saving us developers and architects time.

Software Factories are the Architect's Domain

I think that consuming software factories is for developers and that creating them is mostly work for the Solution Architect and the Senior Developer, based on code written in previous projects. It is their job to spot patterns in the enterprise's software designs and needs, and to extract those into a set of reusable factories and application blocks. Moreover, I think that while software factories are definitely another step in the right direction towards delivering 4GL's promise, the common problems related to reuse will resurface with factories: are people going to spend time to write code and create templates and factories that are actually reusable, and will they actually be reused? From experience I have learned that this is only true if reuse is enforced on the team by the Solution Architect, who must posess strong reuse and mentoring skills to drive this point home and to actually get it used by the rest of the team...


Smart Client Architecture

The final session I attended, or at least entered before I left 10 minutes later, was the one on Smart Client Architecture. This subject is “totally my bag,” to quote Austin Powers, and again I felt as if the presenters were dissing up old material that anyone can find in the Patterns & Practices materials. Anyway, I left the session quickly without waiting for any potential juicy bits to appear because I got tired of listening to the Buffalo Bill-soundalike onstage...

Well, I'm off to the reception now. Talk to you again tomorrow and keep those comments coming :-)

with 0 Comments

Total Coolness: Microsoft's (free) online Virtual Labs

Microsoft launched a really cool initiative today: the Virtual Lab. Using it, you can perform exercises such as those at Tech-Ed's Hands-On Labs from your own PC over the Internet.

That's right: via your Internet Explorer, you connect to a full virtual PC that has all the software installed you need to do the exercise you selected first -- for example, you may want to experience ClickOnce Deployment firsthand, or you may want to experiment with C# 2.0 without downloading and installing Visual Studio 2005 Beta 2 or the Visual C# 2005 Express Edition Beta 2.

The procedure is simple: register for free, select the virtual lab you want to try your hand at, open the PDF that guides you step by step (a good idea is of course to print it), then connect to your very “own” virtual PC over the Internet and start clicking away! You don't have to be afraid of f..., ahem, messing up because it's a virtual machine and it gets deleted after you've used it anyway. Run into trouble? Close your session and open another, fresh one.

Microsoft is putting a number of such virtual labs online and more are coming. I think it's the greatest idea since trialware!

with 0 Comments

Steve Ballmer's keynote kicks off Tech-Ed Orlando nicely

This morning Microsoft CEO Steve Ballmer's keynote speech kicked off Tech-Ed talking about the “New World of Work” as envisioned by Microsoft. This reminded me very much of the yearly internal-only Microsoft Technical Briefing (MTB) and Microsoft Global Briefing (MGB) events that I attended while at MS -- every year there's a new slogan such as “Realize Your Potential” etc., and they all boil down to the same thing: we want to create software that makes people's lives easier, tools that help them jump farther and with less effort. It's just like Apple's slogan a few years ago, “The Power To Be Your Best.”

Anyway, the current wave of potential-realizing new world of work stuff generally means better communication and connectivity. People want to travel, use software and devices etc. using a single identity, they want to know who they can reach and how, etc. This is nothing new really; it has been a central tenet of portals for years.

The key is, however, that the new tools make it easier to get there, or make it easier for developers to write software that gets people there. Microsoft's Live Communications Server is an example of the former, and Visual Studio 2005 is an example of the latter. What I'm really looking forward to, besides the full RTM versions of Visual Studio 2005, SQL Server 2005 and BizTalk Server 2006, not to mention Longhorn at some time, is actually using the recently-announced Windows Mobile 5.0. According to Steve, or should I call him Mr Ballmer, some 40 OEMs are going to ship devices based on this OS this year. In addition to that, we can expect Windows 2003 Release 2 this year too, and of course the 64-bit version of Windows 2003 is here already (if not, Microsoft put a bogus DVD in my event bag...)

.net is gaining momentum

Earlier this year, I heard from Microsoft Belgium that .net had surpassed Java as an enterprise development platform in Europe. Ballmer quoted some numbers, claiming a 43% market share for .net as developers' primary platform vs. 35% for Java. That's quite impressive, given that .net is much younger and that version 2.0 is still in Beta today. Part of that success is of course due to Microsoft's excellent marketing, but most of it, I think, to the sheer quality of the environment.

I've been coaching a couple of Java developers during their switch to C# for a while now, and they too realized the value of C#/.net quickly. Okay, Visual Studio.NET 2003 is not up to par with Eclipse, but Visual Studio 2005 definitely is. The fact that .net Beta 2 scores up to 200% faster execution time than IBM WebSphere 6 on Sun Microsystem's own WS-Test 1.1 benchmark also shows that it's far superior on the server.

Seeing that .net is a core technology in upcoming systems such as SQL Server 2005 and Longhorn, and seeing that it looks like it's going to get integrated into the other server products such as Commerce Server 2006 more and more, Microsoft's strategy and vision of interconnected systems based on managed code is starting to come together, and will provide a huge payoff soon...

with 0 Comments