[PHP] Re: Medium to Large PHP Application Design

2003-01-10 Thread David Eisenhart
 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 have found the Smarty template engine (http://smarty.php.net/) to be a
most excellent tool for separating business logic and presentation.



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




[PHP] Re: Medium to Large PHP Application Design

2003-01-10 Thread Manuel Lemos
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



[PHP] Re: Medium to Large PHP Application Design

2003-01-09 Thread michael kimsal
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?

These are just some of the questions that I'd like to see expanded upon, 
I'm sure there are others out there who can add more to the list.

Nick Oostveen


Hello Mr. Oostveen:

Is that the same hpmarketing.com that had someone named 'jozef' at it?
The domain name looks familiar - like I've seen it in online chats before.

Anywho...

Are you only looking for 'open source' (GPL/BSD/etc) frameworks?  If 
not, I'd encourage you to take a look at
http://www.logicreate.com/index.php/html/main/developer1.html
for a quick overview of our product - feel free to email back or
call if you've any questions.

Now, in general, yes, it's certainly worth thinking about
design patterns at this level (whatever 'this' is).  There's
very few situations where thinking like that *isn't* helpful.
Preplanning code projects, coming up with a structure, and
other 'niceties' become essential as projects grow and mature
to help manage the inevitable complexities which arise.  These
complexities stem not just from the management of the code itself,
but from the growing number of contributors and/or end users
whc will be affected by the project as it becomes larger and/or
more important.

There's some discussion about topics of scalability, design patterns,
and other similar topics on many websites, but not much on the group 
here itself.  I'd suggest having a look at http://www.phppatterns.com
for a start.

Interesting related tools I came across recently: Umbrello and 
Microgold.com's UML program.  Umbrello (uml.sourceforge.net) is a KDE 
app, and microgold is a windows app.  The microgold, while about $200
(I think ) has the added ability to take preexisting classes and
attempt to reverse them into UML diagrams, suitable for giving newcomers 
to a project a good starting point for understanding a project.  Of 
course, UML is just one facet of a project's development, which isn't 
even that widely embraced in most circles, but it's becoming quite 
common in other circles.

Hope that helps some.

Michael Kimsal
http://www.phpappserver.com
734-480-9961


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



[PHP] Re: Medium to Large PHP Application Design

2003-01-09 Thread rush
Nick Oostveen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 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?

Hello,

It is not nearly covering all aspects you have asked about but here is  some
of my expirience.

I think there is a good usage of object oriented approach when working with
PHP. Projects I am working on are using TemplateTamer to separate interface
from the appearance from the functionality. Asifde from that it also
encourages usage of objects

First for each page you get php class descirbing it, and on larger projects
it commes naturaly to have a few base page classes defining common stuff
while each particular page class overides or adds its specifics to it. Base
class usually has bells and wistless for sessions, cacheing, translation,
general layout etc.

Second thing that usually happens is that we develop a lot of smaller parts
of the page as classes that can be used or refined. For instance various
widgets like menus, paged lists, some entity editor, etc.. , they all
naturally fit into the classes.

Third  place where it is a good isea to use classes is to access db objects.
Generally wrapping a something from the db into the object can be usefull in
order to siplify migration to another database, to have good loging,
replication etc.

rush
--
http://www.templatetamer.org/




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