473,395 Members | 1,931 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Modular PHP

Hey guys

I am about to write some back end software for my business. I want a system
that I can create invoices, clients etc... I can do this no problem. However
I want to write it in modules so its extendable in the future.

Like someone else can write a module for it and it can plug stright into my
system. I can't figure out a good way to do this in php. I was thinking of
hooks or something, but PHP does not support this.

Does PHP 5 have anything like this? Or does anyone else know a good way to
do it in PHP 4?

Any info appreciated.

Thanks
Jul 17 '05 #1
14 3743
Hayden Kirk a pensé très fort :
Hey guys

I am about to write some back end software for my business. I want a system
that I can create invoices, clients etc... I can do this no problem. However
I want to write it in modules so its extendable in the future.

Like someone else can write a module for it and it can plug stright into my
system. I can't figure out a good way to do this in php. I was thinking of
hooks or something, but PHP does not support this.

Does PHP 5 have anything like this? Or does anyone else know a good way to
do it in PHP 4?

Any info appreciated.

Thanks


You have several ways to do it, the worst way to do it is simply pass
the
code given to an eval(), but it is not a really good thing IMHO.

The best "PHP" way is to implement an objet loader, so you write your
modules
in a class, and your core application loads it with a $object = new
"ModuleName";
which of course can be replaced by a $object = new $Module_Name;

