52. Did you have to use any design patterns in your Java project ?

Yes. Refer Q10 [Strategy], Q14 [Iterator], Q20 [Decorator], Q31 [Visitor], Q45 [Singleton], Q46 [Factory]

Note: Learning of other patterns recommended (Gang of Four Design Patterns)

Resource: http://www.patterndepot.com/put/8/JavaPatterns.htm.

Why use design patterns, you may ask. Design patterns are worthy of mention in

your CV and interview. Design patterns have a number of advantages:

  • Capture design experience from the past.

  • Promote reuse without having to reinvent the wheel.

  • Define the system structure better.

  • Provide a common design vocabulary.


Some advice if you are just starting on your design pattern journey:

  • If you are not familiar with UML, now is the time. UML is commonly used to describe patterns in pattern catalogues, including class diagrams, sequence diagrams etc.

  • When using patterns, it is important to define a naming convention. It will be much easier to manage a project as it grows to identify exactly what role an object plays with the help of a naming convention e.g. AccountFacilityBusinessDelegate, AccountFacilityFactory, AccountFacilityValueObject, AccountDecorator, AccountVisitor, AccountTransferObject (or AccountFacilityVO or AccountTO).

  • Make a list of requirements that you will be addressing and then try to identify relevant patterns that are applicable.


No comments:

Post a Comment