Re: Review of latest code
- To: email@example.com
- Subject: Re: Review of latest code
- From: "Alexey Parshin" <firstname.lastname@example.org>
- Date: Wed, 30 Jul 2008 08:06:55 +1000
- Delivered-to: mailing list email@example.com
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=6XBcNsdA520ZnX267qBQDr/5HIfPvlsdBiSu1KqiSUc=; b=QXPXiz0PWTE5Dxn7+pJEzHvd9sl2XCVlOySc2JcbXK/9XphWA9/EFgu7ThPBbCmqSW FzsUAfII1v5vXVgaVC8BNbcjKys4AExRsnV0kxl4rnq/TOD8cZh+xktuTmbD+sCSdkA7 b+bTNwas+oOz1EcERludshIsHC7sKblaCh1uY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=V1kDmnvKE4pk5naFKnjZ1sGt03un7eqlKVnoSSbA5mGEVBSWO0XnHo2aTkn3/2P+Eq YwB+D1T8HzwS9dNBQVY/0WeSg6KlXnQvYm2lj0d2L1Eiuz/FZoiAGyKB2PxwBdpnfwni o6bpBVjJ/DwUqU3Ar6jjOZ0Lsr4ZCI6i/qPeI=
- In-reply-to: <488F5042.firstname.lastname@example.org>
- Mailing-list: contact email@example.com; run by ezmlm
- References: <488F5042.firstname.lastname@example.org>
2008/7/30 Ilya A. Volynets-Evenbakh <email@example.com>
I finally started reviewing code.
First thing that caught my eye:
string csp = "HomeView.csp";
RequestDispatcher* destination = request.getRequestDispatcher(csp);
This contradicts tech spec:
Templates (CSP pages) will have identical names, and will be mapped to subdirectories named based on theme.
I need an example of the correct mapping. The current code wasn't changed since (in that respect) since Sergey developed it.
Now, HomeView.csp itself.
Currently it's doing lot of data retrieval work from DB.
This sort of conflicts with the original idea of having all data retrieval be done from a servlet,
and passing the data as request attributes.
(This, by the way, would prevent your exception handling problem we discussed on IRC).
This is Ok. I wouldn't worry too much about:
1) Performance: we need to retrieve these data one way or another. It doesn't matter where - the retrieval time is the same. Actually, generating data into the memory in the servlet and later retrieving it out of memory creates unnecessary delay, even not to significant.
2) Code complexity. The current implementation is much cleaner since it doesn't have to store objects in the session or request in servlet in order to retrieve it later. It also has the advantage of retrieving data when and how we need 'em.
The downside of retrieving data in servlets is: If there are several ways to get to the same page, all the servlets redirecting to that page should update page data, isn't it? Then the code updating the data should be duplicated in these servlets.