There are lots and lots of open source web applications out there.  I like to read code to see how things are being done.  Can you point to any web application out there, with source code available to read, that is built in the way that you are describing?