Tuesday, May 03, 2005

Over the past few weeks I've given a number of presentations on service-oriented design and how it relates to both OO and n-tier models. One constant theme has been my recommendation that service methods use a request/response or just request method signature:

 

   response = f(request)

or

   f(request)

 

"request" and "response" are both messages, defined by a type or schema (with a little "s", not necessarily XSD).

 

The actual procedure, f, is then implemented as a Message Router, routing each call to an appropriate handler method depending on the specific type of the request message.

 

In concept this is an ideal model, as it helps address numerous issues around decoupling the client and service, and around versioning of a service over time. I discussed many of these issues in my article on SOA Covenants.

 

Of course the devil is in the details, or in this case the implementation. Today's web service technologies don't make it particularly easy to attach multiple schemas to a given parameter - which we must do to the "request" parameter in order to allow our single endpoint to accept multiple request messages.

 

One answer is to manually create the XSD and/or WSDL. Personally I find that answer impractical. Angle-brackets weren't meant for human creation or consumption, and programmers shouldn't have to see (much less type) things like XSD or WSDL.

 

Fortunately there's another answer. In this blog entry, Microsoft technology expert Bill Wagner shows how to implement "method overloading" in asmx using C# to do the heavy lifting.

 

While the outcome isn't totally seamless or perfect, it is pretty darn good. In my mind Bill's answer is a decent compromise between getting the functionality we need, and avoiding the manual creation of cryptic WSDL artifacts.

 

The end result is that it is totally possible to construct flexible, maintainable and broadly useful web services using VB.NET or C#. Web services that follow a purely message-based approach, implement a message router on the server and thus provide a good story for both versioning and multiple message format stories.

 

Indigo, btw, offers a similar solution to what Bill talks about. In the Indigo situation however, it appears that we’ll have more fine-grained control over the generation of the public schema through the use of the DataContract idea, combined with inheritance in our VB or C# code.

Tuesday, May 03, 2005 10:15:53 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [5]  | 

There are many ways to tweak VPC to get better performance. Putting the vhd file on its own physical (fast) hard drive is key, and Brian Randell has other tips.
 
But the single biggest thing you can do is have so much RAM in the host computer that there's no paging. I just upgraded my desktop so it has 2.5 gigs of RAM. My VPC machine has 768 megs allocated and it is fast. And at the same time on the host I'm able to run Word, Outlook, RSSBandit, Windows Media Player, Trillian, Avant Browser and all the other random stuff in my system tray.
 
The key of course, is to avoid paging, and the only real way to do that is to have about 20% more RAM than you'll ever actually use. 2.5 gigs seems to be a sweet spot for me, since even with everything running at once I still show almost 1 gig of free memory.
 
Prior to this I was at 1.5 gig total RAM, and with a VPC loaded the whole system was super-slow. The VPC was almost unusable, and other apps on the host loaded very slowly and ran with sub-par performance.
 
Now, last night I fired up a game and was happily playing away - then I realized that I'd never shut down the VPC. Here I was playing a memory-hungry modern game and a VPC and I didn't even notice the difference.
 
More memory is happiness!
Tuesday, May 03, 2005 9:25:31 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [6]  | 

 Friday, April 22, 2005
CoDe Magazine has published my article on extending the Configuration Management Application Block (CMAB) to support user, system and enterprise settings as well as application settings.
Friday, April 22, 2005 11:17:42 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [3]  | 

 Thursday, April 21, 2005
Thursday, April 21, 2005 2:47:42 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [5]  | 

Microsoft has made an agreement with Developer Express to include a fully functional version of Refactor! with VB 2005 and Visual Studio 2005!! Yea!
 
This means that VB now has refactoring comparable to (or maybe even better than) C# in VS 2005. Happiness!
 
Click here for the download page.
Thursday, April 21, 2005 6:35:34 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [7]  | 

 Wednesday, April 20, 2005
Microsoft has just opened up a new online training site with free training. They are calling it an eLearning site. It is hard to beat free training!
 
Better yet, in an effort to get people to try the training, they have a contest running where you can win some really cool prizes. Personally I'm shooting for the 50" HDTV :)
 
Unfortunately thus far they only have one course up - on 64 bit computing. Having gone through the 32 to 64 bit switch under OpenVMS 15 years ago, I can't say I'm overly excited. But they promise to have more courses on more interesting areas including Smart Client, Connected Systems, SQL Server 2005 and Visual Studio 2005.
Wednesday, April 20, 2005 8:57:47 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  | 

 Monday, April 18, 2005

Indigo is Microsoft’s code name for the technology that will bring together the functionality in today’s .NET Remoting, Enterprise Services, Web services (including WSE) and MSMQ. Of course knowing what it is doesn’t necessarily tell us whether it is cool, compelling and exciting … or rather boring.

 

