Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / May 2005

Tip: Looking for answers? Try searching our database.

what should be the architecture !!

Thread view: 
Gaurav - 05 Apr 2005 13:25 GMT
hi..

I am developing a Lab management software.
Our lab includes certain resources like Switches and routers . We just
want to keep track that who all people have reserverd the resources and

who are in the queue.

I have thought to implement the middle tier in JavaBeans and the
frontend in JSP and the Servlets , with the backend being in mySQL.

can anybody help me how to build the architecture , and after reading
about all these technologies , i still dont understand how do i
integrate all these technologies.

any help would be appreciable.

with regards

Gaurav
EricF - 06 Apr 2005 05:20 GMT
>hi..
>
[quoted text clipped - 16 lines]
>
>Gaurav

This sounds like the right approach.

There are a number of good web resources out there. Do this google search:

java model 2 architecture mvc

The JavaWorld article that was at the top is very good (though maybe a bit
dated).

Eric
Gaurav - 06 Apr 2005 07:13 GMT
thank's Eric for replying.
should i use EJB instead of BEANS ?

is it necessary ?

gaurav
Daniel Rohe - 06 Apr 2005 20:19 GMT
Are there a lot of transactions in short time, then EJB would be better. If
there are only a few transactions, then I think EJB would be overkill. Using
DAOs or Hibernate or JDO would be better.

Daniel

> thank's Eric for replying.
> should i use EJB instead of BEANS ?
>
> is it necessary ?
>
> gaurav
EricF - 07 Apr 2005 05:48 GMT
I agree with Daniel - though EJB has several flavors. Sessions beans using
DAO/Hibernate/JDO is less overkill than entity beans. And Struts or Spring as
a framework would rock. But if Gaurav is a newbie (as it sounds), there's a
lot to be said for keeping it simple to begin with. With a good design and
minimal coupling, it's not too difficult to utilize other frameworks.

Having said that, JBoss/Hibernate makes a great combination. ;-)

HTH

Eric

>Are there a lot of transactions in short time, then EJB would be better. If
>there are only a few transactions, then I think EJB would be overkill. Using
[quoted text clipped - 8 lines]
>>
>> gaurav
CodeFutures - 07 Apr 2005 09:53 GMT
> >> thank's Eric for replying.
> >> should i use EJB instead of BEANS ?
> >>
> >> is it necessary ?
> >>
> >> gaurav

If you are concerned about choosing a simple approach to data
persistence I recommend JDBC DAOs and a JSP or Struts/JSP presentation
tier.

You may find this comparison of the various options (EJB CMP, JDO, etc)
useful:

http://www.codefutures.com/weblog/corporate/archives/2005/02/data_persistenc.html

PJ Murray
CodeFutures Software
http://www.codefutures.com
Daniel Rohe - 07 Apr 2005 11:06 GMT
A good approach is first to design the application without having a concrete
implementation system (EJB, JavaBeans) in mind. He shoud think about the
usage of the application. How much users are there per hour/minute/second.
What users are there. What use cases should be implemented. How much time he
has to implement the application. After that he can decide which
architecture (EJB, JavaBeans) fits best.

>I agree with Daniel - though EJB has several flavors. Sessions beans using
> DAO/Hibernate/JDO is less overkill than entity beans. And Struts or Spring
[quoted text clipped - 3 lines]
> lot to be said for keeping it simple to begin with. With a good design and
> minimal coupling, it's not too difficult to utilize other frameworks.

If he is a newbie than he should keep it real simple, a DAO layer and Struts
are the best to start with. For development he should think about using Ant
and XDoclet to generate the configuration files (web.xml and
struts-config.xml). For the design pattern DAO is an explanation at the Java
homepage under the blueprints section
(http://java.sun.com/blueprints/patterns/DAO.html).

> Having said that, JBoss/Hibernate makes a great combination. ;-)

If the application doesn't need to handle thousands of transactions
(reservation of a resource) a minute than I think also a application server
is too much. In such a situation I would prefer a web server (tomcat, jetty)
and implement the back-end with Hibernate, JDO or an own DAO layer and the
front-end with Struts and/or Spring.

