My JSF Books/Videos My JSF Tutorials OmniFaces/JSF PPTs
JSF 2.3 Tutorial
JSF Caching Tutorial
JSF Navigation Tutorial
JSF Scopes Tutorial
JSF Page Author Beginner's Guide
OmniFaces 2.3 Tutorial Examples
OmniFaces 2.2 Tutorial Examples
JSF Events Tutorial
OmniFaces Callbacks Usages
JSF State Tutorial
JSF and Design Patterns
JSF 2.3 New Features (2.3-m04)
Introduction to OmniFaces
25+ Reasons to use OmniFaces in JSF
OmniFaces Validators
OmniFaces Converters
JSF Design Patterns
Mastering OmniFaces
Reusable and less-verbose JSF code

My JSF Resources ...

Java EE Guardian
Member of JCG Program
Member MVB DZone
Blog curated on ZEEF
OmniFaces is an utility library for JSF, including PrimeFaces, RichFaces, ICEfaces ...

[OmniFaces Utilities] - Find the right JSF OmniFaces 2 utilities methods/functions

Search on blog

Petition by Java EE Guardians

Twitter

luni, 23 martie 2015

Never heard about OmniFaces ? It's time! Let's go!

1. What is OmniFaces ?

OmniFaces is a powerful and robust utility library dedicated to "make JavaServer Faces life easier".

This makes OmniFaces a library useful to all JavaServer Faces fans, and, when I say all, I mean that it doesn't matter what level of experience you have in JSF, or if you are a JSF developer or just a JSF page author, or if you like Mojarra or Apache MyFaces, or if you are a big fan of JSF library extensions like, PrimeFaces, RichFaces, OpenFaces, etc. OmniFaces is like an "universal tool" for JSF, because it answers to daily questions via solutions developed 100% in pure JSF API (and some crumbs of plain JavaScript) - there are no third-party libraries, add-ons, plug-ins or "hidden" modules. Most probably, your practical problems are reflected in questions like "How can I do this or that in JSF ?", "Can I get/set this JSF artifact?",  "Is there an workaround to this JSF bug ?", "Why JSF cannot do this or that?", "I thought JSF comes with such a feature! Is not ?", "I need a quick solution to this! Should I implement it ? How do I know if my implementation is correct ?", "Can I do this faster and apply it easily ?", and, most probably, the answers are in OmniFaces features. Practically, OmniFaces is a compendium of components, tag handlers, validators, converters, event listeners, exception handlers, utilities, functions, etc. Each of these artifacts answer to a practical JSF problem: common JSF bugs/issues, missing features, long time expected features, questions/issues harvested directly from production via StackOverflow, shortcuts needed for speeding the development process, etc. OmniFaces fix your day by day problems, but OmniFaces is also a "silent teacher" that will help you to build a strong logic and learn "healthy" programming techniques. As a consequence, in time, you will come with your own ideas and gain confidence that you can write clean and high quality JSF code (even extending OmniFaces source code). It may sound strange, but you will see that OmniFaces shows you valuable lessons of exploiting JSF API and source code, because it digs deeper in JSF "bowels" to reveal hidden techniques, cool tips and tricks and handy approaches that are very useful in any JSF developer arsenal. The OmniFaces source code is a goldmine for those who want to understand what's behind JSF world, and really need a source of inspiration or a boost of their JSF expertise.
 The OmniFaces creators (Bauke Scholtz (aka BalusC) and Arjan Tijms) are JSF professionals and members of JSF Expert Group (EG), very active and well known in JSF communities, with many years of practical experience and high level of programming knowledge (fundamentals, design patterns, OOP). This is the guarantee that OmniFaces is a high quality product!

More details on OmniFaces website.

2.  Before start learning/using OmniFaces, what JSF level should I have ?
As I said earlier, OmniFaces is useful to all JSF fans. This means that OmniFaces doesn't required a certain level of JSF knowledge, and, since is 100% based on JSF API, it doesn't require any third-party artifacts to be known. Most probably, OmniFaces will start to make your life easier from the moment when you will face your first issues in the JSF production field. So, if you are looking for a junior/senior JSF developer job (or Java/JEE developer that works with JSF also), then OmniFaces is a must in your arsenal. Sooner or later, OmniFaces will help you to find the best solution to a time consumer issue, will save you to reinvent the  JSFUtils or FacesUtils utility classes, will provide you the workaround to a JSF bug, will point you to use a component/tag handler that save you from hours of work, will help you with  "ready to go" snippets of code, will inspire you!

