Posted Apr 17, 2012 11:16 UTC (Tue) by alankila (subscriber, #47141)
[Link]
JSP -- probably best avoided if at all possible. I inherited an application that used JSP once, and find it an embarrassing piece of technology.
I personally use wicket for everything. But there's a bit of boilerplate there: you have to subclass WebApplication, and you must at the very least define the class which implements the web page rendered at the root of the website. Then you must give an implementation of that Page (the class file can be empty), then you get to write HTML.
I think that templates should have no evaluation capability whatsoever. In wicket's case, dynamic elements are marked with an xml attribute called wicket:id, for instance <div wicket:id="foo"/>, and then it's up to the Page to choose what is rendered into the element identified by name foo. The state of page is entirely on server side. Components can be replaced in the page tree to generate different kind of elements on the page dynamically in response to user interaction. For instance, foo could start out without content, but become replaced with a modal dialog instead when user interacts with some button or link on the page.
The real problem is with understanding the evaluation model. Wicket gives you an impression that you are actually working with a desktop application, because page instances are kept alive on server and access to the same page will automatically preserve the state of the members, so you get state saving for free. That means improved chance to write secure code, as you don't have to write things into form hiddens, or put them into session hashmap where multiple tabs/windows in same session could trample all over each other. But most astonishingly: page instances are versioned, and requests so if the user uses back button, wicket actually resurrects an earlier version of the page to handle that request, which cleanly allows user to back out from choices made earlier (provided they did not cause permanent state changes to components outside wicket).
PHP: a fractal of bad design (fuzzy notepad)
Posted Apr 17, 2012 13:07 UTC (Tue) by canatella (subscriber, #6745)
[Link]
At the time, installing apache + php + mysql was just a simple apt-get away. Running jsp required finding and installing the sun jre just to see that for this you needed the sdk then setting up tomcat (not that simple), learn how to setup all those xml files needed, generate a war file to be able to deploy your application. And nobody was providing cheap hosting for java application.
So yes for a newbie/amateur, PHP was the easy/quick solution.
PHP: a fractal of bad design (fuzzy notepad)
Posted Apr 17, 2012 19:24 UTC (Tue) by drag (subscriber, #31333)
[Link]
For the longest time php + mysql was your only option. It wasn't until VPS got cheaper that people could really start playing around with things like ruby on rails or python without a bunch of headaches.