Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - Design Patterns | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Ramsus

Octoballoon
Level: 19

Posts: 63/162
EXP: 34651
For next: 1126

Since: 01-24-05
From: United States

Since last post: 39 days
Last activity: 71 days
Posted on 05-20-05 06:23 AM Link | Quote
Anyone else know what I'm talking about? I'm reading a book on them, thanks to all of the thousands of free books available at my university's engineering library. I've been using object oriented programming lately, and this really clears up my thinking on designing a current project I'm planning on doing in PHP. It's all kind of obvious on some level (everyone uses or has used at least a few), but it adds a new sense of clarity I think.

Anybody want to comment on their experiences with design patterns?

I think they're great, but after I finish this current project I'm going back to studying functional programming, macros and Common Lisp.
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 3060/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 05-22-05 09:25 PM Link | Quote
I've learned them--I haven't used them yet in my software engineering career. I know they help you generate a general solution to your problem but I haven't really applied it to any other class. I have yet to start working so I dunno how much it is used there.
windwaker

Ball and Chain Trooper
WHY ALL THE MAYONNAISE HATE
Level: 61

Posts: 1601/1797
EXP: 1860597
For next: 15999

Since: 03-15-04

Since last post: 4 days
Last activity: 6 days
Posted on 05-26-05 08:16 PM Link | Quote
I've heard of them, yet I have yet to grasp the art of doing so. What really is using this to speed up code?
rg_

Goomba
Level: 8

Posts: 1/26
EXP: 1964
For next: 223

Since: 03-27-05

Since last post: 21 hours
Last activity: 12 hours
Posted on 06-03-05 02:17 AM Link | Quote
In my opinion there are two major advantages that come from using design patterns in your code.

The first one is that you don't have to think about how to implement certain things. If you know your design patterns well you will instantly know how to write code for certain situations. If you have to implement something like a directory structure for example you don't have to think about the general structure of your data first, unless there's something very non-standard about your directory structure you can instantly think "Composite pattern" and you know what to code. Even better is that all the common patterns are well-tested, well-documented and well-understood. If you write your own solution instead of choosing appropriate design patterns neither of these three advantages will be true at first.

The second huge advantage is that you have names for quite complicated class structures adding an extra level of abstraction. When you write a GUI and want to explain it to someone like your co-worker or teacher or whoever you don't have to start giving huge explanations, possibly drawing diagrams how your classes interact with each other. Instead of saying "Well, I have these three classes here. One is for displaying the GUI elements, one keeps track of the underlying data and one is used to modify the data in a way that keeps the data consistent; here are pictures how they cooperate" you can just say, "three classes; standard MVC pattern" and the other person knows (or should know) how you structured your code.

Also, don't worry about forgetting design patterns after going back to functional programming again. Even though OOP design patterns are probably the most popular ones there are design patterns for virtually all aspects of programming. After all a design pattern is not much more than a formalized way of programming something that has been proven to work very well over the years. I'm not an expert on functional programming but I'm sure if you hit Google you'll find design patterns for functional programming too.
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Programming - Design Patterns | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.005 seconds.