Monday, May 14, 2012

Compiled PHP Framework

I DONT WANT TO COMPILE PHP TO NATIVE EXES OR ANYTHING LIKE THAT ONLY COMPILE/CACHE(both words dont reflect what i mean ;/) THE FRAMEWORK LOGIC ITSELF



Is there anything like a compiled PHP Framework ?



What i mean is take Kohana as an example. Its extensible, overrideable, fun, etc.



But it ends up loading 200 files to show one page !!
What i would think is best is if you have Controller_Admin extends Controller_Admin_Template extends Controller_Template extends Kohana_Controller_Template extends Controller extends Kohana_Controller . this isint needed... if we just copypasted method bodies to $parent->whatever() it would end up in one nice, smaller, faster file.



We allready do it for JS and CSS to minimise assets downloaded, why not the whole damn framework :D



Also i am looking for a compileable ORM. The Kohana ORM is very... slow... it uses magic methods, loads tables, generaly is fun to work with but a pain in the... circuitry of the server :P



if we could make ORM::factory('test')->compiled()->where('bla','=','1)->execute(); to compile into ORMC::factory('test','SELECT * FROM test WHERE bla=1')->execute(); in the production server it would be cool. This applies to a bunch of other stuff besides ORM but ORM would benefit greatly.



The overhead of dynamic frameworks doesnt seem to tip the scales by the ease of use in my opinion. With this we loose no ease and speed it up like hell of a lot ;)



So my question is : Does something like this exists? If not, is my logic flawed?



;)



Edit:



because of failed answers ill show more straight what i want to do



we have /application/ where there is the EXACT SAME code as without "compiling"



and /compiled_app/ where all (for example) queries that can be SIMPLIFIED are SIMPLIFIED (not object Query_Builder but SELECT blablablabla etc)



Also as much as having 50 files for one class adds a lot of umm... override vectors ? :D it is an UNNEEDED 100% GUARANTEED BOTTLENECK PERFORMANCE OVERHEAD. maybe its not much but its there allways. And it doesnt have to.





No comments:

Post a Comment