Prism replacement

Topics: Prism v2 - WPF 4
Nov 2, 2010 at 4:23 PM
Edited Nov 2, 2010 at 4:23 PM

I haven't followed the latest Prism development, so I'm not sure if I missed something...

But I wrote a much simpler library based on MEF which can replace Prism (as far as I know.....)(I wonder if I'm right)
(To be entirely truth I do rely on MEF, which is a big library itself, but with a very small and simple public API) 

To be sure I successfully ported the StockTrader application to it, while seriously reducing the application size (I removed all presenters, replaced by a generic class class which does view resolution and use a MVVM approach even more forcefully).

I'll be glad to have some feedback!

It's all open source on CodeProject:
http://www.codeproject.com/KB/dotnet/CompositeApplicationEx.aspx 

Nov 3, 2010 at 2:57 PM

Hi,

Thanks for sharing this with the rest of the community. Hopefully, the community will provide you more feedback. 

I have read some parts of the documentation in the home page of your project, so I would like to give you my personal appreciations. It is clear you were pretty inspired in Prism and others. So, this is just great, since Prism is meant to be a guidance. 

As for the Validation, in Prism 4 the ViewModel base class supports setting validation errors for the properties of the view model or model. Therefore, you will find guidance on this topic in the MVVM Quickstart and in the following documentation section in the Prism4.chm: MVVM Quickstart, see the Validation section.

In terms of providing you a more MEFEE code, in the Stock Trader RI, you will find a new ViewExport attribute, which helps you on exporting this to the container as well as register this in a particular region.

[ViewExport(RegionName = "MainRegion")]

You could check the Stock Trader RI if you need more guidance on this topic.

It is pretty interesting the concept of Areas, which is similar to Regions and the way that it is managed without Region Adapters by creating interfaces. In my personal opinion it is a simpler approach in cases that you need to expose new controls for which you do not to add a Region Adapter, but in most cases it could comprises the productivity. Additionally, it loses the ability of UI Composition in an homogenized way between different applications, you need to write for each view.

It seems that you worked hard on this and also provided a lot of guidance. Personally, I found this really valuable, so I would encourage you to continue on this project.

Just for you to take it into account, you could use Codeplex as another option to manage your own open source projects.

Hope this helps.

Fernando Antivero
http://blogs.southworks.net/fantivero

 

Nov 3, 2010 at 9:54 PM
Hi Fantivero,
How exciting it is to receive an email by one of the Prism’s developers!
Yes I was strongly inspired by Prism, as I used it for the last 2 years at work. But we didn’t upgrade, so I can only say I know relatively well the version from 2 years ago.
I did have problem writing a container adapter for a 3rd party control I was using! So much so that we didn’t use the region manager in the end and I might have missed out on some of its functionality. For example I am not sure what is this view composition you are referring about!
If it is “subrebgion” while I do not provide guidance my ideas is hat each “subshell” area expose an interface or (more likely) and the datamodel for it is shared among people accessing it.
Anyway I’ll have a look at the particular area you mentioned!
I was not really thinking of putting it on CodePlex as I wanted to keep the functionality small and it is working as it is. However I gave it some thought and that might just be a good idea indeed! Smile
Anyway, time to go to work!
Thanks for your feedback,
Lloyd
Sent: Thursday, November 04, 2010 1:57 AM
To: [email removed]
Subject: Re: Prism replacement [CompositeWPF:233190]

From: fantivero

Hi,

Thanks for sharing this with the rest of the community. Hopefully, the community will provide you more feedback.

I have read some parts of the documentation in the home page of your project, so I would like to give you my personal appreciations. It is clear you were pretty inspired in Prism and others. So, this is just great, since Prism is meant to be a guidance.

As for the Validation, in Prism 4 the ViewModel base class supports setting validation errors for the properties of the view model or model. Therefore, you will find guidance on this topic in the MVVM Quickstart and in the following documentation section in the Prism4.chm: MVVM Quickstart, see the Validation section.

In terms of providing you a more MEFEE code, in the Stock Trader RI, you will find a new ViewExport attribute, which helps you on exporting this to the container as well as register this in a particular region.

[ViewExport(RegionName = "MainRegion")]

You could check the Stock Trader RI if you need more guidance on this topic.

It is pretty interesting the concept of Areas, which is similar to Regions and the way that it is managed without Region Adapters by creating interfaces. In my personal opinion it is a simpler approach in cases that you need to expose new controls for which you do not to add a Region Adapter, but in most cases it could comprises the productivity. Additionally, it loses the ability of UI Composition in an homogenized way between different applications, you need to write for each view.

It seems that you worked hard on this and also provided a lot of guidance. Personally, I found this really valuable, so I would encourage you to continue on this project.

Just for you to take it into account, you could use Codeplex as another option to manage your own open source projects.

Hope this helps.

Fernando Antivero
http://blogs.southworks.net/fantivero

Read the full discussion online.

To add a post to this discussion, reply to this email (mailto:CompositeWPF@discussions.codeplex.com?subject=[CompositeWPF:233190])

To start a new discussion for this project, email CompositeWPF@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com