Page 1 of 1

Design patterns for (x)harbour

Posted: Thu Dec 27, 2012 3:25 pm
by santy
Hi all,

Repeating design patterns I decided to create examples of their implementation for (x)Harbour.
First two patterns.

Facade pattern:
http://code.google.com/p/santysoft/down ... akechanges

Mediator pattern:
http://code.google.com/p/santysoft/down ... akechanges

to be continued. :)

Re: Design patterns for (x)harbour

Posted: Fri Dec 28, 2012 2:36 pm
by santy
Singleton pattern:
http://code.google.com/p/santysoft/down ... akechanges

to be continued.

Re: Design patterns for (x)harbour

Posted: Sat Dec 29, 2012 11:15 am
by santy
Builder pattern
http://code.google.com/p/santysoft/down ... akechanges

Two simple example using this pattern (in archive):

Computer builder and Report Builder. :)


to be continued.

Re: Design patterns for (x)harbour

Posted: Thu Jan 03, 2013 9:41 am
by santy
Template method pattern
Intent. Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure

http://code.google.com/p/santysoft/down ... akechanges


to be continued.

Re: Design patterns for (x)harbour

Posted: Fri Jan 11, 2013 1:32 pm
by santy
Decorator pattern
Intent. Attach additional responsibilities to an object dynamically. Decorators provide a flexible
alternative to subclassing for extending functionality.

http://code.google.com/p/santysoft/down ... akechanges

Factory Method pattern
Intent. Define an interface for creating an object, but let subclasses decide which class to
instantiate. Factory Method lets a class defer instantiation to subclasses.

http://code.google.com/p/santysoft/down ... akechanges

Re: Design patterns for (x)harbour

Posted: Tue Mar 05, 2013 10:59 am
by santy
Prototype pattern
Intent. Specify the kinds of objects to create using a prototypical instance, and create new objects by
copying this prototype

http://code.google.com/p/santysoft/down ... r&can=2&q=

to be continued :)

Re: Design patterns for (x)harbour

Posted: Tue Mar 05, 2013 11:04 am
by esgici
Thanks Alex

Regards