Another "hard" way would be to code (in C) you modules, according to
ZEND and PHP API,
(see http://www.php.net/manual/en/zend.php and
http://www.php.net/manual/en/api.php), so
you could load it with dl()

Good luck.

--
Julien CROUZET aka c2c
julien_|at|_synten.com

Jul 17 '05 #2
"Hayden Kirk" <sp**@spam.com> wrote in message
news:xS********************@news02.tsnz.net...
Hey guys

I am about to write some back end software for my business. I want a system that I can create invoices, clients etc... I can do this no problem. However I want to write it in modules so its extendable in the future.

Like someone else can write a module for it and it can plug stright into my system. I can't figure out a good way to do this in php. I was thinking of
hooks or something, but PHP does not support this.

Does PHP 5 have anything like this? Or does anyone else know a good way to
do it in PHP 4?

Any info appreciated.

Thanks


Well, you first need to outline what kind of things you will want to have
available as a plug in, and define a way of comunicating with them, sorta
like an API. you cant just have people writing code and expect it to
intergrate. An example would be photoshop, you can write a plug in for
images, but you can not write a plugin to change the way the photoshop
interface works.
So, you must decide what you want others to be able to controll, and define
a way to pass data back and forth. Also, you must define how you want that
module to be active, 2 aproaches:

Aproach 1:
have an ini.php file and have a lines that read such as this:
$modules['style'] = "genaric.php";

And allow people to edit the ini file and change the module 'generic.php'
Aproach 2:
set up a loader function, that will include all files in a directory

This way, one only has to replace the style file in that directory.
Now this is to replace functionality to a site, if you want to add
functionality you will need to decide how you want to add items, for
example, tools, addition pages etc.. This basicaly meens you need to do a
good outline of what you want to acomplish first, then go from there.

--
Mike Bradley
http://www.gzentools.com -- free online php tools
Jul 17 '05 #3
What im finding hard is the API

Im use to Windows C++ Programming with API, this is much harded to do in
PHP. How can I catch an event in PHP. Is there a way, like, if someone
executes a function a module can pick that up and see what is happening,
like in Windows?

I have a basic outline of how I want to do this, but ill save you the time.
I just can't get my head around making modules interact with my system that
im going to design. I hope you get what I mean?

Say if I print an invoice, I have an invoice module that someone else has
created, can this pickup on that event?

Thanks in advanced.
"CountScubula" <me@scantek.hotmail.com> wrote in message
news:H1*******************@newssvr29.news.prodigy. com...
"Hayden Kirk" <sp**@spam.com> wrote in message
news:xS********************@news02.tsnz.net...
Hey guys

I am about to write some back end software for my business. I want a system
that I can create invoices, clients etc... I can do this no problem.

However
I want to write it in modules so its extendable in the future.

Like someone else can write a module for it and it can plug stright into

my
system. I can't figure out a good way to do this in php. I was thinking of hooks or something, but PHP does not support this.

Does PHP 5 have anything like this? Or does anyone else know a good way to do it in PHP 4?

Any info appreciated.

Thanks


Well, you first need to outline what kind of things you will want to have
available as a plug in, and define a way of comunicating with them, sorta
like an API. you cant just have people writing code and expect it to
intergrate. An example would be photoshop, you can write a plug in for
images, but you can not write a plugin to change the way the photoshop
interface works.
So, you must decide what you want others to be able to controll, and

define a way to pass data back and forth. Also, you must define how you want that
module to be active, 2 aproaches:

Aproach 1:
have an ini.php file and have a lines that read such as this:
$modules['style'] = "genaric.php";

And allow people to edit the ini file and change the module 'generic.php'
Aproach 2:
set up a loader function, that will include all files in a directory

This way, one only has to replace the style file in that directory.
Now this is to replace functionality to a site, if you want to add
functionality you will need to decide how you want to add items, for
example, tools, addition pages etc.. This basicaly meens you need to do a
good outline of what you want to acomplish first, then go from there.

--
Mike Bradley
http://www.gzentools.com -- free online php tools

Jul 17 '05 #4
I suggest you read one of the many books that has been written about PHP and
how to write dynamic web sites. This is really too big a topic to answer in
a newsgroup posting. Just visit amazon.com and type in "PHP" in the search
box and you will astounded by the number and variety of books available.

One thing you have to be aware of when you are attempting to learn a
different language (as opposed to learning your first language) is that IT
WILL BE DIFFERENT from what you already know, so don't expect them to be the
same, to have the same functions, to have the same structure, the same
whatever.

Tony Marston
http://www.tonymarston.net
"Hayden Kirk" <sp**@spam.com> wrote in message
news:cG********************@news02.tsnz.net...
What im finding hard is the API

Im use to Windows C++ Programming with API, this is much harded to do in
PHP. How can I catch an event in PHP. Is there a way, like, if someone
executes a function a module can pick that up and see what is happening,
like in Windows?

I have a basic outline of how I want to do this, but ill save you the time. I just can't get my head around making modules interact with my system that im going to design. I hope you get what I mean?

Say if I print an invoice, I have an invoice module that someone else has
created, can this pickup on that event?

Thanks in advanced.
"CountScubula" <me@scantek.hotmail.com> wrote in message
news:H1*******************@newssvr29.news.prodigy. com...
"Hayden Kirk" <sp**@spam.com> wrote in message
news:xS********************@news02.tsnz.net...
Hey guys

I am about to write some back end software for my business. I want a system
that I can create invoices, clients etc... I can do this no problem.

However
I want to write it in modules so its extendable in the future.

Like someone else can write a module for it and it can plug stright
into
my
system. I can't figure out a good way to do this in php. I was
thinking of hooks or something, but PHP does not support this.

Does PHP 5 have anything like this? Or does anyone else know a good
way
to do it in PHP 4?

Any info appreciated.

Thanks


Well, you first need to outline what kind of things you will want to

have available as a plug in, and define a way of comunicating with them, sorta like an API. you cant just have people writing code and expect it to
intergrate. An example would be photoshop, you can write a plug in for
images, but you can not write a plugin to change the way the photoshop
interface works.
So, you must decide what you want others to be able to controll, and

define
a way to pass data back and forth. Also, you must define how you want that module to be active, 2 aproaches:

Aproach 1:
have an ini.php file and have a lines that read such as this:
$modules['style'] = "genaric.php";

And allow people to edit the ini file and change the module 'generic.php'

Aproach 2:
set up a loader function, that will include all files in a directory

This way, one only has to replace the style file in that directory.
Now this is to replace functionality to a site, if you want to add
functionality you will need to decide how you want to add items, for
example, tools, addition pages etc.. This basicaly meens you need to do a good outline of what you want to acomplish first, then go from there.

--
Mike Bradley
http://www.gzentools.com -- free online php tools


Jul 17 '05 #5
"Hayden Kirk" <sp**@spam.com> wrote in message
news:cG********************@news02.tsnz.net...
What im finding hard is the API

Im use to Windows C++ Programming with API, this is much harded to do in
PHP. How can I catch an event in PHP. Is there a way, like, if someone
executes a function a module can pick that up and see what is happening,
like in Windows?

I have a basic outline of how I want to do this, but ill save you the time. I just can't get my head around making modules interact with my system that im going to design. I hope you get what I mean?

Say if I print an invoice, I have an invoice module that someone else has
created, can this pickup on that event?

Thanks in advanced.

When I say API, I mean you should create your own. Lets take your invoice
routine for example.

May ways to do this, one is just pass all data via an array, simple example:

$strArray['name'] = "john Doe";
$strArray['skus']['1']['prod_id'] = "01";
$strArray['skus']['1']['desc'] = "Some Widget";
$strArray['skus']['1']['price'] = "1995";
then call the function doCreateInvoice($strArray)
this function will exist in solely in a php file, that can be replaced my
another programmer.

Another way to do it, is to have your invoice routine call documented
functions, and keep those functions in a seperate file, that can be replaced
by the user.

You have to define how the iunteraction is going to work, there are no hooks
as in Visual C++

Create your own API, document it, and have those functions in thier own .php
files, and let users replace those files with thier own.

Or, look for the existance of a file, say plugin.php if its thier, include
it, and look for predifend functions, if there, call them, this is work
around for hooking functions.

--
Mike Bradley
http://www.gzentools.com -- free online php tools
Jul 17 '05 #6
Alternatively you could do it the XP way, i mean:
- think of a metaphor of what the system should be like
- write down some requirements,
- Write unit tests first
- Build the simpelest thing that could possibly work
- extend to meet more requirements
- Refactor whenever you find youself writing the same or similar code a
second time

With XP there is no difference between development and maintenance, so
when later you find new requirements, just go on extending and
refactoring. So far it's all on http://www.extremeprogramming.org/
and http://www.xprogramming.com/

If you want plugins, after some time you can do meta-xp: See if there
is a pattern in your extensions and refactorings. Analyze it, design a
plugin api for it. Make it the simpelest plugin api that could possibly
work. Write plugin api tests, refactor to make the new tests run (and
the old ones too, of course). Extend and refactor as new patterns emerge.

Of course all this does not tell you how to design & code. But all
design really comes down to getting rid of repeated code. You could just
start doing it and learn as you go. (But reading some books and articles
will probably pay of soon enough, so you can do that too)

Greetings,

Henk Verhoeven, MetaClass.


CountScubula wrote:
"Hayden Kirk" <sp**@spam.com> wrote in message
news:xS********************@news02.tsnz.net...
Hey guys

I am about to write some back end software for my business. I want a


system
that I can create invoices, clients etc... I can do this no problem.


However
I want to write it in modules so its extendable in the future.

Like someone else can write a module for it and it can plug stright into


my
system. I can't figure out a good way to do this in php. I was thinking of
hooks or something, but PHP does not support this.

Does PHP 5 have anything like this? Or does anyone else know a good way to
do it in PHP 4?

Any info appreciated.

Thanks

Well, you first need to outline what kind of things you will want to have
available as a plug in, and define a way of comunicating with them, sorta
like an API. you cant just have people writing code and expect it to
intergrate. An example would be photoshop, you can write a plug in for
images, but you can not write a plugin to change the way the photoshop
interface works.
So, you must decide what you want others to be able to controll, and define
a way to pass data back and forth. Also, you must define how you want that
module to be active, 2 aproaches:

Aproach 1:
have an ini.php file and have a lines that read such as this:
$modules['style'] = "genaric.php";

And allow people to edit the ini file and change the module 'generic.php'
Aproach 2:
set up a loader function, that will include all files in a directory

This way, one only has to replace the style file in that directory.
Now this is to replace functionality to a site, if you want to add
functionality you will need to decide how you want to add items, for
example, tools, addition pages etc.. This basicaly meens you need to do a
good outline of what you want to acomplish first, then go from there.

--
Mike Bradley
http://www.gzentools.com -- free online php tools


Jul 17 '05 #7
Uzytkownik "Hayden Kirk" <sp**@spam.com> napisal w wiadomosci
news:cG********************@news02.tsnz.net...
Im use to Windows C++ Programming with API, this is much harded to do in
PHP. How can I catch an event in PHP. Is there a way, like, if someone
executes a function a module can pick that up and see what is happening,
like in Windows?
Huh? I didn't know you can do that in Win32. You mean using SendMessage() or
SetEvent()? It's been quite a while since I last looked at MFC.
I have a basic outline of how I want to do this, but ill save you the time. I just can't get my head around making modules interact with my system that im going to design. I hope you get what I mean?
If you can't get your head around it, then maybe it's the wrong solution.
Frankly speaking, it usually a bad sign when a programmer ponders his time
away on a particular solution instead of thinking about how to solve the
problem at hand.
Say if I print an invoice, I have an invoice module that someone else has
created, can this pickup on that event?


You don't need that kind of decoupling in web programming. Don't makes
things more complicate than it needs to be. PHP programming is fairly simple
in general. At the end of the day, all you're doing is printing out some
HTML code. If want to print an invoice, just build an HTML template of the
invoice and stick in the numbers.

When I build a site I like to take the outside-in approach: start with a
visual mock-up, then fill in page by page the necessary functionalities,
writing lower level functions as the need arises. The inside-out approach
would start from some kind of a foundation and you work your way towards the
final result. This, I've found, usually doesn't work.
Jul 17 '05 #8
Hayden Kirk wrote:
What im finding hard is the API

Im use to Windows C++ Programming with API, this is much harded to do in
PHP. How can I catch an event in PHP. Is there a way, like, if someone
executes a function a module can pick that up and see what is happening,
like in Windows?

I have a basic outline of how I want to do this, but ill save you the time.
I just can't get my head around making modules interact with my system that
im going to design. I hope you get what I mean?

Say if I print an invoice, I have an invoice module that someone else has
created, can this pickup on that event?

Thanks in advanced.


I'm doing some work on an opensource PHP framework which supports the
modularity you are speaking of. I haven't release the event-handling
component yet but if you are still interested, send me an email and I
will send you the source.

Everything is done with XML, so you will want to be familiar with XSLT
to use the framework (I detest proprietary templating systems).

Basically it listens for cirtain post(or other hash) variables that you
declare (these are the events) in an XML file which looks like so.

<?xml version="1.0" encoding="UTF-8"?>
<xao:RequestMap
xao:xmlns="http://xao-php.sourceforge.net/schema/xao_1-0.xsd">

<xao:RequestSet ReqName="GameTasks">
<xao:Request ReqValue="rounds" Handler="Handle_GT_rounds" />
<xao:Request ReqValue="edit" Handler="Handle_GT_edit" />
<xao:Request ReqValue="close" Handler="Handle_GT_close" />
<xao:Request ReqValue="players" Handler="Handle_GT_players" />
<xao:Request ReqValue="docs" Handler="Handle_GT_docs" />
<xao:Request ReqValue="add" Handler="Handle_GT_add" />
</xao:RequestSet>

</xao:RequestMap>

In the above example you might be delacring events for the variable
$_REQUEST["GameTasks"] but if you like, you could do

$arrRequests = $_POST;
or $arrRequests = $_REQUEST;
or $arrRequests = $_COOKIE;
or $arrRequests = $_POST["arrEvents"];
(where <select name="arrEvents[]" />)

It really doesn't matter where you get the hash from. The framework
checks the value of the "GameTasks" item (in this case) and then calls
the function itentified by the Handler attribute in the above XML,
passing the $arrRequests to it.

This is how it is called.
$objReqMap = new RequestMap("RequestMap.xml");
$objReqMap->ExecuteRequests(
new HandleGameEdit(...),
$arrRequests
);
In this case, the module would be the HandleGameEdit class which
contains methods named after those in the Handler attributes. Here's
what a module make look like...

class HandleGameEdit extends HandlerBase {

function HandleGameEdit(&$objHost) {
$this->HandlerBase($objHost);
}

function Handle_GE_update($arrReq) {
$this->objHost->objLgDb->UpdateGame(
$arrReq["game_id"],
$arrReq["title"],
$arrReq["start_ts"],
$arrReq["end_ts"],
$arrReq["summary"]
);
}
}

You could call ExecuteRequests multiple times, if you want to, with
different modules (object instances) which might implement an arbitary
selection of the declared event-handlers.

http://xao-php.sourceforge.net/
when it is finally released.

I admit that some poeple may find this complex, but then you wouldn't be
using the RequestMap feature unless you were writing a complex app!

It's also worth noting that all the XML parsing for the request map
config file is only done once, it then creates a cache file containing a
serialize()d version of the (internal) array generated by the request
map file. So performance is quite good.
To update the request map config file with new modules, simply edit it,
then delete the cache file. (I could probably do this automatically by
checking the timestamp but that's overhead for every single hit - I'm
still considdering it).
email me for the current source if you're keen.

Jul 17 '05 #9
Hayden Kirk wrote:

You might also want to check out Apache Avalon

http://avalon.apache.org

This is worth a read for ANY programmer.
Jul 17 '05 #10
Terence wrote:

http://avalon.apache.org
This is worth a read for ANY programmer.


Good link! Thanks.

bblackmoor
2004-03-22
Jul 17 '05 #11
Brandon Blackmoor wrote:
Terence wrote:

http://avalon.apache.org
This is worth a read for ANY programmer.

Good link! Thanks.

bblackmoor
2004-03-22


You're welcome. I discovered it while doing some research into the
cocoon platform which uses avalon heavily.

Man, I gotta say, Cocoon is just nuts!!!
I won't be writting any new apps in PHP for a while.
(sac relig)

Apparently there is a PHP5 port called Papoon but I don't know how the
hell they will keep up. Cocoon is so modular in so many dimensions,
people are bunging new functionalities on all the time. It will take a
very very long time for popoon to build a codebase and community like
cocoon. Then there's cocoon's integration to EJBs.

Cocoon has a large learning curve though. PHP is probably better for
small apps than cocoon but I haven't seen anything in the way of
frameworks anywhere else which comes close. Forget Struts. I've been up
till 4:30am every morning this week (since last Saturday) reading up on
it. The sitemap, generaters, aggregators, XSPs and logic sheets -- fully
nuts!
How about this for a cataclysmic shift in web application development????
http://cocoon.apache.org/2.1/userdocs/flow/index.html
(use the menu on the left to navigate to subsections. at least read the
"continuations" page or you won't get the gist).
more info.
http://wiki.cocoondev.org/Wiki.jsp?page=WhatIsFlow

ASP.net is famous and heavily promoted for it's event driven and
"control" based architecture. Cocoon and ControlFlow makes ASP.net look
like a wet piece of toilet paper.

I'm looking forward to building some XUL apps with it. "There is only
Cocoon"
Jul 17 '05 #12
If you want a PHP development infrastructure that is based around the 3 tier
architecture (separate layers for presentation, business logic and data
access) plus a variation of the MVC (Model-View-Controller) design pattern
then take a look at
http://www.tonymarston.co.uk/php-mys...structure.html

In this infrastructure I also generate all HTML from XML and XSL by making
use of a library of reusable stylesheets and templates.

I have read articles on Cocoon, but I find that it is typical of the Java
world - over-complicated and over-engineered.

--
Tony Marston

http://www.tonymarston.net

"Terence" <tk******@fastmail.fm> wrote in message news:4061435a$1@herald...
Brandon Blackmoor wrote:
Terence wrote:

http://avalon.apache.org
This is worth a read for ANY programmer.

Good link! Thanks.

bblackmoor
2004-03-22


You're welcome. I discovered it while doing some research into the
cocoon platform which uses avalon heavily.

Man, I gotta say, Cocoon is just nuts!!!
I won't be writting any new apps in PHP for a while.
(sac relig)

Apparently there is a PHP5 port called Papoon but I don't know how the
hell they will keep up. Cocoon is so modular in so many dimensions,
people are bunging new functionalities on all the time. It will take a
very very long time for popoon to build a codebase and community like
cocoon. Then there's cocoon's integration to EJBs.

Cocoon has a large learning curve though. PHP is probably better for
small apps than cocoon but I haven't seen anything in the way of
frameworks anywhere else which comes close. Forget Struts. I've been up
till 4:30am every morning this week (since last Saturday) reading up on
it. The sitemap, generaters, aggregators, XSPs and logic sheets -- fully
nuts!
How about this for a cataclysmic shift in web application development????
http://cocoon.apache.org/2.1/userdocs/flow/index.html
(use the menu on the left to navigate to subsections. at least read the
"continuations" page or you won't get the gist).
more info.
http://wiki.cocoondev.org/Wiki.jsp?page=WhatIsFlow

ASP.net is famous and heavily promoted for it's event driven and
"control" based architecture. Cocoon and ControlFlow makes ASP.net look
like a wet piece of toilet paper.

I'm looking forward to building some XUL apps with it. "There is only
Cocoon"

Jul 17 '05 #13
Tony Marston wrote:
If you want a PHP development infrastructure that is based around the 3 tier
architecture (separate layers for presentation, business logic and data
access) plus a variation of the MVC (Model-View-Controller) design pattern
then take a look at
http://www.tonymarston.co.uk/php-mys...structure.html

I had a read through this. It is very good. On the first pass, it looks
a bit prescriptive but I can't say that I understand it fully without
having actually used it to write a real-life application.
In this infrastructure I also generate all HTML from XML and XSL by making
use of a library of reusable stylesheets and templates.

hooray! someone who doesn't believe in using proprietary templating systems.

I've managed to accrue some XSL widgets but I haven't had the time to
organise them into a propper library yet.
I have read articles on Cocoon, but I find that it is typical of the Java
world - over-complicated and over-engineered.


I have to say, when I first looked at cocoon, I was quite put-off by
having to learn the site map and I thought it was over-engeneered. But
since I actually invested some time into learning it, I have to say,
it's a joy to be able to produce results so quickly and easily. My
theory is that complexity is OK -- AS LONG AS IT IS JUSTIFIED.

In fact, you don't even need to have a firm grasp of Java to be able to
use it. Indeed there are many cases where no code is needed (other than
XSLT). You just declare stuff in the sitemap and everything just works.
As a newbie, I have immediately enjoyed the benefits of:

1) taking FULL advantage of the URL request space to declare patterns
for dealing with a scenario group. ie.
<map:match pattern="*.xml" type="wildcard">
<map:generate src="xsp/{1}.xsp" type="serverpages"/>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="(logon|basicSearchForm)" type="regexp">
<map:aggregate element="layout">
<map:part src="cocoon:/getMenu.xml"/>
<map:part src="content/static/{1}.xml"/>
</map:aggregate>
<!-- one global template which includes display logic moduels
for difference business scenarios - plus widgets and other
common things like navigation -->
<map:transform src="stylesheets/global.xsl"/>
<map:serialize type="html"/>
</map:match>
<map:match pattern="*">
<map:aggregate element="layout">
<map:part src="cocoon:/getMenu.xml"/>
<map:part src="cocoon:/{1}.xml"/>
</map:aggregate>
<map:transform src="stylesheets/global.xsl"/>
<map:serialize/>
</map:match>
And guess what! They have a <map:generate type="PHP"/>
for more information, see
http://cocoon.apache.org/2.1/userdoc.../matchers.html

2) When I'm not using PHP to generate my source content, I have the ease
and simplicity of a templating language which is much like PHP. In fact,
you can choose which language to use including Java, Python (Jython).

3) Because XSP is 100% XML compliant (which can't be said for PHP), I
can create XSL templates which produce XSP based on tags I invented (or,
by leveraging XPath, even complex scenarous of other tags). These are
know as logicsheets (as opposed to "style"sheets).
http://cocoon.apache.org/2.1/userdoc...ogicsheet.html

4) I can ignore XSPs alltogether if I don't like template based
scripting and I have a penchant for 100% Java OO applications. I can
just write my own genertors or actions. Doing so is NOT an "advanced"
technique, but just basic standard programming. Same goes for
transformers and serilize.

