
Announcing Backlift: Deployment and Hosting for Backbone.js - colevscode
http://www.backlift.com/index.html
======
debaserab2
This is so close to being awesome.

There's several showstoppers for me. If you figure out how to fix them, you'll
have my business:

1). Server side validation. If I can't prevent a CSRF attack, it can't be the
basis of my app/website.

2). SEO. Figure out a way to serve deep links using the root index.html
transparently in a way that is undetectable to the client side (search
engines)

3). Build in require.js or leverage some other technology to make backbone app
codebases manageable yet compressed and performant in the production
environment.

If you can solve 2 and 3, you solve one of the biggest issues I have when
writing backbone apps -- I'm often writing my code twice, often in two
separate languages, which isn't DRY and feels like a waste of the efficiencies
gained by backbone.

If you figure this out, Backbone isn't just for web apps anymore -- it's for
any website.

------
bdunn
Checkout my post from yesterday to see why I think solutions like this are a
_bad_ idea: [http://www.projectorpm.com/blog/2012/03/25/rails-is-more-
tha...](http://www.projectorpm.com/blog/2012/03/25/rails-is-more-than-an-api/)

(Hint: Don't trust clients)

------
victork2
Nice initiative. I am not a big fan of writing in Javascript but it certainly
is a big plus to have such a nice library like backbone.js.

Just a tiny point ... About the drawing of the triceratops, he has very
mmmmm.... "developed" crotch area. Once you've seen it it's hard to not think
about it every time. It's just a little detail but it's a little bit weird!

Good luck !

~~~
ohgodthecat
It is just a bone, you can see the same thing on plenty of other fossils,
maybe you just have a dirty mind? :)

------
mhd
I think I've eaten some stupid soup today. Could someone explain to me what
the backend is all about? As far as I see it, the command line creates a
backbone template and syncs it with the server. Which is dandy, but as it's
client code anyway, that's mostly static web hosting.

So now I'm ready to create a hyper-nifty Web 2.71 interface to WHOIS. So
normally I'd create a simple web app that serves me my data. Where does
backlift come in here, as I'm not doing CRUD all from within the app itself?

~~~
dmvaldman
Whenever you persist data to a backend, say by calling save() on a model, it
seems Backlift will handle the backend for you, that is, it gives you a server
to process the PUT request and a place to store the data. Then to retrieve the
data on the front end, you just do a fetch().

So now you just do save() and fetch() and you never worry about what happens
in between.

------
tbranyen
I'm rather confused about a few things:

1) Is there no index.html?

2) Can you develop locally?

3) How do you use the templates you showed?

4) Is the boilerplate you provide open sourced anywhere?

~~~
colevscode
1) By default, Backlift generates the index.html file based on a few
configurable parameters. We think this will work in many cases since the index
file for a backbone.js site can simply provide a container for your html
templates.

2) Not currently.

3) If you're starting a new app and you need a starting point you can do so by
downloading a template. You can alternatively run "backlift init" with an
existing project.

4) Not yet. We're thinking of creating a github project where devs can upload
their own templates or tweak ours. Pulled templates will become available from
the CLI. We don't have a specific timeline for this yet.

~~~
rbxbx
2) Wouldn't [http://documentcloud.github.com/backbone/docs/backbone-
local...](http://documentcloud.github.com/backbone/docs/backbone-
localstorage.html) work for local development?

~~~
jeromegn
By the way, this is being actively developed:
<https://github.com/jeromegn/Backbone.localStorage>

------
ralphleon
I'm really happy to see more tools coming out to take some of the effort out
of setting up / deploying your development environment. It's refreshing to get
more time to actually _code_ rather than administrate systems.

Awesome site design as well!

------
rdl
This looks pretty useful today, and I assume will continue to evolve and add
more functionality in time. I have very little clue about frontend apps, so I
will use something like this to offload a lot of the tool selection process so
I can focus on the app itself. I imagine a lot of developers (especially those
not on hn) are the same way.

------
Toddward
Curious as to what the backend stack is - can you provide any details?

~~~
colevscode
Data is stored in MongoDB, and assets are packaged with JAMMIT. Two tornado
apps run each of backlift.com and backliftapp.com behind NGINX.

~~~
Toddward
Using bare PyMongo, asyncmongo, or some ORM-like solution?

Coincidentally, I'm also working on my own app using Tornado and Backbone and
considering the switch to Mongo (currently using the base MySQLdb wrapper
included with Tornado) - curious as to how you've found working with whatever
Mongo solution you're using.

