Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What design pattern i should apply ?

 
Nakataa Kokuyo
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good day,

I have objects Team, Tab and Tab fields.

Work Description
============
- To create a form which have multiple tabs and each tab will have fields tied with it based on user configuration by disable/enable it.

Object Description
==========
Team - group of person working on same dept , ie: Inside Sales, Outside Sales
Tab - few tab name which suppose appear in a form , ie : Contact, Function, Agreement
Tab fields - fields that attached to Tab Contact/function or agreement , the field can configure by user to enable/disable and also whether it is required field, ie :firstname, lastname

Logic
===
- administrator create a team - Inside sales, and assign fields by enable/disable that belong to which tab(tab do not created by admin, it have only 3 tabs as above mentioned)


Question
======
How can i used design pattern to make the solution in better OOP sense ?

Thanks in advance !
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch, Nakataa!
 
Madhan Sundararajan Devaki
Ranch Hand
Posts: 312
Java MS IE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe, you need to first design the solution and then use Design Patterns to make the solution better/best.
 
Nakataa Kokuyo
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks All, I really hope can learn from your how to do the design, appreciated your guidance how's way you start to design the solution !
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to effectively apply established object-oriented design patterns when designing a software application, you first need to understand the concept of "OO design patterns." Once you understand the concept, you can then start to learn specific patterns including their variations and details. After you learn "what" and "how" the patterns are beneficial, then you can start to consider them when working on a design.

Keep in mind that design patterns are typically best applied to designing large systems which will have many developers working together.

Nakataa, your assignment is to create a form. This is not a large system and it may be difficult to learn design patterns this way.

Good luck!
 
Nakataa Kokuyo
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jimmy Clark,

OO design pattern you mentioning is it like Singleton, Facade and so on ? the tiny work like create a form just required those common practice like inheritance or polymorphism will do ?

Any recommended book or website i should start off ?
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Design Patterns: Elements of Reusable Object-Oriented Software
Hardcover: 416 pages
Publisher: Addison-Wesley Professional
Language: English
ISBN-10: 0201633612
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic