Project Estimation Documents

I would like to know how you would make and discuss project estimation for a fairly complex web applications?

Before a project starts, customers wants a module break down and estimation. But while in the development phase, it normally takes longer than the expected delivery.

How do you participate in reducing the risk by more accurately estimating the project? What factors should we include? Any forms of documents would be good to read out.

SitePoint has a great article about this here: How To Estimate Time For A Project » SitePoint

Another good read regarding this topic is here: 10 Reasons Why Software Project Estimates Fail » SitePoint