In-Depth

Modeling for .NET

Modeling and software design are once again riding a wave of popularity, at least in some limited circles. The Unified Modeling Language (UML) and, recently, the Model-Driven Architecture (MDA) have gained notoriety in the industry, and the idea of better design up front clearly has interest.

But the clamor around modeling does not always seem to encompass the .NET space. As much as any others, what .NET programmers want most is to just code. But modeling improvements are proceeding on planet .NET at the same pace as on planet Java.

Modeling of software apps provides a blueprint that helps to ensure that the app will meet user needs. Companies investing in software development for .NET do not want to rewrite an app every couple of years because they failed to do a proper design and architecture in the first place.

Recent tool innovations such as Borland's Together Control Center and IBM Rational's Rose XDE Developer have improved the UML story, helping to ensure that UML models are maintained in synchronization with underlying code implementation. That has helped people to cross the curve of uptaking UML. For all these reasons, modeling is steady on.

There are, of course, modeling challenges specific to the complexities of .NET. For those who are familiar with object-oriented technology, modeling for .NET has not been too much of a hurdle. Not all developers are familiar with object technology, however, and not everyone is an expert at designing reusable components.

In fact, Microsoft itself sees that as a key issue as it looks to create its own model offerings for upcoming Visual Studio .NET releases. As with so much the software giant does, the new modeling tools will generate both interest and controversy.

What drives models?
For now, some object assembly may be required. When Microsoft introduced Visual Basic .NET, for example, compatibility with older versions of Visual Basic was broken. The new Microsoft Visual Basic .NET essentially forces developers to start mastering some new object-oriented concepts.

Going back several years, Microsoft offered a basic Rational Rose modeler in the Visual Studio box, and it has added Visio visualization capabilities to its tools since purchasing that company several years ago. It has worked at times with third parties to create a useful developers' repository.

As Microsoft works to roll out its code-named ''Whitehorse'' design tools, it is mindful of the shortcomings a wide group of developers have when it comes to object design. The firm appears ready to make its modeling moves without committing to UML or MDA standards.

Patterns and practices
To help developers visualize OO concepts and models for .NET and all its complexities, many tool providers, including IBM Rational, Borland, Telelogic, Interactive Objects Software GmbH, Computer Associates, Compuware, Embarcadero, Microsoft and others, have either introduced new modeling tools, or revamped existing tools to work within the Microsoft Visual Studio .NET dev environment.

Modeling can be driven from any number of different layers, said Brent Carlson, co-founder and vice president of technology at Pittsburgh-based LogicLibrary Inc. ''There is business process modeling, which today tends to be a lot of process workflows in a graphical environment, and they don't necessarily get translated by any tools means into requirements but have to be translated by human means into requirements.''

''I expect that will change over time, but it will take some time to get to that point,'' continued Carlson. ''Often, a lot of work is done up front with architectural models, and the .NET component framework, and the descriptive patterns and practices that Microsoft has started rolling out go a long way toward starting to organize the way .NET developers think about application architecture.''

For its part, LogicLibrary formed a partnership with Microsoft aimed at making that knowledge content more consumable. This centers around the patterns and practices that are being defined for development and deployment architectures, and much of that is model-driven using UML. LogicLibrary manages that content and exposes it to Visual Studio .NET users.

Microsoft has also built out various reference applications that use not only the .NET framework but application blocks, which are extended capabilities built on top of the .NET framework that are designed to solve specific problems. These application blocks are pre-built pieces of code that can be used as is or extended by the enterprise. These problem solvers have been likened by some to 'best practices in a box.'

LogicLibrary has worked with Microsoft to present those reference applications in a model-based form. LogicLibrary's Logidex for .NET product addresses what Carlson terms ''the glut of information issue,'' and helps enterprises to better organize what they have, put it alongside what Microsoft delivers to them and then make sense of it.

''Right now, there's a lot of information out there and it's hard to know where to begin,'' said Carlson. ''If a developer who is going build a .NET app comes into Visual Studio and sees this reference app that describes how to do data access, or describes how to do exception handling, or describes how to do caching in their business layer to improve performance, that's really good stuff and it gives them a jumpstart toward building out their application more rapidly.''

IBM goes .NET
Now part of IBM, Rational Software Corp. was one of the original developers of the OMG's UML standard modeling language. With the Rational acquisition, IBM has added a full development platform to its portfolio, including support for .NET.

Historically heavily entrenched in Java, rather than .NET, IBM entered the development tools business with tools for its middleware technologies like WebSphere Application Server, which were typically complemented by a Java-based development environment.

Rational initially partnered with IBM in 1999 to work on IBM's Eclipse development tools. Rational had also been working closely with Microsoft to provide visual modeling capabilities for Microsoft .NET. While there was some question about whether support for Microsoft technologies would continue after IBM's acquisition of Rational earlier this year, both IBM and Rational went on to affirm that the relationship would remain unchanged and that Rational would continue its support of Microsoft technologies.

