locked
Should I use prism? RRS feed

  • Question

  • Hi,

    I am new to Silverlight and want to start off with best practices.  Since I don't have any experience with Silverlight not using Prism 4, can someone tell me if Prism 4 is worth using?  What about Expression Blend SDK?

    Thanks!

    Mei

    Friday, August 5, 2011 4:49 PM

Answers

  • IN my opinion the honest (sounds a bit like a coward, but definitely not so!!) answer is: it depends on the intended scope, complexity and foreseen practical use of your application. Prism gives perfect guidelines (look here and here) to assist you when developing large scale applications that need maintenance, team-work and so on. It is a matter of proper architecture more than anything else.

    In words of the MSDN documentation of Prism by the makers:

    Prism is intended for software developers building WPF or Silverlight applications that typically feature multiple screens, rich user interaction and data visualization, and that embody significant presentation and business logic. These applications typically interact with a number of back-end systems and services and, using a layered architecture, may be physically deployed across multiple tiers. It is expected that the application will evolve significantly over its lifetime in response to new requirements and business opportunities. In short, these applications are "built to last" and "built for change." Applications that do not demand these characteristics may not benefit from using Prism.

    So good luck with your decision. make it seriously (as I expect you will, given the fact that you consider this upfront) but don't expect miracles out of Prism by itself. You're in charge!

    And about Expression Blend: you may benefit from the design capabilities from Blend when you integrate Prism. Blendability as it is called can be best achieved when you stick to MVVM principles. Not per se part of Prism, but an architect's decision also. The main factor to consider is to separate code from user-interface. When you do that, you can leave the graphical designer to his job, without fear for breaking code. Maximum flexibility and user-adaptability when desired.

    So it all comes back to: use with sense and vision!

     

     

    Saturday, August 6, 2011 2:32 PM
  • Prism,

    I have to agree with Peter.It depends on your requirements. I also believe it takes a bit of time to learn even the basics. I am just starting to learn the basics myself.      

     Silverlight(Prism)  along with either unity or Mef is the premier solution to work with  enterprise

    solution. By the way, I have not talked about this much, If you are in passionate with design patterns, obeject oriented programming inheritance then you would simply

    really appreciate prism with either mef or unity because it fits so brillantly fits  into the mvvm pattern. A new book coming out on using

    unity and mef called (.net dependency injection By manning)   that you can use with prism. If you have received the latest msdn

    article(august) you will find a article on security using prism.       

    In my opinion, I believe   the silverlight team should include Prism as part of the download with silverlight, Microsoft azure (the cloud)

    works with prism so yes it's good to see scott guthrie(he heads  up the azure team)   believe in the future of Prism . Windows phone also uses prism as well. If you need any tutorials on the subject please ask on another post and I would be happy to point you

    in the right direction.        

          

    Saturday, August 6, 2011 3:54 PM
  • Hi zmguan,

    As a complement, you can download them here and here.

    Best Regards,

    Monday, August 8, 2011 6:20 AM
    Moderator

