SlideShare uma empresa Scribd logo
1 de 22
Baixar para ler offline
Delivering Business Value through IT
Modularize AngularJS Apps
- restaurant approach -
1
Delivering Business Value through IT
Modularization
Restaurant approach
▪ A Customer (Client) orders a meal
▪ Waiter Vasko (PM) takes the order
▪ Chef Me (Developer) prepares the meal
▪ Decorator Milena (Designer)
• make it look beautiful
▪ Cvetanka (Tester) tastes the meal
▪ At the end Vasko serves the meal
2
Delivering Business Value through IT
Modularization
Problem – client requirements
▪ Client app extension
▪ 3 different countries / versions
▪ Need different style
▪ Need different set of features
• Add new features
• Change old ones
▪ Most of them same / reused
▪ Do it in 2 weeks :)
3
Delivering Business Value through IT
How we did it initially
▪ COPY PASTE THE APP
▪ DELETEEEEEEEEEEEEE THE CODE THAT WAS NOT NEEDED
▪ RE-DESIGN THE APP
▪ DEMO:
▪ Restaurant javaB4days
▪ The story of two students with same task
4
Delivering Business Value through IT
Modularization
Agenda
▪ Problems / Motivation
▪ Monolithic V.S. Modularized Apps
▪ How to implement modularization?
• Module Identification
• Business V.S. Common modules
• Refactoring
• Build Scripts
• Module distribution
▪ Obstacles
▪ Benefits
5
Delivering Business Value through IT
Modularization
Problem – our goals (R&D team)
▪ Reuse the code
▪ Ease maintenance / testing
• Prepare for Continuous Integration
▪ Extensibility / new features
▪ Increase development speed
▪ Speed up the build for new affiliates
▪ Do it less than 2 weeks :)
▪ Solution is simple: Use Modules! But how?
6
Delivering Business Value through IT
Modularization
Monolith Apps
▪ what is monolith app?
▪ is angular monolith?
▪ but wait, there are modules…
▪ hmm, how to use them,
▪ what is module, or what should be?
▪ yet they are not distributed
7
Delivering Business Value through IT
Modularization
Benefits of using modules
▪ Distributed / independent development
▪ Code reusability
▪ Program readability / quality
▪ Encapsulation (module is a function)
▪ Manageable tasks
• design, implement and test
8
Delivering Business Value through IT
Modularization
Actual V.S. Expected
9
Delivering Business Value through IT
Modularization
How to do it
▪ Think a lot
▪ R&D, evaluation of existing solutions
• Yeoman
• ng-boilerplate
• npm / bower / grunt /
▪ Distribution
• Git
• Bower
• requireJS
10
Delivering Business Value through IT
Modularization
How to do it
▪ Define our meaning of module
• business v.s. common modules
▪ Work in parallel:
• grouping / refactoring business code
(top down approach)
• grouping / refactoring common code
(bottom up)
• while r&d: build scripts, module distribution, etc.
11
Delivering Business Value through IT
Modularization
Business Modules
▪ Structure
▪ Module definition: config / routes / deps.
▪ Controllers: services, model,
▪ View: html / directives
▪ Other resources: css, images,
▪ examples:
• Starter meal
• Main dish
• Dessert
12
Delivering Business Value through IT
Modularization
Common Modules
▪ same structure as business modules
▪ mainly services and providers
▪ html, directives
▪ other resources: css, images
▪ examples:
• menu,
• dialogs,
• data / cache providers,
• logger,
• i18n
13
Delivering Business Value through IT
Modularization
Build Scripts
▪ Gruntfile.js = task / build manager
▪ bower.json = dependency management
▪ Jshint/esLint = checkstyle and error detection
▪ Karma / protractor = test runner / end-2-end testing
▪ Sass / Compass = CSS extension language
▪ One script to rule them all:
• build, test, minify, compile a package
▪ We are now CI ready
14
Delivering Business Value through IT
Modularization
▪ Demo 2:
▪ Restaurant java2day
15
Delivering Business Value through IT
Modularization
New version
▪ java2day 1.0
• Starter 1.3
• Main dish 1.1
• Dessert 1.5
▪ java2morrow 1.0
• Main dish 1.4
• Dessert 2
16
Delivering Business Value through IT
Modularization
▪ Demo 3:
▪ restaurant java2morrow
17
Delivering Business Value through IT
Modularization
Distribution of modules
▪ not only separate folders,
but separate repos / versions
• bower modules
• node modules
• git submodules
▪ Maven-like modules / artifacts
▪ Resulted in 40 modules
• 6 in this demo
▪ Each has own module definition
18
Delivering Business Value through IT
Modularization
Obstacles
▪ Code everywhere
• it’s hard to gain control with a monolithic design
▪ Plug-ability of modules
• make them aware of each other using module manager / registration
▪ Generic common features
• menu, i18n bundles, configuration, caching, etc.
19
Delivering Business Value through IT
Modularization
Pros
▪ Increased speed of development
▪ Testable code, less regression bugs
▪ Faster, more secure application (sealed package)
▪ Improved the process of new app creation
▪ Ready for Continuous Integration
Cons
▪ Maintenance of module repositories is more time consuming
• New repo, merge, versioning, etc.
▪ Needs a lot of attention when creating a business module
• make it independent from other business modules
20
Delivering Business Value through IT
Modularization
Future
▪ Configurable builds with CI / versions
▪ Improve the distribution process
• try git subtree
▪ Improve modules
• More directives for the view’s part
• Even more atomic modules:
✓ choose even the ingredients in the menu
✓ how do you like your steak Sir?
21
Delivering Business Value through IT
Thank You!
Questions?
Authors:
Goran Kopevski
gkopevski@gmail.com
@gkopevski
Stojan Peshov
stojan.pesov@gmail.com
@spesov
Source code: https://github.com/gkopevski/2015.java2days.base
22

