revjim.net Rotating Header Image

pseudo-code: web application framework

I've been going over some more of my ideas for this web application framework I'm attempting to design. Based on how I see the system working, I've developed some pseudo-code. There are some huge chunks of the code missing, like exactly what it is that processes the incomming HTTP request, and exactly what happens when the core.* functions are called (aside from what obviously happens by looking at the code) but it's a start. Comments and feedback are greatly appreciated.

I've never programmed anything quite like this before. So, I'm looking at this from the perspective of a programmer who might be willing to use it as a toolkit to develop future applications. I'm attempting to make it easy on that person, and yet still force programmers/developers to adhere to certain rules to assure continuity, interoperability, and ease of use for the end user.


time module class:

function gettime($args) {

	return time();
}

function dopage($args) {

	$tpl = new Template();
	$tpl->assign("time",time.gettime());
	$tpl->display($args["template"]);

}

core.register_tag("time.gettime","time.gettime","");
core.register_page("time.gettime","time.dopage",array("template"));

page display class:

function showpage($args) {

	$tpl = new Template();
	$tpl->display($args["template"]);

}

core.register_page("page.showpage","page.showpage",array("template"));

URL association:

node      method	 parameters
time	  time.gettime   template=>timefrompage
showtime  page.showpage  template=>timefromtag

timefrompage template file:

Hello. The time is {$time}.

timefromtag template file:

Hello. The time is {time.gettime()}.
Google Buzz
blog comments powered by Disqus