View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Discussion 2 - Joaquin Estrada

For discussion 2, I read an article called "Design Pattern (computer science)" on Wikipedia. The link to the article is: http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29. I also referenced "What Are Design Patterns?" (Link: http://www.developer.com/design/article.php/3325211)

Part 1)Question: What are the differences between creational, structural, and behavioral patterns?
Answer:
Creational patterns control the creation of objects and in doing so they optimize the instantiations of objects.

Structural patterns deal with the relationships between entities. They make it easier to have large, structured programs through the careful composition of objects into groups.

Behavioral patterns improve the communication between entities. They increase flexibility and flow of communication between complex entities.

Part 2) I referenced Wikipedia at http://en.wikipedia.org/wiki/Low-Coupling_/_High-Cohesion_pattern:
Low-Coupling/High-Cohesion pattern is a functional pattern that aims to fulfill OO programming standards while also becoming easier to understand, program, and maintain.
The concept is two fold. Low-Coupling implies that the relationship between entities is as basic as possible with as few ties between the two entities. Whether it's a method in one object that is responsible for the overall communication between objects or one object inheriting for another, the lines of communication are not overbearing.
High-Cohesion is the amount of understanding and effectiveness with the amount of "lines" between entities.

Therefore, the total concept is to have as little as possible and do as much as possible. It's basically getting a lot of functionality with as little code/complexity as possible.

This interests me because I am not a huge fan of coding because a lot of the time the connections between objects results in a complex network of confusing code. This design pattern would reduce the connections between objects and would help me to understand the overall functionality of the program at a quick glance rather than studying code for hours on end.

It makes sense to me that it is necessary to carefully design the interaction between classes so that the functions that need to get done are done with as little complexity as possible. Sitting down and writing code without first spending time on design is definitely the best way to NOT use this pattern. In my own coding, I could use this principle by first sitting down and drawing out all of the interaction between classes and then optimizing the number of connections between classes so that low coupling is maintained.
My only qualm with this pattern is that it is easier to praise it and more difficult to put into effect. I will definitely always try to use this pattern because I just know I will end up looking at my own code months later and I will not be able to follow my own complex awkward way of thinking at the time that I first wrote the code.

Link to this Page