Register | Log in | Password |

365 projects | 71 services | 215 websites | 1073 freelancers | 2760 topics | advertise


Purchase JoomlaWatch:
30 day money-back guarantee
Read more...
9 EUR lifetime license
Buy Now

15 EUR lifetime license
Buy Now
(nofollow link from sponsors page)

Login:

23.2%United States United States
15.4%India India
7.3%Russian Federation Russian Federation
7.1%Colombia Colombia
6.1%Germany Germany
5.2%United Kingdom United Kingdom
4.5%Poland Poland
3.5%Netherlands Netherlands
3%France France
2.9%Canada Canada

Today: 372
Yesterday: 1586
This Week: 1958
Last Week: 10059
This Month: 8657
Total: 31971

Users

Most active users today from total of 17:
mlewis, yosua.winata, plaginha, davoided, waseem, Contestano, maryswave, NightOwl, dwlamb, artisan, rottenberg, djunykasim, dlaurie, mrits, acrucesalus, ravsyn, blueoceancruiser
About JoomlaWatch:
JoomlaWatch is popular joomla visitor tracking and live stats component. It provides several features such as spam blocking, goals tracking, charts, nightly email reports, latest visit map, interactive HTML5 traffic flow graph and many other useful functionalities, which will help you to optimize your site.
RSS Feeds:

rss Freelance
rss Projects
rss Forum
rss Resources

Home

JSF, Icefaces and custom components experiences

I got the task to evaluate the new web-frameworks in the company I work for.  There were many candicates that might enhance the web user interface and move away from the old struts framework. If you want to know some of my experiences, just read on..


Google web toolkit ? 

One of them was google web toolkit. I have to say that the development in GWT is quite simple, but there are many other problems there. One of the main cons was, that it's still a javascript that has to be deployed in the production. The gwt produces also different versions for different browsers, so when something goes wrong, you have to be a multi-browser javascript expert.

Trying JSF

I had some JSF experiences before, but since that time many things have changed. Today there is a whole variety of 'rich' components and frameworks that provide much better user experience than the old plain JSF HTML renderer.

Icefaces is one of the solution that combines both.  It lets you to use the power of JSF and the AJAX together.

Good thing here is, that you don't have to write a single piece of javascript code. All AJAX magic is made by the Icefaces' AJAX bridge. It's really amazing  how also the old  components are  rendered without any page refresh ! 

AJAX bridge works that way, that it partially updates only the part of the application that has changed.

There are also some other amazing features like the partial form submission (validates your form right after you fill the value in the input field).  

Another neat feature - Validators

You can attach to eg. input field any kind of validator you want. There are some pre-defined, like LengthValidator, DoubleRangeValidator, etc.. And if it's not enough, you can write your own.

I saw some custom validators around the internet - eg. the regular expression validator, and many others.

 

What about custom components?

Even though you are using many of components that comes with the icefaces framework and the JSF, it may happen that you will need to write your own component.

It took me some time to get into it, but after that I must say that it's quite easy. You can generate the forms, form fields, panel grids, data tables, etc.. on the fly ! This is the most powerful feature. This way you can have the component that is absolutelly dynamic.

Unfortunatelly, in every tutorial I read, renderers are using the HTML-like way to produce the component's output. You had to be the one who writes the HTML tags, but this is not a good idea. For those things we had JSP and other 'low-level' web languages.

I found a way how to use existing components and render them dynamically.
All you have to do is just to find a blank custom tag by it's component id and then add all the instances of components you want there. The component abstraction is great. You don't have to care about some output. The style is quite simmilar to the swing-kind of programming.

You can react to the user interaction with methods like onClick, onChange..  There are some effects as well. This way you can make your form to 'Appear', fade in, fade out.. 

 

Myfaces and tomahawk components

Icefaces provide their own set of rich components, which you can see at

http://component-showcase.icefaces.org/component-showcase/

 

but..  I tried to switch the SUN JSF Reference Implementation (RI) for a MyFaces JSF implementation. The switch was without any problem, you just remove the sun's JSF jars and put the MyFaces .jars there. Myfaces have also better error reporting mechanism, and you directly know what's going on..

I haven't tried the JSF 1.2 yet (it's the new implementation). 1.1 was fine for me, also because it's stable and people have experiences with that.

So.. when I had my web application working on myfaces, I tried to use some of the tomahawk components. Here's the link where you can find them:

http://www.irian.at/myfaces/home.jsf

Things like callendar, sortable table and other are perfect. There is also a possibility to use the Myfaces Sandbox components. It's the bunch of components "waiting" to get into a set of Tomahawk components. I haven't tried those components with my application yet. 

But, the great thing is, that you can use both - icefaces and tomahawk components together.  Sometimes I experienced some rendering problems, but I thing it's solvable.

 

What IDE to choose?

I downloaded a BEA Workshop for JSF, which is a great eclipse-based IDE, but unfortunatelly it's not free. There is a trial version, but after some days you don't have any chance to use this IDE any longer.

I found the solution - there is also a free version but only for JSP. It's called "BEA Workshop for JSP". It doesn't provide as much features as BEA Workshop for JSF, but I'm fine with it. I can live without features like showing you available parameters in the JSF tags, and so on.

Main reason why I use this IDE is that it redeploys your web application automatically. This way you don't have make the process "stop, build, run" manually everytime you make some single change.

 

