Facelets
I've reappeared from the lab with a new toolkit for developing JavaServer Faces applications; it's called "Facelets". I've recently opened project page at Java.net, https://facelets.dev.java.net/.
I, like many in the corporate world, will forever be stuck behind the technology curve thanks to vendor platforms *cough* BEA *cough*. I've been participating in the JSP 2.1 and JSF 1.2 alignment but was constantly reminded that I would never be able to use the technology I was helping to steer for about another 2 years. This assumption is based on the fact that we will only, maybe, be getting JSP 2.0 support this fall with Weblogic 9.0, and that's only if there aren't a bunch of issues with the platform. We've been running on 8.0 now for what seems to be 2 years, and that platform has JSP 1.2 support with an odd interpretation of the Servlet 2.3 spec.
Facelets is a clean slate on the JSP standard if you will. To the JSP developer/designer, things seem extremely normal if you are familiar with JSPX (xml compliant JSP). The major benefit of Facelets is that it's geared at utilizing JSF technology based on the interweaving/tree creation that must occur under the JSF 1.2 specification. Here's a sample taglib file for Facelets.
Everyone wants to be more designer friendly, and Tapestry seems to be the only choice developers are pursuing. On the other hand, JSF is the standard everyone would like to have happen, but JSF needs a more "pluggable" ViewHandler framework that is more designer/developer friendly.
Developers go through enough work defining UIComponents/Converters/Validators in their faces-config.xml, and Facelets *only* asks them to specify a name alias to plug their objects into their pages (no XML necessary). JSP requires duplicating your UIComponent's properties into a separate class *and* XML file, while Facelets works off of the UIComponent instance itself to properly handle Validators, Converters, Listeners, and Actions in accordance with the JSF 1.2 spec, along with setting ValueExpressions versus literals on the UIComponent's Attribute model auto-magically for you.
Jakarta Velocity has a great API model for environment-independent execution and Facelets was modeled the same way. Unit testing JSF components is extremely easy and doesn't require any Servlet container. Simply initialize a FaceletFactory, and start grabing Facelet instances. This could open the doors for more non-web uses for JSF while providing a JSP-version independent view technology that can be released and used as rapidly as JSF new versions.
Really, Facelets could be used the same as Thinlets or Macromedia's Flex technology to define views/compositions/templates that are completely unrelated to HTML or the web.
While some other frameworks are out there attempting to work with JSF components, they are all too 'middle' ground to be practical. Who wants to re-define their UIComponent's behavior or properties in yet another XML file or properties file? Facelets just does it for you under the JSF 1.2 specification.
I spent a while this afternoon getting Hans Bergsten's "Improving JSF by Dumping JSP" hangman example working under Facelets. With Facelets, I was able to retain the editability factor that he had proposed (same as with Tapestry's jwcid attribute), and reduce page declaration down to a single document without any of the issues he described.
On one hand, just the fact that I was able to swap out all the pages/component definitions within JSF without modifying any of the Java code is a real testament to the flexability of the JSF framework. Secondly, with the above taglib, instead of defining his 'bar' component multiple times within a separate XML file (as his framework uses), you can use your custom 'bar' component like so:
Facelets automatically takes care of all of the property mappings/valuebindings, validators, listeners, etc-- for you.
I'm not even going to get into the cool templating/decorator features built into Facelets. I'm going to save that for another blog :-)
Backstory
I, like many in the corporate world, will forever be stuck behind the technology curve thanks to vendor platforms *cough* BEA *cough*. I've been participating in the JSP 2.1 and JSF 1.2 alignment but was constantly reminded that I would never be able to use the technology I was helping to steer for about another 2 years. This assumption is based on the fact that we will only, maybe, be getting JSP 2.0 support this fall with Weblogic 9.0, and that's only if there aren't a bunch of issues with the platform. We've been running on 8.0 now for what seems to be 2 years, and that platform has JSP 1.2 support with an odd interpretation of the Servlet 2.3 spec.
About Facelets
Facelets is a clean slate on the JSP standard if you will. To the JSP developer/designer, things seem extremely normal if you are familiar with JSPX (xml compliant JSP). The major benefit of Facelets is that it's geared at utilizing JSF technology based on the interweaving/tree creation that must occur under the JSF 1.2 specification. Here's a sample taglib file for Facelets.
<facelet-taglib>
<namespace>http://www.mycompany.com/jsf
<tag>
<tag-name>bar</tag-name>
<component>
<component-type>javax.faces.Data</component-type>
<renderer-type>com.mycompany.Bar</renderer-type>
</component>
</tag>
</facelet-taglib>
Why Facelets Will Succeed
Everyone wants to be more designer friendly, and Tapestry seems to be the only choice developers are pursuing. On the other hand, JSF is the standard everyone would like to have happen, but JSF needs a more "pluggable" ViewHandler framework that is more designer/developer friendly.
Developers go through enough work defining UIComponents/Converters/Validators in their faces-config.xml, and Facelets *only* asks them to specify a name alias to plug their objects into their pages (no XML necessary). JSP requires duplicating your UIComponent's properties into a separate class *and* XML file, while Facelets works off of the UIComponent instance itself to properly handle Validators, Converters, Listeners, and Actions in accordance with the JSF 1.2 spec, along with setting ValueExpressions versus literals on the UIComponent's Attribute model auto-magically for you.
Jakarta Velocity has a great API model for environment-independent execution and Facelets was modeled the same way. Unit testing JSF components is extremely easy and doesn't require any Servlet container. Simply initialize a FaceletFactory, and start grabing Facelet instances. This could open the doors for more non-web uses for JSF while providing a JSP-version independent view technology that can be released and used as rapidly as JSF new versions.
Really, Facelets could be used the same as Thinlets or Macromedia's Flex technology to define views/compositions/templates that are completely unrelated to HTML or the web.
Conclusion
While some other frameworks are out there attempting to work with JSF components, they are all too 'middle' ground to be practical. Who wants to re-define their UIComponent's behavior or properties in yet another XML file or properties file? Facelets just does it for you under the JSF 1.2 specification.
I spent a while this afternoon getting Hans Bergsten's "Improving JSF by Dumping JSP" hangman example working under Facelets. With Facelets, I was able to retain the editability factor that he had proposed (same as with Tapestry's jwcid attribute), and reduce page declaration down to a single document without any of the issues he described.
On one hand, just the fact that I was able to swap out all the pages/component definitions within JSF without modifying any of the Java code is a real testament to the flexability of the JSF framework. Secondly, with the above taglib, instead of defining his 'bar' component multiple times within a separate XML file (as his framework uses), you can use your custom 'bar' component like so:
<m:bar id="letters" value="#{visit.letters}" var="letter">
<h:column>
<h:graphicImage value="#{letterImages[letter]}" />
</h:column>
</m:bar>
Facelets automatically takes care of all of the property mappings/valuebindings, validators, listeners, etc-- for you.
I'm not even going to get into the cool templating/decorator features built into Facelets. I'm going to save that for another blog :-)
23 Comments:
Jacob,
I heart Facelets!
This technology looks very promising. I very much appreciate the work that has gone into this.
I found that when running the two example apps numberguess.war and hangman.war I received an exception under Tomcat:
java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64
... (snip)
A brief search of the Apache Commons site turned up a link to the missing jar file, which is apparently a Base64 codec.
Placing the jar file in the WEB-INF/lib folder fixed the issue. I used the current version 1.3.
For the benefit of other users, if you get an error message when running the demos, try downloading the codec jar at the following URL: http://jakarta.apache.org/commons/codec/
Again, thanks for the great technology.
By Anonymous, at 10:01 PM
Hi,
is it possible for us to build custom loop tag as in JSTL c:forEach begin="" end=""
I built the custom ct:if and custom functions but am not able to know how to build this type of tag. Please help.
By ravi, at 3:07 AM
Hi,
is it possible for us to build custom loop tag as in JSTL c:forEach begin="" end=""
I built the custom ct:if and custom functions but am not able to know how to build this type of tag. Please help.
By ravi, at 3:07 AM
roulette
free roulette systems
roulette strategies
how to play roulette
online roulette
Water
Run your car on water
Run Car on Water
Water Powered Car
Water Car
horse racing
horse racing tips
horse racing betting
horse racing software
horse racing systems
movies
downloadable movies
download full version movies
download movies
movie downloads
forex
forex killer
forex trading education
forex software
learn forex
world of warcraft
warcraft
world of warcraft cheats
world of warcraft download
world of warcraft hacks
Poker
online poker
how to play poker
learn poker
poker online
blackjack
online blackjack
blackjack strategy
how to play blackjack
iphone
iphone downloads
iphone games download
iphone download site review
iphone download sites
Warren Buffett
Warren Buffet
By Anonymous, at 12:15 AM
在十年前,有个城市人,想找一家杭州装修公司来装修自己家的房子,可是他走遍杭州城,却找不到家合意的杭州装饰公司,心想,找一家杭州办公室装修修也行啊,他就继续努力的找,后来他终于找到一家杭州店面装修了.他高兴坏了.
By Anonymous, at 1:21 AM
杭州装修公司
杭州装修公司
杭州装修公司
杭州装修公司
杭州店面装修
杭州办公室装修
杭州装饰公司
ball valve球阀
gate valve闸阀
angle valve角阀
bibcock水嘴
tap
Check valve
hot-water heating
fittings
By Anonymous, at 1:21 AM
wholesale jewelry,
costume jewelry,handmade jewelry,
pearl jewelry, jewelry wholesale,
crystal jewelry,Gemstone jewelry,turquoise jewelry
By Anonymous, at 3:15 AM
wholesale jewelry
fashion jewelry
jewelry wholesale
handmade jewelry
pearl jewelry
wholesale crystal jewelry
coral jewelry
wholesale fashion jewelry
gemstone jewelry
discount jewelry
By Anonymous, at 9:39 PM
ウエディングドレス;
知多半島 ホテル;
RAID復旧;
障害者;
マンションリフォーム;
アメリカンホームダイレクト;
テレマーケティング;
By Anonymous, at 8:15 PM
チューリッヒ;
スタイリスト学校
By Anonymous, at 8:16 PM
We specialize in laptop battery,laptop AC adapters. All our products are brand new, with the excellent service from our laptop battery of customer service team.
Thanks for your info. The most convenient and cheap replacement battery online shop in uk. We specialize in laptop batteries, laptop AC adapters.
All our laptop AC adapters are brand new, with the excellent service from our customer service team.
the most convenient and cheap battery online shop in uk.
You can find some battery and adapter from here is very cool.
By Anonymous, at 11:36 PM
http://www.thetailsection.com/lost-news/damon-and-carlton-talk-lost-se.phphttp://www.thetailsection.com/lost-news/damon-and-carlton-talk-lost-se.phphttp://www.thetailsection.com/lost-news/damon-and-carlton-talk-lost-se.php
By Anonymous, at 1:39 AM
I remember this app...it was nice!
By Anonymous, at 5:32 PM
Today, in-gamthe Microsoft-owned e ad agency said that it has signed an exclusive multiyear agreement with Blizzard. Azerothians opposed to seeing in-game ads in their localworld of warcft goldwatering holes need not worry, however, because the deal is limited to Blizzard's Web sites and Battle.net,the game maker's online-gaming hub. Terms of the deal were not announced, but Massive did note that the agreement is applicable to users in the US, Canada, Europe, South Korea, and Australia.
buy wow gold
Massive also said today that it would be extending its aforementioned deal with Activision to encompass an additional 18 games appearing on the Xbox 360 and PC.cheap wow goldThe agency didn't fully delineate which would fall under this deal, though it did call out Guitar Hero: World Tour, James Bond: Quantum of Solace, and Transformers: Revenge of the Fallen,buy wow items as well as games in its Tony Hawk and AMAX Racing franchises.Shortly before Activision and Vivendi announced their deal of the decade,wow power levelingthe Guitar Hero publisher signed on to receive in-game advertisements from Massive Inc for a numb
By Anonymous, at 7:01 AM
徐州回转支承 公司提供转盘轴承 --slewing ring slewing bearing slewing bearings服务. automation-industrial-industrial automation-slewing bearing嵌入式系统slewing bearings电源
By Anonymous, at 8:29 PM
wholesale jewelry
jewelry wholesale
pearl jewelry
wholesale handmade jewelry
beaded jewelry
fashion jewelry
handmade jewelry
By Anonymous, at 4:42 AM
buy wow gold , mmoinn is your best choice is very simple to order, we give you the cheapest wow gold and wow power leveling , you can buy a peaceful Mentality, we are confident that our services.
By Anonymous, at 11:44 PM
by the way,i would like to recommend a good jewelry wholesale online store site in China.
you could wholesale jewelry directly from China for very good price.
you could find more than 10,000 styles fashion jewelry wholesale.and offer No minimum quantity.you could buy 1 pcs each item.
there are 925 sterling silver,fashion jewelry and crystal jewelry and so many kinds of fashion jewelry wholesale online.
if you are interesting,pls feel free to visit online catalog: http://www.cnvp-jewelry.com
thanks for your attention!
By Unknown, at 8:43 PM
bridal jewelry
costume jewelry
pearl jewelry
jewelry wholesale
crystal jewelry
beaded jewelry
china jewelry supplier
wholesale beads
freshwater pearl jewelry
semiprecious jewelry
gemstone jewelry
turquoise jewelry
shell jewelry
coral jewelry
swarovski jewelry
costume jewelry
handmade jewelry
fashion jewelry
pearl jewelry
crystal jewelry
Semiprecious jewelry
turquoise jewelry
coral jewelry
shell jewelry
swarovski crystal jewelry
By Anonymous, at 2:25 AM
Purchase wow gold Mmoinn.com is your best choice! Here is a professional trade platform, as soon as possible to buy cheap wow gold and wow power leveling it! You will get a guarantee of confidence!
By Anonymous, at 8:36 PM
It is really good idea, really rocks, Love to have more references too, Cheers, dentist essex
By Anonymous, at 1:03 PM
超ホモ-ゲイ動画超デブ-ゲイ動画超g-ゲイ動画超外国人-ゲイ動画超サンプル-ゲイ動画超美少年-ゲイ動画超ビデオ-ゲイ動画超マッチョ-ゲイ動画超sm-ゲイ動画超今暇-ゲイ動画超官能小説-ゲイ動画超見分け方-ゲイ動画超足フェチ-ゲイ動画超カミングアウト-ゲイ動画超ハッテン場-ゲイ動画超メンズネット-ゲイ動画超体験談-ゲイ動画超出張ホスト-ゲイ動画超ショタ-ゲイ動画超無料-ゲイ動画
By Anonymous, at 5:50 AM
With technology, people will never run out of different and various innovations. This is such a great and interesting post, a blog that surely shows the importance of technology in developing the IT sector. How nice and interesting that post is. If you need a Pendant Light for your house, contact us by checking the link provided. More beautiful and classy items are also available.
By expertshelp, at 3:45 AM
Post a Comment
<< Home