Thursday, February 17, 2011

10 Things to Keep in Mind while depeloping a Web App

What should I ensure before I start developing a web application? So here is my humble list of things that I must do (don’t) in the future:

1. There is a need for authentication so figure that out first. Use a well know library for it – like if you are using Java use Spring Security.

2. Do not write your backend first. Especially for Ajax based web apps. You will need to add or change the API with the page design changes.

3. Do not return HTML from any Ajax API ever. Use JSON. [If you do this with # 2 you are doomed]

4. In your HTML, JSP (or ASP) or XSLT - do not write the style attribute (in HTML tags) to save time today. Instead add a class in your style.css file. It will save a lot of time in the future. Like if you want to change the color of the whole page you can work with one css file instead of all your ASPs and JSPs.

5. Have one entry point for all services – use a dispatcher. What I mean by this is make your web app configuration lean (for Java world it is web.xml).

6. Keep the logged in user in a secured URL like HTTPS. Never transport password over HTTP.

7. Try to standardize the JSON response. If you need to render something from JSON data this will help you a lot. You can write one helper JS function which will take care of it.

8. Follow css box model always. No excuse.

9. Divide the web page into multiple parts. Each part should be working fine. I mean as much as possible.

10. Build a feature a close it for today’s requirement. Do not jump to a feature without finishing the one in hand – it will bite your ass later.

10 + 1. Test in a lot of browsers (IE7+, FF, Opera, Chrome)

1 comment:

Tom Elam said...

Cool! But why #5?