Ultimately beauty is in the eye of the beholder. Certainly the Indigo team feels a great deal of pride in their work and they paint this as a very big and compelling technology.

 

Many technology experts I’ve talked to outside of Microsoft are less convinced that it is worth getting all excited.

 

Personally, I must confess that I find Indigo to be a bit frustrating. While it should provide some absolutely critical benefits, in my view it is merely laying the groundwork for the potential of something actually exciting to follow a few years later.

 

Why do I say this?

 

Well, consider what Indigo is again. It is a technology that brings together a set of existing technologies. It provides a unified API model on top of a bunch of concepts and tools we already have. To put it another way, it lets us do what we can already do, but in a slightly more standardized manner.

 

If you are a WSE user, Indigo will save you tons of code. But that’s because WSE is experimental stuff and isn’t refined to the degree Remoting, Enterprise Services or Web services are. If you are using any of those technologies, Indigo won’t save you much (if any) code – it will just subtly alter the way you do the things you already do.

 

Looking at it this way, it doesn’t sound all that compelling really does it?

 

But consider this. Today’s technologies are a mess. We have at least five different technologies for distributed communication (Remoting, ES, Web services, MSMQ and WSE). Each technology shines in different ways, so each is appropriate in different scenarios. This means that to be a competent .NET architect/designer you must know all five reasonably well. You need to know the strengths and weaknesses of each, and you must know how easy or hard they are to use and to potentially extend.

 

Worse, you can’t expect to easily switch between them. Several of these options are mutually exclusive.

 

But the final straw (in my mind) is this: the technology you pick locks you into a single architectural world-view. If you pick Web services or WSE you are accepting the SOA world view. Sure you can hack around that to do n-tier or client/server, but it is ugly and dangerous. Similarly, if you pick Enterprise Services you get a nice set of client/server functionality, but you lose a lot of flexibility. And so forth.

 

Since the architectural decisions are so directly and irrevocably tied to the technology, we can’t actually discuss architecture. We are limited to discussing our systems in terms of the technology itself, rather than the architectural concepts and goals we’re trying to achieve. And that is very sad.

 

By merging these technologies into a single API, Indigo may allow us to elevate the level of dialog. Rather than having inane debates between Web services and Remoting, we can have intelligent discussions about the pros and cons of n-tier vs SOA. We can apply rational thought as to how each distributed architecture concept applies to the various parts of our application.

 

We might even find that some parts of our application are n-tier, while others require SOA concepts. Due to the unified API, Indigo should allow us to actually do both where appropriate. Without irrational debates over protocol, since Indigo natively supports concepts for both n-tier and SOA.

 

Now this is compelling!

 

As compelling as it is to think that we can start having more intelligent and productive architectural discussions, that isn’t the whole of it. I am hopeful that Indigo represents the groundwork for greater things.

 

There are a lot of very hard problems to solve in distributed computing. Unfortunately our underlying communications protocols never seem to stay in place long enough for anyone to really address the more interesting problems. Instead, for many years now we’ve just watched as vendors reinvent the concept of remote procedure calls over and over again: RPC, IIOP, DCOM, RMI, Remoting, Web services, Indigo.

 

That is frustrating. It is frustrating because we never really move beyond RPC. While there’s no doubt that Indigo is much easier to use and more clear than any previous RPC scheme, it is also quite true that Indigo merely lets us do what we could already do.

 

What I’m hoping (perhaps foolishly) is that Indigo will be the end. That we’ll finally have an RPC technology that is stable and flexible enough that it won’t need to be replaced so rapidly. And being stable and flexible, it will allow the pursuit of solutions to the harder problems.

 

What are those problems? They are many, and they include semantic meaning of messages and data. They include distributed synchronization primitives and concepts. They include standardization and simplification of background processing – making it as easy and natural as synchronous processing is today. They include identity and security issues, management of long-running processes, simplification of compensating transactions and many other issues.

 

Maybe Indigo represents the platform on which solutions to these and other problems can finally be built. Perhaps in another 5 years we can look back and say that Indigo was the turning point that finally allowed us to really make distributed computing a first-class concept.

Monday, April 18, 2005 10:13:06 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [3]  | 

 Tuesday, April 05, 2005
Microsoft has a strong commitment (and strong incentive) to helping the VB6 community move into VB.NET. Many features in Whidbey (Visual Studio 2005) are specifically geared toward making VB.NET more accessible to existing VB6 developers. In preparation for the Visual Studio 2005 release, Microsoft has dedicated people to the job of coming up with ways to help people move.
 
The new VBRun web site is one of the first big moves in that direction. This site is all about VB6 today, and how to make VB6 work with VB.NET. No one, least of all Microsoft, expects the move to happen instantly and this site tries to bring a level of fusion between VB6 and VB.NET.
Tuesday, April 05, 2005 4:27:19 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  | 

 Friday, April 01, 2005
