I need to build a web application and most of what it is doing will involve CRUD screens for a database that I have already built. I have used JDBC to run queries against my development database server (linux / postgresql) so I have the basics down on connecting to the database. I have done some tutorials that walk the user through building a CRUD screen with Spring and got those working.
While studying tutorials I have been following some of the threads on frameworks to use for web applications like Frameworks? Do I need one? want one?. In many of the posts Bear Bibeault, Pat Farrell, and others talk about not using a framework. I am trying to find an example of what the classes, html pages, and jsp pages would look like that would be involved in building scriptless CRUD screens without a framework like Spring.
A war file that I could look at like the 'Simple Command' sample app on the Code Barn Servlets page Code Barn Servlets [ December 11, 2008: Message edited by: margaret gillon ]
Margaret, I don't know where would find an example. I can imagine one though - it would have servlets for processing requests that delegate to a DAO (data access object) class to do the actual work.
That said, most people use some framework. Even it's just a servlet that delegates to classes to do work based on the URL. Even Bear has a framework he likes. The key is that it is extremely lightweight.
I have ordered some more of the older books and maybe a few of them will have more CRUD examples than the ones I have now. I know about Bear's framework and have downloaded it so I can study it on my desktop. I am reading the articles in some of the JavaRanch newsletters, too.
I don't mind using a framework and will probably try to work with Bear's. What I am cautious about is that I have seen companies adopt frameworks and the entry level programmers who get trained in the framework cannot distinguish what the framework is doing from the general structure of the application and language.
Originally posted by margaret gillon: What I am cautious about is that I have seen companies adopt frameworks and the entry level programmers who get trained in the framework cannot distinguish what the framework is doing from the general structure of the application and language.
Then you'll probably like Front Man. That's exactly what it was designed not to do.
so what the H-e Double Hockey Sticks is wrong with JSF :-)
I personally think it's pretty darn easy and intuitive. I think it gets a bad wrap due to its 1.0 and 1.1 release. Netbeans IDE also has a slick WYSIWYG editor (Matisse) so you can get down to business without a lot of design headaches.
as for frameworks, yeah.. I don't like JPA, I like SQL so I just issue native queries that i store in a central repository.
One of the books recommended on this site was "Special Edition Using Java Server Pages and Servlets " by Mark Wutka (2000) . When I received the book I found it has several chapters on creating a CRUD application and shows the classes that support the database connections and editing. A bonus for me is that this book includes a chapter on security and the example class shows different ways to authenticate people. Thanks to the ranchers who recommended it . The book is out of print but used editions are easy to find on Amazon.