Download the PHP package devtime/backbone-bundle without Composer
On this page you can find all versions of the php package devtime/backbone-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download devtime/backbone-bundle
More information about devtime/backbone-bundle
Files in devtime/backbone-bundle
Package backbone-bundle
Short Description Easily setup and use backbone.js with Symfony2
License MIT
Homepage http://github.com/gigo6000/DevtimeBackboneBundle
Informations about the package backbone-bundle
Backbone Bundle
Easily setup and use backbone.js with Symfony 2.1.1 and greater (it probably works in older versions but not tested)
Follow @gigo6000 on Twitter. Tweet any questions or suggestions you have about the project.
What you need
This bundle requires Symfony 2.1.1 or greater (it probably works in older versions but not tested)
The latest versions of jquery, underscore.js and backbone.js are included.
Installation
Step 1: Download DevtimeBackboneBundle using composer
Add DevtimeBackboneBundle in your composer.json:
Now tell *composer to download the bundle by running the command:
Composer will install the bundle to your project's vendor/devtime
directory.
- Note: If you don't have Composer yet, download it following the instructions on http://getcomposer.org/ or just run the following command:
Step 2: Enable the bundle
Enable the bundle in the kernel:
Layout / Directory structure
Create the basic directory structure for your backbone files. Remember that you only need to do this once!.
This will create the following directory structure under Resources/public/js/
:
It will also create a toplevel app.js file to setup namespacing and setup initial requires.
After this you need to install (publish) your assets
And you should see all the files now under your web dir ready for your template! web/bundles/acmedemo/js/
After putting this in your template and reloading the page you should see a popup message saying: "Hellow from Backbone!"
Scaffolding
This bundle provides a simple generator to help you get started with your backbone.js classes. The generator will only create client side code (javascript).
The scaffold generator creates skeleton router, view, model and collection classes
Example Usage
Output dir structure
Install without javascript assets
Using another jquery version or CDN hosted jquery
If you want to use your own jquery lib, just remove the jquery line in your template:
And make sure the other lines are AFTER your jquery lib is included:
Sample App
This simple app was created with this bundle: https://github.com/gigo6000/DevtimeRafflerBundle
All versions of backbone-bundle with dependencies
symfony/finder Version >=2.1.1
symfony/console Version >=2.1.1