AngularJSMeetup   Intilery.com
About Me• Founder and CEO of Intilery.com• Previously the CIO of The Hut group• And before that, 10 years as chief archite...
Intilery.com – App Stack5 parts:• UI/Web app dashboard (angular)• UI/Web app email designer (angular)• App Backend• A data...
Intilery.com – Tech Stack• Web apps – Angular, jQuery, Require (lots of  libs) talks to Java using JSON• App backend – Jav...
Intilery.com• Demo
RequireJS + AngularJS   Maintainable JavaScript Application = oxymoron?Apply the same principles of good software engineer...
PrinciplesEach file should contain one (and one only) component –  directive, filter, service, controller, view etc.Split ...
RequireJS SetupAll code at  https://github.com/cymantic/angular-require-  testacular
Directory Structureindex.html (the require script tag goes here)--libs     --angular     --jquery     --require       requ...
<script data-main="./scripts/main.js" src="libs/require/require-jquery.js"></script>(we are not yet optimizing the files i...
app.js – first non-library to load, we define our module herebootstrap.js – manually start up the application
Configuration
ControllerEditLinkController                       TextService(modal)                        MergeTagSvc                  ...
Text Inspector Controller
Text Content Svc – bound to the content editable element we are editing
Merge Tag Service
Angular meetup
Upcoming SlideShare
Loading in...5
×

Angular meetup

470
-1

Published on

Maintainable javascript applications with angularjs and requirejs

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
470
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Angular meetup

  1. 1. AngularJSMeetup Intilery.com
  2. 2. About Me• Founder and CEO of Intilery.com• Previously the CIO of The Hut group• And before that, 10 years as chief architect of Moneysupermarket.com
  3. 3. Intilery.com – App Stack5 parts:• UI/Web app dashboard (angular)• UI/Web app email designer (angular)• App Backend• A data collector/segmenter/analytics &personalisation engine• An email Sender (think mail chimp)
  4. 4. Intilery.com – Tech Stack• Web apps – Angular, jQuery, Require (lots of libs) talks to Java using JSON• App backend – Java, Jersey, Spring IOC, Guava, Mongo, MySQL• Collector – Java event pipeline, twitter storm (like), rules engine, elastic search, MySQL• Emailer – Java, Spring Quartz, StringTemplate• Env - AWS
  5. 5. Intilery.com• Demo
  6. 6. RequireJS + AngularJS Maintainable JavaScript Application = oxymoron?Apply the same principles of good software engineering to angularjs apps.JavaScript is very flexible, very easy to write undisciplined code (and architecture) – be strict!
  7. 7. PrinciplesEach file should contain one (and one only) component – directive, filter, service, controller, view etc.Split out components into smaller components (each own file).Spilt out the app into smaller apps – We use our API’s to integrate app.Use RequireJS to manage the dependencies and loading of libs and your components
  8. 8. RequireJS SetupAll code at https://github.com/cymantic/angular-require- testacular
  9. 9. Directory Structureindex.html (the require script tag goes here)--libs --angular --jquery --require require-jquery.js (jQuery loaded here) --domReady (needed in some browsers when scripts loaded before dom is ready)--scripts (your components) --controller --directives --filters --resources --servicesapp.js (angular module of app defined here)bootstrap.js (manual bootstrapping of the app)main.js (require configuration and route configuration)--styles--templates--views
  10. 10. <script data-main="./scripts/main.js" src="libs/require/require-jquery.js"></script>(we are not yet optimizing the files into a single file – todo before beta launch)main.js
  11. 11. app.js – first non-library to load, we define our module herebootstrap.js – manually start up the application
  12. 12. Configuration
  13. 13. ControllerEditLinkController TextService(modal) MergeTagSvc DataModelRsrc AlignmentMenuSvc SelectionMgrSvc PasteMgrSvc FormattingMgrSvc
  14. 14. Text Inspector Controller
  15. 15. Text Content Svc – bound to the content editable element we are editing
  16. 16. Merge Tag Service
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×