In fact, IBM Rational provides a wide-ranging integrated life-cycle development platform for .NET. Because the products are language-agnostic, they are applicable to Java and other software development activities.

''The business we're in is to enable the success of customers who develop software,'' said Roger Oberg, IBM Rational's director of market management. ''It's very clear that customers are, in many cases, heterogeneous in their selection of component technologies. They'll have multiple projects and some projects will use .NET, some will use Java and others may use embedded technologies, depending on the nature of the company.''

Oberg notes that, at some point, a few of those Visual Basic developers may look to move to Java as a language. ''Learning UML and abstracting yourself from the underlying component technology can be a very effective strategy for an organization, so they can develop people who can work on a .NET project today, but work on a Java project tomorrow,'' he explained. ''Our tooling applies to both component technologies, so you can learn what you learn about how to model, and then the UML itself is applicable to both Java and .NET technologies.''

IBM Rational's Rose XDE Developer includes the Eclipse IDE and can run inside Microsoft Visual Studio .NET or IBM WebSphere Studio. ''The assets that you get along with them might be applicable to one environment or another; clearly, we don't abstract you so much from the underlying component technologies that you can be completely unaware of them,'' explained Oberg.

White board, Whitehorse
After intimations from company head Bill Gates, Microsoft is set to update its modeling arsenal with software now known as ''Whitehorse.'' It is oriented for ''design for operations,'' allowing users to specify logical infrastructure requirements early in the development process, and to verify application settings against logical infrastructure.

''In today's world, there's little communication between infrastructure and architecture teams,'' noted Prashant Sridharan, lead product manager, Microsoft's Developer Division.

As portrayed by Sridharan, a key is that a logical infrastructure designer and a service designer will co-reside in Whitehorse. ''The secret sauce is in how the two designers work together,'' he said. The software will improve back-and-forth between different software camps, he explained. He said Whitehorse will ship with Microsoft's Whidbey, the next version of Visual Studio .NET, scheduled for release at the end of 2004.

ADT asked Sridharan about UML modeling support in Whitehorse. He said it was not intrinsic to the offering, but that UML modeling could be supported via add-ons.

''There are a lot of different modeling environments. UML is one of them. In Whitehorse, our approach is a little different. We're trying to build a platform for modeling.'' That, he said, includes a modeling engine and a modeling framework. He said the framework would be public (''when it ships''), and that the company was already working with select third parties in this regard.

Sridharan has high hopes for this offering. ''We want to build a renaissance in modeling in general. We believe in model-driven development -- although we also believe in traditional development with code.''

Whitehorse, he indicated, will be different from the Rose UML tool with which some Microsoft developers have worked. ''UML addresses an OO space,'' he said, noting that Visio also could support traditional OO modeling. But as service-oriented architectures flourish, and systems become highly distributed, issues like latency and security must be considered. OO approaches may not be the best solutions for such work, Sridharan said.

