NoBackend: Front-End First Web Development
infoq.com
infoq.com
http://nobackend.org/dreamcode Interesting gists of ideal code:
- user accounts / authentication https://gist.github.com/gr2m/5463426
- data persistence https://gist.github.com/gr2m/5463475
- data sharing https://gist.github.com/gr2m/5463525
- emails https://gist.github.com/gr2m/5463552
- file conversion https://gist.github.com/gr2m/5463605
- payments https://gist.github.com/gr2m/5463675
- http://css-tricks.com/editable-invoice-v2/
- http://gr2m.github.io/EditableInvoice/
http://nobackend.org/solutions < known live projects
This is the part I have a bit of an issue with when it comes to all the hype about front-end development. I've been involved in web development since 1994, and software development since the 80's. I've so very, very rarely encountered applications to which this applies.
When I mention this, people come up with examples like GMail or Twitter, obviously not understanding the the front-end part, however impressive in the case of GMail, is just that: a front-end, a client for an application so much more complex.
I sometimes feel front-end experts have no idea about what happens on the back-end. All those API-calls are not being handle by some magic genie.
Or maybe I'm wrong and I've missed something essential.
But they're there. You implement what they do on the front-end. Think of any application you interact with on a daily basis. The tasks are very front-end oriented. I can only think of a handful of applications I use that have a robust backend for an apparent logical reason (image recognition and pdf parsing). Most of what we do on the web can and will be handled on the front-end.
So when working on a new product, it's worthwhile to build as much of a facade interface as you can to quickly and cheaply explore how it feels to use the product. Then you can iterate rapidly with something concrete in front of your stakeholders, and when they're happy, you can just build the back-end once, from a solid foundation of domain knowledge.
It also works out well socially. Some people (who tend to congregate in front-end) work well with vague ideas about a user experience and instructions to explore the product on their own. Others (who congregate in back-end these days) want firmer ideas about the product and usage so that they can exercise their creativity in solving the technical problem well. Front-end-first is a great way to let everyone do the part of the job that they like.
I'm not being sarcastic (well, okay, a little), I pretty much agree with most of what you wrote (of course depending on the project at hand), except the notion that this is something new.
Also, just working on the front-end/user experience doesn't give you, and certainly not the back-end developers, a "solid foundation of domain knowledge". That only happens if they are deeply involved in the same process, and front-end-first suggests exactly the opposite. A front-end, no matter how wonderful and detailed, is still way to vague to serve as specs unless the application is very simple.
I can appreciate the front-end-first philosophy, and can see it working well in an environment where you what to build something to "show off" (kind of like WordPress templates that you can "demo"). It might even work fine for something like AirBnB in which the bulk of the application is just a CRUD mesh.
I cannot see it working well for any startup that relies on technology that requires a careful and thorough iteration of its foundation (backend). Once the backend is built with a solid RESTful interface, it's trivial to write the front-end and you can A/B test the shit out of it, do white-labeling, try different workflows and UX experiments all while only making tweaks or small additions to your backend (of course excluding major deep-feature development).
This was after I already had a "real" backend (could grab/merge RSS feeds), but I still found it useful in focusing on some front-end features, and I wonder if I might even have been farther along from a prototyping standpoint if I'd made that approach from the start.
If this is true for some problem domains, my guess is that it's possibly more true for those (such as feed gathering) where the backend tech issues are mostly simple or solved problems and most of the novel work to do is in the realm of UX.
There are some more innovating ideas listed on the site. This sure looks promising.
The no-backend approach removes the backend all toghether, by focusing on UX, basically on the end-user. This is an amazing idea. Not because of how revolutionary the technology is, but mostly because it is a very creative way of improving the user experience.
Obviously not all websites would benefit from this approach, but there is a large application for it. For most application, a hybrid approach would bring the best results.
Zumero (http://zumero.com/) for example keeps the data on the user device for mobile applications. It makes sure the application stores everything in the device, so that apps don't require an external backend.
In the case of Websites, ExtJs (http://www.sencha.com/products/extjs/) has its store, which represents a local storage for web applications. It is not persistent, but there are ways to keep it in the user machine.
Don't dismiss the idea because it seems radical, try to integrate it into your app and I am sure you will see the advantages.
In a way "dreamcode" is basically the same: you determine what you want to build and infer the API dependencies that you will need. It makes sure that all the API that you're going to build are going to be used.
Front end first, back end first... it doesn't really matter. You shouldn't be designing one to the other. Function first :)
What you do is you create your Backend App in iKnode like this one: https://github.com/Structum/iKnodeSdk/blob/master/Javascript...
Then you write your Unit Tests in Javascript like in here: https://github.com/Structum/iKnodeSdk/blob/master/Javascript...
You can also run any other Unit Test framework against iKnode, for example we have:
- C# with Microsoft Unit Test:https://github.com/Structum/iKnodeSdk/tree/master/C%23
- Objective-C with Unit Tests: https://github.com/Structum/iKnodeSdk/tree/master/Objective-...
Depending on the problem, that could be a prime candidate for falling back to the backend.
This reminds me of how UX designers talk about their job. Their job importance can be measured in X and they are always trying to make it sound important as X squared. Please front end guys, do not do this.
If this isn't new to you, contribute to the conversation with additional examples or insight.
An oldie (but goodie) was on the front page today: http://www.thingist.com/item/4372/. There might be some valuable & relevant lessons to glean.
So nothing new here. that's called building up to bottom . You focus on a few user scenarios and you just make them happen.
then you refactor your obviously nasty code , and thanks to tests , nothing breaks on the client.
That's why i like microframeworks too instead of bloated stuffs. They can grow with your needs instead of having all these unusefully layers of code packaged together, and they are still good enough for team work.