guinbRo Posted March 11, 2012 Share Posted March 11, 2012 So I've been trying to get more savvy with the programming lingo. I'm a first year CS student, but I've messed with PHP for about a year to a year and a half. I'm not that great at much, but I'm having fun learning some of the basics of data structures and algorithms (mergesort, quicksort, graphs, ahh the list goes on). One thing my professors haven't covered yet has been design methods and design patterns. I've seen these words tossed around before in peer-reviewed journals and such but basic web searches as they apply to programming don't really tell me too much about them. Any chance of someone putting it in laymans terms? Thanks, guinbrO Quote Link to comment https://forums.phpfreaks.com/topic/258675-design-methods-vs-design-patterns/ Share on other sites More sharing options...
requinix Posted March 11, 2012 Share Posted March 11, 2012 I've never heard the term "design method", but a design pattern is basically just a way of solving a fairly common problem. For example, have you ever wanted to make a class that stores a bunch of data so it's all available in one place? There's a design pattern for that. Ever wanted to make sure that only one instance of a class exists and others can't be created? There's a design pattern for that too. Ever seen a really complicated class and felt like making another class that's much easier to use? Guess what? Google it. There's a ton of information out there on the subject. Quote Link to comment https://forums.phpfreaks.com/topic/258675-design-methods-vs-design-patterns/#findComment-1326071 Share on other sites More sharing options...
guinbRo Posted March 11, 2012 Author Share Posted March 11, 2012 Ah that makes more sense, thanks. I wonder where I picked up design methods, I probably meant something else entirely . Anyways I think I'm starting to understand it then, a design pattern could be something like creating a class to handle MySQL queries to make your life simpler. Quote Link to comment https://forums.phpfreaks.com/topic/258675-design-methods-vs-design-patterns/#findComment-1326118 Share on other sites More sharing options...
ignace Posted March 11, 2012 Share Posted March 11, 2012 Yup. Here are a few resources to study what design patterns: http://martinfowler.com/eaaCatalog/ http://www.slideshare.net/spriebsch/basic-php-design-patterns-presentation http://www.ibm.com/developerworks/library/os-php-designptrns/ http://www.fluffycat.com/PHP-Design-Patterns/ My favourite is to use SlideShare.net to learn/understand new stuff. Quote Link to comment https://forums.phpfreaks.com/topic/258675-design-methods-vs-design-patterns/#findComment-1326150 Share on other sites More sharing options...
guinbRo Posted March 11, 2012 Author Share Posted March 11, 2012 Thanks for the reads. I'm getting the concept a bit more. I've been studying up on the MVC idea, and I've been getting a stronger hold on OOP since I've been learning Java. It's amazing, the more you learn, the more you want to learn! Quote Link to comment https://forums.phpfreaks.com/topic/258675-design-methods-vs-design-patterns/#findComment-1326248 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.