Hi, for those who are not aware, Rasmus Lerdorf has an interesting article:
http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html
I need to study it more, however I believe that we should take these ideas into account while discussing any MVC move for phpMyAdmin.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
The website seems unavailable at the moment. It is cached on Google, however.
Greets,
Dieter
2010/3/19 Marc Delisle marc@infomarc.info:
Hi, for those who are not aware, Rasmus Lerdorf has an interesting article:
http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html
I need to study it more, however I believe that we should take these ideas into account while discussing any MVC move for phpMyAdmin.
-- Marc Delisle http://infomarc.info
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Hi
Dne Fri, 19 Mar 2010 13:30:47 -0400 Marc Delisle marc@infomarc.info napsal(a):
for those who are not aware, Rasmus Lerdorf has an interesting article:
http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html
I need to study it more, however I believe that we should take these ideas into account while discussing any MVC move for phpMyAdmin.
Well it is interesting article, but using PHP this way requires lot of discipline. Basically he is right that using another template layer in PHP, what is itself basically template language is overhead. However having option to use arbitrary code will lead to some hacks at some place and you will end up mixing view and controller layers.
So I'm all for real template language which will really limit what can be used in it (though most of template languages for PHP I've seen do still allow any code).
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
2010/3/22 Michal Čihař michal@cihar.com:
Hi
Dne Fri, 19 Mar 2010 13:30:47 -0400 Marc Delisle marc@infomarc.info napsal(a):
for those who are not aware, Rasmus Lerdorf has an interesting article:
http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html
I need to study it more, however I believe that we should take these ideas into account while discussing any MVC move for phpMyAdmin.
Well it is interesting article, but using PHP this way requires lot of discipline. Basically he is right that using another template layer in PHP, what is itself basically template language is overhead. However having option to use arbitrary code will lead to some hacks at some place and you will end up mixing view and controller layers.
So I'm all for real template language which will really limit what can be used in it (though most of template languages for PHP I've seen do still allow any code).
Writing good code is always about discipline, if you don't have the discipline to apply the same coding style, think about the best solution in the long run and don't go for the quick and dirty, use comments where necessary, write documentation, ... then using a templating system or any other tool is not going to solve that. ;) If we would choose for a templating system, it should be for the right reasons (useability, being suitable for PMA needs, ...), not to enforce developers to keep logic and output/layouting seperate. Because that leads either to frustration, or to the templating system not being used.
I think this guy makes a good point, that you don't necesarily have to use a 'true' templating system. It is a possibility, but if it is too complex, or doesn't allow you to do what you want it to do, it's better to look for another system, or even create a custom one, maybe even a coding guideline.
I haven't used a templating system before, but I'm interested in it. But I think the MVC concept is more important, than using just any templating system. As choosing a system for PMA will affect a big part of the current code, I think it's a good idea to look for the best fitting solution (but that's a discussion that's going on in a different thread, I think), before rushing into just any system.
Greets,
Dieter
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi
Dne Tue, 23 Mar 2010 14:44:47 +0100 Dieter Adriaenssens dieter.adriaenssens@gmail.com napsal(a):
Writing good code is always about discipline, if you don't have the discipline to apply the same coding style, think about the best solution in the long run and don't go for the quick and dirty, use comments where necessary, write documentation, ... then using a templating system or any other tool is not going to solve that. ;)
It's not going to solve that, but it's going to help. It is hard to force discipline from external contributors (you usually end up rewriting patch yourself or not applying it at all) and when there is force from the tools into right direction, it always helps. At least this is my experience from other projects.
I can even provide example from phpMyAdmin - the current versions use php files for translations. One of translations used things not expected by our tools to update and sort translations, but valid in PHP. Over time, the translation got horribly broken without anybody noticing. This is exactly problem which can appear if you provide too much flexibility where it is actually not needed.
I haven't used a templating system before, but I'm interested in it. But I think the MVC concept is more important, than using just any templating system. As choosing a system for PMA will affect a big part of the current code, I think it's a good idea to look for the best fitting solution (but that's a discussion that's going on in a different thread, I think), before rushing into just any system.
Well I'm not really sure if right now is good time for such move. Starting this in parallel with GSoC will make things really hard to merge and synchronize.
- -- Michal Čihař | http://cihar.com | http://blog.cihar.com