View Single Post
Old Jul 16, 2003, 13:01   #70
Selkirk
SitePoint Guru
 
Join Date: Nov 2002
Posts: 845
In "Fundamentals of object-oriented design in UML" (a highly recommended book) mpj groups all classes into one of four domains:
Quote:
Foundation domain: "The classes in the foundation domain are usable in many applications from many different industries running on a broad range of computer architectures."

Architecture domain: "The classes in the architecture domain are usable in many applications from many different industries. However, the reusability of architectural classes is limited to a single computer architecture"

Business domain: "The classes in the business domain are useful in many applications, but only those within a single industry."

Application domain: "A class in the application domain is used only within a single application (or a small number of related applications)"
One problem with PHP from an OO perspective is that it does not provide any sort of Foundation domain classes. PHP provides its foundational capabilities (String manipulartion, Iteration, file access, etc.) using a functional interface.

PEAR targets the Architecture domain and is based on the standard PHP Foundation functions.

I believe that any effort to create foundational classes for PHP outside of the official PHP distribution is doomed. I also think that non-standard foundational classes would doom any architectural domain class library or framework that was based on them.

Some here are complaining about the lack of consistency in the PHP foundation domain functions and the lack of consistency in the PEAR application domain classes. I agree, but feel this is an inevitable result of the open source development process.

No political process or design committee is going to be able to overcome the splintered nature of open source development.


I have an architectural domain framework which I have been developing for several years. I am in the process of doing some major refactorings and additions to it and have decided to release it as an open source project. (Web application component toolkit)

I think it will deliver some of the things that people are looking for here. My goals are for it to provide a lightweight, modular, productive, high performance web application development environment.

I am interested in keeping it in "code normalized form" and in delivering a test suite with it. (probably using simpletest)

I am reluctant to bring it up in this thread, however.

I am not much interested in "classifying" the built in PHP functions. I am not much interested in a high ceremony committee process. I am also not much interested in creating textbook implementations of patterns devoid of context.

This thread started out with a poll. I voted "A PHP class library would be better off not basing itself off the Java class library API at all."

the reason that I voted this way is that I feel that porting is a poor driver for framework development.

My framework is the result of refactoring several web applications into a common framework. Everything in it had a basis and use in a real application. I've tried to continue with this by creating examples that demonstrate each feature in the context of a real web application.

I feel that driving the frameworks capability based on examples and real applications will result in a better framework.

I feel that driving the development of a framework based on porting another framework is going to result in porting paradigms that don't necessarily apply in the PHP environment. (PHP has dynamic, weak typing. Java has static, strong typing. PHP is interpreted. Java is compiled. PHP has a functional foundation domain. Java has a class based foundational domain, etc. Java is for Web or GUI apps. realisticly, PHP is just for web apps)

I feel that a porting effort would succumb to the desire to "round out" classes with capabilities that are not needed (or are rarely needed) in any kind of real web application. PEAR suffers from this everything AND the kitchen sink mentality.

I am also reluctant to even mention this because I am at such an early stage. I haven't even uploaded the code to the project page, nor do I have documentation of what I have done.

Anyway, if you are like minded philosophically (I am very much influenced by XP), I would welcome help.
Selkirk is offline   Reply With Quote