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

Design Pattern doubt.

 
Akshay Kiran
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An ebay.com developer has created a web applicatino that includes a servlet fo each use case in the application. These servlets have become rather difficult to maintain becase the request processing methods have become very large. ther is also common processing code in many servlets because these use cases are very similar.
Which two design patterns can be used together to refactor and simplify this application?


I can straight away see the front controller pattern fitting in with the "large number of request processing methods" but which is the other one?
MVC? this seems a bit tricky- when you're allowed to refactor your code?


And another question
The composite delegate pattern isn't in the objectives list, then why does it figure in the mock exam of the design patterns chapter in HFSJ? will there be surprises like this in the exam?
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Front Controller and MVC
2. NO. Questions in exam will be fairly easy and straight.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

1. The answers should be Front Controller and MVC. MVC is not only the design pattern, but more it itself is architecture. The One of the Controller part of the MVC architecture can be Front Controller.

2. I think there is no Composite Delegate pattern defined in the J2EE patterns.

Thanks
 
Akshay Kiran
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you people sure about this?

the answers in a mock exam say its front controller and "business delegate" but offers no explanation for the latter.

Can anybody please confirm this?
and those of you who have answered MVC, can you justify?
 
Manikandan Jayaraman
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ONE - ONE servlet for each use case in the application.
TWO - COMMON request processing code.

The above are the KEY points of the question. Now take all the design patterns that you have studied.

BUSINESS DELEGATE - Possible. Because you transfer the common request processing code into a common component. FAVOURS TWO.

SERVICE LOCATOR - Again, Possible. The look up stuffs can be abstracted here. FAVOURS TWO.

FRONT CONTROLLER - FAVOURS ONE.

INTERCEPTING FILTER - Not Applicable here.

TRANSFER OBJECT - Not Applicable here.

=====
MVC - NOT APPLICABLE. This is because the main drawback of converting every use-case into MVC ends up in one M-V-C for every use case and thats why front controller pattern came into existence.

Please comment ....

Regards,
Mani
 
kesavaraj vazanth
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i heard from this forum that Design Patterns are low scoring part in the scwcd.
Can u have notes on Design Patterns?
Any useful info,links,tips are welcome..
regards,
keshav..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic