Hello,

On 01/10/2003 01:51 AM, Nick Oostveen wrote:
As PHP becomes more accepted in the corporate world, it is only logical that larger and more complex applications are going to be developed using it. While there is an abundance of information out there about making specific things work, there seems to be a shortage regarding the big picture.

As such, my question is this: What methods and techniques can be used to help design and build complex, medium to large PHP applications that are not only scalable, but maintainable and extensible? I'm looking for online references, personal experience and opinion and even examples of open source code which you think demonstrate the above criteria on this one. I think an extended discussion on this topic could be of great benefit to everyone.

Obviously separating application and business logic from interface code is a given, but what about other things? Are the object orientated facilities of PHP currently worth really trying to take advantage of? If so, what are you doing to take advantage of them? Are design concepts such as design patterns relevant at this level? What frameworks, if any, currently exist to assist in rapid, structured development, and what specific benefits do they bring to the table?
Your concerns are the same that I had several months ago. PHP is indeed fine for small applications but when it comes to large applications you end up coding by hand many repetitive tasks that could be abstracted by tools that generate the code for from conceptual definitions to save a lot of development time.

One of the most frequent tasks that becomes one of the most development time consuming is interfacing with databases to store and retrieve application data.

I did some research to find what kind of tools exist to automate tasks like database interfacing making it flexible enough to adjust to the application needs and generate efficient code. I realized that there are plenty of components for handling what I need that are usually named persistence layers.

One of the problems that those components has is that most of them are not for PHP. Another problem is that many of them tend to be too generic and a try to do most of the things at run time.

So, I decided to develop a persistence layer generator application. It would generate PHP (although mine can also generate Java and Perl) and it would not generate code that applications may not need to avoid generating bloatware made of code that most of the time is not needed. I also would like to never need to deal SQL in any place.

Last month I finally released Metastorage after over 3 months of development. It is a persistence layer generator application that takes a XML based description of components made of classes . You just describe the classes variables, relationships between classes, validation rules and the declaration functions that you want to use to store and retrieve the classes objects from persistence storage that is currently a SQL based database.

From then on, Metastorage generate everything for you, including all the code for all the classes and even schemas definitions and classes for installing the database tables that are needed. The generated code is database independent.

As a bonus, it also generates entity relationship like class diagrams in UML that you can render in many image formats. This is usually very good to document projects in such a professional way that impresses customers and bosses.

The good part is that it reduces to minutes or hours, the work that usually would take weeks or months to develop with hand written code.

Metastorage is Open Source is available here:

http://www.meta-language.net/news-2002-12-09-metastorage.html

http://www.meta-language.net/metastorage.html






--

Regards,
Manuel Lemos


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to