Live data from Hacker News

Ask HN: What's your go-to back end for simple projects?

news.ycombinator.com

31–40 of 65 posts

Re: Ask HN: What's your go-to back end for simple projects?

#32

apache2, php7.0, mysql-server, libapache2-mod-php7.0 and php7.0-mysql. Yes I'm not cool :P but when did I care about being cool...

As the framework, it's CodeIgniter or for ultra-simple projects Slim, templating engine is Mustache, and hosting platform is nginx reverse proxy + virutal machines with NAT on a dedicated box at OVH.

Re: Ask HN: What's your go-to back end for simple projects?

#33
post #18

Flask! It's Pythonic and good. Once you've done a couple of Flask projects, you can spin up a new microservice in a couple of hours. It's much lighter weight than Django, so it forces you to keep fewer moving parts in your head while hacking. http://flask.pocoo.org/ Lately, I've been using Flask on the back-end, and React on the front-end.

I keep thinking I'll learn Django, but I hate Django, why would I want to build a skill that I'm then forced to use, as well as proliferating the market for Django products?

I work on Flask stuff on purpose, because it means in the future I'll have more Flask work...

Flask is much more pythonic than django.

In fact, go look at Django's website/documentation, they don't have a hello world or a quickstart, they have like a 10-page tutorial to build some frankenstein nonsense, Flask's homepage has a 5 line application! That's how Python is supposed to be.

The more flask in the world, the better.

edit: now I've read some other people here saying Django gets easier after you use it, or it's gotten simpler... Flask is easy the first time you use it, and it's always been simple. Pythonic. End rant.

Re: Ask HN: What's your go-to back end for simple projects?

#34
post #18

Flask! It's Pythonic and good. Once you've done a couple of Flask projects, you can spin up a new microservice in a couple of hours. It's much lighter weight than Django, so it forces you to keep fewer moving parts in your head while hacking. http://flask.pocoo.org/ Lately, I've been using Flask on the back-end, and React on the front-end.

I usually combine flask_restful, SQLalchemy and a SQLite database. Stupidly easy to build an API this way...

Re: Ask HN: What's your go-to back end for simple projects?

#35
post #13

Django Good solid base for quickly developing something quickly. Iterating on a database schema has never been easier since 1.7 the migration tools are built in and the ecosystem of plugins has lots of tools that make development of a prototype extremely easy. It just keeps on getting better, just the other day I found an plugin to automatically generate knockout.js powered AJAX forms without me having to write any o…

w..what plugin is that? I need that!

Presumably django-knockout

https://github.com/AntycSolutions/django-knockout

Re: Ask HN: What's your go-to back end for simple projects?

#38
Pyramid and Postgres on the backend, Mako templates w/bootstrap on the front.

When I'm prototyping, my data model is stored procs that return json structures to the templates. I use SQLAlchemy core to connect to the db and execute the procs.

A prototype like this is super fast to get running, it gives you a really clean app structure that you can hand off to pretty much anyone and have them work on features, if you're lucky enough to have a team. If not, it's pretty easy to keep it all in your head at once.

As things grow, you can replace components as you need to.

You start off rendering JSON anyway, so if you need a more advanced interface up front, you can use React or Angular or Ember to hook into the data model. Whatever you want, really.

If things get more complex on the backend first and you need more structure there, you can refactor the SQL (because it was probably really gross the first time you wrote those "dump everything" procs). If you end up with a really complicated data model, you may have to eat the performance hit and switch to Alchemy proper for maintainability. Either way, the choice is yours.

Sometimes the simple app is the one you need, and the biggest challenge is scaling quickly. That's easy too because the database handles transactions inside the procs. Run one instance of the app per core on your server and put them all behind nginx and repeat on as many machines as you need to cover your traffic needs behind HAProxy. Now you're maximizing multi-core performance per machine without having to write async/await code.

It's probably not for everyone, but I find it gives me an enormous amount of flexibility, scales well in every sense of the word, allows the app to develop organically, and has very few drawbacks.

Re: Ask HN: What's your go-to back end for simple projects?

#39

Go with App Engine. There is a free tier and I've had projects running there for years.

Same here. Easy to setup projects. Quick to deploy. Focus on the app instead of administration. Go+AppEngine has a lot of my projects - no cost, no maintenance. Of course, if by any chance those projects grow, I'm still likely to run it there.

Small hope/suggestion: I wish there was a free tier on Cloud SQL.

Re: Ask HN: What's your go-to back end for simple projects?

#40

Google Firebase. As a front-end developer I just can't warrant the time setting up a backend, setting up a database, defining routes, handling authentication and the other nonsense that seemingly takes a solid day to get working. Firebase to me is the best choice for simple projects, I don't use anything else anymore.

Did a couple of projects on Firebase also (apart from my preferred Go+AppEngine) and liked it. Easy and can move fast.

Technical downside: backend processing and search & filtering are more involved.

Personal downside: Though I code in JavaScript, I'm no fan of it. Is there a good library in Go for it?

Post reply on HN