Ask HN: Why am I still writing server-side code?
This may be a crazy question, but I'm getting an increasing feeling that every time I write a new web app, I am writing the same server-side code over and over again. On the other hand, the JavaScript-heavy client-side needs careful control to get the interactions just right.
So, why do I still have to write server-side code?
Isn't there some service out there which I can spit data at from the client, and then read data back? Perhaps set some kind of data integrity rules? Some basic built in user auth system and permission control would be good.
Does this not already exist? If not, why? How hard can it be?
If it doesn't exist, and is possible, lets build it!
24 comments
[ 3.3 ms ] story [ 58.9 ms ] threadWho would own that super-backend-service? Who would own the data submitted? Oh and btw, single point of failure (see the recent debacle inflicted upon jotform)?
Also, I'm not really being sarcastic or the like. But overall, data presentation has always been pretty trivial IMO. For the bsaic set of data-munging apps that so many tend to build, I can't imagine a 90% solution can't exist as a simple set of basic data definitions and rules.
In fact, aren't we both just talking about something like Filemaker on steroids?
We are currently in beta testing right now. You might want to check it out:
* iKnode (http://iknode.com)
If you like an invite, just signup here: http://iknode.com/register/
If what iKnode offer doesn't match what you are looking for, don't dismiss the idea of a Backend as a Service just yet. Try the following as well:
* Parse (http://parse.com)
* Kinvey (http://kinvey.com)
* Stackmob (http://stackmob.com)
Among others...
EDIT: Fixed the Kinvey Link.
I've signed up for iknode - it would be great to check it out!
In the case of iKnode, we are focusing mostly on web sites. I have to be honest. We don't particularly like the mobile environment so much, specially because it feels like a step backwards for standards. We believe firmly in the Web. So we do support mobile environments, but we are pushing for the web to be successful. Even if mobile is hot right now.
For a good deal of small mobile apps and simple web apps this would be a great tool for modeling simple CRUD workflows. I have several apps that this would be great for where 90% of it is just save and retrieve data where the other 10% need transforms or business logic, hence being able to place small transform scripts in the workflow. Now granted it's not going to scale to an enterprise solution, but there would be a lot of value to being able to stand a back-end up in a few hours by diagramming it out. I think of it as kind of like BPEL for REST services. If it existed I would pay for it, and I can't imagine that I am the only one.
You'd still need something to handle transactions which can not be allowed to be performed by a user, such as credit card transactions, web service account-linking authorizations, etc. You could have an app on your iPhone written in JavaScript that just queries for transactions to process and does all the heavy lifting, in effect being the "backend" on your phone. But again, that would be really annoying.
We have frameworks and libraries for a reason: to make writing the monotonous backend quicker and easier. When you utilize the right tools it shouldn't be too much work. But yes, you could probably offset a lot of crap on the server with simple key/value sets sent from the client. Whether or not that's a good thing i'll leave up to the users to decide.
This was the issue I had with Parse when looking at it, while I think it is a great service, we need more than just a data store, there has to be some way to perform logic behind the REST service, because it is just not an operation that you can trust the client to do. You may be able to get away with a mobile device to card authorization but a JavaScript client should not be trusted to orchestrate it. So for me, with these services that look like a data store there is a core piece missing and that is the ability to perform business computation and orchestration that the client should not be responsible for.
You can see the screenshot here:
* Editor: http://iknode.com/images/tour/appeditor.png
* Assembly Upload: http://iknode.com/images/tour/asmupload.png
You can create your application that becomes a service endpoint and then just call your logic.
You can call your application using a REST POST like this:
https://api.iknode.com/Applications/execute/<application...
And in the body just put your parameters:
{ parameters: "{ myParam1: myValue1, myParam2: myValue2 }" }
We are planning to support IronPython and IronRuby in the future. In the case of Lisp, we looked at Clojure, which can run on top of the CLR. But we have no plans for it so far.
See also the somewhat passé http://couchapp.org/ (how quickly we tire of such things)
I had to make a site for my fiancee and I's wedding, and I realized I could whip one up really quick and just stick it on StackMob - backend, hosting, everything.
An example saving/fetching data to/from StackMob via the StackMob JS SDK (built on Backbone.js):
var user = new StackMob.User({ username: 'ericktai', password: 'opensesame', ..}); user.create(); //this saves your user to the datastore on StackMob's servers in the background via AJAX
var users = new StackMob.Users(); //notice plural users.fetch(); //this fetches all users
var user = new StackMob.User({ username: 'ericktai'}); //notice singular user.fetch(); //this fetches my user from StackMob
Sounds like you're writing a JS web app, so you can also try our JS SDK that lets you connect to StackMob's backend - it's your datastore already built on servers. Here's a tutorial I wrote up to give you an idea of what that actually means programatically.
http://www.stackmob.com/devcenter/docs/JS-SDK-Tutorial
To make sure you don't run into any cross domain AJAX call issues, we host your html app also. This relieves you of having to worry about whether browsers support cross-origin headers or not.
Good luck to you developing! It's great that there are so many tools out there nowadays like aespinoza mentioned! Find the tool that works best for you :)