473,881 Members | 1,651 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Abstract Factory and Factory Method PHP5 Design Patterns

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

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.

I have only completed my pages for Abstract Factory and Factory
Method thus far and I have a pretty good idea of what I will do for
Composite and Memento. Hopefully I will be adding one or two new
patterns each week until all are complete. If any other pattern
loving PHP enthusiasts want to check it out I'd love your feedback:

Oct 27 '05
11 4327

Yes, PHP is certainly behind Java with regard to pattern development.
This is of course partly because PHP 5 is (to me anyway) PHP's first
decent OO implementation. PHP 5 is just starting to become available
at hosting companies, so PHP programmers are just now getting into the
exciting world of OO.

On 28 Nov 2005 01:10:08 -0800, "A. Timurhan Cevik" <at*****@gmail. com>
There are a lot of frameworks in php out there. I am not mentioning
building one, promoting one or helping one.

There are many architectural patterns for j2ee, there is so little info
for php. I am not talking about how to build a php framework based on
some architectural pattern documented for java, I am talking about
documenting design patterns for php, helping people to read some
patterns for php, documents that are good enough to help build

Some site named phppatterns (I do not remember the full adress) is
doing quite a job, but there is not any reference like java's core j2ee
patterns or dotnet patterns and designs site for php yet.

Nov 29 '05 #11
Thanks for asking, I've been wondering what I'd do after gof myself.
I'm such a huge fan of MVC that I am planning to do an example of

I should add a part to the site so that others can add comments, or
even their own whole examples, but I'm still hashing out the details
of just how that would work on my site.

On 27 Nov 2005 07:56:51 -0800, "A. Timurhan Cevik" <at*****@gmail. com>
Are you thinking of putting not only gof patterns but also some
enterprise level patterns such as mvc ? I think it would be great to
include some patterns such as Core J2EE patterns for php. Any study on
that ? I would like to participate, if there is.

Nov 29 '05 #12

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

Similar topics

by: Medi Montaseri | last post by:
Hi, Given a collection of similar but not exact entities (or products) Toyota, Ford, Buick, etc; I am contemplating using the Abstraction pattern to provide a common interface to these products. So I shall have an Abstract Base called 'Car' implemented by Toyota, Ford, and Buick. Further I'd like to enable to client to say Car *factory;
by: max | last post by:
Hello, I analyze this design pattern for a long time but I do not understand how this pattern work and what the purpose is? (I looked a this site http://www.dofactory.com/Patterns/PatternAbstract.aspx). Could anybody try to explain me in his own words how this pattern work and what the purpose is? thanks in advance
by: Chris Capel | last post by:
What is the rationale behind the decision not to allow abstract static class members? It doesn't seem like it's a logically contradictory concept, or that the implementation would be difficult or near-impossible. It seems like it would be useful. In fact, there's a place in my code that I could make good use of it. So why not? Chris
by: Frank | last post by:
Hello, a question about abstract classes. Abstract ClassA, inherited classes X and Y. When creating it's something like: if (true) ClassX xx = new ClassX(); else ClassY yy = new ClassY(); Is it in someway possible to put the if statement in the constructor of the
by: mailforpr | last post by:
Hi. Let me introduce an iterator to you, the so-called "Abstract Iterator" I developed the other day. I actually have no idea if there's another "Abstract Iterator" out there, as I have never looked for one on the net (I did browse the boost library though). It doesn't matter right now, anyway. To put it simply, Abstract Iterator is mainly a wrapper class. It helps
by: RSH | last post by:
Hi, I am a fairly seasoned developer and have recently started looking at software design patterns. I am starting with the Abstract Factory Pattern and was wondering if someone could help me understand where I might use this Pattern. I get the general concept but I am having a hard time converting that concept into where I might use that in a real world scenerio for a business application or web development project. I appreciate the...
by: Duy Lam | last post by:
Hi everyone, Sorry, I don't know what group to post this problem, I think may be this group is suitable. I'm styduing DAO (Data Access Object) pattern in this link http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html. While I've read about implementing Data Access Objects by Factory Method Pattern (http://java.sun.com/blueprints/corej2eepatterns/Patterns/images09/figure09_07.gif) and Abstract Factory Pattern...
by: suresh_rai | last post by:
Hello I am hoping someone can give me very needed help. I am wanting some C+ + code for 'C++ Abstract Factory'. I need code to be free. I am been learning Design patterns. I found some code on web but dont know which is one is ok. http://programmerjoe.com/2007/03/18/the-abstract-factory-pattern-in-c/ http://www.codeproject.com/KB/architecture/DesignPattern.aspx Loki :in text book http://sourceforge.net/projects/papafactory
by: C# | last post by:
http://www.questpond.com/FreeDesign1.htm I was going through the above videos. Can i conclude Abstract factory patterns are extensions of factory patterns. I have made the conclusion after viewing the video and reading GOF books. I am confused by these two patterns.
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...
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,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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,...
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...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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.