Conclusion 

Icefaces seems to be the best solution when you want the rich user experience, easiness of use and good code maintability. You can separate the work between the component developer and the web designer and it allows you to use all of the existing libraries and the power of java.

 

 

Comments  

 
-1 #1 Matto 2008-01-30 14:00
Hi Kirill,
yes, I also found a way how just to assemble a component tree without any need to write HTML tags. And of course, this is the way how we should work with JSF, on this level.

I'm doing it like this, that a particular JSF tag is bound to the private instance of a backing bean using a tag binding="#{backingBean.form}" . This instance then can be manipulated using for example
HtmlOutputText text = new HtmlOutputText( );
text.setWhatever..();

form.add(text);

in methods of a backing bean,

and in the view, the form (and it's children, in this case - the text) is iteratively rendered by their own renderers.


I think your approach is pretty much the same, right?

Regards,

Matej Koval
Quote
 
 
-1 #2 Kirill 2008-01-30 14:01
Hi Matej,



Thanks much for you quick response… it was very useful!

I just tried the idea on my project and it worked fine.



Seems like one can inherit a component from HtmlPanelGroup and not to implement the encodeBegin, encodeEnd to do some low level HTML rendering which is devious and error prone process.



Thanks gain,

Kirill
Quote
 
 
-1 #3 gss 2008-03-27 08:50
hi

i want to ask a question, how to integrate struts2 and icefaces?
thanks a lot

come from china
Quote
 
 
-1 #4 Deepak Kaushik 2008-06-29 10:15
Hello sir ,
I had readed ur article on JSF , it is realy interesting

I m in B.Tech(IT)7th sem now ,nd take java as my strong programing technology

I want to know is there any software by which i can get JSP code at my computer insisted of simple HTML code in source window of my Internet Explorer,or from where i can get effective jsp code i m using netbeans IDE is it ok or i should
change to some else IDE,

please help me with this ,I m waiting for ur reply(answers)
Reply me if u can nd send any information reguarding project develpment

thanking u!!!
Quote
 
 
-1 #5 Karthik 2008-07-03 18:45
Have you guys tried Apache Wicket? if not, hav a look.. they follow similar approach, dynamically tweaking components without disturbing front-end.
Quote
 
 
+1 #6 mate tee 2009-12-05 21:13
I was having fun earlier trying to get a custom component working. I wanted to create a dynamic menu component, which I didn’t think was easily possible with standard JSF components.
Quote
 

Add comment


Security code
Refresh


no license? questions?

Recommended: (advertise)
Joomlawatch 1.2.17 Demo (PRO: 9/15 EUR)
Download Joomlawatch 1.2.17 (PRO: 9/15 EUR)

Rate this extension ...


Stay in touch:

JoomlaWatch is now available for Drupal as unlocked BETA version for testing: (link)

New article about JoomlaWatch Live Stats feature: (link)
4 days ago from web

Tested versions 1.2.12 FREE, 1.2.17 PRO, 1.2.18 BETA on Joomla 2.5 and older Joomla 1.5 - confirmed to work on both Joomla versions

Small installer fixes - added JoomlaWatch compatibility with Joomla 2.5
2 weeks ago from web

New article on JoomlaWatch Traffic Flow feature: (link) ... All features of JoomlaWatch will be documented this way.
2 weeks ago from web

Another minor fixes for version 1.2.17 and 1.2.18, added functionality to display only changed values in SEO report - important keyprases
2 weeks ago from web

Minor fixes for JoomlaWatch version 1.2.17 (language files), you can find the latest package in customer zone ((link)
3 weeks ago from web

If you'd like to help with testing of the latest 1.2.18 BETA with new features (Joomla/Wordpress),please add me on skype: matto3c.Thank you!

New article on JoomlaWatch SEO (Search Engine Optimization) report functionality - (link)

JoomlaWatch 1.2.18 is out now! Features new click heatmap feature, SEO report - how people find you on google, and many other improvements

Reorganized the menu items. Now you'll be able to easily find most requested links

JoomlaWatch 1.2.18 BETA now ready! Main features: - Heatmap integration - SEO reports - Anti-spam section visualization (link)

Fixed one issue: no unique visits recorded; PHP $_SERVER['REMOTE_ADDR'] doesn't always return remote IP address! using HTTP_X_FORWARDED_FOR

Christmas Special - 19% OFF from all licenses until 25th of December 2011

JoomlaWatch Heatmap functionality nearly done. Works with all client resolutions. Will be available in next version. (link)

Simple customer zone - (link) is now ready. Users who purchased the PRO version can now download newest version from there.

Because of the problems with payments and forwarding. We are using (link) service to deliver you the files after purchase.

Tracking Expenses from SMS android application is now published on android market :) and it's completely free !

(link) user information now protected with UserCrypt 1.1

UserCrypt version 1.1 released: Added query log, jos_users decryption on database interceptor plugin deactivation (link)



Partners:
Freelance ColdFusion, Flex, PHP

Olejomalby, abstraktne obrazy

Camping Europe

WinAsm Studio

Vyšné Ružbachy

Sochy, Reštaurovanie

R.E.M.

Valid XHTML 1.0 Transitional

RSS feed:

Statistics:
Search Engine Genie Promotion Widget
Privacy policy | Advertise | Donate

Locations of visitors to this page


©2003-2010 Codegravity.com