Ride Out the .NET Programming Revolution
A .NET revolution is underway, but you can act now to make sure that you avoid becoming a casualty of this process and minimize its impact on your own coding.
ET development is undergoing fundamental change. The pressure is building, and the ground is shaking. Each new tool is more exciting in its niche than the last, but each increases the surface area of what we must know. And worse, there is no possibility that adding more to .NET will simplify it. No matter the intent, the new stuff means there is more to learn. No one is competent to write .NET applications anymore (see the article, "Pace of Change Leaves No One Competent
" [Guest Opinion, VSM
May 2007]). But seeing the trends behind such revolutionary change will keep you sane and focused.
It's hard to assess the impact this month's announcements, much less assess the announcements made during the last year. CoreCLR in Silverlight 1.1 and the Dynamic Language Runtime (DLR) are huge, but only because they broaden the reach of earlier changes in Windows Presentation Foundation (WPF), Windows Workflow Foundation (WF), Windows Communication Foundation (WCF), and the .NET framework itself.
Traditional technologies are like big water balloons; in spite of namespaces, everything is stuck inside one layer. Techniques like Domain Specific Languages (DSL), modeling, and visualization enable a paradigm more akin to an onion. You'll work in the surface layer, diving deeper only as required. Early implementations include the visual metaphor of WF, which closely resembles modeling. Writing and carefully naming workflow tasks lets you create a DSL.
Workflow as a DSL integrates local and remote services as abstract building blocks. If all meaningful actions are defined as services, the set of service interfaces effectively becomes a higher level language definition. You can switch the actual implementation at will. New abstraction paradigms are unlikely to succeed without patterns that plumb core processes in flexible ways. Separating the application definition (the Workflow, for example) from the implementation frees the expression of business intent from technology. Services and workflows calling other services and workflows even allow abstraction nesting.
Windows Presentation Foundation illustrates different abstraction approaches. Databinding, templates, triggers, and commands isolate UI appearance and behavior. Validation and converters allow simplified programming. Separating layout intent from the look-and-feel is so powerful you can transform WPF XAML into massively different UIs—even Windows Forms or Web Forms, with a little code generation. WPF is successful in isolating different facets to achieve a single goal; that is, this isolation allows independent evolution and delivery.
LINQ incorporates, among other things, extension methods to enhance any .NET class. You can add a SubstringAfter method to the String class by adding a shared (static in C#) method with special syntax. Any time your method is in scope, it appears in Intellisense as a new method for String. From one perspective, it's just a better way to organize utility methods. But from another, it alters development by letting you add library features.
These technologies are in full release today. They'll pair up with recently announced technologies which expose their own trends, including extremely fluid UI platforms on top of common XAML and a move toward dynamic-language support. If you see each technology in isolation, things look fragmented and chaotic. But the core features show fundamental trends toward better ways to code.
Not all the new trends will pan out, but solutions will evolve where real problems exist. Three major issues threaten development today. The act of coding needs to be simplified massively to refocus programmers on business problems. UIs need to be created once to run on all platforms. And the software lifecycle must be altered to stop the serial rewrites of business applications every few years. Tools in our hands now or in the pipeline address each of these issues—in extremely rudimentary ways, anyway.
The maturation of these technologies won't create linear paths to new paradigms. Instead, progress will feel like a spiral, sometimes going backwards and seemingly covering the same ground in a painfully slow revolution. Progress in this post-modern-OOP world moves toward higher levels of abstraction, with replaceable implementations expressing the same code, flexible languages tuned to your usage, and intent-based isolation. This isn't an easy time to be a programmer—revolutions are messy things. But hang on for the ride; it's going to be fun.
Kathleen is a consultant, author, trainer and speaker. She’s been a Microsoft MVP for 10 years and is an active member of the INETA Speaker’s Bureau where she receives high marks for her talks. She wrote "Code Generation in Microsoft .NET" (Apress) and often speaks at industry conferences and local user groups around the U.S. Kathleen is the founder and principal of GenDotNet and continues to research code generation and metadata as well as leveraging new technologies springing forth in .NET 3.5. Her passion is helping programmers be smarter in how they develop and consume the range of new technologies, but at the end of the day, she’s a coder writing applications just like you. Reach her at firstname.lastname@example.org.