5) If I don't like using selectors in my sitemap (which IMHO are a bit
clumsy), I can use a "propper" programming paradigm to code my
controller. I can just pretend HTTP is a connection based protocol and
issue commands such as cocoon.sendPageAndWait("myPage.html",objContext);
http://cocoon.apache.org/2.1/userdocs/flow/tutor.html
This, I have not seen anywhere in web development before.

Yes, Cocoon is complex. Yes, Cocoon has a big learning curve. Yes, it is
worth the effort to learn. With great power comes great responsibility.
No, there is not much effort in building apps -- even tiny ones. and No,
you don't need to have Java experience (but it helps).

The main reason why I am embracing Cocoon, it because of the way it was
written -- using Avalon's Component Oriented Programming.
http://avalon.apache.org
This means it is oh so simple for me to extend the framework with my own
Java code -- and there are extension points a-plenty in cocoon :)
Cocoon is more of an implementation of a "publishing" design pattern
which is concept oriented rather than implementation oriented. It
provides a logical structure for massive expansion to be handled in an
orderly fashion.

Hence all the high-level functionality that comes bundled with it (for
instance, XMLDB generators and logic sheets).
Jul 17 '05 #14
Just what I was after,

Thanks alot :)

- Hayden

"Tony Marston" <to**@NOSPAM.demon.co.uk> wrote in message
news:c3******************@news.demon.co.uk...
If you want a PHP development infrastructure that is based around the 3 tier architecture (separate layers for presentation, business logic and data
access) plus a variation of the MVC (Model-View-Controller) design pattern
then take a look at
http://www.tonymarston.co.uk/php-mys...structure.html

