File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes where to write application logic in JSf.? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "where to write application logic in JSf.?" Watch "where to write application logic in JSf.?" New topic
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: where to write application logic in JSf.?
 
Similar Threads
Is JSF, Hibernate 3 and Spring 2.5 integration good
writing data into sql database
How to code business logic in JSF
Where to handle cookies
Really!!