TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Advanced PHP Programming (http://www.talkphp.com/advanced-php-programming/)
-   -   Critique the framework I use (http://www.talkphp.com/advanced-php-programming/4081-critique-framework-i-use.html)

Enfernikus 03-26-2009 09:01 PM

Critique the framework I use
 
1 Attachment(s)
The framework I use is very small but flexible, I don't plan to release it but I'd like some criticism from fellow developers as to whether I'm using OOP concepts correctly and such things.

The framework follows a very slack MVC model, infact the model and controller are one in the same at this point and perhaps later on will be separated into their own entities.

The reasons for two libraries folders is to separate the libraries I and the framework use through out every job such as session management and database access and libraries which are unique to the job. Same with Helpers & Config files.

Thanks in advance!

PLEASE DOWNLOAD THE COPY IN MY LAST POST

P.S The most important files in the framework are in /Core/Contstruction

ETbyrne 03-26-2009 09:59 PM

It looks very interesting, I'll try and take a closer look some time soon.

xenon 03-27-2009 06:28 PM

Looks very nice at the first glance. I'll take a look tommorrow probably and I'll share my oppinions, if I may :D

PS: I advise you to loose the PHP closing tag at the end of the file. Believe me, it will save you alot of trouble in the future, as the project grows :)

Enfernikus 03-27-2009 06:50 PM

Quote:

Originally Posted by xenon (Post 22582)
Looks very nice at the first glance. I'll take a look tommorrow probably and I'll share my oppinions, if I may :D

PS: I advise you to loose the PHP closing tag at the end of the file. Believe me, it will save you alot of trouble in the future, as the project grows :)

Of course! I want to know especially if the way I'm loading objects is efficient and could be improved. For those who want to know how I do it without looking at the code. I use the Registry pattern ( Misnamed Factory in my script ) to store objects. The controller object's library call is simply a wrapper for Factory's getLibrary function.

Enfernikus 04-02-2009 12:18 AM

1 Attachment(s)
I have made some additions to my framework and would like anyone who looks at this new copy to also see my routing method located in

/Core/Construction/CoreOO.php
/Core/Construction/Route.php


Dynamic routing works like spo

PHP Code:

$cfg['routing']['url']['products/:alphanum']  = 'store/products/:result';
$cfg['routing']['url']['product\/[a-z]'] = 'store/products/$1';
$cfg['routing']['url']['categories/:num/:alphanum-:num']  = 'store/categories/:result/:result/:result'

the current dynamic routing supports regex and a limited number of wild cars:

:num
:alpha
:alphanum
:any

Regular routing works so

PHP Code:

$cfg['routing']['url']['blogs/joe']  = 'store/blogs/joe'



All times are GMT. The time now is 12:20 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0