At the local state university, we're about to put into production a simple web app developed following the lessons of the Cattle Drive. While the app will have hundreds of users, it will likely never have more than a dozen concurrent users. It occurs to me that I might want to ask if there is anything about the JDBC or Servlets assignments that was strictly for learning purposes and shouldn't be implemented in even a small-scale/small-volume web app. So, is there anything to look out for?
Are you familiar with concurrancy issues? I think the big thing you will need to think about is what if two people try to use the same servlet at the same time. The main thing is that you don't want to use "global variables" - don't store something as a servlet attribute and have methods within the servlet depend on that information. In other words, don't set such an attribute to a value then call a method that depends on that value. It's possible that another user is using the same servlet at the same time and is setting the same variable to something else! It was a long time ago that I wrote those assignments. So I can't remember that much about them. But off the top of my head, I would guess that they would be okay.
I'm only up to Servlets-4b but so far there seems to be no requirement for synchronization on the list used for the Video Library. I did put it in but got hints that I shouldn't do it because users were well mannered. Also there is one "global" library, not one for each user. There is just one password to access the servlets and it is hardcoded and unencrypted.
I can't think of anything that should not be implemented. It would probably be wise to add/modify a couple of things for real life use even though they're above and beyond the assignment requirements. Passwords and concurrent access are on top of the list. If you have a small number of users, you probably won't need to get into connection pooling.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Wink, wink, nudge, nudge, say no more, it's a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop