[Tutor] Fwd: Re: Tips

Alan Gauld alan.gauld at btinternet.com
Sat Jun 21 19:23:04 CEST 2014


On 21/06/14 01:45, Alex Kleider wrote:

> The only applicability that fits in with anything I've experienced has
> to do with the necessity of globals to represent command line parameters

That's not a necessity and I hardly ever do that... :-)
But it is one pattern for handling CL args.

Other common patterns are for state machines.
That's where a system responds to events differently depending
on what events have already been seen.

Another is GUIs where the most common pattern is known as
Model-View-Controller. The implementation of MVC varies
greatly between languages, toolkits and technologies
(Web v Desktop, say) But they all use MVC as the pattern.

There are many others especially in the Smalltalk and Java
communities where the nature of the languages as well as
their community culture tend to restrict the solution
choices somewhat (although each in very different ways).

There are various pattern web sites. Wikipedia is a good
starting point:

http://en.wikipedia.org/wiki/Software_design_pattern

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos



More information about the Tutor mailing list