Pratik, I hate to be too blatantly self promoting, but "buy the book". ;-) The common patterns I use for web apps are Secure Pipe, Secure Logger, Audit Interceptor, Intercepting Validator, Intercepting Web Agent, Authentication Enforcer, Authorization Enforcer and a few others. The best practices are too numerous to list here. Check out the website: http://www.coresecuritypatterns.com