himalia.net | community blogs

Thursday, June 28, 2007

Himalia on Acropolis


Some people believe Himalia and Acropolis may overlap in some zones. And they are right! Himalia and Acropolis overlap in the zones where Himalia doesn't want to be... Yes, some time ago we had to build our own service schema and now we were thinking about a composite strategy for large teams... but it isn't our real focus. We just want to have more time to show you how we can build semantic user interface in minutes... this is our mission!!! (BTW, we will need this services schema anyway for the other platforms: asp.net and .net 2.0. Keep in mind that Acropolis requires .net 3.0)

 

Now that the first Acropolis CTP is public, our composite strategy will be far easier: we should put just on top of Acropolis.

So, I spent a couple of hours trying my first approach... (there are other two methods we are discussing right now and will attack in the near future).

 

**** Disclaimer: This code doesn't work with the public version available from December. ****

 

1. Create a Part Library, and name it Himalia.Acropolis

2. Add a new Part (HimaliaPart) and a new PartView (HimaliaPartView)

3. Add a new connection point to the Himalia Part: RootElement

  <AcropolisComponent.ConnectionPoints>
          <ComponentProperty Name="RootElement" />
  </AcropolisComponent.ConnectionPoints>

4. Override the OnFactoryCreationComplete method on the HimaliaPart

        protected override void OnFactoryCreationComplete()
{
base.OnFactoryCreationComplete();

// Creates the Himalia Session in the WPF Runtime
WinFxUISession session = new WinFxUISession(this.Name);
session.StandAlone = false;
this.Title = session.Title;

// Set the root element to the connection component property
this.RootElement.Value = session.Start<FrameworkElement>();
}

5. Override the OnPartAttachedmethod on the HimaliaPartView

        protected override void OnPartAttached()
{
base.OnPartAttached();

// Add the root element to the control
this.Children.Clear();
this.Children.Add(this.Part.RootElement.Value as UIElement);
}

6. Now, in your Acropolis application, you can use HimaliaPart's, like this

  <AcropolisApplication.ChildParts>
<Him:HimaliaPart Name="C:\\PetShop.hui" />
<Him:HimaliaPart Name="C:\\Invoices.hui" />
</AcropolisApplication.ChildParts>

7. Replace the OnActivated method of the Application (it throws a null exception because the MainWindow is bad set, I don't know why)

        protected override void OnActivated(EventArgs e)
{
foreach (Window w in this.Windows)
{
if (w is Window1)
{
base.MainWindow = w;
break;
}
}
base.OnActivated(e);
}

8. This is how it should looks like:


HimaliaOnAcropolisInvoices HimaliaOnAcropolisPetShop


 


Conclusion


You can integrate Himalia and Acropolis points of view nicely. In one side, Acropolis allow you to better segment the desktop application in divisible parts. On the other side, Himalia allow you to better create each part, focusing in the most important things for your users. Remember, Himalia focuses on usability and is a modeling tool. Acropolis focuses on composability and extensibility and isn't a modeling tool.


 


But soon, you will see how these developer-side separated user interfaces could be user-side integrated again... just give us some time.


 



Technorati tags: , , , ,

Labels: , ,


Comments: Post a Comment
Links to this post:

Create a Link


<< Home