Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Which do I use for web design?

Reply
Thread Tools

Which do I use for web design?

 
 
Roedy Green
Guest
Posts: n/a
 
      06-04-2008
On Tue, 03 Jun 2008 20:52:46 -0400, Arne Vajh°j <(E-Mail Removed)>
wrote, quoted or indirectly quoted someone who said :

>> Ones you have get ready soon without a long learning curve, pure
>> Servlets.

>
>Why not pure JSP's ?


It is one less thing to learn. JSP is one of a dozens of template
engines all of which strike me as bailing wire. They smell of
Dartmouth basic in their ugly syntax.

A JSP-like language is possible, but it needs someone like Niklaus
Wirth to define a clean syntax. I have yet to see anything even as
clean as Java.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      06-04-2008
On Tue, 3 Jun 2008 18:46:14 -0700 (PDT), jmDesktop
<(E-Mail Removed)> wrote, quoted or indirectly quoted someone
who said :

>What is "pure servlets"? I don't want to emit html code from
>servlets.


If you did not know any of the server side technology, and needed to
put a tiny bit of server-side intelligence into a web page in minimal
elapsed time, then pure Servlet would be the way to go, on the
grounds you would not need to learn any template engine. You could use
something like Quoter to convert web pages into Java string literals.

http://mindprod.com/applet/quoter.html

you could whip up a web page or two as Java literals far faster than
you could figure out one of the template engines including all the
deployment.

If the project were to grow or to require frequently maintenance, then
it would pay to invest the time learning a template engine.

Doing one small project that way might be a good intermediate learning
step before tackling the complexity of a template engine. Then you
would much better understand what the template engine were up to.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      06-04-2008
On Tue, 03 Jun 2008 20:52:46 -0400, Arne Vajh°j <(E-Mail Removed)>
wrote, quoted or indirectly quoted someone who said :

>> Mid size ones templates.

>
>Velocity ??


here are more than you can shake a stick at.
http://mindprod.com/jgloss/templateengine.html
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
Reply With Quote
 
Silvio Bierman
Guest
Posts: n/a
 
      06-04-2008
jmDesktop wrote:
> If you were starting a web project from scratch, which technology
> would you use? I have looked at various. I saw "regular" jsp
> scriplets, servlets emitting html, JavaBeans, JSTL, EL, JSF, and then
> frameworks (or is JSF a framework?)
>
> Outside of using frameworks, what would you use? It is a webpage that
> could develop into a homemade CMS. Probably use MySQL to store
> account information.
>
> I've been thinking about it and I can't bring myself to use any
> embedded code like PHP, Classic ASP or older JSP constructs, or
> emitted HTML. So, it appears that I would use JavaBeans, servlets to
> talk to those JavaBeans and HTML files that have EL in them.
>
> Is this a "good" way to do things? Or should I try JSF which seems
> very popular.
>
> I digress, but the security aspect of it seems like something that is
> missing from many of the frameworks I have seen and nothing in JSP
> like ASP.NET has, which is why I mention the MySQL above.
>
> Thank you.


The first thing is to try and understand the basic mechanisms. Servlets
will expose these most clearly. Write some servlet code emitting HTML
and handling user input sent back from the browser. Just to get a feel
of what happens at the core level.

I will assume you are already familiar with databases and have possibly
already decided upon some data storage strategy. If not you will have to
learn about that as well.

Then start looking at frameworks and try to discover what they cover and
how they do it. Focus on what the consequences are for the code you have
to write. Decide if you find it sufficiently simple, fast (coding-time
wise) and easy to modify when the target system evolves.

Try not to become dogmatic. Emitting HTML from servlets is not a bad
thing, in fact all frameworks use servlets to emit HTML. Writing
application level code that use print-like commands to generate HTML,
however, is bad and you should stay away from that.

My main point is that a smart and layered design is much more important
than conforming to monkey-rules. It is not bad to use plain JDBC but if
you do you should do it wisely and create an isolated layer that embeds
the JDBC logic and hides it for the rest of the system. The same thing
goes for emitting HTML from servlets or using plain TCP sockets. If a
sufficiently fitting framework for some required functionality is
available do not hesitate to use it. On the other hand, a set of good
frameworks does not a good system make.

Silvio
 
Reply With Quote
 
David Segall
Guest
Posts: n/a
 
      06-04-2008
jmDesktop <(E-Mail Removed)> wrote:


>I'm using NetBeans. Not really wanting a framework yet. Trying to
>learn myself.

In that case I suggest you visit
<http://www.netbeans.org/kb/trails/web.html> and choose the Visual Web
Application Development tutorial that most closely matches the
application you want to write. In a day you will have a working Java
Server Faces application. From there, you can admire all the work that
NetBeans did for you and modify the code to learn how JSF, Beans and
Java server code work together.
 
Reply With Quote
 