Mais conteúdo relacionado

Semelhante a Modularize angular js apps - java2days 2015 speech

Bojan Veljanovski - Modular Software Architecture and Design (Code Camp 2016)
Bojan Veljanovski - Modular Software Architecture and Design (Code Camp 2016)Bojan Veljanovski - Modular Software Architecture and Design (Code Camp 2016)
Bojan Veljanovski - Modular Software Architecture and Design (Code Camp 2016)Bojan Veljanovski
 
Gartner Infrastructure and Operations Summit Berlin 2015 - DevOps Journey
Gartner Infrastructure and Operations Summit Berlin 2015 - DevOps JourneyGartner Infrastructure and Operations Summit Berlin 2015 - DevOps Journey
Gartner Infrastructure and Operations Summit Berlin 2015 - DevOps JourneyKelly Looney
 
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know! (07-2...
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know! (07-2...Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know! (07-2...
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know! (07-2...Imaginet
 
Sitecore user group mumbai sitecore commerce extension
Sitecore user group mumbai  sitecore commerce extensionSitecore user group mumbai  sitecore commerce extension
Sitecore user group mumbai sitecore commerce extensionJitendra Soni
 
Code Management and Promotion (DDT) - Jason Cornell - ManageIQ Design Summit ...
Code Management and Promotion (DDT) - Jason Cornell - ManageIQ Design Summit ...Code Management and Promotion (DDT) - Jason Cornell - ManageIQ Design Summit ...
Code Management and Promotion (DDT) - Jason Cornell - ManageIQ Design Summit ...ManageIQ
 
Software Process Models
Software Process ModelsSoftware Process Models
Software Process ModelsAtul Karmyal
 
Sitecore Experience & SUGCON 2019
Sitecore Experience & SUGCON 2019Sitecore Experience & SUGCON 2019
Sitecore Experience & SUGCON 2019Rene Naplava
 
Software operability and run book collaboration - DevOps Summit, Bangalore
Software operability and run book collaboration - DevOps Summit, BangaloreSoftware operability and run book collaboration - DevOps Summit, Bangalore
Software operability and run book collaboration - DevOps Summit, BangaloreMatthew Skelton
 
A Day in the Life: Developer Enhancements with Visual Studio 2012
A Day in the Life: Developer Enhancements with Visual Studio 2012A Day in the Life: Developer Enhancements with Visual Studio 2012
A Day in the Life: Developer Enhancements with Visual Studio 2012Imaginet
 
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Phil Leggetter
 
New life inside monolithic application
New life inside monolithic applicationNew life inside monolithic application
New life inside monolithic applicationTaras Matyashovsky
 
BuchiReddy 5+Years Resume
BuchiReddy 5+Years ResumeBuchiReddy 5+Years Resume
BuchiReddy 5+Years Resumebuchireddy6
 
Developer Conference 1.4 - Customer In Focus- Sammons Financial Group (SFO)
Developer Conference 1.4 - Customer In Focus- Sammons Financial Group (SFO)Developer Conference 1.4 - Customer In Focus- Sammons Financial Group (SFO)
Developer Conference 1.4 - Customer In Focus- Sammons Financial Group (SFO)Micro Focus
 
Focused integration development with agile methodologies - Oracle Primavera P...
Focused integration development with agile methodologies - Oracle Primavera P...Focused integration development with agile methodologies - Oracle Primavera P...
Focused integration development with agile methodologies - Oracle Primavera P...p6academy
 
Webinar: Ten Ways to Enhance Your Salesforce.com Application in 2013
Webinar: Ten Ways to Enhance Your Salesforce.com Application in 2013Webinar: Ten Ways to Enhance Your Salesforce.com Application in 2013
Webinar: Ten Ways to Enhance Your Salesforce.com Application in 2013Emtec Inc.
 
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Theo Jungeblut
 
Drupal commerce an overview drupalcamp gent
Drupal commerce an overview   drupalcamp gentDrupal commerce an overview   drupalcamp gent
Drupal commerce an overview drupalcamp gentwesleydv
 

Semelhante a Modularize angular js apps - java2days 2015 speech (20)

DevOps Days Ohio
DevOps Days OhioDevOps Days Ohio
DevOps Days Ohio
 
Bojan Veljanovski - Modular Software Architecture and Design (Code Camp 2016)
Bojan Veljanovski - Modular Software Architecture and Design (Code Camp 2016)Bojan Veljanovski - Modular Software Architecture and Design (Code Camp 2016)
Bojan Veljanovski - Modular Software Architecture and Design (Code Camp 2016)
 
Gartner Infrastructure and Operations Summit Berlin 2015 - DevOps Journey
Gartner Infrastructure and Operations Summit Berlin 2015 - DevOps JourneyGartner Infrastructure and Operations Summit Berlin 2015 - DevOps Journey
Gartner Infrastructure and Operations Summit Berlin 2015 - DevOps Journey
 
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know! (07-2...
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know! (07-2...Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know! (07-2...
Upgrading to Team Foundation Server (TFS) 2012 – What You Need to Know! (07-2...
 
Sitecore user group mumbai sitecore commerce extension
Sitecore user group mumbai  sitecore commerce extensionSitecore user group mumbai  sitecore commerce extension
Sitecore user group mumbai sitecore commerce extension
 
Code Management and Promotion (DDT) - Jason Cornell - ManageIQ Design Summit ...
Code Management and Promotion (DDT) - Jason Cornell - ManageIQ Design Summit ...Code Management and Promotion (DDT) - Jason Cornell - ManageIQ Design Summit ...
Code Management and Promotion (DDT) - Jason Cornell - ManageIQ Design Summit ...
 
Software Process Models
Software Process ModelsSoftware Process Models
Software Process Models
 
Sitecore Experience & SUGCON 2019
Sitecore Experience & SUGCON 2019Sitecore Experience & SUGCON 2019
Sitecore Experience & SUGCON 2019
 
Technical Without Code
Technical Without CodeTechnical Without Code
Technical Without Code
 
Software operability and run book collaboration - DevOps Summit, Bangalore
Software operability and run book collaboration - DevOps Summit, BangaloreSoftware operability and run book collaboration - DevOps Summit, Bangalore
Software operability and run book collaboration - DevOps Summit, Bangalore
 
A Day in the Life: Developer Enhancements with Visual Studio 2012
A Day in the Life: Developer Enhancements with Visual Studio 2012A Day in the Life: Developer Enhancements with Visual Studio 2012
A Day in the Life: Developer Enhancements with Visual Studio 2012
 
Using Features
Using FeaturesUsing Features
Using Features
 
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
 
New life inside monolithic application
New life inside monolithic applicationNew life inside monolithic application
New life inside monolithic application
 
BuchiReddy 5+Years Resume
BuchiReddy 5+Years ResumeBuchiReddy 5+Years Resume
BuchiReddy 5+Years Resume
 
Developer Conference 1.4 - Customer In Focus- Sammons Financial Group (SFO)
Developer Conference 1.4 - Customer In Focus- Sammons Financial Group (SFO)Developer Conference 1.4 - Customer In Focus- Sammons Financial Group (SFO)
Developer Conference 1.4 - Customer In Focus- Sammons Financial Group (SFO)
 
Focused integration development with agile methodologies - Oracle Primavera P...
Focused integration development with agile methodologies - Oracle Primavera P...Focused integration development with agile methodologies - Oracle Primavera P...
Focused integration development with agile methodologies - Oracle Primavera P...
 
Webinar: Ten Ways to Enhance Your Salesforce.com Application in 2013
Webinar: Ten Ways to Enhance Your Salesforce.com Application in 2013Webinar: Ten Ways to Enhance Your Salesforce.com Application in 2013
Webinar: Ten Ways to Enhance Your Salesforce.com Application in 2013
 
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
 
Drupal commerce an overview drupalcamp gent
Drupal commerce an overview   drupalcamp gentDrupal commerce an overview   drupalcamp gent
Drupal commerce an overview drupalcamp gent
 

Último

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 

Último (20)

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 

Modularize angular js apps - java2days 2015 speech

  • 1. Delivering Business Value through IT Modularize AngularJS Apps - restaurant approach - 1
  • 2. Delivering Business Value through IT Modularization Restaurant approach ▪ A Customer (Client) orders a meal ▪ Waiter Vasko (PM) takes the order ▪ Chef Me (Developer) prepares the meal ▪ Decorator Milena (Designer) • make it look beautiful ▪ Cvetanka (Tester) tastes the meal ▪ At the end Vasko serves the meal 2
  • 3. Delivering Business Value through IT Modularization Problem – client requirements ▪ Client app extension ▪ 3 different countries / versions ▪ Need different style ▪ Need different set of features • Add new features • Change old ones ▪ Most of them same / reused ▪ Do it in 2 weeks :) 3
  • 4. Delivering Business Value through IT How we did it initially ▪ COPY PASTE THE APP ▪ DELETEEEEEEEEEEEEE THE CODE THAT WAS NOT NEEDED ▪ RE-DESIGN THE APP ▪ DEMO: ▪ Restaurant javaB4days ▪ The story of two students with same task 4
  • 5. Delivering Business Value through IT Modularization Agenda ▪ Problems / Motivation ▪ Monolithic V.S. Modularized Apps ▪ How to implement modularization? • Module Identification • Business V.S. Common modules • Refactoring • Build Scripts • Module distribution ▪ Obstacles ▪ Benefits 5
  • 6. Delivering Business Value through IT Modularization Problem – our goals (R&D team) ▪ Reuse the code ▪ Ease maintenance / testing • Prepare for Continuous Integration ▪ Extensibility / new features ▪ Increase development speed ▪ Speed up the build for new affiliates ▪ Do it less than 2 weeks :) ▪ Solution is simple: Use Modules! But how? 6
  • 7. Delivering Business Value through IT Modularization Monolith Apps ▪ what is monolith app? ▪ is angular monolith? ▪ but wait, there are modules… ▪ hmm, how to use them, ▪ what is module, or what should be? ▪ yet they are not distributed 7
  • 8. Delivering Business Value through IT Modularization Benefits of using modules ▪ Distributed / independent development ▪ Code reusability ▪ Program readability / quality ▪ Encapsulation (module is a function) ▪ Manageable tasks • design, implement and test 8
  • 9. Delivering Business Value through IT Modularization Actual V.S. Expected 9
  • 10. Delivering Business Value through IT Modularization How to do it ▪ Think a lot ▪ R&D, evaluation of existing solutions • Yeoman • ng-boilerplate • npm / bower / grunt / ▪ Distribution • Git • Bower • requireJS 10
  • 11. Delivering Business Value through IT Modularization How to do it ▪ Define our meaning of module • business v.s. common modules ▪ Work in parallel: • grouping / refactoring business code (top down approach) • grouping / refactoring common code (bottom up) • while r&d: build scripts, module distribution, etc. 11
  • 12. Delivering Business Value through IT Modularization Business Modules ▪ Structure ▪ Module definition: config / routes / deps. ▪ Controllers: services, model, ▪ View: html / directives ▪ Other resources: css, images, ▪ examples: • Starter meal • Main dish • Dessert 12
  • 13. Delivering Business Value through IT Modularization Common Modules ▪ same structure as business modules ▪ mainly services and providers ▪ html, directives ▪ other resources: css, images ▪ examples: • menu, • dialogs, • data / cache providers, • logger, • i18n 13
  • 14. Delivering Business Value through IT Modularization Build Scripts ▪ Gruntfile.js = task / build manager ▪ bower.json = dependency management ▪ Jshint/esLint = checkstyle and error detection ▪ Karma / protractor = test runner / end-2-end testing ▪ Sass / Compass = CSS extension language ▪ One script to rule them all: • build, test, minify, compile a package ▪ We are now CI ready 14
  • 15. Delivering Business Value through IT Modularization ▪ Demo 2: ▪ Restaurant java2day 15
  • 16. Delivering Business Value through IT Modularization New version ▪ java2day 1.0 • Starter 1.3 • Main dish 1.1 • Dessert 1.5 ▪ java2morrow 1.0 • Main dish 1.4 • Dessert 2 16
  • 17. Delivering Business Value through IT Modularization ▪ Demo 3: ▪ restaurant java2morrow 17
  • 18. Delivering Business Value through IT Modularization Distribution of modules ▪ not only separate folders, but separate repos / versions • bower modules • node modules • git submodules ▪ Maven-like modules / artifacts ▪ Resulted in 40 modules • 6 in this demo ▪ Each has own module definition 18
  • 19. Delivering Business Value through IT Modularization Obstacles ▪ Code everywhere • it’s hard to gain control with a monolithic design ▪ Plug-ability of modules • make them aware of each other using module manager / registration ▪ Generic common features • menu, i18n bundles, configuration, caching, etc. 19
  • 20. Delivering Business Value through IT Modularization Pros ▪ Increased speed of development ▪ Testable code, less regression bugs ▪ Faster, more secure application (sealed package) ▪ Improved the process of new app creation ▪ Ready for Continuous Integration Cons ▪ Maintenance of module repositories is more time consuming • New repo, merge, versioning, etc. ▪ Needs a lot of attention when creating a business module • make it independent from other business modules 20
  • 21. Delivering Business Value through IT Modularization Future ▪ Configurable builds with CI / versions ▪ Improve the distribution process • try git subtree ▪ Improve modules • More directives for the view’s part • Even more atomic modules: ✓ choose even the ingredients in the menu ✓ how do you like your steak Sir? 21
  • 22. Delivering Business Value through IT Thank You! Questions? Authors: Goran Kopevski gkopevski@gmail.com @gkopevski Stojan Peshov stojan.pesov@gmail.com @spesov Source code: https://github.com/gkopevski/2015.java2days.base 22