I need to create an application using JSP, Servlets, and JDBC. No EJB. No Hibernate. No Spring. I would like to see a reference application to help me doing this app. May be an open source project or a good tutorial.
I need to known the better aproach to do tasks like transaction handling, logging, etc. This application need to be 24x7 and support many simultaneus users.
Thanks in advance.
Leonardo Luiz
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35258
7
posted
0
I need to known the better aproach
Compared to what? It's not aproblem to develop a web app using just JSP, Servlets, and JDBC, with no EJB, no Hibernate and no Spring. You need to tell us what your baseline is right now that you are trying to improve upon.
My baseline is made upon some examples from books and web tutorials. I would like to see a working code written that way. There are some best practices?
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35258
7
posted
0
The good thing about best practices is that there are so many to choose from. You might start by reading these articles, which I found by googling "servlet|jsp|jdbc best practices":
Did somebody tell you: "you are not allowed to use Spring"?
It makes using JDBC a lot easier (you will end up with less code and better code): -you can define transactions, Spring makes and closes connections for you, -you can define 'interceptors' for logging
Herman
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35258
7
posted
0
I think it's good to start out without any web or database frameworks in order to learn what the underlying libraries can and can not do. Once those have been mastered one can add to the toolset, e.g. by using Hibernate for persistence, or something like Stripes or Struts for the web tier.
Herman Schelti
Ranch Hand
Joined: Jul 17, 2006
Posts: 387
posted
0
hi Ulf,
I agree with you about the 'starting out', but "This application need to be 24x7 and support many simultaneus users" does not sound like 'starting out' to me.
Herman
Leonardo Luiz
Ranch Hand
Joined: Mar 24, 2006
Posts: 51
posted
0
Hi, thanks for yours answers!
The project's aim is to re-write an existing web application that actually makes use of these frameworks. The custumer doesn't want to search a framework specialist always a problem occurs.
Hmm. If I were given this task, I'd question the customer's justification for not using an existing framework. Given the limited non-functional requirements you mention my first move would be to look at existing "enterprise" frameworks, such as EJB or Spring. If these didn't exist, I be writing some sort of bespoke approximation of them myself.
Given that, I'm not sure I understand the limitation: how is it easier in terms of maintenance if you have designed from the ground up some sort of bespoke application, the architecture of which is understood only by you, rather than reusing an existing standard (or commonly used framework) that is understood by many people?