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.



Reply With Quote