Dinis,
Thanks for brining these things up; I'm glad we're talking about them now.
I've spoken with Alexis about the template system and I from what I've read I still believe that is more useful only when you want to allow users or designers without any knowledge of the underlying language to modify it. The main disadvantage I see, although this depends on the framework, is the lack of ability to generate html code to iterate through groups of objects.
I want to stay away from "generators" as much as possible. I worked with CakePHP, and its html generators, for almost a year. There is nothing more frustrating than depending on a generator and discovering it can't do what you want or doesn't handle the data the way you are. Often times hacks were required to get the desired behavior. Many times I found myself ripping out the generator and replacing it with plain html that did what I needed. Why couldn't html have been used the first time around? For example, passing an array to a function to generate a drop-down (a.k.a. select) is only a couple lines short of a foreach loop to do the same thing. And what if you come back later and need to add a class to the options? Well, if it's not supported by the generator you'll have to rip it out and write the html. If you don't want to write html use an editor that can auto-complete or insert snippets. In the end, I've found generators to be more trouble than they're worth.
One thing we might consider is migrating the project to a framework like Yii, CakePHP, or whatever.
I can't discourage the use of CakePHP, in any project, enough. As I said, I worked with it for almost a year and hated it. The "automagic" is truly magic in that you have little control over it. If the magic works the way you want, that's great, but if it doesn't, it's a waste of time to try and mold it to what you're doing.
I have a huge gripe with most frameworks out there: they don't strive for simplicity. A lot give in to the restrictions of php as a language and don't try to find workarounds that truly improve developers' code. Most are bloated, resource intensive, hogs that enforce rules that must be followed or the program won't work properly. A lot of projects would be better off if they didn't use a framework. For example, here is some code in the current AL member system:
$email = FormEmail::find("`name` = '{$name}'", array('limit' => 1));
Does it run? Yes. Could that be run in other php frameworks and get the same result? No (I've only seen one other, very little known, framework that could run that). Is it possible with php? Yes, it's running now on the AL server. Why can't other frameworks do that? Because they don't try hard enough.
Here's the bottom line: if it can be done with less code in regular php, in a way that's not much less readable than a framework, the framework should be avoided.
Alan, what's the plan regarding this issue? Maybe start a new thread about the framework and introduce us to the current state of the framework/project? Or will we start from scratch?
The framework used in the current AL system is something I wrote many years ago. It's not up to my current standards so we won't be using that. I don't discourage all use of framework-like libraries. If you have a code-base you're fond of, let me know. However, CakePHP will not even be considered (I know it well, I've hacked in my own additions to the core). If we use a framework it must be flexible and lightweight. If you're going to suggest a framework please come up with a well thought out description of what sets it apart and makes it the best.
We will start from scratch. The current code is outdated and we can do better.
Alan