• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Design Question

 
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Right now I have a simple poll applet that consists of check boxes, and a submit button. Users select one of the boxes and then submit it. From there it goes to a servlet and then the servlet updates a database, and then the servlet returns the updated results of the database. So it's an applet on front end, servlet in middle and database on backend. I could probably eliminate the servlet and just have the applet connect to the database(they're on the same machine). Should I get rid of the servlet since it isn't really necessary? What are the pros and cons of using the three-tier while I could use the frontend and backend? If anyone has any suggestions, I'd welcome them. Thanks.
- Sean
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My own thoughts are to get rid of the applet part. Make it a very simple form, and your servlet serves as the 'backend processing'.
 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's what I started out with originally. I've kept the servlet in the middle, but right now I have the applet opening a new frame to post the results. I'm still playing around with it though. I wanted to stay in the realm of the applet because I planned on having numerous polls and thought it would look better with a frame. Furthermore, I was trying to learn how to create a quiz applet. I'm still working on that though.
Thanks.
Sean
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While I would never dare to write applets for the forms you describe, you probably know better. You want an applet, you have it.
Now you want to get rid of the servlet. You can do it, and do away with it for a while. But if you are going to support and evelop the application, it will soon become a nightmare. You will actually have (or be tempted) to develop your own protocol to communicate between your applet and whatever is on the server side.
Then some day someone comes and asks you to add security. Are you going to start using SSL instead of practically transparent HTTPS?
On the other hand, this might be exactly what you want to do to this project, who knows...
 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's just something for my own website. Security isn't a concern. I already finished this though. Although it could use a few touch ups here and there. I used an applet on the frontend, servlet in the middle, and a database on the backend. The applet sends the post data to the servlet, and the servlet then updates the database. The database then sends the updated results to the servlet and the servlet passes them on to the applet. The applet then has a small frame popup and display the results. I may do some touch ups graphically(bar charts to display the results), but it's working quite nicely.
 
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since you have the Applet and the Database on the same machine, y not get rid of the applet and develope Java Application, that talks to the database directly, that way you will get all the features of jdk1.2 whcih you wont get if u use applets since jdk 1.1 is only supported my most of the well known borwsers.
On the other hand if u intend to make this program avaliable on the network then you should probally get rid of the Applet and write a simple form that interacts with the servlet.
Do not add database access code into u'r applet becasue of the security problem.

Vivek
 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply, but in terms of implementation, I think I'm all set. I went with the applet up front, servlet in the middle, and database in back. The reason I want the applet is because this is displayed on my webpage.
 
reply
    Bookmark Topic Watch Topic
  • New Topic