Re:Eddy - Super-light PHP 5.3 Web App Framework
by ryeguy on Friday January 21, 2011 @01:40PM
(#2128352)
First, why is this framework using __autoload? spl_register_autoloader should be used here. Otherwise, other frameworks (like doctrine, zend, etc) can't register their autoloaders.
Second, why require 5.3 and not use namespaces? Should be e.g. Eddy\Controller instead of EddyController.
Third, why so many global functions? Pretty much all of these would be better suited as static functions on a class.
Lastly, why use mysqli? Now whoever uses this has to use mysql. It easily could have been made to use PDO, and should have. There is no reason to use mysqli.
Sorry for the criticism, but there are so many of these out there that new ones pretty much have to be flawless to even matter. This framework just seems to be made by someone who doesn't pay any attention to how other major frameworks and the rest of the community are doing things.
Re:Eddy - Super-light PHP 5.3 Web App Framework
by st0p on Friday January 21, 2011 @03:28PM
(#2128730)
Even though I agree with point 1, 2 and 4, I'm not with you on point 3. Why take OO to an extreme when there is no technical nor functional reason to do so? The best example is Math.Sin(x) vs. Sin(x)... There is no valid reason (IMHO) to go for the Math.Sin() approach in PHP. It doesn't add anything, except more keystrokes.
Of course if your language is entirely OO (like C# or Java), you can't avoid constructs like Math.Sin(). Even though I prefer C# and Java above PHP, it has always annoyed me that I needed to prefix those kind of functions with a class name. I understand that it is a trade off in language design and forcing you to think in objects is mostly a good thing (if you leave functional programming out of the equation). However, if your language supports functions outside of objects, why not use them?
[disclaimer]I didn't look at the actual code, so I'm not sure if there are functions that indeed should have been (static) members of a class.[/disclaimer]
Re:Eddy - Super-light PHP 5.3 Web App Framework
by simonhamp on Saturday January 22, 2011 @10:53AM
(#2130525)
1. It's not meant to be used with other frameworks :)
2. Namespaces are nonsense in 5.3. I've created my own way of namespacing which is much nicer in my opinion
3. The global functions are being worked through: it's early days... less of those to come
4. MySQLi because that's what I use. Limits my support costs
As with any open source framework, you can actually change it to suit your needs. It's not for everyone, if you want those things go elsewhere. This is what I use to get my apps started - they start quicker, finish sooner, work faster.
It's not an exercise in 'best practice', it's about getting the job done - actually building an app that works!
Re:Eddy - Super-light PHP 5.3 Web App Framework
by petervandijck on Friday January 21, 2011 @01:27PM
(#2128293)
I'm trying http://fuelphp.com/ these days, also new, from ex-codeigniter, ex-kohana dudes. In other words, they've learnt some lessons from the other ones. Not bad so far.
Re:Eddy - Super-light PHP 5.3 Web App Framework
by smoody on Friday January 21, 2011 @10:11PM
(#2129791)
What's the downside with static methods? It makes sense to me that they use them for factories and now that the can be effectively overridden in PHP5.3, I'm not sure why it's a bad thing... perhaps just a personal preference?
Re:Eddy - Super-light PHP 5.3 Web App Framework
by petervandijck on Friday January 21, 2011 @02:01PM
(#2128436)
Well, it seems basically pretty codeigniter-like, but much improved, dropping legacy stuff. The docs still need work (they don't even mention the form lib for example), I might help out with that. I hope they take it to a stable and well documented 1.0 (they're in beta now).
Re:Eddy - Super-light PHP 5.3 Web App Framework
by noodle on Friday January 21, 2011 @03:37PM
(#2128779)
i know, and that is what i meant, actually. looks like a good bit of crossover, and if they're going to work on CI community, too, that probably means less work on fuel. and who knows, maybe there's some sort of contractual obligations in there, as well.
Re:Eddy - Super-light PHP 5.3 Web App Framework
by simonhamp on Saturday January 22, 2011 @10:55AM
(#2130528)
It's early days folks, so I'm just getting it out there. Appreciate all the comments and feedback... of course if anyone wants to help develop, please feel free to fork on GitHub... it is an open source community after all right?
Second, why require 5.3 and not use namespaces? Should be e.g. Eddy\Controller instead of EddyController.
Third, why so many global functions? Pretty much all of these would be better suited as static functions on a class.
Lastly, why use mysqli? Now whoever uses this has to use mysql. It easily could have been made to use PDO, and should have. There is no reason to use mysqli.
Sorry for the criticism, but there are so many of these out there that new ones pretty much have to be flawless to even matter. This framework just seems to be made by someone who doesn't pay any attention to how other major frameworks and the rest of the community are doing things.
Of course if your language is entirely OO (like C# or Java), you can't avoid constructs like Math.Sin(). Even though I prefer C# and Java above PHP, it has always annoyed me that I needed to prefix those kind of functions with a class name. I understand that it is a trade off in language design and forcing you to think in objects is mostly a good thing (if you leave functional programming out of the equation). However, if your language supports functions outside of objects, why not use them?
[disclaimer]I didn't look at the actual code, so I'm not sure if there are functions that indeed should have been (static) members of a class.[/disclaimer]
As with any open source framework, you can actually change it to suit your needs. It's not for everyone, if you want those things go elsewhere. This is what I use to get my apps started - they start quicker, finish sooner, work faster.
It's not an exercise in 'best practice', it's about getting the job done - actually building an app that works!
docs or it didn't happen.