It's 10 lines here, 10 lines there. But they're not really 10 - in practice that's going to be 100 once you get past the most trivial use case and add good error handling. Then there are tests to make sure it works. Once you write all of those bits you need properly and start sharing it with your next web app and add some generalisation/config... you've created half a custom framework.