| Author |
where to write application logic in JSf.?
|
hanumantha prem
Greenhorn
Joined: May 20, 2009
Posts: 13
|
|
|
I need to know where do you write application logic in JSf.?
|
 |
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Joined: Aug 26, 2006
Posts: 4967
|
|
What type of logic?
Good applications are layered.
So, JSF has various components to handle input validation, input conversion (removing dollar signs, adding dollar signs, etc), and then handing off validated and converted data to JSF managed beans.
You might say that managed beans are place you code your application logic, and perhaps, some applications do. In more layered applications, managed beans do some mild processing of the data, and maybe even some control type of logic, and then pass the data off to various service objects that might be implemented as stateless session EJBs on an EJB server, or as web services, or somethign like that. Perhaps that is where you might put your 'application logic' in a properly layered applications. Look at the "Application Service" J2EE design pattern for more info.
But I'm guessing that you're just getting started with JSF. In that case, you'll have various 'do' methods in your managed beans. That's the place you can do your application logic. As you get more comfortable with JSF, you'll see benefits in factoring out the code in big 'do<action>' methods in your managed beans and into more modular and maintanable places.
-Cameron McKenzie
|
Author of Hibernate Made Easy, What is WebSphere???, JSF 2.0 Made Easy and the SCJA Certification Guides
|
 |
hanumantha prem
Greenhorn
Joined: May 20, 2009
Posts: 13
|
|
|
you guessed it right..I am very new to JSF..Can you suggest me any good website as such ,which gives example applications on jSF?
|
 |
 |
|
|
subject: where to write application logic in JSf.?
|
|
|