5 ms·
If you don't want a framework, why do you want a framework? Picking an old, barely-used framework because it pitches itself as "fat-free" is a mistake: either u
by phphphphp 4y ago
If you don't want a framework, why do you want a framework? Picking an old, barely-used framework because it pitches itself as "fat-free" is a mistake: either use a good, modern, widely-used framework (like Laravel or Symfony) and benefit from a cohesive framework experience OR skip the framework altogether and grab best-in-class packages for each of the individual things you need and wire them together yourself. You could probably get all of what you need out of PHP League's packages: https://thephpleague.com/ https://thephpleague.com/
- adamrezich 4y agoI'm not looking at F3 because of how it pitches itself, I'm looking at it because I skimmed the docs and it looks like the closest thing to what I'm looking for. right now my whole website is hilariously one giant PHP file (CSS and Javascript both embedded, lol), with a giant switch branch on the after-the-domain part of $_SERVER['REQUEST_URI'] (there's only a few branches because the landing page is the main bulk of the site). the website was rapidly prototyped, and I hadn't used PHP since like 2008. I don't have any interest in overly-complex ways of doing things (using classes for everything, using the MVC pattern), but I do want slightly better organization. I had to monkey-patch in some rudimentary caching on the database-intensive landing page when we started getting lots of traffic, and anything that would make that easier as I add more functionality (that also should be cached) to the site would be great. oh, and I'm running the whole thing on IONOS shared hosting and for business reasons it's not really feasible to use anything else at the moment. so this is why I'm looking at evaluating F3 or any other similar "minimalist" frameworks—I don't want or need a super opinionated complex rejiggering of my existing code, but some small amount of better formal structure would be nice. also, I'm not using any other packages or libraries or anything, except for Stripe, which was incredibly easy to integrate.
- bornfreddy 4y agoJust an (unsolicited) opinion - MVC pattern if one of the few mainstays, and it's like that for a reason. It might (or might not) fit your use case, but it is hardly complex. Also any other dev looking at the code wil probably know it. Apart from that, I would skip framework if I were you. Web is littered with abandoned PHP frameworks which were all viable at some time. If it already works, just clean it up, refactor as needed and identify + resolve any performance bottlenecks.
- adamrezich 4y agoI appreciate the unsolicited opinion regardless, but yeah MVC is just too complicated for what this website does. I may end up just going with some kinda routing package instead of a framework, not sure yet.
- netol 4y agoIn that case I'm not sure I'd use a route package either. If it is very simple, you can create separate files for each page and include them based on the path or query string. Few (or 0) dependencies can also be an advantage, as it will be easier to update and maintain