• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CRUD web app sample without a framework

 
Ranch Hand
Posts: 339
7
Tomcat Server Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am learning web applications by using books but when the books start showing CRUD programming a framework is used. In Marty Hall's "More Servlets" he is using JSF of which Bear says

In my opinion, JSF is an abomination that should never have left the drawing board. thread -- I need a stack



I could not find any non framework samples on the Internet. I believe frameworks can be useful but feel that I need to know the basics before adopting one.

I am looking for a sample CRUD web application that does not use any framework. Then I would like to see the sample application with a framework added.

...or is there a book that would show a no framework web application doing basic CRUD for a database?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Margaret,
JDBC isn't a framework. What are you looking for beyond the JDBC tutorial?
 
margaret gillon
Ranch Hand
Posts: 339
7
Tomcat Server Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jeanne,

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 ]
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
margaret gillon
Ranch Hand
Posts: 339
7
Tomcat Server Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jeanne,

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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
margaret gillon
Ranch Hand
Posts: 339
7
Tomcat Server Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can also take a loot at Marty Hall's original Core servlets & JSP and the more Servlets and JSP.
 
reply
    Bookmark Topic Watch Topic
  • New Topic