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

Thread: Newbie Question: General Controller / Manager?

  1. #1
    Join Date
    Oct 2004
    Location
    California
    Posts
    11

    Default Newbie Question: General Controller / Manager?

    Looking at the examples with Spring's source and stuff like Appfuse, I've noticed that Spring doesn't have a general/generic controller or manager class that is not tied to the web tier (like what's in Beehive or XWork). I don't think that Spring MVC cuts it for being a generic MVC. Am I wrong or have I missed something? Also is there a standard way of using web services with predefined generic controller/business objects within Spring (similar to Beehive) or is this forthcomming?

  2. #2
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    I don't think that Spring MVC cuts it for being a generic MVC
    I don't think Spring attempts or puports to do this. Spring's MVC is given the title "Spring Web MVC" in the reference documentation and states "Spring's Web MVC package provides a Model-View-Controller implementation for web-applications." It does remove web dependencies from your domain model - unlike struts.

    Regarding being generic - being able to integrate with Struts, WebWork etc, as well as several view technologies (JSP, Velocity, Freemarker, PDF, Excel) is pretty generic.

    is there a standard way of using web services with predefined generic controller/business objects within Spring
    Take a look at the Spring JPetstore sample. It supports Hessian, Burlap, RMI, and Web Services via Apache Axis. Again Spring is flexible.

  3. #3
    Join Date
    Oct 2004
    Location
    California
    Posts
    11

    Default

    Regarding being generic - being able to integrate with Struts, WebWork etc, as well as several view technologies (JSP, Velocity, Freemarker, PDF, Excel) is pretty generic.
    Yes, I think that Spring's dependency injection / inversion of control feature is great, but I also feel that having a real control layer framework (instead of another view layer framework like struts) in the way of Xwork would be great to have - though I could use Xwork now with Spring as the control layer, Struts as part of the view, and Hibernate as part of the model layer....

  4. #4
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    Spring works great with XWork, so if you want XWork style commands using XWork + Spring should be a good choice.

    However, some of the things a "command" pattern is typically used for, such as an interceptor chain, can be done using Spring AOP while preserving strong typing.

    Rgds
    Rod
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  5. #5
    Join Date
    Oct 2004
    Location
    California
    Posts
    11

    Default

    Rod, first I'd like to say that Spring is one of the coolest things to come out in a while.

    I was just wondering if you have any plans to make Spring MVC generic instead of being so tied to the web tier like Struts?

  6. #6
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    plans to make Spring MVC generic
    Rod can answer on the MVC plans, but can I ask what's the ultimate goal? What clients would this cater for? There is the Rich Client Project for Java applications, remoting (including Web Services) support and portal development is progressing in the sandbox.

    being so tied to the web tier like Struts
    In Spring's defense, it is designed to be less tied to the web tier than Struts. Take a look at the validator class - no javax.servlet imports and easy to unit test.

  7. #7
    Join Date
    Oct 2004
    Location
    California
    Posts
    11

    Default

    what's the ultimate goal? What clients would this cater for?
    Maximum flexibility and helping people achieve better design - this is for everyone, since the only thing that you can count on is change: an evolution of requirements and your application.

    You've mentioned the Rich Client Project, but that only caters to Swing. What about SWT or Laszlow http://www.laszlosystems.com?

    In Spring's defense, it is designed to be less tied to the web tier than Struts.
    First let me again repeat that Spring is great, but Why merely follow in Struts' example when you can lead? Don't get me wrong Struts was a breakthrough in helping people adhere to good design and a lot of apps reside in the web tier, but there are a lot of apps that go beyond the web tier (and they need more than just validator classes).

    Yes, there are already frameworks like Xwork and Beehive that provide solutions; but for some reason I have the feeling that the Spring team can come up with something better in that respect.

  8. #8
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    what's the ultimate goal?
    Maximum flexibility
    Again, I believe Spring MVC is flexible. It also aims to be lightweight. It caters for the most common client at the moment, and does it well IMO.

    What about SWT or Laszlow
    SWT - I'm not sure for plans on this. I'd guess it'd be based on the current RPC remoting model - not Spring's MVC. Contributions are welcome.
    What about SWT or Laszlow
    Laszlow - This is a cool technology and I believe it is being looked at.
    Be patient - or you can get in there and contribute ...this went Open Source less than 2 weeks before your post. Laszlo requires a (previously proprietary) presentation servlet, so I don't think criticism of Spring's MVC is relevant.

  9. #9
    Join Date
    Oct 2004
    Location
    California
    Posts
    11

    Default

    Again, I believe Spring MVC is flexible.
    While Spring is very flexible and great, Spring MVC is NOT flexible if all it can be used for is the web tier.

  10. #10
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    I was just wondering if you have any plans to make Spring MVC generic
    No plans at present. Interesting discussion though.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

Similar Threads

  1. Question on Multi-Action Controller
    By jcheung in forum Container
    Replies: 3
    Last Post: Nov 26th, 2009, 06:58 AM
  2. Replies: 11
    Last Post: Jul 23rd, 2007, 02:09 AM
  3. newbie question about custom transaction manager
    By jeroenbreedveld in forum Data
    Replies: 6
    Last Post: Sep 28th, 2005, 11:09 AM
  4. Replies: 3
    Last Post: Apr 3rd, 2005, 04:34 PM
  5. Replies: 1
    Last Post: Mar 23rd, 2005, 07:22 PM

Posting Permissions

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