3 ms·
This might be a nice replacement for PHP spaghetti code you might see everywhere - see the recent HN thread where PHP is voted the most-hated language - it's be
by babuskov 15y ago
This might be a nice replacement for PHP spaghetti code you might see everywhere - see the recent HN thread where PHP is voted the most-hated language - it's because even solid coders produce spaghetti code with it. You need to be really disciplined to create something that's easily maintainable.
I would not touch PHP codebase without a framework. Some nice PHP frameworks have emerged in past few years ranging from simplest CodeIgniter to pretty complete Yii I use for most projects now. I would never choose to use PHP for a project without Yii or a similar framework, so until we see a quality framework written in PHPSnow, I don't see any reason to use it.
- sciurus 15y agoWhy couldn't you use an existing PHP framework from PHPSnow?
- babuskov 15y agoTake Yii for example. Beside framework functionality, the power of rapid development comes from Gii code-generation tool and it generates PHP code (complete MVC for CRUD + admin. interface based on database tables or PHP class). You get skeleton structure that you need to fill in with your business logic (and put some design into views, but that's not really a problem here). Everything that Gii does, you would have to write manually using PHPSnow. Doing that manually is slow and error prone. Besides, using MVC framework makes the PHP code clean and maintainable, which are two real problems with PHP. Writing $this-> is a minor nuisance, but I hardly believe it warrants inventing a new language. If PHP is just ugly to you, why use it at all? There's Python, Ruby, whatever...
- codesuela 15y agothen again PHP is arguably a framework itself and when dealing with something either very simple or very complex Yii feels to verbose.
- wvenable 15y ago> it's because even solid coders produce spaghetti code with it. That's ridiculous -- PHP is pretty analogous to most languages in terms of both capability and syntax. The biggest warts in PHP revolve around the standard library and that wouldn't prevent anyone from producing solid code.