3. When should I use OmniFaces and when I shouldn't ?
You will know how to answer to this question, once you have the clear idea about what OmniFaces is and, most important in this context, what isn't! Right from the start, you should know that OmniFaces is not a framework! Moreover, it doesn't belong to the same category with PrimeFaces, RichFaces or OpenFaces, because OmniFaces is an utility library, not a component library (OmniFaces is not a set of "beautiful visually oriented components", like PrimeFaces). OmniFaces can be used in Mojarra and Apache MyFaces implementations next to any of these component libraries (or any other JSF libraries), and most of the time its effect will be reflected behind the scene. So, if you are in search of a JSF framework or a great looking component, DON'T search in OmniFaces. A clear picture of OmniFaces "placemark" on "JSF map" can be seen at OmniFaces "placemark" on "JSFmap".
But, if you feel that your JSF issue can be solved via a custom component, converter, validator, caching mechanism, tag handler, exception handler, function, utility method, custom context, event listener, faces view, filter, render kit, resource handler, view handler, shortcut method, etc, then you better check out OmniFaces showcase first, because, most probably, OmniFaces have an "out of the box" solution for you. Even if it doesn't, you are in the right place, because you can exploit the OmniFaces source code as a great inspiration resource for your custom implementation. I know, and you know, that any custom implementation is based on self confidence which is founded on solid knowledge, because custom things can be achieved in multiple approaches, but not all approaches are correct! OmniFaces can provide you the best JSF programming approaches/techniques, and you can simply use them as the " bricks" of your implementations. Moreover, you can post your issue on StackOverflow, and maybe the answer will consist in a new OmniFaces artifact.
Well, as a final thought, you may check the post, See 10 Reasons to Use OmniFaces.

4. How much time do I need to learn OmniFaces ?
By its nature, OmniFaces is not something that must be learned as a framework or as a programming language, which means that you don't need to follow long tutorials or read a lot of documentation. Basically, you can use OmniFaces one time in your life or every day; is not a matter of learning it, and most important is to know what OmniFaces can do, and use it at the right time. OmniFaces comes as an answer to your question (issue), so you are aware about what should be done, but you just don't know how. While OmniFaces may know how, you must know about OmniFaces! Simple as that!
The "start point" is your first contact with OmniFaces, which can be this article, a component, a tag handler, an utility method, a validator, a converter, etc. From that moment, the curiosity will make you to discover more about what OmniFaces can do.

5. Where can I find OmniFaces (home page, documentation, showcase, etc) ?
The below links are the ones that most probably will be fix in time. Many others (e.g. nightly build, links specific for different versions, etc) can be found on below pages:

OmniFaces home page - http://omnifaces.org/

All the next links can be accessed via OmniFaces home page also:

OmniFaces Showcase - http://showcase.omnifaces.org/
OmniFacesAPI documentation  - http://omnifaces.org/docs/javadoc/current/
OmniFacesVDL documentation - http://omnifaces.org/docs/vdldoc/current/
OmniFacesWiki pages - https://github.com/omnifaces/omnifaces/wiki
OmniFaces source code - https://github.com/omnifaces/omnifaces
OmniFaces issues - https://github.com/omnifaces/omnifaces/issues
                             http://stackoverflow.com/
OmniFaces general feedback - http://devrates.com/project/show/95941/Omnifaces

Other useful links:
JSF ZEEFpage  - https://jsf.zeef.com/bauke.scholtz
OmniFaces ZEEF page - https://omnifaces.zeef.com/bauke.scholtz
Bauke Scholtz - http://balusc.blogspot.ro/
Arjan Tijms - http://arjan-tijms.omnifaces.org/
JSF & OmniFaces Fans - http://omnifaces-fans.blogspot.ro/

6. How can I download, install and configure OmniFaces ?
OmniFaces distribution can be downloaded as a single JARs for OmniFaces home page (http://omnifaces.org/), or can be added in your project directly from Maven central as a dependency. So, depending on how you obtain the OmniFaces distribution, the installation process is:

·         OmniFaces downloaded as a JAR
Simply place the JAR into your project WEB-INF/lib folder

·         OmniFaces added as a Maven dependency

Simply add in your pom.xml file the next lines:

       <dependency>
        <groupId>org.omnifaces</groupId>
        <artifactId>omnifaces</artifactId>
        <version>version</version>
       </dependency>

For OmniFaces 1.8.1 replace version with 1.8.1. For OmniFaces 2.0, replace version with 2.0.

Once you have added OmniFaces into your project (as a JAR or as a Maven dependency)  you need to provide the OmniFaces XML namespaces, as follows:

·         OmniFaces UI components/taghandlers

       xmlns:o="http://omnifaces.org/ui"

·         OmniFaces EL functions

       xmlns:of="http://omnifaces.org/functions"

Here it is a simple JSF page that contains both OmniFaces XML namespaces, next to the common JSF XML namespaces:

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"     
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:of="http://omnifaces.org/functions"
      xmlns:o="http://omnifaces.org/ui">
    <h:head>
        <title></title>               
    </h:head>
    <h:body>
    ...
    </h:body>
</html>

So, installing OmniFaces is just a piece of cake!

Niciun comentariu :

Trimiteți un comentariu

JSF BOOKS COLLECTION

Postări populare

OmniFaces/JSF Fans

Follow by Email

Visitors Starting 4 September 2015

Locations of Site Visitors