jmDesktop
Guest
Posts: n/a
 
      06-04-2008
On Jun 4, 12:42*am, Mark Space <(E-Mail Removed)> wrote:
> jmDesktop wrote:
>
> > I'm using NetBeans. *Not really wanting a framework yet. *Trying to
> > learn myself.

>
> Ah ha. *Well check out this site and their Java EE page, it will help.
>
> http://javapassion.com/
>
> http://www.javapassion.com/j2ee/
>
> It's a confusing, broad subject. *Sang Shin does a good job of sorting
> out the basics. *It looks like the next course is starting up in one
> month, so you're well just in time to jump on the site and take his free
> course.


Believe it or now that is where I have been already (from a suggestion
here.) The subject is so broad though that I don't know where to
start. It's not really like it was when I started asp.net. It was
pretty straight forward. Using Sun's web technologies, while not so
hard to understand when broken down, are hard when you put them all
together. I'm left feeling, they had a way of doing it, added a new
way, kept the old way, just kept adding new stuff. And a new person
is left not know where to start to sit down and just write a web app
from scratch.
 
Reply With Quote
 
jmDesktop
Guest
Posts: n/a
 
      06-04-2008
On Jun 4, 8:41*am, Lew <(E-Mail Removed)> wrote:
> Mark Space wrote:
> > jmDesktop wrote:
> >> If you were starting a web project from scratch, which technology
> >> would you use? *I have looked at various. *I saw "regular" jsp
> >> scriplets, servlets emitting html, JavaBeans, JSTL, EL, JSF, and then
> >> frameworks (or is JSF a framework?)

>
> > All those, except the part about emitting HTML.

>
> Ditto, except the part about scriptlets. *Good thing the OP put the "regular"
> in quotes. *Scriptlets and servlets emitting HTML are two sides of the same
> bad penny.
>
> What exactly, OP, do you mean by "JavaBeans"? *One can hardly write any Java
> program these days without using Beans at least a little.
>
> Also your axiom is flawed. *"If you were starting a web project from scratch"
> is vague and overbroad. *If you were building a house, would you use pine or
> marble?
>
> --
> Lew


I simply meant using JavaBeans in the program somewhere because that
seems to be the right way to build things. Probably to do database
communications.

Scratch was in the context of the given tools. I meant using those
tools and technologies, unless I should be using something else, what
should I do. I think I look around at the netbeans web application
learning trail for a while and see what they have.
 
Reply With Quote
 
Arne Vajh°j
Guest
Posts: n/a
 
      06-05-2008
Roedy Green wrote:
> On Tue, 03 Jun 2008 20:52:46 -0400, Arne Vajh°j <(E-Mail Removed)>
> wrote, quoted or indirectly quoted someone who said :
>>> Ones you have get ready soon without a long learning curve, pure
>>> Servlets.

>> Why not pure JSP's ?

>
> It is one less thing to learn. JSP is one of a dozens of template
> engines


JSP is not a template engine.

And JSP is standardized.

> all of which strike me as bailing wire. They smell of
> Dartmouth basic in their ugly syntax.


It is significant easier to write JSP pages than servlets.

Arne
 
Reply With Quote
 
Arne Vajh├Şj
Guest
Posts: n/a
 
      06-05-2008
Lew wrote:
> The Model instance munches on the parameters and their values, and
> creates some kind of result, perhaps an instance of a custom Result type.
>
> The Controller pops the Result (or possibly the Model object itself)
> into a request attribute (not a parameter), then compares the screen
> name and the outcome of the Model against yet another Map.


> The JSP contains only tags, EL and HTML. The JSTL can handle XML and
> database stuff,


I would argue that the XML and database stuff belong in the model.

Arne
 
Reply With Quote
 
Arne Vajh├Şj
Guest
Posts: n/a
 
      06-05-2008
Lew wrote:
> Arne Vajh├Şj wrote:
>> I would argue that the XML and database stuff belong in the model.

>
> I agree with you.
>
> However, for the OP's purpose the availability of tags for some of that
> might be a cheesy shortcut.


Yep.

And those tags are actually quite cool.

But if you start creating model classes, then I believe that
it will be difficult avoiding moving the persistence to those
(or below those).

Arne
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Session timeout in IIS and web.config, which overwrites which? antonyliu2002@yahoo.com ASP .Net 9 04-23-2008 09:55 PM
Which Free upload site to use....which is Fast & Reliable divyaf@gmail.com Digital Photography 1 07-26-2007 09:34 PM
how to use stoi? which *.h to use? trivial beginners problem... Zahpod C Programming 4 04-21-2006 06:58 PM
Microcontrollers: which one ? which language ? which compiler ? The Jesus of Suburbia NZ Computing 2 02-11-2006 06:53 PM
Web Stats? Which to use? Which is best? Familyman HTML 3 02-09-2006 11:05 PM



Advertisments