Mike Fletcher : Web frameworks are too dang easy to write
Web frameworks are too dang easy to write
I suffer a lot from the same problem. Looks like building [web,ORM,ETL] frameworks is an elaborate form of procrastination from doing the dirty, real-world stuff.
Of course, you feel much smarter when you are writing code to automatically generate SQL queries than writing them by hand, even if it takes twice or more time ! Because, you know, next time you won’t take as much time, thanks to your framework.
Except that the framework that you have guiltily written (all the while trying to perform the task you are paid for in the expected time frame) is not as general as it should be, and you have to spend some more time tweaking it to re-use it the next time.
Plus, suppose now that you don’t have time to maintain this application you made with your custom framework, so you have to teach another developer how to use it to fix a given bug. It would have taken him seconds to spot and change an ORDER BY TASK_PRIORITY ASC to ORDER BY TASK_PRIORITY DESC, had the SQL expression been written by hand instead of generated by your code, but nope, that won’t be as easy… Because how could you have taken time to document your framework, given that it was initially an undercover work ?
No, no, sometimes, dirty things must be done in a dirty way. Try it and you’ll see that actually writing the SQL code / HTML FORM fields management / ETL code is often more productive than loosing yourself in framework stuff. Granted, it’s not as interesting, but face it, not every piece of your work can be interesting. Remember the last time you had to re-install your boss’ PDA synchronisation software because « it no longer works ».
OTOH, when you try to behave yourself and separate the normal work from building the framework (telling yourself that you’ll keep the framework stuff as a side project), the framework is at risk to be too abstracted away from real-world considerations, and then you get EJBs…