aspose file tools*
The moose likes JSF and the fly likes JSF or JSP for fast web development Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF or JSP for fast web development" Watch "JSF or JSP for fast web development" New topic
Author

JSF or JSP for fast web development

Maria Michael
Greenhorn

Joined: Sep 07, 2011
Posts: 18

Hi all,

I am so glad I am back to the Java World and having dillemas such as hmm what technology to use of the so many that are available.

So my knowledge in the past (from the uni) was concentrated on JSP and Servlets. Now I see there are other players in building web applications e.g. the JSF.

JSF looks promising (as it is using JSP) but I have nowhere to start. Any good Book that can assist as a step by step guide including apache/tomcat guidelines etc?

Does JSF cooperate good with MS SQL Server?

I really need the technology that will choose to provide fast development and be rich in functionality.

Any suggestions?

BTW this web app will have a lot of printing (unfortunately) and a lot of report generation. I have never done reports on the web so how do you do that? HTML? PDF?

Thanks.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

Welcome to the Ranch, Maria!

Actually, JSF is not JSP-based anymore. However, it does provide the ability to do JSP-like things while automatically handling a lot of the tedious little details that you have to do manually on JSPs. Overall, however, if what you want is "fast" web development, J2EE isn't the route to go. J2EE is designed for performance, security and scalability, and each of those extracts a price. If you just want to "Git 'r Dun!", consider a quick and dirty platform like PHP, or Python, RoR, etc. For similarly-complex projects, the scripting platforms get pages out in front of managers in a hurry, even if they do replace time spend coding and compiling clean with time spent being paged when a production app crashes in front of the entire world. And, after all, myopia has been one of the defining features of American Business for decades.

JSF can provide a very productive environment for web page design. In addition to its other virtues, it's extendable, so that prettier, skinnable, and more complex UI elements are easily used, along with AJAX support in many extensions (and with JSF2, part of the core JSF).

However, JSF is just one layer in the webapp. As far as SQL Server support goes, for example, JSF doesn't care, since JSF doesn't talk to databases. That's normally handled at a completely different application level, commonly using an ORM system such as the Java Persistence Architecture (JPA).

Printing support depends on your requirements. JSF can definitely produce printable pages, especially with good CSS to help out. However, if precise layout is a must, you need PDF output, and JSF doesn't normally handle that, so it's commonly paired with some sort of non-JSF PDF generation facility such as FOP or one of the Java Report writers.

Customer surveys are for companies who didn't pay proper attention to begin with.
Maria Michael
Greenhorn

Joined: Sep 07, 2011
Posts: 18

Thanks for the reply Tim.

I think I will go for the JSP and Servlets instead of anything else and the main reason is that I had some experience in the past. Security and performance is also a must therefore J2EE is the solution for me.

I found some tutorials and online material regarding JSF and I really found it difficult to understand (Probably did not find the right material??). Therefore I kinda prefer starting with JSP and Servlets and see how it goes.



Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

Maria Michael wrote:
I found some tutorials and online material regarding JSF and I really found it difficult to understand...


This is really sad. The heart of JSF is that you provide Models (Backing Beans) and Views (JSF page templates). JSF supplies (most of) the Controllers, gets data to/from Views, comes with standard validation and conversion features and manages View navigation. Aside from requiring a good knowledge of EL and some one-time boilerplate setup stuff in web.xml, that's about it. The most common problems with JSF that show up in this forum tend to be 1) people attempting it to work like JSPs - mostly by inappropriate use of JSTL, and 2) pulling a lot of esoteric JSF classes and data structure to do what JSF does automatically with POJO objects. In other words, the basics of JSF are so simple that people can't believe it, and they go in and complicate it.

JSF apps do have their drawbacks, and not everything is simple and easy, but it's a pretty good realization of Alan Kay's maxim that "Simple things should be Simple and Complex things should be Possible". Too many systems I've seen made Simple things Complex or Complex things Impossible. Sometimes both.
Maria Michael
Greenhorn

Joined: Sep 07, 2011
Posts: 18

Tim can you suggest a book that is easy and provides a good guide using JSP and JSF?

I was thinking of buying the Beginning JSP, JSF and Tomcat Web Development

or the

Java EE 6 Development with NetBeans 7 (which is published on 2011 which I expect to have the latest developments )
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

Unfortunately, the rather copious selection of computer books at the local store has shrunk from 3 bookcases to one column containing mostly things like "Windows 7 for Dummies". So I haven't had much opportunity to browse lately. I got the first edition of Kito Mann's JSF in Action, but since then I mostly get my info straight from the Internet.

Some of the online vendors have preview features, so you might want to shop them and see if there are any publications that appeal to you.

A nice quick reference for the core JSF tagset is here: http://www.exadel.com/web/portal/jsftags-guide
Maria Michael
Greenhorn

Joined: Sep 07, 2011
Posts: 18

Thank you Tim it looks like I'm gonna need this reference guide.

Also I started reading this tutorial and hope for the best.

https://www.ibm.com/developerworks/library/j-jsf1/

Thank you very much.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

Although that article is pretty old, and doesn't illustrate the annotation options from JSF2, I still think it's one of the best introducitons to JSF that was ever written and I still recommend it to people.
Maria Michael
Greenhorn

Joined: Sep 07, 2011
Posts: 18

I also found this.

http://openfaces.org/demo/overview/homepage.jsf

Have you ever used them to build web apps? They look promising into assisting not writing from scratch code for components.

I also liked the look and feel of the components.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

I don't think I've ever used that particular extension. If I have, it's been over 5 years, so I'd be way out of date.

But definitely, if you want powerful, pretty JSF, it's a good idea to add on some enhancements. The core JSF, for example, doesn't provide such popular amenities as pop-up calendar controls.

Most recently, I've been using RichFaces. I've also used the Apache extensions such as Tomahawk. IceFaces is another favorite in this forum. Oracle has an extension called ADF that they use for their apps.

Most of these extensions have similar abilities, so it's pretty much a matter of what you like and whether you can get good support for it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF or JSP for fast web development