What framework should I use for a hobby web/programming project?
May 20, 2016 1:27 PM   Subscribe

I have a need I could probably satisfy with something COTS, but I kinda want to build something again. I've been out of that game for a while, and getting my hand back in would be nice. What should I use?

Years ago, I used Mason, which actually kind of predated the "all in one" frameworks that include an ORM & etc.

I've mostly been a perl guy, but I've used PHP and it doesn't make me super itchy. I'm reasonably proficient with Javascript, but I haven't touched Node.JS or any of the modern extensions.

I hear nice things about Django; I have no Python experience, but that doesn't really bother me. Is that still the go-to?

Ruby and ROR are probably out, unless the hassle required to get shit running has been drastically reduced.

Bonus points for a tool that has a big backing library a la CPAN to reduce the number of wheels I have to re-invent.

Our target platform is OSX (which means Apache), but for the right tool I could be convinced to spool up a VM.
posted by uberchet to Computers & Internet (14 answers total) 5 users marked this as a favorite
 
I started out in perl but it's been ages since I adopted PHP as my primary language. I'm deep into a large PHP gig on CakePHP but I kinda wish we'd chosen Laravel, given its vastly greater market share and presumed resulting longer life span.

I've recently done some work in AngularJS and it's interesting stuff with a large and growing library of components. If you'd like to try that, I'd recommend checking out John Papa's style guide as a headstart to good habits. It's a very different world, but things fall together in a seductively quick and complete fashion.
posted by richyoung at 2:01 PM on May 20, 2016


> Our target platform is OSX (which means Apache)

Most modern frameworks will expect to run as servers themselves. You have Apache proxy if you feel like you need it. There may be some Apache extension to run what you want, but it's much nicer to not.

If you don't like Rails, you might not like Django.

What are you building? You might like the smaller web frameworks like Flask (http://flask.pocoo.org/) or Sinatra (http://www.sinatrarb.com/) but be aware these don't handle authentication, CSRF protection, etc etc, out of the box, and it's very easy to do those poorly.
posted by l_zzie at 2:06 PM on May 20, 2016 [2 favorites]


I'm tracking client install data. In a different era, I might've sought out something like FileMaker or Access and built a front end with the DB tool, but I kinda don't want to do it that way.

Anyway, the upshot is that I'm not planning on this being available to the public Internet at all, so I'm not concerned about authentication.
posted by uberchet at 2:16 PM on May 20, 2016


I absolutely love Flask, a python micro framework, for things like this. Flask itself is like seven lines to hello world, and then there are extensions to be able to anything you might want to do from there. Django is a lot more batteries-included, which is both good and bad. I like the lightweight nature of Flask, and the way that you can build apps that are just as complex as you need with it.
posted by rockindata at 2:51 PM on May 20, 2016 [3 favorites]


React on the frontend, node.js+Express on the backend. Use npm (node's equivalent of CPAN) to find a connector to the database of your choice.

I haven't used it myself but MERN, a tool which appears to pre-package many of these things for you, looks really interesting.
posted by Old Kentucky Shark at 2:51 PM on May 20, 2016 [1 favorite]


Another vote for Flask! I've used python since like 2.2, but have just recently dug in deeper and use it for work - I really like virtualenv and pip. Really easy to make your setup portable between servers or, well, environments.
posted by destructive cactus at 2:54 PM on May 20, 2016 [1 favorite]


Former Mason user as well, for perl there is now Dancer which I've heard good things about, but haven't used.

If this for your resume I'd go with Python with Django or Flask as the most good looking on a resume. Python has a large library and the learning curve isn't much coming from perl.
posted by DizzyOnBugSpray at 2:56 PM on May 20, 2016


So this is where all of Mason programmers ended up! If you want to learn Python while still enjoying the filesystem-based routing and template inheritance of Mason you might look at Mako.
posted by nicwolff at 6:51 AM on May 21, 2016 [1 favorite]


Django is very much still alive. Flask is nice, too. If you have a bit of time to experiment, work through one of the Django tutorial projects and then do one of the Flask tutorials. Note the similarities and differences.

I use Flask for small, rapid-development personal projects, and Django for "larger" projects where having having good testing support, built-in support for relational databases (via a decent ORM), support of "admin" views on tables, and off-the-shelf support for things like job queues (Celery) and non-relational databases (e.g., MongoDB) readily available are big pluses. Flask is a bit more mix-and-match.

The templating languages are very similar (one inspired the other). Both are neutral on your choice of CSS and JavaScript toolkits/frameworks. And (obligatory plug) once you can handle either, using Google App Engine is mostly a matter of understanding how to use App Engine's non-relational datastore.

To keep dependencies isolated, you can use a virtual machine (VirtualBox works fine on OS X), or something lighter weight like virtualenv/pip.

I did a lot of Perl years back. Moving to Python was easy.
posted by dws at 2:23 PM on May 21, 2016


N'thing Flask. I'm a full-time Django/Python dev but Flask is my go to for my own side projects.

One thing to note however is that it doesn't have a built in ORM. SQLAlchemy is often used, its a very expressive and powerful tool, but it does have a steeper learning curve that Django's ORM.

If your needs are not super complex you should take a look at Peewee which is designed to be simpler to easier to learn. I've not used it, yet, but I've used another project from the same developer and it was a pleasure to work with. The developer, himself, was really helpful and responsive in pushing out some changes to get it to do somethings I wanted, so he gets major props from me.
posted by tallus at 2:42 PM on May 21, 2016


Agree with the above recommendation for node.js+express.js+(angular or react). I'm an old school Perl and Java programmer who's recently picked up Node, and have really been enjoying it. I like the advantage of writing front-end and back end code in the same language.
posted by jferg at 2:56 PM on May 21, 2016


IMO, Django is a fine framework to choose. Python is a very simple language to learn, and Django minimizes your effort on a variety of fronts. There's a wealth of tutorials available for Django, and a large community of developers to help you and borrow plugins from. In contrast, Flask is best suited for microservices, where the performance penalties of Django's additional features are worth caring about.
posted by pwnguin at 7:56 PM on May 21, 2016


I would probably push ROR since setting it has been so much easier today. Gems are heaven sent. For the server, Apache or nginx are awesome. Passenger(a gem) does wonders when setting up on production.

Anyway, the other would be Django which is very similar to ROR.
posted by EastSpring at 11:46 PM on May 21, 2016


Looks like Flask might do me right! I'm also intrigued by Mako, because the filesystem inheritance was really something I loved about Mason. Thanks to all!

(Oh, and for the record, this is for fun and itch-scratching. I doubt I'll be in a coding-job situation again.)
posted by uberchet at 4:04 PM on May 22, 2016


« Older Clothing babies; politely disseminating a baby...   |   Headphones for Bounty Hunter Tracker IV metal... Newer »
This thread is closed to new comments.