IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Hell, yeah!
The example isn't even thread safe. A JDBC connection isn't fond of multiple, open Statements and there's no synchronisation. Unless the result set is being kept open for a reason, it and the statement has to be wrapped in a synchronized statement, where the data is dumped into some custom, data object. Only process data outside the critical section to reduce bottlenecks.

Or how about having HTML mixed up with Java. You can't show that to a web designer. If a web designer gives you a web page with the typical, artistic crap in it, it's painful to make a servlet emit it. And then someone will want the look and feel of the website completely changed. That's what JSP's for! A tutorial that teaches JSP but doesn't demonstrate it. Ummm...

If you're not going to learn an MVC framework like Struts, the servlet should extract the raw, data objects appropriate for a page from a core, business model then forward to a JSP page that formats them for display. Separating responsility means more maintainable code.

Following the tutorial means putting the hideousness of JDBC in every page controller. Separate this stuff into a core, business model, for the love of god!

And there's error trapping after writing part of the response, so it's too late to forward to a general error page with a contact 'phone number, apology or whatever. And if workflow has to be changed, such as mistyped data that must be corrected or a rejected transaction, the servlet is forced to emit the appropriate output for all eventualities, which is duplicated across many servlets. Rather than working out to which servlet to forward. Control logic comes before view logic.

I doubt I can give you some links as I now do the Struts-JBoss thing, which is a completely different brand of horror.
Matthew Greet


But we must kill them. We must incinerate them. Pig after pig, cow after cow, village after village, army after army. And they call me an assassin. What do you call it when the assassins accuse the assassin? They lie. They lie and we must be merciful to those who lie.
- Colonol Kurtz, Apocalypse Now.
New Re: Hell, yeah!
I use Spring in Tomcat. For Java stuff it's pretty nice. No EJBs to deal with, but you still get any transaction stuff you need. And the Inversion of Control configuration with Spring is very useful.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
     When does a java constructor execute? - (drewk) - (56)
         When you say 'new' - (tuberculosis) - (41)
             Word from the IGM on ziwt says ... I was wrong - (drewk) - (40)
                 I think you've got it - (tuberculosis) - (11)
                     Would be nice to say that in the docs - (drewk) - (10)
                         That's missing for most languages - (tuberculosis) - (6)
                             Like Drew, I'm trying to teach myself Java. - (pwhysall) - (5)
                                 "Effective Java" => oxymoron :-) -NT - (ChrisR) - (1)
                                     "Microsoft Works" -NT - (drewk)
                                 What would he know about it? - (tuberculosis) - (2)
                                     That's an oddly visceral response. - (pwhysall) - (1)
                                         Symptomatic of general J-headed attitude - (tuberculosis)
                         Re: Would be nice to say that in the docs - (Arkadiy) - (2)
                             That's it exactly - (drewk)
                             I'd give up on Morphic - (tuberculosis)
                 Now I'm getting frustrated (again) - (drewk) - (27)
                     Re: Now I'm getting frustrated (again) - (admin) - (1)
                         Badness - (jake123)
                     Servlets and business logic - (warmachine) - (22)
                         So is this example stupid? - (drewk) - (21)
                             Hell, yeah! - (warmachine) - (1)
                                 Re: Hell, yeah! - (admin)
                             Way stupid - (tuberculosis) - (18)
                                 Trying to learn The Right Way[tm] - (drewk) - (17)
                                     No such way - (tuberculosis) - (16)
                                         I need to write a small app like it's a big one - (drewk) - (15)
                                             Huh, most people are trying to figure out the opposite - (tuberculosis)
                                             This is classic - (ben_tilly) - (13)
                                                 Um, ... - (mmoffitt) - (1)
                                                     No. Exceptions exist. But generally, yes. -NT - (ben_tilly)
                                                 Not exactly - (drewk) - (10)
                                                     Good luck - (ben_tilly)
                                                     Ah - so that's what you're trying to do - (tuberculosis) - (8)
                                                         Time to hit the library - (drewk) - (3)
                                                             That's an old interview. - (admin) - (2)
                                                                 Gold mine - (drewk) - (1)
                                                                     Moochos grassy arse -NT - (pwhysall)
                                                         Several copies of Rod's book around here. - (admin) - (3)
                                                             Q on book. - (mmoffitt) - (2)
                                                                 Rod's book isn't for administrators - (admin) - (1)
                                                                     Ok, thanks. -NT - (mmoffitt)
                     That's not what they are saying - (tuberculosis) - (1)
                         Servlets and page scoped variables. - (warmachine)
         Re: When does a java constructor execute? - (dshellman) - (13)
             There is a certain amount of value... - (admin) - (1)
                 I already know that - (drewk)
             s/Tomcat/Jetty/ - (tuberculosis) - (10)
                 Based on what? - (admin) - (9)
                     Personal experience - (tuberculosis) - (8)
                         A couple of years back, sure. - (admin) - (7)
                             Oh Tomcat 5 - (tuberculosis) - (6)
                                 Reminds me of Spolsky's piece on Netscape - (FuManChu) - (5)
                                     And I remember disagreeing with it the first time - (ben_tilly) - (4)
                                         Makes sense to me. - (Another Scott) - (1)
                                             Know what you mean - (tuberculosis)
                                         It's a threshold thing - (ChrisR) - (1)
                                             And that point is completely true - (ben_tilly)

Powered by sun spots!
95 ms