my dog learned polymorphism*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Pattern´s Name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Pattern´s Name" Watch "Pattern´s Name" New topic
Author

Pattern´s Name

Joao Bosco Jares
Ranch Hand

Joined: May 13, 2011
Posts: 44
Hi Friends,

I am working in a inventory stock system that in a first moment will use just some kind of items, around four or five item types, but it will be incremented in the future and I can not have make changes in the system. In this way I modelled a generic Item, with just an serialNO with a relationship One-to-One with ItemSpecification that has just a properties named as spec. With this design I can include new Item types without changes in the system, just with a insert in the db.

I had not find any problem with this design, nut I need some help to indentificate possible probmems in this design, I a point of view of the friends that had used this designed in other scnerious with the same situation.

This design can be considered a pattern, had been cataloged, if it is what´s his name and where i can found his reference??


Regards,
Arnold Reuser
Ranch Hand

Joined: Nov 20, 2003
Posts: 194
Seems like you would like to use the Builder pattern.
A few typical applications of the Builder pattern.
* Preparing tea. The process keeps the same but the result can differ based on the tea bag used during the preparation.
* Assume based on a given type and content an email object should automagically be created; which requires setting email type, embedding multimedia objects etc. In this case the Builder pattern is applicable.
In both cases the construction process is remains the same.
But the object used during creation steers the construction process to result in different representations of the output.
Joao Bosco Jares
Ranch Hand

Joined: May 13, 2011
Posts: 44
Arnold Reuser wrote:Seems like you would like to use the Builder pattern.
A few typical applications of the Builder pattern.
* Preparing tea. The process keeps the same but the result can differ based on the tea bag used during the preparation.
* Assume based on a given type and content an email object should automagically be created; which requires setting email type, embedding multimedia objects etc. In this case the Builder pattern is applicable.
In both cases the construction process is remains the same.
But the object used during creation steers the construction process to result in different representations of the output.


Thanks a lot

I´ve thinking exactly as you say. So, now I have the confirmation, it is!


Best Regards,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pattern´s Name
 
Similar Threads
New to Refactoring
Design Patterns vs. Algorithms
In Memoriam - Philippe (Phil) Maquet
How many text fields to I need (GWT)?
Answers to IBM 486 sample test