All replies

  • Hi zmguan,

    Yes.

    Prism for me it's like helper tool it has been helping me solved lots of problem. There's a few pattern&pratice from Microsoft.

    Such as Solution,cloud. The team just update it a few months ago know as Enterpise library.

    Most of those patten&practice is tend to old tecnologies except prism.

     

    Saturday, August 6, 2011 5:26 AM
  • IN my opinion the honest (sounds a bit like a coward, but definitely not so!!) answer is: it depends on the intended scope, complexity and foreseen practical use of your application. Prism gives perfect guidelines (look here and here) to assist you when developing large scale applications that need maintenance, team-work and so on. It is a matter of proper architecture more than anything else.

    In words of the MSDN documentation of Prism by the makers:

    Prism is intended for software developers building WPF or Silverlight applications that typically feature multiple screens, rich user interaction and data visualization, and that embody significant presentation and business logic. These applications typically interact with a number of back-end systems and services and, using a layered architecture, may be physically deployed across multiple tiers. It is expected that the application will evolve significantly over its lifetime in response to new requirements and business opportunities. In short, these applications are "built to last" and "built for change." Applications that do not demand these characteristics may not benefit from using Prism.

    So good luck with your decision. make it seriously (as I expect you will, given the fact that you consider this upfront) but don't expect miracles out of Prism by itself. You're in charge!

    And about Expression Blend: you may benefit from the design capabilities from Blend when you integrate Prism. Blendability as it is called can be best achieved when you stick to MVVM principles. Not per se part of Prism, but an architect's decision also. The main factor to consider is to separate code from user-interface. When you do that, you can leave the graphical designer to his job, without fear for breaking code. Maximum flexibility and user-adaptability when desired.

    So it all comes back to: use with sense and vision!

     

     

    Saturday, August 6, 2011 2:32 PM
  • Prism,

    I have to agree with Peter.It depends on your requirements. I also believe it takes a bit of time to learn even the basics. I am just starting to learn the basics myself.      

     Silverlight(Prism)  along with either unity or Mef is the premier solution to work with  enterprise

    solution. By the way, I have not talked about this much, If you are in passionate with design patterns, obeject oriented programming inheritance then you would simply

    really appreciate prism with either mef or unity because it fits so brillantly fits  into the mvvm pattern. A new book coming out on using

    unity and mef called (.net dependency injection By manning)   that you can use with prism. If you have received the latest msdn

    article(august) you will find a article on security using prism.       

    In my opinion, I believe   the silverlight team should include Prism as part of the download with silverlight, Microsoft azure (the cloud)

    works with prism so yes it's good to see scott guthrie(he heads  up the azure team)   believe in the future of Prism . Windows phone also uses prism as well. If you need any tutorials on the subject please ask on another post and I would be happy to point you

    in the right direction.        

          

    Saturday, August 6, 2011 3:54 PM
  • Hi zmguan,

    As a complement, you can download them here and here.

    Best Regards,

    Monday, August 8, 2011 6:20 AM
    Moderator
  • Hi Peter, 

    very nice explaination. thanks for the smae. I'm hoping you can advice bit more on my scenario?

    our's is an enterprise application. the UI's are simple. not complex UIs. but the functionality that takes place behind the scenes are massive. UI needs to be responsive enough. 

    What would you advice? Prism or WAF? i'm inclined for latter one as our project would never be hosted in silverlight. it's purely wpf. we have roughly 5 modules hosted under one client. each one handling huge amount of data. but one thing to note here is,

    there's no significant UI communciation between modules(Less it is. ). due to various reasons, we push the data into DB and then access it. 

    Kavya

    Tuesday, June 19, 2012 12:28 PM
  • Hi Kavya,

    As I explained in my first reaction, Prism is mainly about decoupling - and of course recoupling again - of sofware parts. It has no relation with Silverlight, so that's no issue to consider. If your functionality behind the screens is massive (I translate: complex) then Prism could help you to de/recompose the functionality. It would help if the functionality consists of composable parts.

    Let's presume that there are certain conditions (from the UI) that together would build a "pathway" through all the functionality. Then functional composability would help, so Prism would do a good job.

    If on the other hand, the functionality is in fact one big routine, taking time to do it's large job, then Prism would not help at all.

    But honestly, in my experience, large blocks of functionality are rare. Most of the time it is better to decompose into smaller pieces. It brings better maintainability, better "scope" per piece of code. Now it comes down to the desired variants in the functional structure.

    Look at it as the route from point A to point B on a map. If there is only one highway, there would be no alternative. In software terms: no need for Prism. On the other hand, if there would be small pieces of road, paths, lanes, streets , then the complete route could be composed, based on different preferences. Do we need to visit certain stores/warehouses/shops? And could those preferences differ from day to day? That would be a Prism job!

    Prism would be the ""glue" mechanism. That is important if it is desirable to build different compositions with the same builing blocks.

    If the composition would have to be the same structure every time, then stick with the simpler (e.g. WAF) pattern. The additional complexity if Prism would only cost, and never pay off. Here is a series of video's that give other insight from an expert.

    Good luck with your decision, I hope this was a bit of help.

    Wednesday, June 20, 2012 2:41 AM