52 Comments
- markho, on 10/12/2007, -2/+8And how do you go about step #1 on your list?
That's where design patterns come in. - Fish123456, on 10/12/2007, -0/+5It's OK if you choose to forgo design patterns. I think you should make that choice after you have a good deal of knowledge of what they have to offer, though. Patterns are something you think about using after you have laid out the way your site/program is intended to work. Never try to force a design based on a pattern you like. Step back, look at your design, and then find where patterns fit in.
... but you will never know how to use them if you don't learn about them first. - merreborn, on 10/12/2007, -0/+4There's a certain point where projects get large enough that they become unmanageable unless you start to structure your code intelligently. Suddenly, you find your self having to make changes in dozens of files every time you change a simple database rule, whereas in a well-designed project, you have a database object that you use in all your classes so that you can make bussiness rule changes in a single place.
- gharding, on 10/12/2007, -1/+5Agreed. This article is an excellent intro to design patterns, but for more in-depth stuff, Adddison-Wesley's book is excellent, along with O'Reilly's Head First Design Patterns (which is a bit simpler). So many people using PHP have never studied anything to do with programming and keep trying to implement things that design patterns cover so easily. I think if more PHP developers hopped on the design-pattern bandwagon as a first step, PHP might be able to get away from the stigma of horrible coders.
- alainb, on 10/12/2007, -0/+3Let me clarify just a bit. Im not saying PHP doesn't have OOP support within its language or anything.
Patterns are just generalizations of code, so any decent language supports OOP patterns.
What im talking about is two things I have seen that has marked a difference between PHP and ROR:
1) ROR is a framework that practically forces a developer to think in terms of objects and object handling. All the libraries are only useful to the programmers that adopt that kind of development model. PHP doesn't have that implicit nature to it, so it allows for non-OO development...which then brings me the next thing...
2) Because PHP doesn't implicitly force the user to think in OO, naturally a lot of PHP developers are going to be totally unfamiliar with OOP! Heck, even this thread is an example of that. A lot of the comments here show a gross misunderstanding of patterns, and they mainly come from PHP developers. In contrast, the ROR community is very adamant about OO, Patterns (even some of the class methods are named after patterns), and unit testing.
So when I say the lack of OO support in PHP is why I switched to Rails , thats what I mean. - disrupter, on 10/12/2007, -5/+8I don't think you get the point
- jo42, on 10/12/2007, -0/+3PHP Object Oriented Programming => POOP
- thedude23, on 10/12/2007, -3/+6sweet, you gotta give it up to IBM for publishing their library of technical documents for free but the Addison-Wesley Design Patterns book is where to go if u want to understand where these ideas came from.
- groovepapa, on 10/12/2007, -1/+3Also, check out PHP 5 Objects, Patterns, and Practice (http://www.amazon.com/gp/product/1590593804/104-8600897-7714338?v=glance&n=283155) for some great OO principles applied to PHP code.
- tablatronix, on 10/12/2007, -1/+3wow that is greek to me.
Anyone have any novice OOP resources ? I am just now writing projects that are big enough to require learning objects and code reuse and better stucture. - SniperSlap, on 10/12/2007, -3/+5Actually, I'm with this guy. I use all the top-heavy OO stuff at work and it just gets in the way of solid decisions. Many good PHP writers are actually aware of the state and process lifecycle of their programs.
In the OO world, you just have people bouncing object designs and terminology back & forth...Blindly coding and coughing up huge cash to IBM when their problems extend too far outside of the design-only realm of creating software.
Please bear in mind, my observations are not to the exclusion of people who have taken the time to learn and understand both design and programming.
Truthfully though, these people are getting more and more rare. To the extent where there are people out there making software who have no idea how the job is getting done. - Beaver6813, on 10/12/2007, -0/+2Yea, learning layout is VERY important. It can make your life so much easier when you come to revisions, for non-commercial scripts i also tend to comment important stages in my code, so its easier if you get anyone else helping. The best way for me to learn the coding layout was getting online classes at places like thephpsolution. It helped me a lot when starting to code!
- ephemerae, on 10/12/2007, -1/+3If I never have to maintain somebody else's PHP code again in my life, I'll be a happy man. I consider the combination of PHP and clueless HTML monkeys to be the worst anti-pattern on the web. I also find the space-sensitivity of the language annoying: a misplaced space in an included file can ruin your whole day. What php needs is an additional file extension for php class files that doesn't require the <? and ?> tags to state the obvious, i.e. "I'm gonna start coding here."
Of course, I also hate ***** who over/mis-use scriptlets and tag libraries in JSP, too. But in general J2EE/MVC goodness is a hell of a lot easier to maintain if you are concerned with quality of extremely complex systems (and pays better too). - schmerge, on 10/12/2007, -1/+3Read the article again, then read it again, then read it again. Once you think you've fully grasped the design pattern, read it again. Design patterns are not a way of creating homogeneous, thoughtless code, they provide a method for engineering reusable agile code all in the while saving tremendous amounts of time and effort.
A VERY useful example where the factory pattern could be put into use is when developing a web application to be deployed on multiple platforms utilizing different databases. With the use of the factory pattern all the developer needs to do is implement a class to handle the supported databases. All dependent code is oblivious to changes in the application back end. So in short, you can have any back end, with limitless extensibility without affecting ANY of your code base. This makes life a lot easier. - merreborn, on 10/12/2007, -0/+2PHP 5's OOP support is pretty complete.
- tagawa, on 10/12/2007, -0/+2This is what I love about Digg (and other similar sites with intelligent contributors).
As well as the usual fanboy rants about Apple/Google/etc., there are often gems like this page where where we get to read the varying opinions of people with valid experience and worthwhile points to make. I've learnt a lot in the past 10 minutes and I haven't even read the main article yet.
Thank you, Diggers. I look forward to more of the same... - ephemerae, on 10/12/2007, -0/+2If I never have to maintain somebody else's PHP code again in my life, I'll be a happy man. I consider the combination of PHP and clueless HTML monkeys to be the worst anti-pattern on the web. I also find the space-sensitivity of the language annoying: a misplaced space in an included file can ruin your whole day. What php needs is an additional file extension for php class files that doesn't require the <? and ?> tags to state the obvious, i.e. "I'm gonna start coding here."
Of course, I also hate ***** who over/mis-use scriptlets and tag libraries in JSP, too. But in general J2EE/MVC goodness is a hell of a lot easier to maintain if you are concerned with quality of extremely complex systems (and pays better too). - joshink, on 10/12/2007, -0/+2I'm not sure about PHP lacking in OO support. It just handels objects differently. While the ruby/python/java/actionscript/vb way of calling or creating an object is very useful, most of it can be done using an array in PHP. It's all up to the developer. I use PHP because it's the best open-source language for the web. There are so many libraries for PHP it's rediculous.
And just to clarify, I'm not trying to bash any other web language of framework (except for .NET). I think it's useful for developers to learn many different language, just pick one to master.
When it comes to patterns, I could care less. The key to great coding is "Resuability". You don't need patterns to accomplish that. Just write libraries/classes - joshink, on 10/12/2007, -0/+2ROR developers have a greener-grass syndrome. OOP is just a way of programming. Sometime it's not even necessary. Although a lot would disagree, I've never ran into a situation where I say to myself, "Self, I wish PHP was a pure OOP language."
Ruby is a beautiful language, there's no doubt about it, but there are still way more developers for PHP than Ruby. PHP is more flexible in that it doesn't force you to think only in objects. You can create an object if you want, but you'll find that good, old-fashioned functions come in rather handy.
About design patterns: I would agree that some of the most aweful coding I have ever seen was in PHP, but you can blame the language for being stupid-easy to use. And that is the reason all us PHP bloaks are saying: "screw patterns!". But in all reality, most of us use patterns whether we realize it or not.
As far as the PHP not being creative (in developing the language). You have to realizeis that if they were closed minded, why the hell is there an install of it on almost every server in the word and why are there more developers for it than Ruby? And don't even say because it's older, Ruby has been around just as long.
PHP is a widely used and a proven language with big sites like Yahoo, Digg and Flickr using it. - xbudex, on 10/12/2007, -0/+2The Gang of Four book is very good. It's called Design Patterns: Elements of Reusable Object-Oriented Software (ISBN: 0201633612) It looks like the whole book is online here: http://lci.cs.ubbcluj.ro/~raduking/Books/Design%20Patterns/contfso.htm
- alainb, on 10/12/2007, -1/+2And what about the damage caused by developers who are unfamiliar with design patterns?
- chiology, on 10/12/2007, -0/+1joshink, you're right that OO is just one way to program. For me, it is _the_ way to program. It makes sense that a number has properties automatically and that it itself should own those properties. It's a matter of domain: who owns what? I say this losely, though, because every number owns its own whatever. But you're right in that OOP is sometimes the worst way to do things: like little scripts to quickly process a form. I develop larger systems, and OOP is the way I do it because it's the only way I can be assured of maintainability some 12 months down the line.
I can hope for PHP being a completely OOP language, and it wouldn't be too hard to treat regular variables as objects with some nice reference hacking and internal masking. But, PHP isn't, and won't ever, become a pure OO language. And why should it? Ruby works wonders, among many others.
There are definitely more developers using PHP than Ruby, by far, but that does not prove superiority by any means: it just means that it was adopted more quickly over others. And why? Well, it's web-centric, and when there wasn't a general use of frameworks for small web apps back in the days of PHP3 and Ruby didn't have the community it does today (for whatever reasons), developers went with the easy choice. Yes, PHP makes it stupid easy to make websites, but it also encourages ugliness and obfuscation. There are no strong thought-leaders encouraging the vast, unaffected community to embrace these good behaviors. I mean, for the PHP community to have such an outrightly negative viewpoint of design patterns, whether they use them unwittingly or not, is the evidence that the PHP community has some serious warts that blind them from a higher form of programming.
The disease of any development community, be it PHP, Ruby, Python, Java, et al, comes from the respective community putting no thought into the _why_ of the design or architecture of the system itself; yes, PHP is stupid-easy, but that doesn't mean that the people shouldn't want to know more and learn better ways to do things the same way you should learn how to do regular expressions if you're going to be working with string processing.
The non-creativity comes from this lack of forward, explorative thinking, not from the result of good fortune and ease of adoption. It may be widely accepted, but not because it is ultimately the best. The best is only the best for the given circumstances, and in many cases, Ruby (and Rails) would be just as good as PHP. Numbers do not constitute excellence or superiority: I believe quality (in all aspects), as opposed to ease-of-use, determines superiority.
Yes, Ruby is just as old (if not older) than PHP, and it shows: it's mature, and has a good support community. And, I must say that, in reflection, the community is another large part of the superiority or excellence of anything: again, not the numbers, but the quality of the community. I can go to the PHP IRC channel, and there are so many there that are asking questions that are easily found in the manuals in the first part of the beginner's introduction to the language. Not only that, but the experts that hang around are beligerant, unhelpful, and chauvinistic in many circumstances (granted, not all). I'd have to say that the degree of quality and helpfulness is much higher in the Ruby community (which is, in part, due to its relative size).
Lastly, I'd have to say that, even without the OOness of Ruby, the signal-to-noise levels are far higher, allowing me to quickly comprehend what's happening as opposed to PHP, which often drowns you out in a sea of {}s, ;s, cludgy functions, repetitiveness, and sheer ugliness.
Ultimately, that's all my opinion. - chiology, on 10/12/2007, -0/+1Great. My email address is chiology at gmail dot com -- shoot me up.
Also, in my distaste for the current state of PHP yet in my circumstances as a project leader and developer with PHP, I've developed my own framework for PHP5 called Canvas. Check it out:
http://c.anvas.es/
Good luck. If you get a chance, buy these books from the Pragmatic Programmers:
Programming Ruby ('the pickaxe')
Agile Web Development with Rails
Rails Recipes
The Pragmatic Programmer
Great books, especially the recipes book and the Pragmatic Programmer book (which will teach you how to think about the system).
M.T. - joshink, on 10/12/2007, -0/+1I really apriciate it. I wish I would have never sold my mac, though...
Last night I was thinking.... Ruby is like Mac (the underdog: not as much support, not as popular, but a hell of a lot easier, cleaner, and more reliable), and PHP is like Windows (Just not as bad...)
Anyway, I work full time, but the project I'm doing is on the side. It's a personal project, and I don't plan on getting it done until December, so I think I will take the plunge and switch. I'll be getting a Mac soon enough, but I'll have to use my PC for now.
Thank you for your help, man. I'll try to find you on here somewhere and let you know how it goes! - rickcarson, on 10/12/2007, -0/+1The Gang of Four book is only a little useful if you are using a language like Java.
Half of the patterns are already deeply embedded in the language/libraries (Iterator), or you look at them and go "yes... I could go to all that trouble... or I could just use an Interface".
new is teh uber "factory" pattern.
What Patterns *should* be used for is for *programmers* to better communicate what they are doing with other programmers. Sadly, what they are more often used for is for the Architecture Astronauts to come in at the start of a project (before you know what the real problems are) and slap down a bunch of Patterns before slipping off to the golf course for the rest of the project. - chiology, on 10/12/2007, -0/+1Just make sure you read the article! :)
- Tetravus, on 10/12/2007, -0/+1The Addison-Wesley book in question is: "Design Patterns - Elements of Reusable Object-Oriented Software" by Gamma, Helm, Johnson, and Vlissides.
I'd stay as far away as possible from all the O'Reilly 'headfirst' books. They seem to be striving for coloring book simplicity with cartoons instead of text to explain concepts. Good for english learners I suppose, but cartoons are a poor medium to convey concepts as rich as design patterns. - chiology, on 10/12/2007, -0/+1"I consider the combination of PHP and clueless HTML monkeys to be the worst anti-pattern on the web." -- ephemerae
I wholeheartedly agree.
On the PHP OOP discussion, I must say that I don't like how PHP has this weakly OO mindset. I've been disgusted with the PHP community for some time now, so this isn't new. With Ruby (and not strictly RoR), I get a very, very OOP-centric language that feels so natural and beautiful.
Of course, you can strive to make PHP a bit more beautiful, or at least standable, by taking the time to produce the objects the way you need to. This is a very active stance you have to take, determining to design the application in a way that is suitable for it. Of course, using these patterns where needed is great because the thought-engineering has been done for you to some degree. It's just as important, though, that you do the work to get the rest of your system to that level of quality and pristine design.
All in all, this article is great (except for the Singleton pattern, though it is useful in a few, very specific places). I'm happy that IBM is helping spread the knowledge of these excellent patterns of good programming behavior, though I wish the uptake were a bit more rapid and the community itself would strive for type of stuff on its own. That is, I wish it would embrace and create new things more often, rather than riding coattails and being so cynical and stone-cold. That's what's wrong with the PHP community: its immovability and lake of creativity (for the language itself).
I wish PHP developers would really wake up to the terrible things they allow in their daily practices, would embrace things like MVC, and would be more open and welcome of changes to their language for the better of its usability. Seriously, arrays should be able to be created with [ and ], not with something that looks like a function. (Yes, it does really matter.)
And a quick reply to joshink: I would have to say that both Ruby and Python have equally impressive libraries for the web, and would whole-heartedly disagree that PHP is the best open source web-based technology/language. Hell, Perl probably beats all of them, but my flavor is Ruby.
"Terminology and thought-concepts in software are a crutch for the unpassionate career artists."
Wow, that's a load of *****. Terminology is just a logical result of progression to a more formalized development model. If someone comes up with a cool concept, like working with objects, then it becomes a part of the terminology of that culture. And the thought-concepts are what drive the culture and community into producing these cool concepts and methodologies. Why hasn't the PHP created a great deal of the more intuitive and creative concepts and methodologies? Because the community (in general) has a very limited view and a dislike for thought-concepts. Exceptions are out there, for sure: I know I'm not alone. But, the general community, the vocal ones, tend to be what I'm going on about. - joshink, on 10/12/2007, -0/+1@chiology
Dude, I have to say... You're very convincing. I love programming and I love PHP, but I think I might get into Ruby. The problem is: I'm in the middle of a enterprise-size developement. I don't want to switch languages for this deployment, but I also don't want to try to migrate code. I want to user Ruby (and Rails), but I'm afraid that it doesn't have database support as robust as PHP. Another concern is speed. From all the test I've seen, PHP (with optomizer) runs at sometimes half the speed as RoR.
I'm also use to using Zend Studio (which makes PHP a freakin breeze); is there something like that for Ruby? Also, is there some sort of extemsion for Dreamweaver? I use it for all my CSS and layout.
If Ruby has the tools I need, I will switch.
Any of you PHP users want to try to change my mind? I'm really confused as to what to do.... - tobyjoe, on 10/12/2007, -0/+1The term 'patterns' is quite old and not at all a buzzword. Design patterns weren't invented, they were discovered. The academic recognition that common approaches are used in design and engineering came from architecture, as did the term 'design pattern.'
Software engineers borrowed the term from architecture, and the GOF book mapped out some of the more common approaches that the authors recognized in various efforts.
This isn't IBM, or anyone else, creating new structures and saying you should stick to them.
As has been implied, all good engineers will recognize a lot of approaches they themselves have taken when they study the GOF book for the first time. Coming up with a common vocabulary and abstracted maps of these patterns is useful when communicating ideas to other engineers.
If you sit down and say 'I want to use an Observer pattern, and maybe tie in a State Machine' and then code to that, you're backwards. - chiology, on 10/12/2007, -0/+1@joshink:
I must say, that's a compliment if I've ever heard one. Thanks for actually reading my response.
Switching in the middle of a (large or not) project is tough. Well, really, damn near impossible. I wouldn't recommend it, really. But I would be spending little bits of my free- or off-time reading up and playing with Ruby (and Rails).
Concerning database support, Ruby itself has a great deal of support for numerous databases (off the top of my head, at least MySQL, PostgreSQL, Oracle, SQLite...), and Rails' ActiveRecord component supports nearly all of them (if not all). On top of this, you really don't even have to interface with the SQL or the database-specific library directly when using Rails as its ActiveRecord (AR) library handles SQL generation for you (while allowing you a great deal of control or even writing the queries yourself if you feel so inclined). And still better, AR provides a Migrations functionality to help you keep up with database schemas and revisions.
Just a taste of what you can do with Rails' ActiveRecord library for getting data quickly (though much more elaborate queries can also be created in a very easy way, too):
# get customer with id 12
customer = Customer.find_by_id 12
# and all his/her orders
customer.orders
# update primary contact
customer.primary_contact_id = Contact.find_by_first_name_and_last_name "John", "Preston"
# update the record
customer.save
Of course, this is a little off given how you'd design your database and define the relationships, but you get the general idea. Now, the kicker is what it takes to define these models and their relationships:
class Customer < ActiveRecord::Base
has_many :orders
end
class Contact < ActiveRecord::Base
belongs_to :order
end
The class that it inherits from (ActiveRecord::Base) defines all kinds of magic functions, like find_by_first_name_and_last_name (which is figured out dynamically) and then the normal CRUD (create, read, update, delete) methods (create, find, save, destroy). Here's one last example of deleting all of the comments that have the word 'cialis' in it:
Comment.find(:all, :conditions => "comment LIKE '%cialis%'").each do |comment|
comment.destroy!
end
Concerning speed, Rails can be milked to perform very quickly. PHP has a downside in that it has to load itself and parse itself every single time it is accessed. Ruby and Rails have similar problems, but its propensity for object reuse when using FastCGI helps it a great deal. However, even better methods for making Rails blazingly fast, using Lighttpd and/or Mongrel (which is the hot stuff right now) is even faster. Benchmarks have shown Rails to be comparable to the most tuned Digg sites, if not faster.
I don't use a specific Rails IDE, though I know RadRails is based on the Eclipse engine (which Zend Studio is as well, no?). I use TextMate on my Mac platform which has a very good bundle defined for it for using Rails (and many other programming languages, including PHP). If you use a Mac, or can switch, TextMate is the best editor for Rails development, unless you're already used to Emacs. And yes, I do believe there are plugins for DreamWeaver, but I don't know any details as I don't use DreamWeaver myself. (Again, I use TextMate.)
Ruby has some really awesome tools. Rails itself uses a little console app (called console) that lets you directly interface with your AR models (and other parts of your app), so you can interactively execute the code I wrote above and it will give you responses immediately. PHP cannot do that (I've been hacking on an interactive interpreter, but I don't think it will ever work reliably until the Sandbox extension becomes more prominant and standard). Plus, Rake (Ruby Make) makes automation so very easy, and Rails uses it expertly. For instance, to migrate your database to the newest version:
$ rake migrate
Or, to go back a version
$ rake migrate VERSION=12
(Assuming you're at version 13.)
Well, hope that whet's your appetite. Here's some links to check out:
http://new.ruby-lang.org/en/
http://www.rubyonrails.org/
http://api.rubyonrails.org/
http://www.poignantguide.net/
http://tryruby.hobix.com/
Cheers,
M.T. - vegasbright, on 10/12/2007, -1/+1This is bloviating on semi-useful tasks. Yes, a structure to how you code is important when working with a team of developers. But coding is like language, with slang and form being exclusive to the coders own style.
- persaltier, on 10/12/2007, -1/+1Design patterns are great. The Singleton pattern isn't.
http://www.prestonlee.com/archives/22 - SniperSlap, on 10/12/2007, -1/+1Disagree. Totally.
IBM has no business anywhere. That includes open software. They do more damage than help, even in spite of the man hours they offer. - alainb, on 10/12/2007, -0/+0wtf? How is my comment an assumption of who you are? I have not directly targeted you in any way.
I can see that you are comments are very insulting, degenerative and inflammatory. They don't hold any critical value, nor offer anything redemptive.
And you know what that means?
I'm not going to respond to you any more. I don't feed trolls....*****. - mzkw, on 10/12/2007, -1/+1I don't think you get the point.
- speed00, on 10/12/2007, -0/+0Hey, this Jack Herrington guy know his PHP, allright! Where can I read more of his stuff ? http://www.peoplesfurniture.net/
- misterjangles, on 10/12/2007, -0/+0Unforatunately throwing out OO terms and design patterns and cramming them into an app without a good reason is something that happens. Developers tend to use them so that they will feel like they're doing enterprise level programming, but they may not fully understand their use. Its just like any other tool - you can use a screwdriver to pound nails, but a hammer would work better.
If you don't see a need for these patterns in your work, then it may be that you just aren't working on projects that require it yet. When you start to feel that your application is getting unmanagable and making revisions is painful - that's when you know that you should have been reading about design patterns! Unfortunately it seems that you have to go through that pain first before you really understand. - alainb, on 10/12/2007, -1/+1Im not saying that coders aren't going to need to always know design patterns, but if a coder where to start creating something similiar to a design pattern that has already been well thought out, and they implemented a half-ass job out of ignorance that there is a better solution, then damage would be done.
If we all just made our own proprietary code and never talked about the design patterns (which are basically algorithims), we'd never have the wonderful technology we have here today.
As ideal as it might sound, a coder can't win by passion alone. He can only win by creating well-thought out and structured code. Patterns provide those generalizations so that coders don't have to season for five years until they can naturally intuit those patterns. Why not just read up on them and learn the basic patterns?
But speaking of unrelated...yes this has nothing to do with IBM, because patterns have nothing to do with IBM. IBM is just writing a intro article on the subject. No need to freak out and wave your 'IBM IS TEH EVIL' flag. - hello2usir, on 10/12/2007, -0/+0"... but you will never know how to use them if you don't learn about them first."
"Pattern" is just a new label for old practices. Most seasoned programmers already know this stuff, even if they've never heard of patterns. A lot of this is just common sense. - joshfraz, on 10/12/2007, -6/+6How many websites are complex enough to actually need that? Here's my design pattern:
1) Create libraries for tasks that are required across the site
2) Pull data from one central database
3) Use CSS to keep content seperate from code
One of the things I love about PHP is that I DON'T need to rely on design patterns to keep my code clear! - angler8890, on 10/12/2007, -0/+0As has been implied, all good engineers will recognize a lot of approaches they themselves have taken when they study the GOF book for the first time. Coming up http://www.ppno.info/sitemap.htm with a common vocabulary and abstracted maps of these patterns is useful when communicating ideas to other engineers.
I think so!!! - hello2usir, on 10/12/2007, -0/+0It's sort of amusing to see these strategies now given a buzzword "patterns" as if they're some newfangled thing. Especially the "factory" pattern. That one cracks me up. If you're looking at the factory pattern and it looks like a new concept to you, then you need to go back to school. If you honestly consider yourself a programmer then any of those five patterns in that article should be familiar to you, even if you're not familiar with patterns.
Also, if you find yourself copying and pasting any of that code verbatim into your project then it would probably be a good idea for you to just forget about patterns, because you've missed the point completely, and your skills are now tainted by your own ignorance. - misterjangles, on 10/12/2007, -0/+0@MatchASM There are a lot of simple ways that you can implement patterns into even simple apps. If you want to write a system that allows other people to write plugins, you might want to experiment with, for example, a factory pattern. I personally like to use the observer pattern for reporting debugging information and such. It's kinds cool because a lot of these patterns are about making your code so that it can be extended by other people (or you can just extend it yourself) and at times it can actually be pretty cool to see your code take on a life of its own and you may even be surprised sometimes!
- MatchASM, on 10/12/2007, -0/+0I'm curious; are there many good examples of PHP projects where OO programming and design patterns actually make a great deal of sense?
- alainb, on 10/12/2007, -1/+0Whats nice to think though is that Open Source is changing IBM. IBM isn't the same behemoth it was back in the 60's and 70's.
No need to throw the baby out with the bathwater. Even businesses can change. - SniperSlap, on 10/12/2007, -2/+1That seems like a blind attempt to sound wise. It also seems unrelated.
If they don't know about "design patterns" and are still good coders/designers more power to them. Terminology and thought-concepts in software are a crutch for the unpassionate career artists. - macronesia, on 10/12/2007, -3/+1I definitely agree with joshfraz. Many people have broken out of the "design mold" and became the best in their field by doing so. Tiger Woods can swing a club anyway he likes. However, it's good to understand the common pattern of design, so then when you're an expert, you can later change it.
I don't see why some of those patterns are useful in PHP. - SniperSlap, on 10/12/2007, -3/+1alainb, your comments are rife with assumptions about who I am, what I do and what I know.
You've just insinuated that I have no idea what I'm talking about and you are hereby guilty of *****-diggery.
It has also become clearly evident that you have entered this comment scene to play little more than a game of save-face.
May you rot. - alainb, on 10/12/2007, -4/+1Its humorous to see that something so simple can be so easily misunderstood.
Understanding design patterns will make you a better coder, because it articulates very distinct and specific *patterns* found through out most enterprise level software. This has nothing to do with IBM.
In fact, the lack of OO support in PHP is the reason I hopped onto Rails. -
Show 51 - 52 of 52 discussions



What is Digg?
The Digg Toolbar for Firefox lets you Digg, submit content, and keep track of Digg even when you're not on the Digg site. Download the official