Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Backbone and r.js

No description

Attila Kerekes

on 27 February 2014

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Backbone and r.js

Optimizing Backbone Apps with r.js
RequireJS has an optimization tool that does the following:

Combines related scripts together into build layers
Example Project
Scaffolding: yeoman backbone with require.js
Views, models, collections etc. for modules
Shared views, models, collections etc.
No real support in yeoman backbone:
Bug: https://github.com/yeoman/generator-backbone/issues/59#issuecomment-35809035
Disable "uglify" (r.js takes over the job)
Disable "rev" (no more cache busting)
Disable final "usemin" job
Some files will be missing
Unnecessary files will be created
(Extend Gruntfile.js to fix those)
Split the app into some "bigger" modules
Split the app into some "bigger" modules
Main module
Shared libraries
Collections and models
First views and their dependencies
Exclude shared libraries
Include dependencies
Split the app into some "bigger" modules
No optimization
Yeoman default:
Everything to one file
Route based modules
The router(s) should use require() calls
Full transcript