My pointless quest for the perfect web stack
Recently I’ve been on the blasphemes quest to find my ideal web stack.
What I Want
Modern web applications are pushing the envelope of the experiences that can be made over the internets. I use Python/Django/Postgres/Backbone/SASS at the moment and that’s all well and good. But what I want now is a concurrent language and a non-blocking web server to serve an API. Why? Because most of my web apps now are mostly client-side using lots of javascript and backbone. I want concurrent because I want speed for powerful algorithms I will theoretically write. I want an asnychronous web server because I’m tired of the Python -> Rabbitmq -> Celery dance I need to do to offload tasks into a queue.
I realize this list of stuff I want is ridiculous since I don’t actually know what I want to build with this theoretical stack. So keep that in mind that this is a pointless exercise, but one that I’ve been thinking about nonetheless. It’s also extremely narrow minded and not inclusive of all the stuff out there.
WINNER:
Not necessarily what I use now, but will use next.
Clojure/Aleph -> Mongo -> Backbone -> Handlebars -> SASS
BACKEND LANGUAGE:
1) Clojure
- Concurrent
- functional
- lispy
- fast
- Still new, smaller community
- Huge learning curve for me
2) Python
- A caveman could write it
- Tons of libraries
- Proven
- GIL sucks :(
3) Javascript
- CoffeeScript makes it awesome
- V8 makes it super fast
- Possibility of one language for front and back end
- single threaded
DB:
1) Mongo
- Schema-less
- easy to query
- restful api (not sure how useful this is out of the box)
- possible difficulties in scaling (anecdotal, but frequent)
2) Postgres/MySql
- Relational
- reliable
- scalable
- migrations can be a pain
WEB FRAMEWORK/SERVER:
1) Aleph (clojure)
- The only real choice for non-blocking server in clojure
- Websocket support
- Works with Noir web framework
- Socket.io not supported
2) Flask (python)
- Super minimal
- Simple to set up
- It’s python
3) Express (node/javascript)
- Lightweight
- Readable
- Large community and resources
- Non-blocking
- Easy Socket.io support
4) Django (python)
- Batteries included
- So many libraries makes rapid development easy
- Get’s in your way after awhile (restrictive)
- Synchronous unless you use Celery as a external task queue
- Overkill for the kinds of web apps I write (Backbone, heavy client side)
FRONT END FRAMEWORK:
1) Backbone
- Makes front-end feel like backend “mvc”
- Namespacing keeps views separate
- Non-prescriptive, use it how you want
- Sometimes confusing because there is no right way to use it
TEMPLATING:
1) Handlebars
- Separation of view logic (as much as possible)
- Helpers let’s you write your own template tags
- Multiple options for using templates
2) Moustache
- Lacks helpers
CSS:
1) SASS
- It’s just a thousand times better than writing cross-browser pure css
And there you have it. My ideal stack that is incredibly flexible and powerful to create awesome shit I haven’t thought of yet.
4 Notes/ Hide
-
marcosortiz reblogged this from alexkehayias
-
djhelmano likes this
-
liamgoodacre likes this
-
joeconyers said:
Why not less? Also what about meteor / etc ?
-
alexkehayias posted this
