One of the most insightful posts i’ve read by the King of PHP Rasmus Lerdorf: http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
November 28, 2008 2:40am
Subscribe [6]#1 / Nov 28, 2008 2:40am
One of the most insightful posts i’ve read by the King of PHP Rasmus Lerdorf: http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html
#2 / Nov 28, 2008 4:31am
This is a post in the same spirit.
To sum it up in one acronym : KISS
#3 / Nov 28, 2008 7:58am
@xwero - Sir (i reserve the right to call you that), you are most certainly correct about KISS. Yes i read the post too. Many frameworks provide you with what you really dont need, so sticking to the basic agile development methods is always a good idea.
I had actually even registered a domain close to KISS: http://www.bestkeptsimple.com - Hopefully within the next couple of months i will put up a blog that focuses on php only.
My partner and I are steaming ahead with php development. I’ve been in design and the “front end crowd” for too long now. Its time to enjoy the meat, and ill tell you its far more interesting than design.
Will let you know when the blog goes up. It would be an honor for you or your colleagues to stop by and possibly share your wisdom.
#4 / Nov 28, 2008 2:25pm
Keep an open mind featureBlend.
The title is contradictory: “The no Framework PHP MVC Framework”. What Rasmus wrote is a framework, and not a very good one. A good framework:
1. better separates presentation from logic
2. has a clear documented structure
3. has features
I can’t believe he’s advocating building your own framework from scratch. You’d miss out on tried and tested ideas, documentation, standards, and hard work from intelligent developers.
He uses a view, controller, and model but he doesn’t use a “front controller”. URL’s are mapped directly to views. That’s not necessarily bad, (that’s the asp.net way) but:
- without a messy .htaccess file, you miss out on nice flexible hackable urls
- you miss out on pre processing like showing a cached page without loading the entire view file and all it’s includes.
#5 / Nov 28, 2008 3:03pm
@Rick: First of all thank you for taking the time to read the post. Secondly, I totally agree with you and personally I don’t think i would EVER go down that route…As @xwero said keeping it simple would be a better approach to any given situation(even if its out of the boundaries of programming).
What i can say is that the knowledge I gain from you all (experienced programmers) will be invaluable to me in my future as a php developer. To me, there is no greater pleasure than to hear what REAL professionals have to say to a new kid on the block (me).
Thats exactly whats happening right here, right now; and i certainly appreciate it.
#6 / Nov 28, 2008 4:59pm
Thanks for posting this article featureBlend.
The best part of this was being able to dig around on his site.
I am playing with searchmonkey now (another article on the site) and I really like what I see.
http://toys.lerdorf.com/archives/48-SearchMonkey.html
Thanks
#7 / Nov 29, 2008 10:57am
You are welcome: Dig this too: http://www.rubyonrails.org - There is a huge buzz in the community about Rails, and many seem to believe its the ideal development environment.
Just for your awareness.
#8 / Nov 29, 2008 4:41pm
Frameworks are about reducing development time, there are many parts of a framework like Codeigniter you may never use, but Codeigniter only loads helpers etc when you instruct it to, so you’re only using what you want to.
I’ve been programming in PHP for around 10 years, and having a framework makes working with other programmers easier, as you both can understand the core and programming style needed, and decreased the amount of development time dramatically, if i were to put a figure on it i’d say by at least 50%+
#9 / Dec 01, 2008 11:08am
This is a post in the same spirit.
The reader’s comment to this post I liked most:
When you first start your career, you don’t know anything and your code’s a mess. Then you pick up some patterns and in your over-keeness implement them everywhere and still create a mess. Then eventually you calm down and still create a mess, at least a bit more of a robust and timely one.
:lol:
#10 / Dec 01, 2008 11:37am
sl3dg3hamm3r that comment is not only funny but it’s very true because you evolve in your programming so even your best code at one time will look clumsy after a while and if other developers look at it they will find points they find messy.
For example i read a post about the return of the include function and the CI/my way of accessing data from included files looked messy because suddenly there is a variable that is not defined in the function or class.
// config file
$config['setting1'] = 'value1';
$config['setting2'] = 'value2';
// or
$config = array(
'setting1' => 'value1',
'setting2' => 'value2',
);
// config class
include('file');
if( ! isset($config)){}If you can do
// config file
array(
'setting1' => 'value1',
'setting2' => 'value2',
);
// config class
$config = include('file');#11 / Dec 01, 2008 12:43pm
Well, as for me, in each project I did you would find some parts where I’d say afterwards I’m not proud of, I would do it better/different next time.
I’d wish I’d finish once a project where I could say at the end “yes, this was perfect work (at least IMHO)” ... but I guess most important is to realize the flaws and learn from it. And maybe there never will be perfect work 😊
#12 / Dec 01, 2008 4:51pm
That is really funny and weird. How can he see this total mess better than CodeIgniter (security, validation, etc) :D
http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html
#13 / Dec 02, 2008 3:37am
@EEssam - Thanks for reading the post. I think you are referring to “me” when you say “he” and not Rasmus (correct me if im wrong). Its just insightful bro, there was no mention of “better”.
I really like how @xwero summed it up with one acronym - “KISS”. In the midst of all the confusion one things fo sho: Rasmus can sure write a catchy heading. Geniuses will always go the confusing route, cuz they can understand all that confusion.
@sl3dg3hamm3r - I like that you are sincere with yourself about your flaws. There are so many people who lie to themselves everyday. I think that your ability to ADMIT your weaknesses will eventually lead you into perfection.. GL!