Library tutorials & articles
Eocene: An OO Web Development Framework
- Introduction
- The Eocene Framework
- Front Controller Design Pattern
- Model-View-Controller (MVC) Architecture
The Eocene Framework
All requests to an Eocene-based system are routed to one or more receivers (php pages that contain “freestanding” codes to activate the framework). Though most applications will use only one receiver, a complex application that receives a large number of different commands can use more than one receiver to divide the application into smaller sub-applications. Each receiver is associated with an xml-based configuration file (config file). For each command (e.g. clicking a link or submitting a form), the config file provides a command class and associated html pages (or templates). A receiver file can have any name (with a .php extension), thereby, providing the flexibility to use more than one receiver with different names and all residing in the same folder.
The receiver creates a front controller (FrontController) object by passing
the full path of its config file. The front controller is the only global variable
that is available in any php page in the system. After instantiating the front
controller, the receiver calls the execute() method of FrontController and then
it obtains the response for the request by calling the content property of the
response object. The response is echoed to the browser.
Internally, the front controller instantiates a command class and dispatches
the request to the command object for processing. You should write the command
class, deriving it from the BaseCommand class or a class that has BaseCommand
in its superclass hierarchy. You should also overwrite the execute method in
the command class and provide application specific logic. The BaseCommand class
provides template processing capabilities, shielding developers from manipulating
templates using codes. You only need to call methods in BaseCommand to process
your templates. You have, however, access to the TemplateEngine object in BaseCommand
if your requirements are not met by available methods in the BaseCommand
class.
Templates are html pages with tokens for generating dynamic contents. Tokens
are available for variable substitutions, if-then blocks, for-each loops, includes,
and plugs. Template tokens are very simple and no attempt is made to develop
“yet another” templating language. Variable substitutions can be made for simple
variables or array variables. Block tokens evaluate an if-then condition. There
is no if-then-else token. All if-then-else constructs should be broken into
simple block tokens. Loop tokens are used to simulate for-each loops. Include
tokens are used to include other templates that may, in turn, contain all the
template tokens described earlier.
Plug tokens are used for modular development or for generating complex dynamic
pages that cannot be generated using other tokens. A plug token in a template
is specified using a command attribute. Each command is associated with
a command class derived, directly or indirectly, from the BaseCommand class.
The command class for a plug returns some contents (strings) that are substituted in the template at the plug token location. Because a command class for a plug has BaseCommand in its superclass hierarchy, it can use other templates which, in turn, can use more plugs, includes, and other tokens. The possibilities are endless. Plugs provide flexibility to extend a template by codes that are separate from the template and keep template tokens simple, flexible, and powerful.
Related articles
Related discussion
-
Create this kind of website
by maidentv (1 replies)
-
PHP London July Meetup
by webdeveloperit (1 replies)
-
Binary Studio | software development outsourcing Ukraine
by shane124 (4 replies)
-
SOFTWARE PHP WORK
by synctel (0 replies)
-
London PHP / MySQL Superstar needed!
by gatewaytechnolabs (1 replies)
Related podcasts
-
EarthClassMail.com - Moving from LAMP to .NET 3.5
Scott chats with Matt Davis, architect at EarthClassMail.com, about their move from a LAMP stack (Linux/Apache/mysql/PHP) to .NET 3.5. What's working, what's not, and what kinds of issues are they running into as their architect their solution.
Events coming up
-
Dec
3
The Auckland PHP December meetup
Auckland, New Zealand
Topic: Magento E-Commerce platform Speaker: Robert Popovic, LERO9, Robert is the Technical Director and co-founder of LERO9. Robert attended the Electrotechnical Faculty at The University of Belgrade where he graduated with a Masters in Computer Science and Information Technology. Robert has worked exclusively in the field of web and software development throughout his career.
I'm interested to source of eocene framework but ...
the link at Eocene Web site in "An OO Web Development Framework - Introduction" page, linked site porn! Phishing action in progress or bad link?
thanks
I am geting the following error message after I have downloaded and unziped and configured as directed. I am using MS IIS as my web server
ERRORS:
Error: Invalid command: galleryApplication. No information found in commands section of config file
I unziped the eoceneGalleryApp.zip into the C:\Inetpub\wwwroot and it created the galleryApplication folder and I change the paths as directed to reflect the path where I unziped dowmloaded files.
Why am I getting this error or don't it work with IIS web server?
To get the source code, you need to download the framework from www.eocene.net
erm its here:
http://www.developerfusion.com/show/3224/1/redir/
The source code is not available at this url. The zip-file contains only the gif-images of the architecture.
So ... is the source code available anyway?
http://www.developerfusion.com/show/3224/1/redir/
Those are just images.. no source code or i'm unable to get ?
I read the article then downloaded the software. It is easy to use and I'm working with it now to improve a site.
Many thanks.
This thread is for discussions of Eocene: An OO Web Development Framework.