Edit: Initially forgot to include asyncmongo in that list.

------
ebiester
When I tried to request early access, I saw "Hm, there was a problem. We're
looking into it. Try again later? Sorry!"

~~~
username3
Yeah didn't work for me either.

Traceback (most recent call last):

File "/home/sendspree/webapps/backlift.com/lib/python2.6/site-
packages/tornado/web.py", line 988, in _execute

getattr(self, self.request.method.lower())(* args, * * kwargs)

File "/home/sendspree/webapps/backlift.com/backlift/backlift/server.py", line
35, in post

raise tornado.web.HTTPError(403)

HTTPError: HTTP 403: Forbidden

~~~
colevscode
Time to go sacrifice the developer that left the debug flag on...

Oh yeah, that was me. FUUUUUUUUUUU

------
mbell
Is there any server side validation? If not this seams cool but ultimately
useless in practice.

~~~
phleet
This seems like a show stopper to me. The inability to have server side
validation means there's no way to control access to things, meaning you have
to fall back to security through obscurity.

What would be _really_ cool is if instead of a python backend, this had a node
backend that used the client side validation mechanism server side to allow
server-side validation without needing to duplicate the code. This could
theoretically be done transparently if all the classes were named by
convention.

~~~
mbell
Dependent on the language I would _think_ you could add annotation style based
validations to the client side code that would be automatically picked up by
the deployment system and hence applied to the server side logic. That said I
don't (at least to my knowledge) believe that is possible with javascript
without modifying the actual client code to fit an api.

------
blissofbeing
This is cool. Will the backend support authentication and authorization?

~~~
colevscode
Definitely on the roadmap, but not for the MVP. We're looking to be a really
good rapid prototyping and learning tool first.

------
ilaksh
Seems pretty awesome if you have actually taken care of all of the backbone
sync backend, so you can just use all of the collection create, update,
findAll and everything and it just reads from or updates the database?

How do you handle a situation with relationships where you need to specify
"give me all of the objects from collection X where parentId is YYYYY"?

Also how do you handle sort of arbitrary queries?

I was thinking about making a service like this because everyone wants to use
Backbone.js.

------
robryan
Just wondering how data validation works for this type of model? If you can't
rely on the front end how can you reliably tell the back end what to expect?

~~~
colevscode
Right, so this is where the admin interface comes in, allowing you to lock the
schema down and setup validation.

------
potomushto
What about user authentication and permissions?

------
idan
Homophone nazi reporting for duty!

"offer a peak" -> "offer a peek" in the bottom (dark) section.

~~~
schambers
Godwins

------
stephenhandley
seems like this is definitely something that's most useful as an app
prototyping tool rather than a deployment environment. and if its a
prototyping tool, i'd want it to run locally so i wouldn't have to deal with
remote admin / debug

so it should probably just be open on github.

just throw express or restify in front of mongodb with some minimal
scaffolding and generators. if i get a minute i'll try to get something like
that up

------
rudasn
I've been meaning to port a javascript app of mine (private video bookmarking)
to backbone for a while. I would love to test this (hint, hint).

------
tjholowaychuk
haha wow... this seems incredibly unnecessary. An entire hosting platform for
a single tiny framework?

~~~
gbaygon
I've been playing around with backbone.js and it's really promising, because
the server acts only as a REST api.

It was a paradigm shift for me. You should try it.

~~~
tjholowaychuk
we have / do it when it makes sense (heavy client). Either way we require much
more infrastructure for "real" apps than some black-box backend, zmq clusters
for computation etc.. I guess this might be an ok playground for some trivial
apps

------
paufernandez
One thing I noticed: the audio volume on the tutorial is way too low... pump
it up a little.

Cheers.

------
idan
Also: lovely idea, attractively clean design. Congrats on shipping!

~~~
_puk
Currently working on something in a similar vein (design wise), and can't get
enough of <http://subtlepatterns.com>.

Used to very good effect here.

------
lukeholder
this looks like a stripped back version of parse.com but with code generation
for a backbone app that connects only to this service. Good work.

------
hengli
This is parse but for backbone instead of mobile?

~~~
rudasn
I have a backbone todo list running locally and hosting the data on parse.
Setting it up took about a minute (good docs yay!).

I don't think you can provide this as a service though as I have my parse
credentials in my js file.

------
thingsilearned
Looks awesome Cole!

------
va_coder
pricing?

