This week's giveaway is in the Threads forum.
We're giving away four copies of Java Concurrency Live Lessons and have Doug Schmidt on-line!
See this thread for details.
Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

where to write application logic in JSf.?  RSS feed

 
hanumantha prem
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to know where do you write application logic in JSf.?
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
hanumantha prem
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!