Java Reference
In-Depth Information
application's core business logic every time the preferred user
interface technology changes.
Prefer JSFs as your first choice of presentation technology
Using JSF, one will get automatic binding of data to visual
components, mapping, and validation of input data and saving
of state between requests. Using JSP - you have to implement
it manually. JSF also supports Ajax interaction with the
server.
If you are developing an application that requires a standard
behavior, such as data entry, editing and display - that JSF is
the best bet. If you need an online application with fast
response, navigation within a page on the client side, such as
Gmail or twitter - you can spend a lot of time translating the
client-side logic components in the JSF. In this case, you
better use the JSP, as a source of data and JavaScript library
to display data.
Store only as much state as you require
Enable session persistence.
HttpSession are great for storing information about
application state. Unfortunately, developers often lose sight of
the intent of the HttpSession -- to maintain temporary user
state. It's not an arbitrary data cache. Many systems put
enormous amounts of data -- megabytes -- in each user's
session. Well, if there are 1000 logged-in users, each with a 1
MB HTTP session, that's one gigabyte or more of memory in
use just for sessions. Keep those HTTP sessions small and if
you don't your application's performance will suffer. Good
Search WWH ::




Custom Search