Silverlight / Prism / RIA: ¿Cómo crear la infraestructura óptima?

Since days I am reading and researching and still struggling how to create the perfect infrastructure. Since there are no Prism 4.0 templates as such, I came up with a strategy, but I need to be sure this is the right strategy and I would appreciate an advice from experienced PRISM/RIA developers.

I use PRISM 4.0, RIA Services 1.0 Sp1 Beta, Silverlight 4.0, Entity Framework 4.0

1) Client side

I created first a "Silverlight Business Application", which creates a Web.host and a Silverlight client application with implemented RIA authorization. The initially created Silverlight client application shall be used as the Shell project.

2) Infrastructure project (Common)

This project would contain some common Prism MEF attributes and perhaps the entity models that are auto generated by RIA as well as the Service Interface. The idea is to create a simple Silverlight Class Library, and under Properties of the project, I would select for the dropdown ‘WCF Ria Services Link ’ to point to the host.Web project that contains the Ria Services. Then after the rebuilding, I am able to see the entity models within the Class Library and these could then be shared between the prism modules to feed their ViewModels etc.

3) Service layer

Should I create the EF4 Model on the Web.host project and add the Domain Service in there? Then I would extract an interface from the Domain Service and put the interface into the Infrastructure (Common) project. The Web.Host therefore needs to reference the Infrastructure (common) project to get access to the interface. On the client side the interface may be used by MEF to retrieve or mock the service . However I am concerned about the service referencing a common project that contains also the client-side generated entities.

4) Authorization

Also a bit concerned about the authorization, shall I leave everything on the Shell project? Or do I have to move anything to the Infrastructure (common) project to share it?

Since this is my first time designing with PRISM, I might have misunderstood or forgotten some aspects. Please feel free to improve my suggestions.

Tu ayuda es altamente apreciada

kave

preguntado el 09 de enero de 11 a las 11:01

2 Respuestas

After two weeks of intense research, this blog couldn't put it better together: http://blogs.msdn.com/b/dphill/archive/2009/08/17/prism-and-net-ria-services.aspx

Respondido el 14 de enero de 11 a las 00:01

There're nice Quick Start templates for Prism, I found it at blog http://blogs.msdn.com/b/dphill so it looks quite nice, I used it also created RIA Service library so everything now is separated:

1) WEb project 2) Ria Service on web 3) generated RiaService client code as separate and shared assembly and it is used by modules. that's it.

Respondido 26 Feb 11, 00:02

Thanks mate. Yeah I has already published the same link above. ;) It is a good resource indeed. - Houman

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.