In our company we did a POC (proof of concept) with Silverlight for our new products.
Now that this POC period has ended with a positive result it is now of course time for the real stuff :-)
One problem we still have with using Silverlight is the lack of some guidelines for your application structure.
Or better yet a framework to help you do so. Following the MVC, MVP or MVVM pattern...
My question is if any of you have some experiences with any of these (good or bad).
Or if you know of any others.
Remark: in the POC period we also experimented with Flex for a brief period.
There you had the Cairngorm framework.
If we don't find any good existing ones, we have toyd with the thought of (trying to ) porting this to Silverlight.
Any of you have any experience with Cairngorm? Would it be possible to port it?
Any thoughts, suggestions on MVC/MVP/MVVM for Silverlight welcome!!!
Unfortunately currently there's no official MVC frameworks for Silverlight. We're still focusing on releasing Silverlight 2 core framework. But if you're building an enterprise application, I think many of the concepts in the
Composite Application Guidance for WPF will be very helpful. This guidance is not for MVC (which is merely a design pattern working for a single application), but rather give your an architecture
guidance so that you can build loosely coupled, semi-independent components and integrate them together to composite various client applications. Note the framework is not created for Silverlight. Don't expect to use any class libraries. But I think if you
follow this guidance, you will have a solid grasp of modern architectures for client side enterprise applications. Also you can download the source code for the library.
shanaolanxing - I'll transfer to the Windows Azure team, and will have limited time to participate in the Silverlight forum. Apologize if I don't answer your questions in time.
Thank you for your reply shanaolanxing.
I've already read (a bit) about the composite WPF. And the ideas outlined there are indeed very good (and actually more or less exactly what I'm after).
But as you say there are no libraries available.
So without investing time in creating Silverlight libraries ourselves, it's not ideal.
Because in my opinion it's better to have these because maybe just guidelines are more easily put aside, or are more open to interpretation per developer...
I played around a bit with the PrismAG project a while ago. The main issue I found is that the WPF reference implementation used a DataTemplate to provide the view by targeting the view model type. This isn't currently possible in Silverlight.
In my test project I created a view as a user control that takes its view model as a dependency, then I set the view model as the DataContext of the control. This seemed to be a decent workaround, though I'm still trying to decide if it helps enough to
be worthwhile.
In my project I have made my own MVC implementation, it's easy because it's natural to code (you are working using .net).
How I structured the code:
I have created a View Layer (Silvelright UI).
Controller Layer, including:
Including Messages Structures (the view just call runCommand filling up a message with info).
Includes IViews interfaces for each SL Page/Dialog), so the controller can update any page on their need.
Model (DAL + Entitites, communication via WCF / Services).
I know there are formal framework over there, but in some ocassions you get tied up to that fx (e.g. I don't like web client software factory for ASP .net).
doolittle
Member
75 Points
28 Posts
Silverlight and MV* frameworks
Aug 04, 2008 02:33 PM | LINK
Hello
In our company we did a POC (proof of concept) with Silverlight for our new products.
Now that this POC period has ended with a positive result it is now of course time for the real stuff :-)
One problem we still have with using Silverlight is the lack of some guidelines for your application structure.
Or better yet a framework to help you do so. Following the MVC, MVP or MVVM pattern...
I've been surfing around a bit and found various bits and pieces. Some I've found:
- PrismAG (http://www.codeplex.com/CompositeWPFContrib/Wiki/View.aspx?title=Home)
- MVC# (http://www.mvcsharp.org/Default.aspx)
- Silverstone (http://neilmosafi.blogspot.com/search/label/Silverstone)
- PureMVC (haven't found any recent activity on this, sample still for beta 1...)
My question is if any of you have some experiences with any of these (good or bad).
Or if you know of any others.
Remark: in the POC period we also experimented with Flex for a brief period.
There you had the Cairngorm framework.
If we don't find any good existing ones, we have toyd with the thought of (trying to ) porting this to Silverlight.
Any of you have any experience with Cairngorm? Would it be possible to port it?
Any thoughts, suggestions on MVC/MVP/MVVM for Silverlight welcome!!!
Thx
Framework "Architucture" MVC
Yi-Lun Luo -...
All-Star
25149 Points
2759 Posts
Microsoft
Re: Silverlight and MV* frameworks
Aug 06, 2008 05:06 AM | LINK
Unfortunately currently there's no official MVC frameworks for Silverlight. We're still focusing on releasing Silverlight 2 core framework. But if you're building an enterprise application, I think many of the concepts in the Composite Application Guidance for WPF will be very helpful. This guidance is not for MVC (which is merely a design pattern working for a single application), but rather give your an architecture guidance so that you can build loosely coupled, semi-independent components and integrate them together to composite various client applications. Note the framework is not created for Silverlight. Don't expect to use any class libraries. But I think if you follow this guidance, you will have a solid grasp of modern architectures for client side enterprise applications. Also you can download the source code for the library.
doolittle
Member
75 Points
28 Posts
Re: Silverlight and MV* frameworks
Aug 07, 2008 03:19 PM | LINK
Thank you for your reply shanaolanxing.
I've already read (a bit) about the composite WPF. And the ideas outlined there are indeed very good (and actually more or less exactly what I'm after).
But as you say there are no libraries available.
So without investing time in creating Silverlight libraries ourselves, it's not ideal.
Because in my opinion it's better to have these because maybe just guidelines are more easily put aside, or are more open to interpretation per developer...
dcstraw
Member
293 Points
103 Posts
Re: Silverlight and MV* frameworks
Aug 07, 2008 06:47 PM | LINK
I played around a bit with the PrismAG project a while ago. The main issue I found is that the WPF reference implementation used a DataTemplate to provide the view by targeting the view model type. This isn't currently possible in Silverlight.
In my test project I created a view as a user control that takes its view model as a dependency, then I set the view model as the DataContext of the control. This seemed to be a decent workaround, though I'm still trying to decide if it helps enough to be worthwhile.
dcstraw
Member
293 Points
103 Posts
Re: Silverlight and MV* frameworks
Aug 27, 2008 04:29 PM | LINK
FYI there is a port now under way of Unity and Composite WPF to Silverlight.
Get the CompositeWPF source here:
http://www.codeplex.com/CompositeWPF/SourceControl/ListDownloadableCommits.aspx
This requires placing the Silverlight Unity dlls in the Lib folder of the AGCompositeApplicationLibrary spike. You can get the Unity source here:
http://www.codeplex.com/unitycontributions/SourceControl/ListDownloadableCommits.aspx
Note that you will have to update your project references and the namespaces in 3 or 4 "using" statements to get this to compile currently.
jp.hamilton has created an example using this framework. See his blog entry here:
http://www.jphamilton.net/post/Building-an-Enterprise-Composite-Silverlight-Application.aspx
modestyZ
Member
11 Points
13 Posts
Re: Re: Silverlight and MV* frameworks
Sep 02, 2008 05:06 AM | LINK
I just ported Cairngorm to Silverlight 2 Beta 2 in VS 2008 SP1, together with a sample application. Here is the article on CodeProject: Silverlight Cairngorm
Silverlight 2 Beta2 Cairngorm
AlexSss
Member
2 Points
1 Post
Re: Silverlight and MV* frameworks
Nov 02, 2008 08:50 AM | LINK
In our company we're using MVC#, it's easy and is based on clear concepts.
Regards,
Alex
Brauliod
Contributor
2448 Points
744 Posts
Re: Silverlight and MV* frameworks
Nov 02, 2008 10:43 AM | LINK
Hello,
In my project I have made my own MVC implementation, it's easy because it's natural to code (you are working using .net).
How I structured the code:
I know there are formal framework over there, but in some ocassions you get tied up to that fx (e.g. I don't like web client software factory for ASP .net).
If you need more info, just give me a shout.
HTH
Braulio
Book: Mastering LOB Development for Silverlight 5: A Case Study in Action
davidezordan
Contributor
6294 Points
957 Posts
Re: Silverlight and MV* frameworks
Nov 02, 2008 07:08 PM | LINK
Hi,
I've posted on my blog some interesting links about MVVM and patterns:
http://www.davidezordan.net/blog/?p=491
http://www.davidezordan.net/blog/?p=516
Hope this helps,
Silverlight MVP
Blog Twitter Silverlight Experts