SlideShare a Scribd company logo
1 of 22
Download to read 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

More Related Content

Similar to 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
 

Similar to 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
 

Recently uploaded

Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 

Recently uploaded (20)

Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 

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