This idea has merit, but they don't carry it far enough to be really useful...
Friday, April 01, 2005 3:29:18 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [3]  | 

 Thursday, March 31, 2005

I just spent three days getting inundated with the details of Indigo as it stands today (in its pre-beta state). For those that don’t know, Indigo is the combined next generation of .NET Remoting, Enterprise Services, Web services (asmx and WSE) and MSMQ all rolled into one big ball.

 

I also had some conversations about Avalon, though not nearly in so much detail. For those that don’t know, Avalon is the next generation display technology that uses full 3D rendering and should allow us to (finally) escape the clutches of GDI. Avalon is the display technology related to XAML. XAML is an XML markup language to describe Avalon interfaces.

 

My interest in these technologies spans quite a range of concerns, but top on my list is how they might impact my Business Objects books and the related CSLA .NET framework.

 

It turns out that the news is pretty good. Seriously good actually. In fact, it looks like people using CSLA .NET today are going to be very happy over the next few years.

 

Within the context of CSLA .NET, Indigo is essentially a drop-in replacement for Remoting. I will have to change the DataPortal to use Indigo, but that change should have no impact on an application’s UI, business logic or data access code. In other words (cross your fingers), a business application based on CSLA .NET should move to Indigo with essentially no code changes.

 

[Disclaimer: Indigo isn’t even in beta, so anything and everything could change. My statements here are based on what I’ve seen and heard, and thus may change over time as well.]

 

One of my primary goals for CSLA .NET 2.0 is to alter the DataPortal to make it easier to adapt it to various transports. In the short term this means Remoting, asmx, WSE and Enterprise Services (DCOM). But it also means I’ll be able to add Indigo support with relative ease once Indigo actually exists.

 

Avalon is a different story. Avalon is a new UI technology, which means that moving to Avalon means tossing out your existing UI and building a new one. But if you are using Windows Forms today, with CSLA .NET business objects for your logic and databinding to connect the two together your life will be better than most. It appears that Avalon will also support databinding against objects just like (hopefully better than) Windows Forms.

 

Since a well-written CSLA-based Windows Forms application doesn’t have any business logic (not even validation) in the UI itself, switching to Avalon should merely be a rip-and-replace of the UI, with little to no impact on the underlying business or data access layers. I keep telling people that the “UI is expendable”, and here’s the proof :-)

 

I just thought I’d share these observations. Indigo and Avalon (together under the label of WinFX) won’t show up for quite a long time, so none of this is of immediate interest. Still it is nice to know that when it does show up sometime in the future that CSLA .NET will have helped people to move their applications more easily to the new technologies.

Thursday, March 31, 2005 11:10:08 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [3]  | 

Cross-pollination is one of the benefits of regular interaction with fellow speakers and authors. For instance, Juval Lowy was just showing me this cool and rather obscure feature where you can just make method calls “disappear”. Now I am not convinced that this is a good thing, as the effect is not at all explicit or obvious – but it is cool nonetheless.

 

The idea is that you can write a method:

 

Public Sub Foo()

End Sub

 

Then you can call this method elsewhere in your code. Perhaps even many places in your code:

 

Public Sub Client()

  Foo()

End Sub

 

So far so good. But now apply this attribute to the Foo method:

 

<Conditional("MyFlag")> _

Public Sub Foo()

End Sub

 

When you now compile your project, Foo is compiled, but the call to Foo in the Client method is not included in the result. Yes, that’s right – all calls to Foo everywhere in your code disappear without a trace. They aren’t in the CIL, and thus are just poof, gone.

 

To get those calls to Foo back, you need to define a compiler symbol:

 

#Const MyFlag = True

 

Now mystically, the calls to Foo will reappear in the compiled code.

 

This is a form of conditional compilation, similar to checking for a debug condition or something. But it is not explicit, and the caller will have no idea that they aren’t calling the method any more. Nor will the developer, since there’s no way for the caller to even know that the method is marked for disappearance.

 

Seems like a feature that should remain obscure, but from a purely geeky perspective it is pretty interesting.

Thursday, March 31, 2005 10:56:10 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [6]  | 

I am a proud signatory of the petition to save IDL. Some may consider such petitions to be foolhardy, even absurd, but I think it is important to put forth some effort to save endangered technologies such as IDL. To see something this important, this transformative and this intuitive simply fade away into obscurity would be a terrible fate.

 

Wait! What the hell am I saying? I hate IDL! Hey, how do I unsign that damn petition anyhow? Damn! Now like numerous VB6 developers, I have signer’s remorse… Woe to me!

Thursday, March 31, 2005 10:45:44 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [4]  | 

 Sunday, March 27, 2005
Bill Vaughn and I were recorded live at Dev Connections in Orlando for a .NET Rocks interview. As always, .NET Rocks is a whole lot of fun, and recording live is even more fun, so check it out!
Sunday, March 27, 2005 8:44:29 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [3]  |