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

ConnectionFactory

 
Qusay Jaafar
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Factory pattern contains:
1. DataConnection interface(Product)
2. LocalConnection class(ConcreteProduct)
3. NetworkConnection class (ConcreteProduct)
4. ConnectionFactory class(ConcreteCreator)

Is it alright not to use the interface class and the pattern will still comply to be a Factory pattern?
Something similar was applied in the book titled "The Design pattern Java Companion" by James W. Cooper
Here, I can ask another question which is:
as long as any particular pattern can take some kind of structure (or shape) that comply with the pattern itself that defined in GOF book, How shall I know these shapes? any reference for that?
thanks
Qusay
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Applying the Factory Pattern to RMI article is more specific and is directly applicable to the assignment, you will find it useful.
Eugene.
 
Qusay Jaafar
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, but I am thinking in another approach. The Factory here only for creating a NetworkConnection object or LocalConnection object. I will try to use Proxy pattern to get access to RMI. RMI itself will use Adapter pattern.
is this to much complicated or shall I apply the Factory pattern to RMI?
In this case, only MVC pattern and Factory pattern will be applied to FBN...
any advice please...
Regards
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In this case, only MVC pattern and Factory pattern will be applied to FBN...

The point of the assignment is not to use as many (or as few) design patterns as possible, but to make your design as simple, transparent, and extendible as possible.
Eugene.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic