News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Systems Architect:
API-based Web Application with Backbone, Require.js and Slim framework
September 26, 2013 @ 11:25:32

On the Systems Architect blog there's a new post from Lukasz Kujawa about creating a simple API-based application combining Slim, Require.js and Backbone. The result is a single-page application that displays a template and a set of links pulled from the backend.

A single-page application (SPA) was something I've been exploring for the last few months. I always liked the idea of moving certain responsibilities to the client's side. After all, why would you like to waste server's RAM/CPU to buil a HTML page (and pay for a transfer to deliver it) when a web browser is perfectly capable of doing that on its own?

He's posted the full example to Github, but he does walk through all the code showing how the parts fit together. He starts with the HTML5 template and Javascript side of things, making a simple Backbone router and a "create" route. The views are rendered via the Lo-Dash templating and injected into the page.

As you can see it's all quite simple. The only problem is that you have to embrace multiple JavaScript frameworks at once but the boilerplate makes it much easier. What I really like about this setup is the structure. It's similar to how things are done in the back-end and it should be fine even with big applications.
0 comments voice your opinion now!
requirejs backbone slim framework tutorial api singlepageapp

Link: http://systemsarchitect.net/api-based-web-application-with-backbone-require-js-and-slimmvc-framework

blog comments powered by Disqus

Similar Posts

Paul Jones' Blog: A Siege On Benchmarks

Community News: Finally, Phorum 5.2 has made it to stable!

PHPInfo: Add Sting to PHP Apps with WASP Patterns

DevShed: Working with Multiple Document Nodes with the DOM XML Extension in PHP 5

The Bakery: Basic User Authentication in (CakePHP) 1.2.x


Community Events











Don't see your event here?
Let us know!


opinion performance hack composer release podcast application introduction database package language install facebook symfony2 series framework hhvm component security unittest

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework