Saturday, April 18, 2009

Web Development Best Practices

High speed Internet connection and Technology Giants such as Google and Apple make most of the people to use internet daily.
So, Web Development is getting important place in Software development. We need to consider many factors when doing website development.
- The most important factor is knowing about target audience. It will be helpful to provide more user-friendly UI (User Interface). Because different type of people will prefer different type of navigation / screen design.
- We should know which factor should be given more importance, whether it is "performance" or "look & feel" or "user-friendliness" or "cost".

- Now-a-days it is important that the websites should be search engine friendly. (i-e) The webpage should be visible not only to human beings but also to the bot/crawler of major Search engines such as Google and Yahoo. Please note that bots of some search engines can not follow links listed using javascript menu. If you still want to use javascript menus, you can provide site map for enabling the bots to crawl your pages. Creating site map is easy. Just we need to list all the links in a text file or xml file or html file . Then we have sumit the path of this sitemap file to the Search Engine thro' their webmaster tool.

-Since many people started using iPhones, it is important to make your website iPhone friendly if you want them to see your website. In this case you can provide separate CSS style sheet for iPhone and normal browsers. And you can dynamically load appropriate CSS file based on UserAgent string.

- If you are developing website for financial transaction you should think about using "https" and preventing cross-site scripting, sql injection, session-hijacking and any other security related steps.

- We should keep in mind that the users may not have the browser/screen resolution/color settings/browser settings same as ours. It is true that some users will not enable javascript in their browsers, and I heard that some users are still using some text based browsers. So it is very important that we need to consider all these factors while developing the website. We should write code such that different code should act based on settings of user browser.

- The very important difference between web development and other desktop applications is, we should always keep in our mind that we are working on stateless protocol. (i-e Clinet browser will not having any other relationship with webserver once after sending the web request, similarly the webserver will not have connection with client browser once after sending the response string). We should take all necessary actions (e.g use of Sessions, cookies) to maintain user session.

- We should use CSS (Cascading Style Sheet) to enable easy change of look and feel of website. You can refer this article for knowing about best practices for CSS use.

- Menu and any other repeatedly used items should be kept in separate file and it should be included in all other pages.

-Javascript validations should be used extensively to save time by contacting webserver for doing any validation which can be easily done in the client side itself. But anyway if security is more important for your website then you should still do server side validation also.

-Ajax should be used extensively to avoid unnecessary refresh of entire page, just for updating one part of the page.

- Loading indication should be shown whenever backend operation (database query) takes more time.

- There won't be any broken links in the website and HTML tags should follow standards. You can use w3c validation to verify it.

-Always put all your javascript functions and references such as CSS file inside the HTML Head tag as the Head tag contents will be loaded first. If it is not possible to access Head tag, then atleast put them at the bottom of the body tag (i-e just before the </body> tag)

- Design the UI properly to improve user experience.

- We need to take additional care when handling single quotes and double quotes in HTML code , in Javascript function and also in Database queries. Use proper escape characters to handle them effectively.

Apart from above practices, we need to follow all other coding standards, such as
writing clear inline comments, keeping appropriate indents for the nested loops and
appropriate naming conventions for variables.

And also, we need to write all details of lesson learnt from any issue, in a document or in a database as a Knowledge base for further/future reference by the Team.

Click here to read Best practices in QA - Software Testing
More Articles...
You can bookmark this blog for further reading, or you can subscribe to our blog feed


Webplore said...

Will work out on this, if felt good then will apply, nice post keep posting.......
Web Development

web hosting said...

You gave me some good information about the "Web Development Best Practices". thanks keep on updating.

Web Designer Developers said...

Good informative one sharing ..

blueapple said...

Thanks For posting . Its Really nice . Keep update a more information .Thanks for sharing the knowledge....

web design company

Search This Blog