Results 1 to 7 of 7

Thread: Getting started with Spring

  1. #1
    Join Date
    Oct 2004
    Posts
    1

    Default Getting started with Spring

    I'm about to embark on my first spring project, which should be a fairly small and simple test case, but still feel completely overwhelmed. No wonder, as I've only made a couple of simple web-apps earlier.

    I'm familiar with servlets/jsp+jstl and did some basic MVC separation; that is, having a front controller which sparked off a page controller based on the parameters, which again called out to business code to construct a model (a heap of beans), stored these in the request and then rendered the page using jsp's..

    I figure something like that would work for this project as well, but am sure I'm best off working within a proper framework, even if that means i'll spend a while learning the ropes. Besides, I'm sure Spring experience will come in handy later.

    I've read a few examples/tutorials, as well as the chapters 3, 10, 12 and 13.2 from the Spring reference fairly close, and also skimmed through a lot of the rest.
    I'm still at a loss on how/where to get started, though, and the xml-everywhere-declarative-programming is looks fairly scary.

    I obviously can't have you code the stuff for me, and wouldn't learn a lot from that anyway, but appreciate thoughts on how to design the system, on all levels.


    Thing I'm supposed to make is a simple app for defining questions for a questionnaire thing, and eventually export this questionnaire as xml. Not very complex, in other words.
    I figure i'll present a list of questions, clickable for editing, as well as the option to create a new one. The create/edit question form lists the Q, its alternatives, and indicate which is the correct answer. You can also add new alternatives, and delete/edit the existing ones..

    Eventually, I'd like to add 'roles' to the system as well. There's only ~10 users, but only a couple of them are supposed to be able to mark questions as 'approved'.
    Probably easier to declare users and roles using xml, than whipping up a full interface for user-administration? Create a users bean declaratively for easy access? Use a 'theme' for customizing the UI? How(where) do I do implement access control?

    For storage I'm thinking plain jdbc will do. No need for transactions, and my db is really simple. Shouldn't be hard to hook up to my connection pool through JNDI and issue some simple queries, right?
    Should I do anything to avoid coupling between my business logic and the db logic, btw? Figure that might be better, and i'm supposed to be doing this 'the right way'. (Would probably go for Hibernate if I wanted to go all out, but my schedule is getting tight, so learning a little Spring will have to do for now..)

    Generating the final product here, an xml doc containing these questions, should be piece of cake, even for me.


    Any feedback much appreciated.

  2. #2
    Join Date
    Aug 2004
    Location
    Canberra, Australia
    Posts
    15

    Default

    You could try having a look at https://appfuse.dev.java.net/ . As well as providing a application starting point there are a number of tutorials.

  3. #3
    Join Date
    Oct 2004
    Posts
    8

    Default Same Request But For Simpler Solution Than AppFuse

    I have nearly the same desires as 'vasquez' above. My situation is slightly different in that I inherited a not so small application that is done quite poorly. I started to clean things up using Struts, but I recently started looking into Spring. I would like to use as much Spring, and as few add-on technologies, as possible.

    AppFuse has too many extraneous technologies, so I'm loathe to delve into it. I've worked through most of the Spring MVC tutorial, and it "seems" too simple, or perhaps not complete enough, for my purposes. I've also looked at the samples that come with Spring, but they're apparently not clicking with me. Maybe I just need to spend more time with them, but I'm pretty squeezed for time. Does anyone know of other tutorials that might fit the bill?

    Thanks,
    TR

  4. #4
    Join Date
    Oct 2004
    Location
    INDIA
    Posts
    9

    Default an example application in spring

    try this. its very simple and good

    http://www.springframework.org/docs/...ep-Part-1.html[/quote]

  5. #5
    Join Date
    Oct 2004
    Posts
    8

    Default Seems Too Simple

    jiffinjoy,

    I mentioned in my previous post that I'd already worked through the MVC tutorial and that it seems too "simple". Also, it looks like it was written for a much earlier version of Spring. It would be nice to have a "walk through" of a basic Spring application that is based on a more recent version of the framework.

    Thanks for trying, though.
    TR

  6. #6
    Join Date
    Sep 2004
    Location
    Leuven, Belgium
    Posts
    1,853

    Default

    I also worked trough the Spring MVC step by step tutorial recently and as far as I know it is pretty much up to date. Ofcourse it is a very simple app and doesn't shed much light on how to structure a real (larger) application.

    Erwin

  7. #7
    Join Date
    Oct 2004
    Posts
    8

    Default Equinox/Spring Live

    Erwin,

    I have taken a further look at AppFuse, though not in great depth. It is impressive and very ambitious. Mr. Raible (Matt) has done a lot of work and provides a wealth of information on his website and in the tutorials that accompany AppFuse.

    However, AppFuse is still a bit overwhelming for me. Fortunately, Matt also recently released a stripped down version of AppFuse called Equinox. I am working through the sample chapter of Spring Live (authored by Matt) that is a walkthrough of a minimal Struts/Spring/Hibernate application based on Equinox. If you're intersted, a good place to start is the Spring Live site: http://www.springlive.com or http://www.sourcebeat.com/TitleAction.do?id=7. Another good source of information is Mr. Raible's wiki: http://raibledesigns.com/wiki.

    I'm still working through these resources so I can't give an adequate review at this time. However, what I've seen so far has been impressive. I've picked up several tips for Eclipse, Tomcat, Ant, and others just by working through some of this information. Matt does a good job of adding extra tips that have been a real help in my quest for the bigger picture.
    TR

Similar Threads

  1. Spring MVC Web Framework versus Struts
    By biguniverse in forum Web Flow
    Replies: 27
    Last Post: Aug 29th, 2012, 03:57 AM
  2. Replies: 5
    Last Post: Aug 9th, 2008, 05:30 AM
  3. Getting started with Spring + Maven
    By ejeklint in forum Architecture
    Replies: 3
    Last Post: Dec 27th, 2006, 10:25 AM
  4. A Spring Class Loader?
    By azzoti in forum Architecture
    Replies: 8
    Last Post: May 7th, 2005, 04:02 AM
  5. Replies: 14
    Last Post: Feb 21st, 2005, 05:41 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
  •