My Headlines

Tuesday, June 5, 2007

Enterprise WPF Applications come of "Age" with Acropolis

by Donald Burnett

Well, there has been much comment over the last few months that while WPF is great for Designers there is not much joy there for winforms developers. People have complained about a lack of components that match the functionality provided by WinForms. Microsoft has shown developers however that you can integrate winforms components with the winforms integration .DLL that ships with .NET 3.0 reference assemblies. Yes that make integration possible and many developers are starting to take advantage of this capability. Still a few things seem to be missing. Folks who program "enterprise" level applications expect a lot of functionality.

If you have ever seen Microsoft Outlook you know that it has a very modular design with panels that give the application a "portal" or "dashboard" look and feel. Different activities are possible in each of the area of the screen.

800px-Outlook_07

"Enterprise" type (dashboard style) applications are standard faire in many businesses world wide that Microsoft services. A few years back Microsoft started offering help to developers attempting to create these applications to manage business operations, processes and projects. They developed the "composite application block" for winforms to help developers with these needs. Altogether this became known as the "Enterprise Library".

Starting with the Enterprise Library, Microsoft started creating a toolset of controls and functionality to make creating applications of this style possible with windows forms. When WPF came along there was a gap in functionality so this type of application wasn't easily created. With 1.0 of WPF even the ubiquitous datagrid control wasn't present. Well Microsoft has a wonderfully supportive developer community authoring controls, and this gave birth to the XCEED Datagrid for WPF which XCEED amazingly made available for FREE to the community. It's become the defacto standard for the community. However "Enterprise" support was still missing from WPF.

PARTS IS PARTS- But this Ain't Chicken! (Conjuring the Spirit of Clara Pellar)

One of the things Microsoft did with winforms is to offer a feature called "PARTS" . If you aren't a Windows Client developer, but know ASP.NET 2.0 you probably know about Web Parts.. Web Parts are a family of controls that enable you to add rich, personalized content and layout to your application. WPF was not yet in the picture with "parts" of any kind. Sure it's possible to create amazing user interfaces with WPF, but people working in the enterprise doing these modular style of applications were left wondering if they would see support.

Today at WindowsClient.net (Microsoft's new portal for WPF and Winforms) Microsoft introduced the next step in the WPF revolution their "Acropolis" CTP. This is a toolkit for creating modular, business-focused Windows client applications. "Acropolis" builds on the.NET Framework, and includes a run-time framework, design-time tools, and out-of-the-box functionality. "Acropolis" enables you to build reusable, connectable components and assemble them into working applications that are easy to change. It uses a composite application framework to address complex, changing business requirements. Composite applications integrate functionality as components that you can easily reconfigure or replace. An example of this would be an application that would let you chose either a winforms or WPF user interface or both.

The CTP seems like a very finished product even in this preview. It integrates nicely into the Visual Studio "Orcas" preview. There are some really cool controls to explore in the toolbox..

toolbox

Some Terminology you should know before sitting down to the CTP:

part

The basic building block for "Acropolis" applications. A part typically provides a portion of the application’s user interface and encapsulates self-contained and reusable functionality. "Acropolis" parts separate the implementation of their logic and state from their user interface (view).

part view

The user interface portion of a part. Part views are sometimes referred to as skins.

form

A part that contains one or more child parts that work together to implement a specific function, scenario, or task that the end-user can perform. A form can implement a specific navigational pattern to help the user to accomplish the task that it implements. You can nest "Acropolis" forms to provide rich user interface structures.

service

An application-level capability that implements a specific strategy or provides pluggable functionality, such as logging, event routing, and so on. Services do not provide user interfaces, but instead provide functionality that parts can use to supplement their own business logic. An application can customize the behavior of the "Acropolis" runtime by defining and configuring services according to specific requirements.

shell

A parent or host application that integrates "Acropolis" parts, forms, and services together with its own functionality. The application shell communicates with the "Acropolis" parts, forms, and services through the "Acropolis" runtime.

runtime

The framework that manages the lifetimes and intercommunication of all parts and services in an "Acropolis" application. The runtime also integrates the "Acropolis" application into the shell and manages the services that are required to communicate with the shell.

connection point

A point of communication between a part and other "Acropolis" components, such as the part's view, other parts, or services. Connection points come in multiple types including ComponentProperty, ComponentCommand, ComponentNotification, and ServiceDependency.

There are a couple different application styles you can create.. One is a "Document" style of interface.. Notice the extended controls in the toolbox and new functionality in application.xaml as seen below..

acropolis1

What you are looking at in the middle of the above picture is the new "Acropolis" Designer. Unlike the WPF Designer and the Windows Forms Designer, the "Acropolis" Designer has nothing to do with the user interface of a part, form, or application. Instead, the "Acropolis" designer is divided into regions that contain information about the different aspects of a part. When you create a new "Acropolis" part, you can view the generated PartName.xaml file in the designer.

The Application shell itself also looks very modular and what you'd expect from a modular enterprise app...

acropolis2

For this posting I do not have time to delve more deeply into the "parts" functionality, but I will in the future. These new controls and functionality finally put WPF on an enterprise level footing.. I expect that we'll see some very amazing applications developed with this new functionality.

This is a new day of joy in the evolution of WPF development. Some of you may be already familiar with this functionality in winforms but now "Acropolis" extends the functionality to be managed in XAML. You can use WPF data binding in the XAML of a part view to bind user interface (UI) elements directly to part connection points. you You can also use XAML to configure aspects of a part, form, or application, such as the following:

  • Connection points.

  • Child parts.

  • Service dependencies.

  • Services made available to child parts.

  • Navigation manager.

The benefit of the new "Acropolis" Designer's XAML configuration capability is that it makes it easy for you to define complex application structures without writing code. XAML provides a consistent syntax that makes it human readable and editable, but it is primarily useful with tools such as the "Acropolis" designer.

There is a lot here to explore. We'll dive deeper in my next posting.

2 comments:

Dad said...

Wow -- excellent post.. thanks for digging into the Acroplis so soon and so deeply!

Please let us know if you have any comments\questions

..brad
http://blogs.msdn.com/brada

Adel Khalil said...

great post, i was wondering what is the diff between this and the original XAML/WPF templates that ships with 3.0 i know this is diff paradm but is it like MFC for C++.. that's how i see it.

??