| | |
best way to code 3 tier application
![]() |
I'm wondering what thoughts people have on the best way to implement a 3 tier application.
I'm playing with the idea of multiple clients <---> server <----> database server <----> mysql database.
I'm not sure if the database server is a necessary step though.
My previous foray into java network progamming just used sockets, but I've read that RMI(?) is a better approach? What think ye? Does anyone know of a basic 3 tier code sample I can get my feet wet with?
I'm playing with the idea of multiple clients <---> server <----> database server <----> mysql database.
I'm not sure if the database server is a necessary step though.
My previous foray into java network progamming just used sockets, but I've read that RMI(?) is a better approach? What think ye? Does anyone know of a basic 3 tier code sample I can get my feet wet with?
------------------------------------------------------------
If you see no coffee in my immediate vicinity, speak slowly and use small words....
ConnectNL Directory | Blog
If you see no coffee in my immediate vicinity, speak slowly and use small words....
ConnectNL Directory | Blog
Thanks for the suggestions! Isn't Hibernate an implementation of RMI?? anyway....
Hypothetically speaking, if an application need to scale from 50 to 500,000 users(disregarding hardware issues) would all three tiers really be necessary? Could we just go with:
many clients <----> Server <----> Database ???
Although I guess the 3rd Tier allows for better control of say, connecting to different types of databases though...
And although yes, Hibernate/RMI seams like the way to go, I think all would agree setting up a simple client server from scratch or playing with a code sample is probably better starting out to learn the bare bones first. At least I find that jumping into something more complex without first seeing the different parts in action just complicates the matter.
Hypothetically speaking, if an application need to scale from 50 to 500,000 users(disregarding hardware issues) would all three tiers really be necessary? Could we just go with:
many clients <----> Server <----> Database ???
Although I guess the 3rd Tier allows for better control of say, connecting to different types of databases though...
And although yes, Hibernate/RMI seams like the way to go, I think all would agree setting up a simple client server from scratch or playing with a code sample is probably better starting out to learn the bare bones first. At least I find that jumping into something more complex without first seeing the different parts in action just complicates the matter.
------------------------------------------------------------
If you see no coffee in my immediate vicinity, speak slowly and use small words....
ConnectNL Directory | Blog
If you see no coffee in my immediate vicinity, speak slowly and use small words....
ConnectNL Directory | Blog
No, Hibernate abstracts away all that nitty gritty JDBC code to access the database.
http://www.hibernate.org
You shouldn't care whether you're talking through RMI or whatever, use an existing system to worry about that.
Spring makes for a lot of very nice capabilities. http://www.springframework.org/
http://www.hibernate.org
You shouldn't care whether you're talking through RMI or whatever, use an existing system to worry about that.
Spring makes for a lot of very nice capabilities. http://www.springframework.org/
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Depending on your application one of the 2 approaches can be chosen.. If you have enough complexity in DB parts OR more than one servers connecting to DB layer, you might want to have database server separately..
In anycase as Ezzarel pointed out J2EE is designed EXACTLY for this purpose.. See this architecture diagram.. it's not mandatory to have 2 physically different machines for J2EE and DB server, both can be on one machine..
In anycase as Ezzarel pointed out J2EE is designed EXACTLY for this purpose.. See this architecture diagram.. it's not mandatory to have 2 physically different machines for J2EE and DB server, both can be on one machine..
Are you Agile.. ?
![]() |
Similar Threads
- Code for Exiting a C# Application (C#)
- data access (Visual Basic 4 / 5 / 6)
Other Threads in the Java Forum
- Previous Thread: Jtree with JCheckBox
- Next Thread: jasperReport and iReport for Linux
| Thread Tools | Search this Thread |
addball android api applet application apps array automation awt bidirectional binary birt bluetooth businessintelligence busy_handler(null) card class classes client code collision columns component constructor crashcourse database designadrawingapplicationusingjavajslider draw eclipse ee error eventlistener exception expand fractal free game gis givemetehcodez graphics gui guidancer html ide image inetaddress integration intellij j2me java javadoc javafx javamicroeditionuseofmotionsensor javaprojects jme jni jpanel jtree julia jvm linux loan loop map method migrate mobile mobiledevelopmentcreatejar myaggfun netbeans newbie oracle physics plazmic print problem program project radio scanner server service set sharepoint smart sms smsspam software sortedmaps sql subclass support swing textfield threads tree trolltech unlimited utility windows






