Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: ASP.Net MVC

  1. #1
    Join Date
    Jun 2007
    Posts
    6

    Default ASP.Net MVC

    What plans do you guys have for integrating with the new ASP.Net MVC framework?

  2. #2
    Join Date
    Oct 2005
    Location
    Toulouse, France
    Posts
    1,409

    Default

    We planned to integrated it when it will be more stable
    We should start to investigate on a more stable version (still a preview today)

    http://www.infoq.com/news/2007/12/as...ons-dec2007ctp

    - Bruno
    My english is as poor as my taylor is rich

  3. #3
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi,

    Actually I had planned to integrate with it before this preview release but it didn't work out in the back-and-forth with Microsoft. My thinking is to support this as fully as possible, adding as much value add and we can. The Spring Java stack can serve as some inspiration in that regard. Simple IoC integration should be straightforward, so I'd like to get that done in the coming weeks and put up a build for users to play with. If you are interested in helping out...let us know!

    Cheers,
    Mark

  4. #4
    Join Date
    Jan 2008
    Posts
    7

    Default

    Hi

    Have you guys already played with Spring.NET and ASP.NET MVC Framework integration?

    I have seen this post from Fredrik Normen but I think this is not a whole integration. It is just a way to instantiate controllers. But what about OpenSessionInView, WebSupportModule, and so on?

    Thanks
    Felipe

  5. #5
    Join Date
    Jan 2008
    Posts
    7

    Default MvcContrib Project integrating MVC Framework and Spring.NET

    I have found this Project:
    http://www.codeplex.com/MVCContrib

    Theses guys did some work to integrate ASP.NET MVC Framework to Spring.NET. Maybe would be nice if Spring.NET members take a look at it and see if this can be the official ASP.NET MVC Framework and Spring.NET integration. Even document it. Just a suggestion.

    Cheers
    Felipe

  6. #6
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi Felipe,

    Thanks for info. I was aware of the MVCContrib project but not the blog posting. I will be reaching out to the community to see if anyone would be intersted in contributing and we would certainly welcome contributions. We can't give a time frame at the moment because we haven't mapped out the full feature set that we would like to have for additions to MVC, but it doesn't hurt to start with the features found in the links you posted. Higher priorities right now are around attribute based DI and 'assembly scanning', features that are present in Spring.Java. I'll keep everyone informed!

    Cheers,
    Mark

  7. #7
    Join Date
    Jul 2009
    Posts
    2

    Default Interim ASP.NET MVC Injection

    Hey Everyone,

    I am looking for a little input to see if i am running some risks with the implementation I am attempting.

    Determined to find a way to get DI working with ASP.NET MVC and Spring.NET 1.2.0 I have materialized an implementation that accomplishes this task for me.

    Considering the Default.aspx page as the entry point into the web application where the initial Page_Load initiates the first ProccessRequest. If Default.aspx is set as the startup page for the application Spring can inject properties for the entire site.

    Using this approach I built a class SpringMVCHelper that contains two static methods getRepository and setRepository. setRepository method accepts a name, IRepository and isSingleton. This then sets an Application or Session variable using the name and repository supplied.

    Moving to the Controllers whenever they need access to a repository to retrieve information they query the SpringMVCHelper.getRepository supplying the name and isSingleton as parameters to appropriately locate the desired repository.

    I am posting this as a question more than anything. Although this is just an interim solution to the release of Spring.NET 2.0 is there any foreseeable downfalls to this approach?

    Thanks

  8. #8
    Join Date
    Apr 2008
    Posts
    86

    Default

    We use a custom ControllerFactory which uses the context.GetObject() inside and returns a controller instance from there. That gives a "wrapped" controller which will inject service/repository dependencies (and on the first page hit, bring spring up). We set this in the application global file.

    We wrote our own (rather complex) view engine that stops developers writing HTML though so I'm not sure how that would fit into the web forms view engine.

    I'd personally rather see Spring MVC ported from Java. It's much nicer and supports more modular separation. ASP.Net MVC is somewhat painful from experience.

  9. #9
    Join Date
    Sep 2009
    Location
    Calgary, Alberta
    Posts
    15

    Default

    Is there any place that documents the steps to get Sprint .NET working with .NET MVC? I had a working MVC application that I added NHibernate and Spring .NET into. I been able to get the application start page to come up but whenever I try to activate another page, I get the error:

    The resource cannot be found.

    Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

    Requested URL: /User/Index

    Any hints as to what I need to fix?

    Thanks,
    Dave.

  10. #10
    Join Date
    Sep 2009
    Location
    Calgary, Alberta
    Posts
    15

    Default

    No need to reply. Turned out to be a problem in my XML configuration.

    Problem fixed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •