News 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

php|architect: Zend Framework - A Practical Tutorial

PHPMaster.com: Patterns for Flexible View Handling, Part 2 - Using Decorators

CodeForest.com: Creating simple tasks app with Backbone.js and Slim micro framework (part 1)

Zend: Framework Subversion Access Opened

Nick Halstead's Blog: Bad code, bad data flow, good idea?


Community Events

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


xdebug example release series library unittest extension introduction install laravel5 opinion php7 voicesoftheelephpant api podcast language community interview framework laravel

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