4 ms·
Would a microframework (no idea what's the equivalent of Flask or Sinatra is on PHP) help? I still have nightmares from my beginner days of doing everything in
by Nextgrid 7y ago
Would a microframework (no idea what's the equivalent of Flask or Sinatra is on PHP) help? I still have nightmares from my beginner days of doing everything in plain PHP.
- reaperducer 7y agoWould a microframework (no idea what's the equivalent of Flask or Sinatra is on PHP) help? I have no idea. Maybe. I've just been coding straight PHP. With the way IDEs are these days, once your environment is set up the way you like and you have your favorite macros bound, it's not a problem. I'll look into Flask and Sinatra before I start the next site. Any other ones you recommend?
- Nextgrid 7y agoFlask would be my personal preference but I have a Python background (you mentioned PHP so I assumed that was your main language). Sinatra is in Ruby. The "hello world" looked very similar to Flask but I haven't explored it deeper so no idea. For PHP maybe also check out Phalcon ? It's not as "light" as the aforementioned ones but maybe they're more conservative in terms of breaking changes?
- baddox 7y agoAnd probably the nearest equivalent in server-side JavaScript is Express.
- AlphaSite 7y agoFalcon is nice too.
- giancarlostoro 7y agoHighly recommend you give CherryPy a look. Its older than most Python web frameworks mentioned (Flask and Django included) and was the most beautifully backwards compatible framework. In spirit of migrating to Python 3 they are obviously dropping old versions in a reasonable time frame though. I wouldnt recommend Python 2 for any new projects regardless. I used it for 3 years nonstop. It is minimal so you include your own ORM of choice and template library.
- hiccuphippo 7y agoFor PHP I'd recommend to take a look at libraries that adhere to the PSR (Php Standard Recommendations). It is very easy to build your own microframework with them and add only what you need and nothing else. For the libraries themselves look at the League of Extraordinary Packages: https://thephpleague.com/ https://thephpleague.com/. Zend and Symfony also have PSR compatible libraries you can use. They are no longer the big monoliths of yesteryear.
- mastazi 7y agoIf you prefer to stay within PHP, Lumen is similar to Flask and Sinatra (BTW Flask is Python and Sinatra is Ruby).