Tech Brief

Inside Acropolis

Microsoft's new composite UI framework helps you build rich-client apps.

"Acropolis" is the code name for a new set of Microsoft frameworks and associated wizards used to make rich-client development easier and more replicable using Windows Presentation Foundation (WPF). The successor to Microsoft's Composite UI Application

Block (CAB) and Smart Client Software Factory (SCSF), Acropolis is a composite app framework that corrects a common problem in apps written using Visual Studio, as well as other development tools -- especially code written by novices in a hurry, and by those building rapid prototypes.

Specifically, Acropolis helps developers build apps in separate UI and logic layers. The idea of separating UI code from business logic -- the name often given to code that does computation or data processing -- is an accepted practice for making applications more modular and easier to maintain. Acropolis encourages that model of application design by providing separate areas to place UI and business logic components. And by doing so, it also makes it possible to take components of both types and reuse them in other applications.

Acropolis is available for download as an August 2007 community technology preview (http://windowsclient.net/acropolis). You need Visual Studio 2008-currently in beta 2-along with the .NET Framework 3.5. Microsoft plans to integrate Acropolis tooling into future versions of .NET and Silverlight.

UIs by Designers
Acropolis is composed of a set of UI templates geared toward specific types of rich client applications. You choose a template that most resembles the type of application you'd like to build, and that provides you with a look and feel for your application. You also get to choose the form layout, theme and navigation. At this point, the choices aren't many, but you still get to customize a bit.

The resulting WPF interface is defined by XAML. (You can go to RedDevNews.com and access this article to see what a typical XAML definition looks like after applying the application UI wizard.)

Even if you can't write XAML, the XML-like syntax is readily understandable, and you can see how the description translates into the view on the screen.

Acropolis
[click image for larger view]
An application UI shell built using the Acropolis wizard shows a basic layout that can serve as the starting point for a WPF application.

Logic in Parts
Now, you'd write business logic in a typical application. Business logic in Acropolis is written in "parts." A part is a piece of business logic that contains more functionality than an individual control, but less than an application as a whole.

Acropolis also provides for connection points, which allow the parts and components to communicate within the application shell. A connection point derives from the Acropolis goals of layers and loose coupling. Application parts define external interactions between a part and other components, such as other parts, services or even the part's view and its container.

You create a part by selecting the project and right-clicking to bring up the project menu. Then select Add Item, where you'll get a long list of possible items to add to the project. You can choose either Acropolis Part or Acropolis Document Part.

When you create a part, you get two files. A class derived from the part class, and the template that divides the class between a XAML file and a code-behind file. The XAML file contains the connection point and any service-dependency declarations for the part. The code-behind file contains the C# or Visual Basic with the actual business logic.

So, if you're going to write logic to add features, here's where you do so. Among the types of parts you might want to create are data access, standardized tasks and even implementations of patterns.

Changing Appearances
There are a lot of applications that Acropolis won't help with, and beyond the part concept there's nothing here for use with business logic or Web services. You still have to write that logic in C# or Visual Basic.

That said, for its intended applications, Acropolis is at least an interesting exercise in rapid application development. Think of Acropolis as a demonstration technology for WPF and XAML. You define a basic application-something that would take you half an hour or so to do in Visual Studio 2005-and there it is, all laid out for you in a few lines of XAML code. You fiddle with the code, and boom -- the UI changes. You run the wizard again, change a couple of things, and ten seconds later it looks different again.

While it's not a killer application, to a developer it's powerful and cool. Acropolis demonstrates how easy it is for developers to work with XAML to create new application appearances just by changing a few XAML tags. Enterprises can make use of this capability to design internal applications with the same look and feel, reducing the need for training. And developers can build parts that provide the same features across these applications. Cool and useful -- what more can we ask of our technologies?

About the Author

Peter Varhol is the executive editor, reviews of Redmond magazine and has more than 20 years of experience as a software developer, software product manager and technology writer. He has graduate degrees in computer science and mathematics, and has taught both subjects at the university level.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube