PHP Web Development—Improve Programming

13/12/2012 11:28

Since PHP is king in web development languages and that you can evidenced by the vast use of it on the web. This post is not for advanced programmers but for those who have got some knowledge of PHP and are ready to dirt their hands in further coding.

SQL Injection Cheat Sheet

I think every developer should have enough knowledge of security aspects of the web development and have habit to use good security practices. The most important think is that you should not trust the data you get from other resources. Same the way you should escape data before you pass them somewhere else. The main cause of SQL injection is a failure to escape output. This occur mainly when the format of an SQL query and the data used by the SQL query is not carefully maintained. Thus, escaping preserves data in a new context and save from misinterpretation. If you filter in coming data you assure that data is valid before it is used.

Comparison Operators

This consists of a big part of PHP and unfortunately many programmers are not well versed in their differences so be familiar with differences between comparison operators.

Else

It is good practice that you code  should simple and smaller so you can do this by take middleman out of else statements which are widely used in coding PHP Web Development.

Drop Braces

Curly brackets means braces can be drop in a single expression and this save some space of your code documents.

Memcached

There are plenty of options for caching, but Memcached is topper as it is the most efficient for database caching. When you are going to PHP web development to build a website and uses a database Memcached can definitely improves the speed.

Frameworks

PHP frameworks can help speed up PHP web development bu eliminating some overhead and some repetitive tasks.