Framework design
Posted: Tue Oct 28, 2008 7:56 am
Hi, I'm building a framework similar to ASP.NET framework but for PHP + Integrated module/security management + Integrated Session management and more. So far, everything is working fine but i was wondering if the following was possible and if it would be recommended.
In ASP.NET you call the ASPX files and when it loads IIS attaches the ASPX rendering engine to it by reading the content of the page at the top such as the class name, class file etc. I'd like to make that same concept so for example:
1. All my pages would be PHPX extensions
2. I'd need apache to be able to serve these (Using HTAccess that could be possible if i remember right)
3. I'd need apache to print a bit of generic code at the top of the PHPX extensions that will contain a framework initialization
3.1. I'd need to setup an include path from that initialization code so that all includes don't need to be path specific, can that be done from an HTAccess file?
Can all this be done and what do you think of it? What are the flaws? i see a load of dependencies such as LAMP only architecture, specific apache modules, etc.
What are the good sides? I also see the good side of it such as real template and code seperation (and don't talk to me about those templating engines out there such as smarty) with encapsulation of code and access to control centric templates.
The door is open, hit on me...
In ASP.NET you call the ASPX files and when it loads IIS attaches the ASPX rendering engine to it by reading the content of the page at the top such as the class name, class file etc. I'd like to make that same concept so for example:
1. All my pages would be PHPX extensions
2. I'd need apache to be able to serve these (Using HTAccess that could be possible if i remember right)
3. I'd need apache to print a bit of generic code at the top of the PHPX extensions that will contain a framework initialization
3.1. I'd need to setup an include path from that initialization code so that all includes don't need to be path specific, can that be done from an HTAccess file?
Can all this be done and what do you think of it? What are the flaws? i see a load of dependencies such as LAMP only architecture, specific apache modules, etc.
What are the good sides? I also see the good side of it such as real template and code seperation (and don't talk to me about those templating engines out there such as smarty) with encapsulation of code and access to control centric templates.
The door is open, hit on me...