Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Excuse my ignorance but.......

 
Rob Petterson
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've just started to delve into JSP's and have been looking into the tag libraries. The question I have is say for example you are building a shopping cart within a web application - how do you go about identifying a suitable tag/tags that would help build the cart??
Also, I'm looking at IDE's for the first time. I was thinking about using JBuilder to help me build a web app using JSP, JDBC etc. Can anyone suggest which are the most suitable version and rev I should use?
Just a final note. I'm reading JSP Web Development by Wrox, which seems to be fairly informative. Any suggestions of other books/sites which goes through various example apps for on-line buying etc which gives a good break down of the code for a newbee like me to get going with?
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rob Petterson:
I've just started to delve into JSP's and have been looking into the tag libraries. The question I have is say for example you are building a shopping cart within a web application - how do you go about identifying a suitable tag/tags that would help build the cart??

There are a couple of factors for identifying candidate tags. First of all, you can stand back from your JSP pages, look at the code and ask yourself what you could reuse - both across the pages and across other web applications. A good example here is a tag that provides iteration over a collection of objects.
Secondly, you could use tags to wrap up complex presentation logic on your page. For example, you might programmatically determine whether some specific content is displayed based upon whether the user has logged in. Again, this is potentially something that can be reused, but wrapping it up inside a tag will greatly simplify the development and testing of the page.
At the end of the day, custom tags can be used to wrap up a wide range of functionality although there are several best practices around what you should and shouldn't wrap up. For some inspiration, take a look at Chapter 8, Tag Patterns (from Professional JSP Tag Libraries) for some common uses, and also, the JSP Standard Tag Library as this already has implementations of many common tasks.

Also, I'm looking at IDE's for the first time. I was thinking about using JBuilder to help me build a web app using JSP, JDBC etc. Can anyone suggest which are the most suitable version and rev I should use?

Choosing an IDE is a very subjective thing and it depends on what you want to do with it. At one end of the scale, you have those that provide lots of wizards, and at the other, those that are just fantastic code editors. I personally like IntelliJ IDEA because it works the way that I want it to work.

Just a final note. I'm reading JSP Web Development by Wrox, which seems to be fairly informative. Any suggestions of other books/sites which goes through various example apps for on-line buying etc which gives a good break down of the code for a newbee like me to get going with?

As for books covering on-line buying type apps, I'm not too sure to be honest. The J2EE blueprints (Pet store) book might be a good start if you want to get into the design of a full J2EE app.
Hope that helps...
Simon
 
Rob Petterson
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Simon for the input, but can you expand upon the first part of my original question please. Lets just say that you know exactly what business logic you are after - all you want to do is search and locate the correct tag for the job. How is this done? Is there documentation issued with a custom tag - if so how is it ordered so that one can easily locate the right tag?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic