![]() My advice? If you already are comfortable with OOP, then you won't have trouble picking up good OOP practices in PHP. As someone who's delved in many of the PHP frameworks, I can guarantee that using one will not automatically help you learn "good PHP" (it's still quite possible to write crappy code within controllers, etc.). ) I believe that with any language, you should be comfortable with the language itself before you gain familiarity with any sort of framework. If you're worried that learning PHP without a framework is going to imprint bad practices in your head, we've got a bigger problem. ![]() Memcached: When your database is under heavy load you also need to store your query's in memory.It will store the PHP opcode in memory(huge, huge boost). APC: If it all possible you should really install apc to speed up php.Learn TDD/PHPunit to properly test your code.It will help you create rest-like applications. In the past I stumbled upon Matt Zandstra's PHP book which is really good and I think you should read it to learn PHP properly. Also I would like to notice that mosts slides from are really good. If you intend to use a database, open theįast: Rasmus(PHP inventor) did benchmark a lot of the PHP frameworks(slides 24-32) out there and as you can see Codeigniter performs good compared to some other framweworks.Open the application/config/config.php file.Upload the CodeIgniter folders and files to your server.MVC: In my opinion this helps you to write cleanly separated code.ĭatabase: This module helps you with a lot your database pain.Įasy: codeigniter is really easy to pick up which is a huge plus. I don't think you can code something like this with just plain PHP because codeigniter allready has the following solid foundation: When watching there screencast you will find out the with Codeigniter you can create a simple blog in 20 minutes. If you are trying to learn PHP(no PHP experience) I guess you should first pick up an easy framework like Codeigniter. What would be my best opportunity for learning PHP, but learning GOOD PHP that uses real software engineering techniques instead of spaghetti code? It seems all the PHP books and resources either assume you are just using raw PHP and therefore showcase bade practices, or that you already know PHP and therefore don't even touch on parts of the language. Should I be trying to learn PHP by using one of the better known frameworks for it? I've looked at CakePHP, Symfony and the Zend Framework so far Zend seems to be the most flexible without being too constraining like Cake and Symfony (although Symfony seemed less constraining than CakePHP which is trying too hard to be Ruby on Rails), but many tutorials for Zend I've seen assume you already know PHP and want to learn to use the framework. I've used C# in the past so I'm familiar with OOP and software design patterns and similar. ![]() I'm afraid that trying to learn PHP this way will just imprint these bad practices in my head and make me waste time later trying to unlearn them. ![]() All the tutorials and books I've seen are really lousy - it never shows any kind of good programming practice but always the quick and dirty kind of way of doing things. The problem is that PHP without any framework is ugly and 99% of the time really bad code. I've never used PHP before, and figure if I can get more opportunities if I pick it up then it might be a good idea. I've noticed a lot of jobs in my area for PHP. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |