|
From: Ken K. <kk...@kk...> - 2003-05-01 17:58:58
|
Isabelle Muszynski wrote: >Hi Ken, > >It seems to me that 2 major groups of developeres will be using Spring. One of these would use only the persistence framework, together with an external MVC framework such as Struts. The other would use the Spring MVC framework as well (i.e. the whole enchilada). >So for the 1st stage I see some very simple pages which allow the user to enter base data (register a pet with the clinic, manage the vets, ...). This stage uses a simple servlet and / or JSP. >Then the second stage incorporates the Web framework, and has for ex. sick pets visiting the vet. > >I am currently working on charting Spring in UML. Ideally there should be a parallel between your work and mine. You show the code, I show the framework innards. > >Isabelle > > > Isabelle, Although I agree with your statement regarding the 2 likely sets of developers that may use Spring, I respectfully disagree strategically with the approach you suggest of using a simple servlet for the first iteration of the demo/tutorial. It seems to me that the primary emphasis of the demo/tutorial should be to showcase what the Spring frameworks have to offer to the developer. I think that the very heart of Spring is the web application framework. Although most of the other frameworks are useful without it, they exist primarily as conveniences to simply make the developers web application work easier. Spring's integration capability with other technologies, be they presentation or persistence oriented should be part of the side show/trails, IMO. I also think that the group using the "whole enchildada" should be the primary target audience at least for the first iteration of the demo/tutorial. Side trails that show how to use the Spring frameworks with Struts, servlets, fat clients, object-relational mappers, etc. are some of the future possibilities. Another side trail that compares the Spring web framework to Struts for instance is another possibility. That particular trail, however, would need to be a very carefully planned undertaking if it is to be effective in convincing developers to choose Spring over Struts. It is also important to keep in mind that the demo/tutorial Petclinic metaphor itself is also part of the side show. The emphasis, particularly in the first iteration, needs to be on the most important Spring features/classes. The tutorial text should first discuss the framework's most important pieces and what common problems they can be used to address. It should then show how to use them as the demo itself evolves. The Petclinic metaphor should evolve as necessary to suit the needs of the demo/tutorial. Obviously, this is not the way real applications are developed but it is useful to meet the goals of this effort. The tutorial exposition itself however should evolve to show how to solve the Petclinic business problems in the more usual way from the developers point of view. Perhaps the best way to do this is to use an approach similar to that of the Sun Java Developer Certification Exam wherein there already exists a database full of data that needs to be accessed in a new way. We can pretend that some of the functionality will be provided by existing software at least temporarily. Parts of the database that don't add anything new to the tutorial probably should be pruned away, for instance, the Vets table may not be needed. At some point we will need to add session and transaction related stuff so maybe we add the invoicing of services/medications or provide the ability to purchase special pet food online. Just thinking out loud here. The following are some examples of the important classes/interfaces that I think need to be explained/demonstrated in the less advanced version(s) of the demo/tutorial: - from com.interface21.beans.factory : InitializingBean - from com.interface21.validation : Errors, Validator - from com.interface21.jdbc.object : ManualExtractionSqlQuery,SqlUpdate - from com.interface21.jdbc.core : SmartDataSource and/or DataSourceUtils - from com.interface21.web.servlet : ControllerServlet - from com.interface21.web.servlet.mvc : FormController and later SessionFormController and WizardFormController - from com.interface21.web.servlet.mvc.multiaction : MultiActionController, PropertiesMethodNameResolver - from com.interface21.web.servlet.handler : SimpleUrlHandlerMapping - from com.interface21.web.servlet.view : ResourceBundleViewResolver, InternalResourceView or JstlView - from com.interface21.web.context : ContextLoaderServlet - from com.interface21.web.context.support : XmlWebApplicationContext - from com.interface21.web.tags : BindTag I would suggest that the opening section of the tutorial text should be the same as what would be on the front page of the website. I would also suggest that this should be some sort of statement that Spring is a collection of loosely coupled, flexible frameworks which can be used as needed without having to buy into the whole collection. It would then provide a brief introduction to each of the Spring frameworks with a synopsis of what they provide for the potential developer. Much of this could probably be derived directly from information presented in the book. I am also going to assume the following for the initial version: - The view technology will be JSP and JSTL. - The pages will be very simple forms/views without style sheets, headers/footers/menus, or internationalization. - No authentication/authorization. - No session. As I am beginning to feel a compelling need to produce something substantive, I am going to proceed on this basis. It will probably include all the stuff related to the Pets and their Owners. If we decide to use a servlet instead, we can just chop out the web framework stuff for use later as needed and put in the servlet. I will put something together, post it, and then we can hack away at it. We can then discuss how to stage it within the tutorial. What do you think ? If anybody else has anything to add to this discussion, please do so. Ken |