• 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

Design consideration

 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am creating an appln whereby a co is getting lots of small job like dataentry etc.
Thses tasks are assigned to different employees.
1. So employees should be able to fill in periodic task sheets for the projects they have done & the time spent.
2. Co wants to know how much time time has been spent by all the employees on a particular project.
I am considering a design for this soln. Since this is going to be on intranet aplln.
My choice would be to use jsp as front end.
The design appears simple
one form for the employee to fill in data
second for the company to genrate reports.
Can anyone suggest a better architecture. or is jsp ok?
how else to decide?
Any expert comments.
thanks,
Majid
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSP sounds like a good approach to me. Since it's on an intranet, you could even use applets outside the sandbox if you need to. You may want to add some servlets to take care of the data and responses.
 
Majid Khan
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Michael.
Can you elaborate more on the need for servlets.
As I am not getting a clear picture of the whole scenario.
I was thinking of 2 jsp pages one for time sheet input & another for results. is it ok?
I need more details on how to convert design into code.
As you can what is to be done is clear, how it is to be done is the question.
Can you elaborate more do write in.
Any advise on this is welcome.
regards
Majid
 
Bartender
Posts: 1844
Eclipse IDE Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In general, a JSP should only be used for displaying somethign to the user. Servlets should be used for calculation code that does not display anything to the user.
The reason for this is two-fold: a). They are designed that way (do it because we said so! ) and b). You have more direct control over things with a servlet.
A little elaboration on b). If you want to redirect the user to another page, you cannot write anything to the output stream before redirecting, else you will get a runtime error. JSPs, however, are designed to write things to the output stream. This doesn't mean that you can't use JSPs to do the job, it just means that you have to be very careful with how you code them, else you will get this error.
Remember that when it comes to Web Apps, JSPs are compiled into servlets behind the scenes. This means that Servlets are required for a web app; JSPs are not.
(Also, the Web Server has to compile a JSP the first time you use it. By writing non-user-output code into servlets, you save just that tiny bit of overhead...)
So the pattern is something like this:
User Form (JSP) -> Process Form (Servlet; data processing happens here) -> Results page (JSP, redirected to from the Servlet)

Hope this helps
 
reply
    Bookmark Topic Watch Topic
  • New Topic