hi ...
i wouldn't construct it that way ... a class is a kind of 'prototype' for an object so let me speak in javascript terms and demonstrate it with some easy code:
1. we create a class:
- // constructor
-
function PAGE() {
-
this.add_events();
-
}
-
-
// define a method to add some events to the page
-
PAGE.prototype.add_events = function() {
-
}
now we construct the webpage
- <html>
-
<head>
-
<script type="text/javascript" src="page_class.js"/>
-
</head>
-
<body onload="var page = new PAGE;">
-
</body>
-
</html>
as you can see in the onload we create an instance of the PAGE-Class and the page is not a class but an instance or call it an object if you want to see it that way
classes in a webproject could be a PAGE-class, a TREE_MENU-class, an AJAX_REQUEST-class etc. ... ok? and in your pages you use them to create instances from them that has their own data, their own methods ... i hope it would help you ...
kind regards