Daniel
CodeFutures - 07 Apr 2005 22:03 GMT
> If he is a newbie than he should keep it real simple, a DAO layer and Struts
> are the best to start with. For development he should think about using Ant
> and XDoclet to generate the configuration files (web.xml and
> struts-config.xml). For the design pattern DAO is an explanation at the Java
> homepage under the blueprints section
> (http://java.sun.com/blueprints/patterns/DAO.html).

Daniel's advise about keeping it as simple is true in this case, and
worth remembering ...

Can I suggest you look at FireStorm/DAO?

FireStorm/DAO is a Java Code Generator that can import existing
database schemas (from a SQL script or from a live JDBC connection) and
can then generate a complete DAO persistence tier and Struts JSP
presentation tier.

You can read about FireStorm/DAO here:
http://www.codefutures.com/products/firestorm/

You can read about DAOs here:
http://www.codefutures.com/data-access-object/
Gaurav - 08 Apr 2005 07:17 GMT
hey thanx everybody . that has been a overwhelming responce. Thanx once
again

yeah , just to make clear i am a newbie .

my application would not be handling many transcations per minute . may
be just 10-20 max per minute would be good enough .

I have decided to use mySQL as the database and i am using the Tomcat
as the webserver . front end would be made in JSP and servlet. i am
follwoing the model 2 architecture of MVC.

i have to finish this project by april end and i am also learning these
new technologies side by side.

what you people can suggest me to do more in this time frame of 1 month
, so i can make my project look and feel THE BEST .

thanx again for all you people out there , helping me.

regards
Gaurav
Daniel Rohe - 08 Apr 2005 08:08 GMT
> hey thanx everybody . that has been a overwhelming responce. Thanx once
> again
[quoted text clipped - 13 lines]
> what you people can suggest me to do more in this time frame of 1 month
> , so i can make my project look and feel THE BEST .

Not much time :-(. Because you want to implement it as MVC model 2
architecture you should use Struts and a DAO layer. Make each use case as an
Struts Actions and the domain objects as Struts ActionForms. The DAO layer
should also work with the ActionForm. So far this couples the backend (DAO
layer) with the frontend (Struts) but you will save a lot of time. Later if
someone had to extend the application he can extract the domain model from
the ActionForms and decouple backend and frontend. The time can be used to
implement the frontend and make the project look best ;-).

Daniel
CodeFutures - 08 Apr 2005 09:48 GMT
I agree with Daniel's suggested architecture

Not just because it's a simple architecture, but also its a sustainable
architecture, following DAO and MVC patterns.

Since its your first project, I probably would have recommended this
architecture even if you had more time to look at more complex options.

And the good news is that you can easily get this project done in the
time available - once you have the data model/database schema, you can
generate all the DAO and Struts code.  This will allow you to
concentrate on solving the business problem rather than learning DAOs
and Struts.

You can take a quick look at a tutorial here:

http://www.codefutures.com/products/firestorm/tutorial/

Note that FireStorm/DAO has many DAO code generation options: we're
suggestion here that you go with a straight JDBC DAO data integration
tier and Struts presentation tier.  Ignore the temptation to look at
options like EJB CMP or JDO.
Gaurav - 09 Apr 2005 08:55 GMT
now this 'Firestrom' is a paid software and i cant use it , because i
am supposed to use any thing that is free :-(
Gaurav - 09 Apr 2005 09:42 GMT
can I , please get a example code which makes me understand how to
integrate struts,JSP, servlets, beans and the DAO. ?

i am gettin notes for all these as different entities and not as a
whole thing combined. therefore it is becoming very difficult for me,
to think about the bigger picture.

if somebody have some example codes which contains all these
technolgies, it would help me a lot.

regards
Daniel Rohe - 11 Apr 2005 10:04 GMT
Download Struts from their homepage (http://struts.apache.org) and look at
the sample applications.

A typical use case in your application could be the reservation of an
existing resource. For this the user must go to a webpage and submit a
filled form. Then maybe he gets a reservation mail or something else. When
the resource is available he should also get a mail.
How could this be realized on a Java webserver with Struts, JSP, Servlets
and a DAO layer?

The user also opens his browser and navigates to a specific URL. The web
server than displays the JSP file under the given URL. On this web page
exists a HTML form that must be filled and a submit button to send the data
from the form to the web server. The form path gets mapped to a Struts
Action. How goes this? At first Struts uses a single Servlet that acts as a
controller and all requests gone through this Servlet get mapped to specific
Struts Actions. It is also responsible for populating a Struts ActionForm
with the data from the request. After the Servlet has populated the Struts
ActionForm and found the Struts Action. It calls the execute method on that
Struts Action. Here comes your code. In the Struts Action you use the Struts
ActionForm to retrieve the data the user has made in the web page. And you
use your DAO to communicate with the database. For this use case you use the
data to add the reservation to the database. The DAO executes the insert
statement to create a new row in the database.

A web application is configured in the file web.xml the Struts framework is
configured in a file called struts-config.xml. The Struts Servlet is also
configured in the file web.xml. The web server loads the web application and
the configuration from the file web.xml. There the Struts Servlet is
configured and loads the file struts-config.xml. In this file all Struts
Actions and ActionForms are configured.

Daniel

> can I , please get a example code which makes me understand how to
> integrate struts,JSP, servlets, beans and the DAO. ?
[quoted text clipped - 7 lines]
>
> regards
CodeFutures - 11 Apr 2005 21:43 GMT
Hi Gaurav,

I sort of guessed you were a student or something similar.

Why don't you download FireStorm/DAO and try it out?

http://www.codefutures.com/products/firestorm/download/

I'll look out for your download and arrange a free license for the
duration of your project.

If you're learning Java, then you may as well learn to do things the
right way. The code generated by FireStorm/DAO is based on the Core
J2EE Design Patterns (not just data access objects, but also data
transfer objects, session facades, business delegates, etc).

Regads
PJ Murray
CodeFutures - 11 Apr 2005 21:43 GMT
Hi Gaurav,

I sort of guessed you were a student or something similar.

Why don't you download FireStorm/DAO and try it out?

http://www.codefutures.com/products/firestorm/download/

I'll look out for your download and arrange a free license for the
duration of your project.

If you're learning Java, then you may as well learn to do things the
right way. The code generated by FireStorm/DAO is based on the Core
J2EE Design Patterns (not just data access objects, but also data
transfer objects, session facades, business delegates, etc).

Regards
PJ Murray
Gaurav - 12 Apr 2005 11:00 GMT
hi Murray,

Thanx for your kind consideration. I would certainly try FireStrom. and
yeah i am a student and my project work is for 4 months, so i am trying
my level best to figure out these complex design patterns. and J2EE.

actually i tried a software called "DB Architect" which auto generated
the DAO classes for me. i kinnda liked it.

Is your software too, does the same thing ?

regards
Gaurav
Gaurav - 12 Apr 2005 14:38 GMT
is there any good GUI tool in JAVA / JSP which can help me make
fantastic front end (web page ) in JSP and HTML.  ?

it probably should have drag and drop facilties like the one Microsoft
Visual studio for .NET has !!
Gaurav - 12 Apr 2005 13:26 GMT
is there any other software , which can help me make frontends in JSP/
JAVA with drag and drop capabilties like Microsoft Visual Studio for
.NET

i mean that, with the help of that software we can easily make
frontends and that too visaully appealing one.

regards
Gaurav
CodeFutures - 11 Apr 2005 21:43 GMT
Hi Gaurav,

I sort of guessed you were a student or something similar.

Why don't you download FireStorm/DAO and try it out?

http://www.codefutures.com/products/firestorm/download/

I'll look out for your download and arrange a free license for the
duration of your project.

If you're learning Java, then you may as well learn to do things the
right way. The code generated by FireStorm/DAO is based on the Core
J2EE Design Patterns (not just data access objects, but also data
transfer objects, session facades, business delegates, etc).

Regards
PJ Murray
Gaurav - 18 Apr 2005 08:01 GMT
well, nobody has answered. :-( .. neways , i was thnking to make GUI in
swings which would be embedded in the JSP page. wht do you people say ?
If i could have found out a good GUI software , that would have
reasonbaly helped !

regards
gaurav
Gaurav - 18 Apr 2005 22:56 GMT
can anybody do let me know, if there is some HTML editor exactly like
FRONTPAGE ?
As in Office XP, there is no FRONTPAGE :-(
Daniel Rohe - 19 Apr 2005 09:37 GMT
Macromedia Dreamweaver

Commercial, with good HTML and Taglib support (MX version). Why do you need
Drag&Drop? For tables, Database connections or what?

Daniel

> can anybody do let me know, if there is some HTML editor exactly like
> FRONTPAGE ?
> As in Office XP, there is no FRONTPAGE :-(
Gaurav - 21 Apr 2005 07:07 GMT
kwell...yeah that drag and drop option was wrong. i think a good HTML
editor should serve my purpose to make a good front end
Gaurav - 04 May 2005 04:37 GMT
hi everybody !!

I am back, and my project is goin fine... Just stepped into more deep
waters !!
I have a page where I have three combo boxes. Each combo box would be
filled up by three different database queries.

Now , the requirement is , that when I fill my first Combo Box from the
database, and as soon as the user chooses one option from the 1st Combo
Box , the 2nd Combo Box should use the values of 1st Combo Box and run
an datbase query depending on the value choosed in 1st Combo Box and
display it.

In ,NET we make this possible by " run at = server" . but I am really
not getting an idea, how to do this specific job in J2EE.

hope to get help from you people, as in past !
regards,

Gaurav


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.