By Peter Bell

Page as a Fundamental Metaphor in Web Applications

I find that for the vast majority of applications I build, the idea of distinct HTML pages (the idea as opposed to actually having them) is incredibly useful. Even for “application” style projects it is often useful to be able to have help and FAQ and contact pages even if the vast majority of the functionality is more event driven.

I also find the ability to describe a site as a number of pages within a hierarchy with the top level pages being different sections as a very useful way to allow business users to describe common requirements for secondary content areas (“in the about us section I’d like to display a list of testimonials in the sidebar but it the catalog section I’d like to display cross sells instead"). There are definitely plenty of ways of implementing this using a simple event driven architecture (if you think about it a unique page file path can be seen as an event name so you can implement a pseudo page controller easily in MG or M2 with a little URL rewriting if you choose to), but I find the richness and usefulness of the metaphor to be great enough to justify building the concept of pages into LightBase.

It also allows for easy reuse of functionality as a non-technical user can use an admin screen to add a page to a site, select from a list of features, and parameterize the feature easily so a non technical user could add new discussion group or commerce pages to an existing site without programmer support.

I just wanted to mention this as future articles will treat the page “scope” as a fundamental element of a request. And to clarify, the page scope is the set of parameters that a user associated to a given page URL when creating the site – not variables within a given page request which is the request scope and (in LightBase) is contained within the RequestObject.

Page scope includes the default object, action and modifier (which between them fully describe an event for the primary content area) as well as the page name, section name and any default properties (such as the default category ID or number of records per page).

Related Blog Entries

Comments
I think a page is a good construct but it can also be destructive if it become too fundamental to a framework. Non-page elements end up jumping thru hoops to get the level of access pages get and you end up with kludgy workarounds to force various formats into the page paradigm.

Having it, as you say, available as a solution will address the majority of website basics, allowing for other components to address the remainder.
# Posted By wioota | 12/12/06 5:28 AM
And one trick is to allow multiple content areas with independent controllers so the "page" metaphor is available throughout a request cycle but hasn't have to be used as the driver of what functionality to be put in the right bar (although it CAN be used that way).
# Posted By Peter Bell | 12/12/06 7:31 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.005.