The drift from UML (as supported in Microsoft's earlier Rose add-ins) may trouble some. ''What Microsoft has pulled up the curtain on is decidedly not a standards-based approach,'' said Greg Keller, director, design and modeling solutions at San Francisco-based Embarcadero Technologies Inc. ''They are not interested in UML or MDA. Their tool will be good, it will be effective, but it's not embracing standards other than XML.''

Are partners getting the information on Whitehorse? Mike Devlin, general manager at IBM Rational, says ''yes.'' ''Microsoft does a pretty good job briefing partners. They do have their own vision of where modeling is going. The difference between ours and theirs is ours is not platform-specific.''

The mere fact that Microsoft is promoting modeling is notable, said Grady Booch, IBM fellow, and one of UML's originators. ''The fact that they are entering the modeling market is an exciting thing.'' Microsoft's moves, he indicated, further validate IBM and Rational's efforts since the mid-1990s.

.NET intrinsic
The .NET environment introduces its own specific technologies to help people build Web-based and traditional thick-client-type apps. In particular, there are ADO.NET technologies and Web services through ADO.NET. In IBM Rational's Rose XDE Developer, the modeling tool inside the .NET shell provides a profile to help model and manage ADO.NET and Web services apps.

''The biggest problem that occurs is that people, without knowing it, tend to change the definition of their Web services and they end up breaking the clients using the Web services, whether internal or external,'' said Kevin Murphey, development manager at IBM Rational. ''Modeling is crucial to help you manage the definition of your Web services and Web-based apps, where you can model the GUI along with the code behind. We let you model and visualize those through UML.''

.NET has also introduced into all of its programming languages some new key primitives, things like delegates, events, properties or indexers, low-level programming constructs that are new to the software industry or at least have never been incorporated directly into the programming language.

Through assisted modeling technology, IBM Rational Rose XDE Developer allows developers who are not familiar with these constructs to visualize them. For developers who are familiar with and understand these programming constructs, visual modeling without having to master the intricacies of the UML is provided.

Of note recently is the proposed Reusability Assets Specification, currently under review by the OMG. It provides the ability to create assets with a standard way of describing them. For example, the asset could be the code, code plus information about that code, what the code's purpose was or its requirements, what the test results were, version history or, basically, any variety of meta information associated with this code that facilitates reusable assets.

According to IBM Rational's Oberg, this is a potentially huge benefit to software developers because the whole notion of component reuse has been around for a while; but because there has not been a standard way of describing a component, it never really got off the ground. IBM Rational has added into XDE the capability to search for and retrieve components that use this description language.

Java/.NET conundrum
While modeling and development for the .NET environment is boosted by a variety of tools providers and standards, there is still the issue of .NET vs. Java. Microsoft is more than ready to convert Java to .NET, and for many teams, Java is the first stop. When asked where IBM Rational's leanings are truly rooted today, the firm's Oberg had to side with Java.

''Java is frankly delivering a lot of value to customers, which is why it's both popular today and still increasing in popularity,'' said Oberg. ''Our customers have demonstrated that they're successfully building very complex, very large-scale applications in Java. It's scalable, robust and it's an open development environment not owned by any one proprietary organization.

''To be clear, if a customer is wondering whether to go with .NET or Java, IBM's recommendation will be to go with Java because we believe it delivers the highest value proposition to customers,'' he continued. ''However, if a customer for their own purposes has selected .NET, we're going to help them build great apps in .NET.''

Flexibility has proven to be a key factor in these modeling tools and standards. UML supports many platforms, languages and development environments. MDA essentially allows you to have models that are in sync with the code. It also extends UML into code generation and other areas of the application life cycle; with its platform-independence, it also supports porting to different platforms.

LogicLibrary's Carlson said that his team could readily architect their application and successfully move it from a J2EE implementation to .NET. ''We were able to preserve a largely single-source code base for both products because Microsoft has strong support for J# and can consume Java code in J# form,'' he said.

''In many cases, with a large percentage of our source code we've been able to just recompile our Java code as J# and deploy it on the .NET framework. This is a compliment to both my team and to Microsoft for having a seamless environment for traditional Java developers,'' noted Carlson.

All points between
Modeling should continue to gain attention at Microsoft, as it seeks to maintain mind share vs.  the Java tools providers. While the Java camp fashions easier-to-use IDEs, a la Visual Studio, it seems to have a lead in modeling. This means Microsoft is playing catch-up, and that modeling, of all places, will be a field where the platform wars may heat up.

''The Java community has embraced the concept of modeling a lot more quickly. Tools have been a lot more prevalent,'' said Embarcadero's Keller. ''What you are left with is Microsoft holding the bag, offering tools -- with all due respect to Visual Studio -- without great visual clarity.

''Compuware, for example, and others are doing what they can to steal the VB developers and bring them over to the light of Java,'' Keller continued. ''Microsoft is trying to maintain the VB folks and [the Java camp] is trying to tap them.''

Keller noted that a lot of this recent modeling attention focuses on app development, sometimes to the apparent exclusion of data modeling.

''Much of this is about making the app development approaches easier. But it doesn't stop at the app. It does not quite stop in the middleware either,'' he said. ''The question is: How do you make it easier from class to database component, and all points in between?''

.NET unplugged
Visual Basic .NET application developers may also want to target a set of mobile devices, said Bob Holt, product manager at Atlanta-based AppForge Inc. ''For example, if you wanted to write apps for a Palm OS handheld, Pocket PC or Symbian, or some of the smart phones coming out of Europe, you can use your Visual Basic training in the Visual Basic Studio .NET environment to create and test the apps. After you're comfortable with that, the AppForge MobileVB.NET software development platform will compile the code written in the project into a form that's suitable for that handheld device.''

MobileVB.NET uses an add-in module for Visual Studio. An additional menu inside Visual Studio provides access to AppForge operations. A set of forms is used to create a set of apps in the same way that they would be used for desktop apps.

According to Holt, modeling aspects are generally handled well by UML-based add-ins to the Visual Studio .NET environment. It is after a design is in place that Mobile VB.NET begins to work.

A typical mobile application in the enterprise environment may be inventory with combined bar-code entry, dial-up-based signature capture and database logic so that people working remotely with a wireless device can do things like inventory analysis to a central database.

In general, AppForge spans the spectrum of vertical markets, including airlines, transportation, hotels, medical and financials. Coca-Cola uses the AppForge product with handheld devices and custom serial cable and connections to gather data about what has and has not been sold from Coke machines.