Re:Roll Your Own Frameworks
by commandlinefan on Thursday May 21, 2020 @10:02AM
(#23258438)
> the best way to handle things like routing or database access
See, I'm always a little concerned handing something like database access over to an unaccountable framework for fear that they'll do the wrong thing and a) it'll be my fault and b) I'll have to figure out how to work around it under time pressure.
I was tasked with delivering PHP code that would serve pages to the customer. For whatever reason I wasn't allowed to use CodeIgniter, which was what we used elsewhere in the company. I wound up creating a mini-framework to serve pages. It was extremely basic and limited, but in this situation it was what was needed.
It is the only time I've ever had to create a framework. I doubt I'll ever have to do so again. The beauty of frameworks is that they free you up to focus on your application and the logic to support it, rather than figuring out the best way to handle things like routing or database access.