Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is Factored forward ?

 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does the expression factored forward mean?
Is there some J2EE significance to this term?
Thanks.
- satya
From the Sun Quiz of JSP Arch.

What type of scriptlet code is better-suited to being factored forward into a servlet?
A. Code that deals with logic that is common across requests.
B. Code that deals with logic that is vendor specific.
C. Code that deals with logic that relates to database access.
D. Code that deals with logic that relates to client scope.
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for looking up ersin.
- satya
 
ersin eser
Ranch Hand
Posts: 1072
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't heard that before. This questions are based on JSP Professional from Wrox and related chapter 12 has "factored" word on page 317 318 and 329.
"factored" in 317 and 318 are under section called Code Factoring and role seperation

page 318
We will also want to remove much of our business logic and data access code from our JSP page and encapsulate it within JavaBeans, called Worker or Helper Beans.We start to see a pattern of code movement from our JSP into two area: Servlet ( or JSP ) that sits in front of the JSP { Comment:this sound like a Front Controller pattern or Intercepting Filter to me Does Wrox like to call it Factored Forward ? } and JavaBeans that sit in the back { Comment:is this a Business Delegate,DAO, Service Locator ? Does Wrox like to call it Factored Back ?!} We refer to this common pattern as "Factor Forward - Factor Back" as shown in the figure :

Another way to think about where code should be localized and encapsulated is that our JSP page should reveal as little as possible of our Java code Implementation details.
Rather , the page should communicate our intent by revealing the delegating messages we send to worker beans, instructing them to get state from a model , or to complete some business processing.

IMHO ,I guess this is Wrox invented name , I did not see it in the Core J2EE Patterns book, ( of course this does not make it invaluable.
So this sounds like putting logic , access to bean " factored back "
or using a dispatcher approach with servlet "factored forward" the thing is being factored is code the I think.
factored: to resolve into factors
factor: one that actively contributes to the production of a result

Every body wants to own a pattern nowadays : They are cool Dude
[ January 10, 2002: Message edited by: ersin eser ]
 
ersin eser
Ranch Hand
Posts: 1072
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Satya
Read their pdf file for Chapter 12 page 317-318-329
this new UBB is driving me nuts !!
[ January 10, 2002: Message edited by: ersin eser ]
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure will.
Thanks.
- satya
 
Ram Dhan Yadav K
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Factoring forward may be some thing related to code factoring done to make the code more OO compliant, more realdable, more manageable. Probably they are expecting what sort of code can be factored out from the jsp into a servlet.
Ramdhan YK
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ersin eser:
this new UBB is driving me nuts !!

agreed! But I found a way to get around it. Just post as before, and ignore all the "new features"
Roseanne
 
Ashik Uzzaman
Ranch Hand
Posts: 2373
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And Madhav, what abt the answer of this question u think? I would have gone for (A)...
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ashik:
You are correct. A is the answer.
This is part of the qstn I got in the Sun Sample test. Initially I selected "A" then while reviewing I thought "C" would fit well. Since generally DB Connections etc are better in Servlets as it is pure Java Code. But then that was wrong.
So, "A" is the correct answer.
- satya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic