Async Module Definition via RequireJS

15,482 views

Published on

Модульный подход во Frontend-разработке, который помогает структурировать не только код, но и мысли. Работаем с javascript под управлением RequireJS

Презентация подготовлена по материалам прошедшего 19 ноября витебского фронтенд-митапа: http://devowl.org/

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
15,482
On SlideShare
0
From Embeds
0
Number of Embeds
12,441
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Async Module Definition via RequireJS

  1. 1. ASYNC MODULE DEFINITION author Vlad Batushkov
  2. 2. Agenda • • • • Client-side complexity AMD - how it work (client-side only) Usage Samples
  3. 3. Client-side g Not a single page application C Features add complexity k Dependency order Compatibility t conflicts I Performance suicide v
  4. 4. Solution AMD powered by RequireJS IE 6+, Firefox 2+, Safari 3.2+, Chrome 3+ and Opera 10+
  5. 5. Principle SYNC ASYNC ASYNC ASYNC SYNC SYNC
  6. 6. Compare
  7. 7. Module First.js Second.js Third.js MODULE.JS
  8. 8. AMD in action
  9. 9. Knockout jQuery Bootstrap
  10. 10. Async in action
  11. 11. Define
  12. 12. jquery.amdmodule.js as Require
  13. 13. bootstrap.amdmodule.js as Define
  14. 14. knockout.amdmodule.js as Define
  15. 15. Enjoy Homepage: http://requirejs.org/ Manifesto: http://wiki.commonjs.org/wiki/CommonJS Articles: http://addyosmani.com/writing-modular-js/ http://habrahabr.ru/post/152833/ GitHub: https://github.com/amdjs/amdjs-api/wiki/AMD
  16. 16. Thanks Mail: vlad.batushkov@gmail.com Skype: vlad.batushkov, vladdrez Blog: http://devroof.blogspot.ru/

×