Monday, 29 October 2012

Top 15 PHP Web Development Tips and Tricks

PHP is probably one of the most widely used open source general-purpose scripting languages on the web. It is used to enhance web pages. With PHP, you can do things like create user id and password login web pages, check details from a form, create forums, blog, picture galleries, and a lot more. If the URL of the web page ends with .php, then the author has written some programming code to liven up the plain, old HTML.

- PHP stands for Hypertext Preprocessor
- PHP scripts are executed on the server
- PHP supports many databases like MySQL, Oracle, Sybase, PostgreSQL, Generic ODBC, etc.
- PHP is open source software
- PHP is free to use and download

15 PHP Web Development Tips and Tricks
PHP is most likely the preferred web development languages in the world. There are already over 20 million domains on the web that have made use of PHP Web Development techniques.

I have read about many of these points in books and online tutorials. Initially I ignored it but after that I realized its importance for security with PHP & MySQL, but I would like to suggest everyone who is new to PHP is to read these tips and apply them before you end up with a big confusion.

1. Echo() versus print():
Echo is quicker than print. Both functions are used for the same thing but echo is the language constructs which return nothing, which publish will return 0 or 1 based on success or failure.

2. Be sure to validate user input on the server side:
While validating user input with JavaScript, does it on the server side too, since for bypassing your JavaScript validation a user just needs to turn their JavaScript off. It is (JavaScript validation) is only good to reduce the server load.

3. Use single quotes for longer strings rather than double quotes
Because in double quotes it will search for PHP variable to evaluate them. So in this case, in single quotes is faster because it does not require any string manipulation.

4. Always escape the output:
It will avoid XSS (Cross Site Scripting) attacks. You have to be sure about it i.e., When displaying user input on a page use htmlentities($user_bio, ENT_QUOTES, ‘UTF-8′).

5. If you have declared a method as static then let it is the same, as its 33% quicker than member functions.

6. Try to use minimize relative paths:
For relative path insertion it will search for default include path then current directory then so on. As a result file search in that case may catch more time.

7. Identical operator (===) is faster than (==) operator as identical operator will include type checking also.

8. Avoid using short tags and try to use , It can generate a problem for you if you are available to organize your application on another server.

9.Echo’s multiple parameters:
For faster result, use echo's multiple parameters instead of string concatenation.

10. Specify full paths:
Try to use full paths in includes and requires, for less time spend on resolving the OS paths.

11. Derived classes vs. base classes:
You may have to know i.e., methods in derived classes run faster than ones defined in the base class.

12. About accessing arrays:
e.g. $row['id'] is 7 times faster than $row[id]

13. Do not implement every data structure as a class:
Avoid to being everything OOP, as often it is too much overhead, and each method and object call consumes more memory. For this case, do not implement every data structure as a class, arrays are useful, too.

14. Avoid functions inside loops:
Try to use functions outside loops. If not the function may get called each time.

15. Free unnecessary memory:
Unset your variables to free memory, especially large arrays.

Thursday, 11 October 2012

Top 21 Web Design and Development Forums for Web Designers

Forums for all time are a big place to get answers to your unclear questions about :
- Web Development Coding,
- Web Designing,
- SEO,
- Marketing,
- Blogging.

As a web designer, I felt in need with these kinds of communities, maybe you’ll find these web design forum sites useful too. Participating in these forums not allows you to share your knowledge with peers, but also allows gaining trust.

Forums are essential for web designers and web developers. Web Design Companies, web designers and site owners rely on forums for a many reasons i.e., for finding way out to web design, technical problems, to investigate new areas and just to contribute in discussion with other web designers.

Today I have picked top 21 web design forums which can build your web developing skills to accomplish another level.

List of Top 21 Web Design Forums for Web Designers:






















What makes a great forum in my opinion?

As web designers and web developers, we choose a forum depending on its facility to approach our needs.

- Having a great knowledgeable community.

- The users have to be active.

- Forum should be outsized sufficient, moderators should be supportive and the posts should be responded quickly.

- Quality of the community i.e., responses from community members.

- The forum should have best moderation and guidelines.

- Also web design of the forum plays a role in our personal decision to utilize it.