locked
Can I do some of the following items? RRS feed

  • Question

  • User1429591925 posted

    As I see ASP.NET MVC, it follows the Application Archtype as shown here:

     

    but what I would like to do is add a Service Layer between the Presentation Layer (where the Controller and View site) and the Business Layer (where the Model sits) as shown something similar to:

     

     

    The advantages of this type scenerio is getting the framework of MVC, with the expandablity of adding XMAL clients or even a WPF client to connect to the framework.  Basically moving the VC to the Client, but I don't see it as that per se.  Perhaps setting up some WCF services or other methods to connect to the Model at the Business Layer is what makes sense.  If I had a better feel for how data is passed between layers, I believe I would be able to speak a bit more intelligently on this aspect of the design.

    Has anyone done something along these lines with the ASP.NET MVC framework?  Does this make sense? 

    Thanks in Advance.

    Reference Pics from:

    http://msdn.microsoft.com/en-us/library/ee658104.aspx

    Thursday, February 4, 2010 2:10 PM

Answers

  • User-525215917 posted

    If you need just data exchange between client and server then you should consider web services. If you need also pages to do something in browser (your app is not only Silverlight or Flash) then you should consider using MVC. This is not absolute truth but I think it is the best way. Of course, you can use both if you have something very complex to do. :)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 5, 2010 2:42 PM

All replies

  • User-525215917 posted

    You can go with ASP.NET MVC for sure, no problem. I found out that using MVC in different AJAX and rich client scenarios is more convenient than working with ASP.NET forms. Try out some simpler test scenarios on MVC and Forms - I bet you will vote for MVC with two hands. :)

    Thursday, February 4, 2010 3:14 PM
  • User1429591925 posted

    There are a few articles on implementing WCF with MVC and doing some of what I am thinking of doing, such as this one:

     

    http://www.aaronlerch.com/blog/2008/01/01/unifying-web-sites-and-web-services-with-the-aspnet-mvc-framework/

     

    But I am wondering if it makes more sense for me to scrap MVC and go with an entirely different framework such as

     

    http://caliburn.codeplex.com/

     

    I am just more familiar with MVC verse some of these other frameworks.  I don't expect any silver bullet answers, but if others have had to tackle this type situation, hearing about how they addressed their business needs would be greatly appreciated.

    Perhaps it is more of how would you solve building the web server portion of the RIA?

    Friday, February 5, 2010 10:53 AM
  • User-525215917 posted

    If you need just data exchange between client and server then you should consider web services. If you need also pages to do something in browser (your app is not only Silverlight or Flash) then you should consider using MVC. This is not absolute truth but I think it is the best way. Of course, you can use both if you have something very complex to do. :)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 5, 2010 2:42 PM