background preloader

IBGS - Php - 30 PHP Best Practices for Beginners - Nettuts+

IBGS - Php - 30 PHP Best Practices for Beginners - Nettuts+

TOOLBOX - Php - ZendFramework - Par Martin Il existe depuis quelques années de nouveaux outils pour travailler efficacement avec PHP, Ce sont les frameworks, ou cadriciels. Ils apportent un cadre de travail pour mieux architecturer son code, souvent grâce à MVC, des bibliothèques pour éviter de réinventer le roue, mais surtout de la documentation et une communauté. On est ainsi bien aidé dans notre développement, mais voyons comment utiliser au mieux un framework PHP et plus particulièrement le Zend Framework, puisqu’il fait partie de ceux que je connais le mieux et que j’utilise le plus. Photo de just.Luc depuis Flickr Présentation Le Zend Framework ou ZF est en même temps un framework ou cadriciel et une bibliothèque de classes. Pour plus d’informations sur le Zend Framework, lisez la présentation qu’en fait la communauté française : Présentation du ZF Documentation La documentation du Zend Framework est bien développée, pas toujours complète sur certains sujets, mais une excellente base avec beaucoup d’exemples. Normes

24 Cool PHP Libraries You Should Know About Martin Angelov It is an exciting time to be a PHP developer. There are lots of useful libraries released every day, and with the help of Composer and Github, they are easy to discover and use. Here are 24 of the coolest that I’ve come across. Your favorite is not on the list? 1. Dispatch is a minimal PHP framework. include 'dispatch.php'; get('/greet', function () { render('greet-form'); }); post('/greet', function () { $name = from($_POST, 'name'); render('greet-show', array('name' => $name)); }); dispatch(); You can match specific types of HTTP requests and paths, render views and more. 2. Klein is another light weight routing library for PHP 5.3+. respond('/[:name]', function ($request) { echo 'Hello ' . You can also subscribe to specific HTTP methods and use regexes as paths: This is great for small projects, but you have to be disciplined when using a library like this for larger apps, as your code can become unmaintainable very fast. 3. require '.. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13.

Virtual Template - HOME PAGE PHP: Hypertext Preprocessor :: onpk :: blog PHP, MySQL, développement web & connexe(s) PHP Best Practices: a short, practical guide for common and confusing PHP tasks Top 20+ MySQL Best Practices Database operations often tend to be the main bottleneck for most web applications today. It's not only the DBA's (database administrators) that have to worry about these performance issues. We as programmers need to do our part by structuring tables properly, writing optimized queries and better code. In this article, I'll list some MySQL optimization techniques for programmers. Before we start, be aware that you can find a ton of useful MySQL scripts and utilities on Envato Market. Most MySQL servers have query caching enabled. The main problem is, it is so easy and hidden from the programmer, most of us tend to ignore it. The reason query cache does not work in the first line is the usage of the CURDATE() function. Using the EXPLAIN keyword can give you insight on what MySQL is doing to execute your query. The results of an EXPLAIN query will show you which indexes are being utilized, how the table is being scanned and sorted etc... After adding the index to the group_id field:

PEAR - PHP Extension and Application Repository

Related: