473,785 Members | 3,245 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

design patterns - Maze examples

yb
Hi,

I just started reading design patterns and looking at the Lexi example.
I'm very new to this so please bear with me.

I understand the Decorator pattern, but a bit confused by the Maze
example used for creational patterns. Is this example a bit contrived?
I would have thought a decorator pattern would make more sense instead
of deriving mazes with different attributes.

Anyway, just seemed to me the example is not good practice but just
made to illustrate the point on how to apply creational patterns??
hope my question makes sense.

Dec 9 '05 #1
3 4107
yb wrote:
I just started reading design patterns and looking at the Lexi example.
I'm very new to this so please bear with me.

I understand the Decorator pattern, but a bit confused by the Maze
example used for creational patterns. Is this example a bit contrived?
I would have thought a decorator pattern would make more sense instead
of deriving mazes with different attributes.

Anyway, just seemed to me the example is not good practice but just
made to illustrate the point on how to apply creational patterns??
hope my question makes sense.


Is there a C++ _language_ question here somewhere? Please consider
'comp.software. patterns' for your general patterns questions.
Dec 9 '05 #2

Victor Bazarov wrote:
yb wrote:
I just started reading design patterns and looking at the Lexi example.
I'm very new to this so please bear with me.

I understand the Decorator pattern, but a bit confused by the Maze
example used for creational patterns. Is this example a bit contrived?
I would have thought a decorator pattern would make more sense instead
of deriving mazes with different attributes.

Anyway, just seemed to me the example is not good practice but just
made to illustrate the point on how to apply creational patterns??
hope my question makes sense.


Is there a C++ _language_ question here somewhere? Please consider
'comp.software. patterns' for your general patterns questions.


There is also a general OO group somewhere but I forget its name.

Dec 9 '05 #3
ro**********@gm ail.com wrote:
[..]
There is also a general OO group somewhere but I forget its name.


comp.object ?
Dec 9 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
9936
by: Bernard Fields | last post by:
Greets, all. As the title suggests, I'm trying to make a maze. Specifically, it's a top-down, 2-d maze, preferably randomly generated, though I'm willing to forego that particular aspect as this point. I've done many, many web-searches, but nothing that I've found so far has provided any clues....
4
2866
by: Tony Ha | last post by:
Hello I am learning Python for in the pass ten months, and have brought a few books about Python. Most of them are good books by its only right, and all of them only teach you how to write Python programs using Python syntax and Python ways, but no one single Python book explicitly teaches you on how to analyst your application, and structure your programmes in a way, so that, it is easy to maintain, easily to reuse, (i.e. use loosely...
11
4309
by: FluffyCat | last post by:
In Febraury - April of 2002 I put together in Java examples of all 23 of the classic "Gang Of Four" design patterns for my website. Partly I wanted to get a better understanding of those patterns. They are still online at http://www.fluffycat.com/java/patterns.html Since September 2003 I've mainly been using PHP, and now that PHP 5 is becoming more available I am going to try the same thing I did in Java with PHP.
1
2375
by: Jay | last post by:
The GOF text is widely considered the definitive book on the topic. Design Patterns: Elements of Reusable Object-Oriented Softare, Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides Note, all the examples are in C++ but you can get through them with a little work.
1
1709
by: R Reyes | last post by:
Hello All, I'm always looking for ways to improve my code. Most of the time (whenever I'm working on a project) I write a bunch of functions. Then after the project is finished, I put all the similar functions into their own module/class/page for neatness: -- like a stringsManipulate class which has all string manipulation methods to the project...separated from the whole project into its own library for neatness. -- like a...
13
6562
by: John Salerno | last post by:
Here are a few I'm considering: Design Patterns Explained : A New Perspective on Object-Oriented Design (2nd Edition) (Software Patterns Series) by Alan Shalloway Design Patterns C# by Steven John Metsker Design Patterns by Erich Gamma Head First Design Patterns by Elisabeth Freeman
12
3039
by: FluffyCat | last post by:
New on November 28, 2005 for www.FluffyCat.com PHP 5 Design Pattern Examples - the Visitor Pattern. In the Visitor pattern, one class calls a function in another class and passes an instance of itself. The called class has special functions for each class that can call it. With the visitor pattern, the calling class can have new operations added without being changed itself.
22
4747
by: Krivenok Dmitry | last post by:
Hello All! I am trying to implement my own Design Patterns Library. I have read the following documentation about Observer Pattern: 1) Design Patterns by GoF Classic description of Observer. Also describes implementation via ChangeManager (Mediator + Singleton) 2) Pattern hatching by John Vlissides Describes Observer's implementation via Visitor Design Pattern. 3) Design Patterns Explained by Alan Shalloway and James Trott
7
3105
by: =?Utf-8?B?bWF2cmlja18xMDE=?= | last post by:
Hi, I would like to know more about design patterns and specifically using C#. Can any one recommend a good book? Thanks
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10091
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.