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

PHPMaster.com: String Handling Functions

PHP-Coding-Practices.com: Introduction To Security Vulnerabilities In PHP

NETTUTS.com: How to Create a Wordpress Theme from Scratch: Part 2

SitePoint PHP Blog: Generate Excel Files and Charts with PHPExcel

SitePoint PHP Blog: Building a Micro Markdown API App with Lumen


Community Events

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


framework podcast php7 programming project application series language laravel example opinion yii2 api list community symfony part2 composer interview introduction

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