Sunday, August 12, 2007

Acropolis Parts, Views, and xaml files. - MSDN Forums

 

Web Parts for Windows?  Here's Acropolis. 

Acropolis provides a mechanism which allows you to cleanly separate your business logic from any associated UI. The Part component contains the business logic, while the View contains the user interface for the part. Both of these are technically components in that they exist as separate pieces of functionality and in that you can replace either one of them as long as you implement the right interfaces.

But the Part component is somewhat different in that it is the main component that gets composed into the application. You can have Parts that have zero, one or more Views, but you can't have a View without an underlying part. If you did want some UI but didn't want to split out the business logic into a separate component, you would build a standard control.

This separation between business logic and UI exists all the way up to the main application itself. You can think of the entire application as a hierarchy of Parts and Views. The Application.xaml file defines the root level (i.e. application level) business logic for the application. The Window1.xaml file defines the UI for the application (i.e. the application's main window or Shell). I have seen people rename Window1.xaml to Shell.xaml but the Application.xaml file usually keeps that name. You can't really delete them because you need something to contain the other Parts and Views in the application.

Source: Acropolis Parts, Views, and xaml files. - MSDN Forums

No comments: