• Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting started with JSF - book - question  RSS feed

 
Dana Ucaed
Ranch Hand
Posts: 406
6
Netbeans IDE Oracle Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jesper,

What are major drawback of JSF comparative with other technologies from Microsoft ,for example?

Sometimes is necessary to do server side validation and/ or client side validation.

in Java Server Faces  , which is a framework, how is the the approach?

Thanks in advance
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16059
88
Android IntelliJ IDE Java Scala Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dana,

There are many different frameworks for building web applications. You don't even need to compare it to Microsoft's solutions - in the Java world itself there are already many different frameworks.

One of the distinctive properties of JSF is that it's a component-based framework. You create your web application out of reusable components, and you can use libraries containing ready-made components. A component can be almost any part of a JSF application, from just a button to for example a table with pagination and sorting features. There are a number of libraries available with JSF components, for example PrimeFaces.

The advantages of this are that it gives you a way to organize your application and that it makes it easy to reuse parts. The disadvantages are that you generally have less control over the HTML pages that are sent to the browser - the components themselves produce the HTML, and if you need to customize the HTML or the styles (CSS) then that can be more complicated than with a framework where you work with the HTML more directly.

There are other component-based frameworks besides JSF, such as Apache Wicket, but JSF is part of the Java EE standard.

There are also other web application frameworks which work in a different way. For example, Spring Web MVC is an action-based framework instead of a component-based framework. With Spring Web MVC, you write the HTML for the web pages all yourself (using a template language such as Thymeleaf) and then you write controller methods to handle actions such as GET and POST requests to specific URLs. This is a bit more low-level than a component-based framework such as JSF.
 
Tim Holloway
Saloon Keeper
Posts: 18792
74
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Speaking of alternate J2EE frameworks, let me add 2 that I've worked with.

Apache Struts is the precursor to JSF. It's based on what they call a "Model 2" framework, which is a somewhat imperfect implementation of MVC. A lot of shops in my benighted town run Struts and Struts is what I used before JSF came along. I even published an introductory article on Struts in Java Pro magazine back around 2001.

Another very interesting, if more obscure framework is Cocoon. Cocoon is based on doing interesting things to and with XML.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!