In this infrastructure I also generate all HTML from XML and XSL by making
use of a library of reusable stylesheets and templates.

I have read articles on Cocoon, but I find that it is typical of the Java
world - over-complicated and over-engineered.

--
Tony Marston

http://www.tonymarston.net

"Terence" <tk******@fastmail.fm> wrote in message

news:4061435a$1@herald...
Brandon Blackmoor wrote:
Terence wrote:

>
> http://avalon.apache.org
> This is worth a read for ANY programmer.
Good link! Thanks.

bblackmoor
2004-03-22


You're welcome. I discovered it while doing some research into the
cocoon platform which uses avalon heavily.

Man, I gotta say, Cocoon is just nuts!!!
I won't be writting any new apps in PHP for a while.
(sac relig)

Apparently there is a PHP5 port called Papoon but I don't know how the
hell they will keep up. Cocoon is so modular in so many dimensions,
people are bunging new functionalities on all the time. It will take a
very very long time for popoon to build a codebase and community like
cocoon. Then there's cocoon's integration to EJBs.

Cocoon has a large learning curve though. PHP is probably better for
small apps than cocoon but I haven't seen anything in the way of
frameworks anywhere else which comes close. Forget Struts. I've been up
till 4:30am every morning this week (since last Saturday) reading up on
it. The sitemap, generaters, aggregators, XSPs and logic sheets -- fully
nuts!
How about this for a cataclysmic shift in web application development???? http://cocoon.apache.org/2.1/userdocs/flow/index.html
(use the menu on the left to navigate to subsections. at least read the
"continuations" page or you won't get the gist).
more info.
http://wiki.cocoondev.org/Wiki.jsp?page=WhatIsFlow

ASP.net is famous and heavily promoted for it's event driven and
"control" based architecture. Cocoon and ControlFlow makes ASP.net look
like a wet piece of toilet paper.

I'm looking forward to building some XUL apps with it. "There is only
Cocoon"


Jul 17 '05 #15

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

Similar topics

2
by: Dan Stromberg | last post by:
Is there already a pure python module that can do modular-arithmetic unit conversions, like converting a huge number of seconds into months, weeks... or a bandwidth measure into megabits/s or...
18
by: Zero | last post by:
Hi, I am calculating an integer to the pwer of a large integer, e.g. 2^5000. It turns out that the result I always get is zero. I am sure that the result is too large to store in such type...
4
by: Nick Goloborodko | last post by:
Hi, I'm in the process of conceptualizing a new ASP.NET application. I'm a relative newbie in ASP.NET / .NET in general, so any comments will be greatly appreciated. Basically i need to make...
12
by: Don Huan | last post by:
Hi my job is to migrate our WinForms application to ASP.NET. This app was build very modular so every peace of code can be replaced by another "modul". There are 1 VS-solution with about 60...
26
by: I_AM_DON_AND_YOU? | last post by:
This is the scenario: I have a VB.Net project comprising of a few Forms. On Form1 I have more than 20 buttons. There is a very lenghty code written in click event of each and every button. Right...
4
by: bbcrock | last post by:
I have some modular code that is written for display purposes. It contains inline CSS code. I originally thought about moving all the inline code to a css file for use throughout the site- one...
20
by: Tuvas | last post by:
I have made and recently posted a libary I made to do Modular Arithmetic and Prime numbers on my website at http://www.geocities.com/brp13/Python/index.html . I am currently in a crypotology...
2
by: Tyno Gendo | last post by:
I'm writing a test "modular site". So far I have created an App class, a Module Manager class and a couple of test modules. The Manager looks in a directory called 'modules' and then for every...
2
by: Canice | last post by:
I'm working on a web application where 90% of it is common 'product' code an the other 10% is customer specific. I want some method of separating the customer specific presentation, business and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
Oralloy
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,...
0
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...

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.