The best approach I've found is to build a domain object model consisting of only the objects that come straight from the problem domain and then multiply the number of objects by a person days to implement an object for the particular implementation technology.
There are some adjustments you can make based on complexity of the UI and developer experience but the basic premise works.
It's sounds like a simplistic approach but it's not because the process of building a good object model and that's a key point, the object model must be well done, this process is really a process of organizing the information you need to build an estimate in a very sophisticated way.
An object model is a way to organize and account for all of the data and behavior of the system and furthermore, to organize the information into reasonable units. The rules around building a good object model will cause the objects to be of a fairly uniform size in terms of complexity.
What you end up with is a list of discrete groupings of data and behavior with well defined interfaces between them allowing for the fairly simple calculation of an average number of person days per object.