SlideShare a Scribd company logo
How to Implement Micro Frontend
Architecture using Angular
Framework
Presented by: Unnikrishnan M, Software Engineer
How to Implement Micro Frontend Architecture using Angular Framework
© RapidValue Solutions Confidential 2
Micro Frontend Architecture in Angular
The Angular team introduced the concept of workspaces in their 7.0.0 version which was released in Oct, 2018.
With this update, Angular gave developers a new --create-application flag feature during creation of the
application. By default the --create-application flag will be false.
Example:-
ng new <workspaceName> --create-application=<true/false>
With this addition, the developers now have the option to easily create an application, library or workspace.
The following is the Angular CLI command to generate/modify the files based on schematics:-
ng generate <schematic> [options]
This schematic can take one of the following values:
• appShell
• application
• class
• component
• directive
• enum
• guard
• interceptor
• interface
• library
• module
• pipe
• service
• serviceWorker
• webWorker
Workspace Setup-Basic Angular CLI Commands How to
Implement Micro Frontend Architecture using Angular
Framework
We will be looking into the basic commands used for generating:-
1. Application
ng generate application <name> [options]
ng g application <name> [options]
OPTION DESCRIPTION
--inlineStyle=true|false True -> Includes styles inline in the root component.ts file.
Only CSS styles can be included inline.
False -> External styles file is created and referenced in the root
component.ts file.
Default: false
Aliases: -s
How to Implement Micro Frontend Architecture using Angular Framework
© RapidValue Solutions Confidential 3
--inlineTemplate=true|false True -> Includes template inline in the root component.ts file.
False ->External template file is created and referenced in the root
component.ts file.
Default: false
Aliases: -t
--lintFix=true|false True -> Applies lint fixes after generating the application.
Default: false
--minimal=true|false True -> Creates a bare-bones project without any testing frameworks.
(Used for learning purposes only.)
Default: false
--prefix=prefix A prefix to apply to generated selectors.
Default: app
Aliases: -p
--routing=true|false True -> Creates a routing NgModule.
Default: false
--skipInstall=true|false Skips installing dependency packages.
Default: false
--skipPackageJson=true|false True -> Does not add dependencies to the "package.json" file.
Default: false
--skipTests=true|false True -> Does not create "spec.ts" test files for the app.
Default: false
Aliases: -S
--style=
css|scss|sass|less|styl
File extension/preprocessor to use for style files.
Default: css
--viewEncapsulation=
Emulated|Native|None|ShadowDom
View encapsulation strategy to use in the new app.
2. Component
ng generate component <name> [options]
ng g component <name> [options]
OPTION DESCRIPTION
--changeDetection=Default|OnPush Change detection strategy to use in the new component.
Default: Default
Aliases: -c
--displayBlock=true|false Specifies if the style will contain :host { display: block; }.
Default: false
Aliases: -b
--export=true|false True -> Declaring NgModule exports this component.
Default: false
--flat=true|false True -> Creates the new files at the top level of the current project.
Default: false
How to Implement Micro Frontend Architecture using Angular Framework
© RapidValue Solutions Confidential 4
--inlineStyle=true|false True -> Includes styles inline in the root component.ts file.
Only CSS styles can be included inline.
False -> External styles file is created and referenced in the root
component.ts file.
Default: false
Aliases: -s
--inlineTemplate=true|false True -> Includes template inline in the root component.ts file.
False ->External template file is created and referenced in the root
component.ts file.
Default: false
Aliases: -t
--lintFix=true|false True -> Applies lint fixes after generating the application.
Default: false
--module=module Declaring NgModule.
Aliases: -m
--prefix=prefix Prefix to apply to the generated component selector.
Aliases: -p
--project=project Name of the project.
--selector=selector HTML selector to use for this component.
--skipImport=true|false True -> Does not import this component into the owning NgModule.
Default: false
--skipSelector=true|false True -> Specifies if the component should have a selector.
Default: false
--skipTests=true|false True -> Does not create "spec.ts" test files for the new component.
Default: false
--style=
css|scss|sass|less|styl
File extension or preprocessor to use for style files.
Default: css
--type=type Adds a developer-defined type to the filename, in the format
"name.type.ts".
Default: Component
--viewEncapsulation=
Emulated|Native|None|ShadowDom
View encapsulation strategy to use in the new component.
Aliases: -v
3. Library
ng generate library <name> [options]
ng g library <name> [options]
OPTION DESCRIPTION
--entryFile=entryFile Path in which the library's public API file is created, relative to the workspace
root.
Default: public-api
--lintFix=true|false True -> Applies lint fixes after generating the library.
Default: false
How to Implement Micro Frontend Architecture using Angular Framework
© RapidValue Solutions Confidential 5
--prefix=prefix Prefix to apply to generated selectors.
Default: lib
Aliases: -p
--skipInstall=true|false True -> does not install dependency packages.
Default: false
--
skipPackageJson=true|false
True -> Does not add dependencies to the "package.json" file.
Default: false
--skipTsConfig=true|false True -> Does not update "tsconfig.json" to add a path mapping for the new
library. The path mapping is needed to use the library in an app, but can be
disabled here to simplify development.
Default: false
How to Implement Micro Frontend Architecture using Angular
Framework
The basic idea is to create an application that has the following characteristics, incorporating the new feature. The
outline is as follows:-
1. Create a workspace named Next.
2. It has 2 projects named - User Management, Login.
3. It has a library named apiCall which is used across the 2 projects.
Let's start creating it:-
Step 1
Open git bash in the desired folder location.
Type in:-
ng new Next --create-application=false;
Dive inside the Next folder. The created project structure is as follows:-
WORKSPACE
CONFIG FILES PURPOSE
.editorconfig Configuration for code editors.
.gitignore Specifies intentionally untracked files that Git should ignore.
How to Implement Micro Frontend Architecture using Angular Framework
© RapidValue Solutions Confidential 6
README.md Introductory documentation for the root app.
angular.json CLI configuration defaults for all projects in the workspace, including configuration options
for build, serve, and test tools that the CLI uses, such as TSLint, Karma, and Protractor.
package.json Configures npm package dependencies that are available to all projects in the workspace.
package-lock.json Provides version information for all packages installed into node_modules by the npm
client.
src/ Source files for the root-level application project.
node_modules/ Npm packages to the entire workspace. Workspace-wide node_modules dependencies are
visible to all projects.
tsconfig.json Default TypeScript configuration for projects in the workspace.
tslint.json Default TSLint configuration for projects in the workspace.
Step 2
Create new project UserManagement.
Type in:-
ng generate application UserManagement
Similarly create an application called Login following the same above commands.
ng generate application Login
The end result will be like:-
How to Implement Micro Frontend Architecture using Angular Framework
© RapidValue Solutions Confidential 7
Note - The Login and User Management are two separate Angular Applications. We also have an option to set the
default when the workspace is served. All the features that can be used in Angular projects apply to each of these
projects too. Additional to that, we can also share the styles, assets and services across all the projects inside the
workspace.
APP SUPPORT
FILES PURPOSE
app/ Component files in which your application logic and data are defined.
assets/ Images and other asset files to be copied when you build your application.
environments/ Build configuration options for particular target environments. By default there is an unnamed
standard development environment and a production ("prod") environment. You can define
additional target environment configurations.
favicon.ico Icon used in the bookmark bar.
index.html The main HTML page that is served when someone visits your site. The CLI automatically adds
all JavaScript and CSS files when building your app, so you typically don't need to add any
<script> or<link> tags here manually.
main.ts The main entry point for your application. Compiles the application with the JIT compiler and
bootstraps the application's root module (AppModule) to run in the browser.
polyfills.ts Provides polyfill scripts for browser support.
styles.sass Lists CSS files that supply styles for a project. The extension reflects the style preprocessor you
have configured for the project.
test.ts Main entry point for your unit tests, with some Angular-specific configuration. You don't typically
need to edit this file.
app/src/
Angular components, templates, and styles go here. The app/scr/ folder inside contain your
project's logic and data.
Step 3 –
How to Implement Micro Frontend Architecture using Angular Framework
© RapidValue Solutions Confidential 8
Create a library apiCall in the work space.
Type in:-
ng generate library apiCall
It will look like the following in the editor:-
Now the newly created apiCall library can be added as a dependency in both the Login and User Management
applications created earlier. The library can be reused across the workspace.
How to Implement Micro Frontend Architecture using Angular Framework
© RapidValue Solutions Confidential 9
About RapidValue
RapidValue is a global leader in providing digital product engineering solutions including Mobility, Cloud,
Omni-channel, IoT and RPA to enterprises worldwide. RapidValue offers its digital services to the world’s
top brands, Fortune 1000 companies, and innovative emerging start-ups. With offices in the United
States, the United Kingdom, Germany, and India and operations spread across the Middle-East, Europe,
and Canada, RapidValue delivers enterprise service and solutions across various industry verticals.
Disclaimer:
This document contains information that is confidential and proprietary to RapidValue Solutions Inc. No part of it may be used,
circulated, quoted, or reproduced for distribution outside RapidValue. If you are not the intended recipient of this report, you are
hereby notified that the use, circulation, quoting, or reproducing of this report is strictly prohibited and may be unlawful.
© RapidValue Solutions
www.rapidvaluesolutions.com/blogwww.rapidvaluesolutions.com
+1 877.643.1850 contactus@rapidvaluesolutions.com

More Related Content

What's hot

How to build Micro Frontends with @angular/elements
How to build Micro Frontends with @angular/elementsHow to build Micro Frontends with @angular/elements
How to build Micro Frontends with @angular/elements
MarcellKiss7
 
DevSecOps
DevSecOpsDevSecOps
DevSecOps
Joel Divekar
 
Azure AKS
Azure AKSAzure AKS
Azure AKS
Gaetan Jaminon
 
Vue.js
Vue.jsVue.js
Practical Microservice Architecture (edition 2022).pdf
Practical Microservice Architecture (edition 2022).pdfPractical Microservice Architecture (edition 2022).pdf
Practical Microservice Architecture (edition 2022).pdf
Ahmed Misbah
 
Web Development with Laravel 5
Web Development with Laravel 5Web Development with Laravel 5
Web Development with Laravel 5
Soheil Khodayari
 
Jenkins presentation
Jenkins presentationJenkins presentation
Jenkins presentation
Valentin Buryakov
 
Docker
DockerDocker
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Dilouar Hossain
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
Peng Xiao
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To Jenkins
Knoldus Inc.
 
Docker Advanced registry usage
Docker Advanced registry usageDocker Advanced registry usage
Docker Advanced registry usage
Docker, Inc.
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerJohn Willis
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Raffaele Di Fazio
 
Docker.pptx
Docker.pptxDocker.pptx
Docker.pptx
balaji257
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
Phuc Nguyen
 
Why Laravel?
Why Laravel?Why Laravel?
Why Laravel?
Jonathan Goode
 
From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...
Jérôme Petazzoni
 
Virtual Container - Docker
Virtual Container - Docker Virtual Container - Docker
Virtual Container - Docker
Venkata Naga Ravi
 
A quick introduction to AKS
A quick introduction to AKSA quick introduction to AKS
A quick introduction to AKS
Alessandro Melchiori
 

What's hot (20)

How to build Micro Frontends with @angular/elements
How to build Micro Frontends with @angular/elementsHow to build Micro Frontends with @angular/elements
How to build Micro Frontends with @angular/elements
 
DevSecOps
DevSecOpsDevSecOps
DevSecOps
 
Azure AKS
Azure AKSAzure AKS
Azure AKS
 
Vue.js
Vue.jsVue.js
Vue.js
 
Practical Microservice Architecture (edition 2022).pdf
Practical Microservice Architecture (edition 2022).pdfPractical Microservice Architecture (edition 2022).pdf
Practical Microservice Architecture (edition 2022).pdf
 
Web Development with Laravel 5
Web Development with Laravel 5Web Development with Laravel 5
Web Development with Laravel 5
 
Jenkins presentation
Jenkins presentationJenkins presentation
Jenkins presentation
 
Docker
DockerDocker
Docker
 
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To Jenkins
 
Docker Advanced registry usage
Docker Advanced registry usageDocker Advanced registry usage
Docker Advanced registry usage
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Docker.pptx
Docker.pptxDocker.pptx
Docker.pptx
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Why Laravel?
Why Laravel?Why Laravel?
Why Laravel?
 
From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...
 
Virtual Container - Docker
Virtual Container - Docker Virtual Container - Docker
Virtual Container - Docker
 
A quick introduction to AKS
A quick introduction to AKSA quick introduction to AKS
A quick introduction to AKS
 

Similar to How to Implement Micro Frontend Architecture using Angular Framework

Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris O'Brien
 
Pyramid patterns
Pyramid patternsPyramid patterns
Pyramid patterns
Carlos de la Guardia
 
An Overview of Angular 4
An Overview of Angular 4 An Overview of Angular 4
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework Basic
Mario Romano
 
Priming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the CloudPriming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the Cloud
Matt Callanan
 
بررسی چارچوب جنگو
بررسی چارچوب جنگوبررسی چارچوب جنگو
بررسی چارچوب جنگو
railsbootcamp
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!
David Gibbons
 
Angular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive FormsAngular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive Forms
Digamber Singh
 
Angular4 getting started
Angular4 getting startedAngular4 getting started
Angular4 getting started
TejinderMakkar
 
Angularjs2 presentation
Angularjs2 presentationAngularjs2 presentation
Angularjs2 presentation
dharisk
 
3 Ways to Get Started with a React App in 2024.pdf
3 Ways to Get Started with a React App in 2024.pdf3 Ways to Get Started with a React App in 2024.pdf
3 Ways to Get Started with a React App in 2024.pdf
BOSC Tech Labs
 
Azure machine learning service
Azure machine learning serviceAzure machine learning service
Azure machine learning service
Ruth Yakubu
 
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part OneAppcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
Aaron Saunders
 
React django
React djangoReact django
React django
Heber Silva
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015
Pushkar Chivate
 
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsPVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
Andrey Karpov
 
Angular 9
Angular 9 Angular 9
Angular 9
Raja Vishnu
 
Useful practices of creation automatic tests by using cucumber jvm
Useful practices of creation automatic tests by using cucumber jvmUseful practices of creation automatic tests by using cucumber jvm
Useful practices of creation automatic tests by using cucumber jvm
Anton Shapin
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
Suresh Patidar
 
Angular performance slides
Angular performance slidesAngular performance slides
Angular performance slides
David Barreto
 

Similar to How to Implement Micro Frontend Architecture using Angular Framework (20)

Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
 
Pyramid patterns
Pyramid patternsPyramid patterns
Pyramid patterns
 
An Overview of Angular 4
An Overview of Angular 4 An Overview of Angular 4
An Overview of Angular 4
 
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework Basic
 
Priming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the CloudPriming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the Cloud
 
بررسی چارچوب جنگو
بررسی چارچوب جنگوبررسی چارچوب جنگو
بررسی چارچوب جنگو
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!
 
Angular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive FormsAngular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive Forms
 
Angular4 getting started
Angular4 getting startedAngular4 getting started
Angular4 getting started
 
Angularjs2 presentation
Angularjs2 presentationAngularjs2 presentation
Angularjs2 presentation
 
3 Ways to Get Started with a React App in 2024.pdf
3 Ways to Get Started with a React App in 2024.pdf3 Ways to Get Started with a React App in 2024.pdf
3 Ways to Get Started with a React App in 2024.pdf
 
Azure machine learning service
Azure machine learning serviceAzure machine learning service
Azure machine learning service
 
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part OneAppcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
Appcelerator Titanium Alloy + Kinvey Collection Databinding - Part One
 
React django
React djangoReact django
React django
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015
 
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsPVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
 
Angular 9
Angular 9 Angular 9
Angular 9
 
Useful practices of creation automatic tests by using cucumber jvm
Useful practices of creation automatic tests by using cucumber jvmUseful practices of creation automatic tests by using cucumber jvm
Useful practices of creation automatic tests by using cucumber jvm
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
 
Angular performance slides
Angular performance slidesAngular performance slides
Angular performance slides
 

More from RapidValue

How to Build a Micro-Application using Single-Spa
How to Build a Micro-Application using Single-SpaHow to Build a Micro-Application using Single-Spa
How to Build a Micro-Application using Single-Spa
RapidValue
 
Play with Jenkins Pipeline
Play with Jenkins PipelinePlay with Jenkins Pipeline
Play with Jenkins Pipeline
RapidValue
 
Accessibility Testing using Axe
Accessibility Testing using AxeAccessibility Testing using Axe
Accessibility Testing using Axe
RapidValue
 
Guide to Generate Extent Report in Kotlin
Guide to Generate Extent Report in KotlinGuide to Generate Extent Report in Kotlin
Guide to Generate Extent Report in Kotlin
RapidValue
 
Automation in Digital Cloud Labs
Automation in Digital Cloud LabsAutomation in Digital Cloud Labs
Automation in Digital Cloud Labs
RapidValue
 
Microservices Architecture - Top Trends & Key Business Benefits
Microservices Architecture -  Top Trends & Key Business BenefitsMicroservices Architecture -  Top Trends & Key Business Benefits
Microservices Architecture - Top Trends & Key Business Benefits
RapidValue
 
Uploading Data Using Oracle Web ADI
Uploading Data Using Oracle Web ADIUploading Data Using Oracle Web ADI
Uploading Data Using Oracle Web ADI
RapidValue
 
Appium Automation with Kotlin
Appium Automation with KotlinAppium Automation with Kotlin
Appium Automation with Kotlin
RapidValue
 
Build UI of the Future with React 360
Build UI of the Future with React 360Build UI of the Future with React 360
Build UI of the Future with React 360
RapidValue
 
Python Google Cloud Function with CORS
Python Google Cloud Function with CORSPython Google Cloud Function with CORS
Python Google Cloud Function with CORS
RapidValue
 
Real-time Automation Result in Slack Channel
Real-time Automation Result in Slack ChannelReal-time Automation Result in Slack Channel
Real-time Automation Result in Slack Channel
RapidValue
 
Automation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDDAutomation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDD
RapidValue
 
Video Recording of Selenium Automation Flows
Video Recording of Selenium Automation FlowsVideo Recording of Selenium Automation Flows
Video Recording of Selenium Automation Flows
RapidValue
 
JMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeterJMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeter
RapidValue
 
Migration to Extent Report 4
Migration to Extent Report 4Migration to Extent Report 4
Migration to Extent Report 4
RapidValue
 
The Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QAThe Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QA
RapidValue
 
Data Seeding via Parameterized API Requests
Data Seeding via Parameterized API RequestsData Seeding via Parameterized API Requests
Data Seeding via Parameterized API Requests
RapidValue
 
Test Case Creation in Katalon Studio
Test Case Creation in Katalon StudioTest Case Creation in Katalon Studio
Test Case Creation in Katalon Studio
RapidValue
 
How to Perform Memory Leak Test Using Valgrind
How to Perform Memory Leak Test Using ValgrindHow to Perform Memory Leak Test Using Valgrind
How to Perform Memory Leak Test Using Valgrind
RapidValue
 
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValueDevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
RapidValue
 

More from RapidValue (20)

How to Build a Micro-Application using Single-Spa
How to Build a Micro-Application using Single-SpaHow to Build a Micro-Application using Single-Spa
How to Build a Micro-Application using Single-Spa
 
Play with Jenkins Pipeline
Play with Jenkins PipelinePlay with Jenkins Pipeline
Play with Jenkins Pipeline
 
Accessibility Testing using Axe
Accessibility Testing using AxeAccessibility Testing using Axe
Accessibility Testing using Axe
 
Guide to Generate Extent Report in Kotlin
Guide to Generate Extent Report in KotlinGuide to Generate Extent Report in Kotlin
Guide to Generate Extent Report in Kotlin
 
Automation in Digital Cloud Labs
Automation in Digital Cloud LabsAutomation in Digital Cloud Labs
Automation in Digital Cloud Labs
 
Microservices Architecture - Top Trends & Key Business Benefits
Microservices Architecture -  Top Trends & Key Business BenefitsMicroservices Architecture -  Top Trends & Key Business Benefits
Microservices Architecture - Top Trends & Key Business Benefits
 
Uploading Data Using Oracle Web ADI
Uploading Data Using Oracle Web ADIUploading Data Using Oracle Web ADI
Uploading Data Using Oracle Web ADI
 
Appium Automation with Kotlin
Appium Automation with KotlinAppium Automation with Kotlin
Appium Automation with Kotlin
 
Build UI of the Future with React 360
Build UI of the Future with React 360Build UI of the Future with React 360
Build UI of the Future with React 360
 
Python Google Cloud Function with CORS
Python Google Cloud Function with CORSPython Google Cloud Function with CORS
Python Google Cloud Function with CORS
 
Real-time Automation Result in Slack Channel
Real-time Automation Result in Slack ChannelReal-time Automation Result in Slack Channel
Real-time Automation Result in Slack Channel
 
Automation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDDAutomation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDD
 
Video Recording of Selenium Automation Flows
Video Recording of Selenium Automation FlowsVideo Recording of Selenium Automation Flows
Video Recording of Selenium Automation Flows
 
JMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeterJMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeter
 
Migration to Extent Report 4
Migration to Extent Report 4Migration to Extent Report 4
Migration to Extent Report 4
 
The Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QAThe Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QA
 
Data Seeding via Parameterized API Requests
Data Seeding via Parameterized API RequestsData Seeding via Parameterized API Requests
Data Seeding via Parameterized API Requests
 
Test Case Creation in Katalon Studio
Test Case Creation in Katalon StudioTest Case Creation in Katalon Studio
Test Case Creation in Katalon Studio
 
How to Perform Memory Leak Test Using Valgrind
How to Perform Memory Leak Test Using ValgrindHow to Perform Memory Leak Test Using Valgrind
How to Perform Memory Leak Test Using Valgrind
 
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValueDevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
 

Recently uploaded

Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 

Recently uploaded (20)

Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 

How to Implement Micro Frontend Architecture using Angular Framework

  • 1. How to Implement Micro Frontend Architecture using Angular Framework Presented by: Unnikrishnan M, Software Engineer
  • 2. How to Implement Micro Frontend Architecture using Angular Framework © RapidValue Solutions Confidential 2 Micro Frontend Architecture in Angular The Angular team introduced the concept of workspaces in their 7.0.0 version which was released in Oct, 2018. With this update, Angular gave developers a new --create-application flag feature during creation of the application. By default the --create-application flag will be false. Example:- ng new <workspaceName> --create-application=<true/false> With this addition, the developers now have the option to easily create an application, library or workspace. The following is the Angular CLI command to generate/modify the files based on schematics:- ng generate <schematic> [options] This schematic can take one of the following values: • appShell • application • class • component • directive • enum • guard • interceptor • interface • library • module • pipe • service • serviceWorker • webWorker Workspace Setup-Basic Angular CLI Commands How to Implement Micro Frontend Architecture using Angular Framework We will be looking into the basic commands used for generating:- 1. Application ng generate application <name> [options] ng g application <name> [options] OPTION DESCRIPTION --inlineStyle=true|false True -> Includes styles inline in the root component.ts file. Only CSS styles can be included inline. False -> External styles file is created and referenced in the root component.ts file. Default: false Aliases: -s
  • 3. How to Implement Micro Frontend Architecture using Angular Framework © RapidValue Solutions Confidential 3 --inlineTemplate=true|false True -> Includes template inline in the root component.ts file. False ->External template file is created and referenced in the root component.ts file. Default: false Aliases: -t --lintFix=true|false True -> Applies lint fixes after generating the application. Default: false --minimal=true|false True -> Creates a bare-bones project without any testing frameworks. (Used for learning purposes only.) Default: false --prefix=prefix A prefix to apply to generated selectors. Default: app Aliases: -p --routing=true|false True -> Creates a routing NgModule. Default: false --skipInstall=true|false Skips installing dependency packages. Default: false --skipPackageJson=true|false True -> Does not add dependencies to the "package.json" file. Default: false --skipTests=true|false True -> Does not create "spec.ts" test files for the app. Default: false Aliases: -S --style= css|scss|sass|less|styl File extension/preprocessor to use for style files. Default: css --viewEncapsulation= Emulated|Native|None|ShadowDom View encapsulation strategy to use in the new app. 2. Component ng generate component <name> [options] ng g component <name> [options] OPTION DESCRIPTION --changeDetection=Default|OnPush Change detection strategy to use in the new component. Default: Default Aliases: -c --displayBlock=true|false Specifies if the style will contain :host { display: block; }. Default: false Aliases: -b --export=true|false True -> Declaring NgModule exports this component. Default: false --flat=true|false True -> Creates the new files at the top level of the current project. Default: false
  • 4. How to Implement Micro Frontend Architecture using Angular Framework © RapidValue Solutions Confidential 4 --inlineStyle=true|false True -> Includes styles inline in the root component.ts file. Only CSS styles can be included inline. False -> External styles file is created and referenced in the root component.ts file. Default: false Aliases: -s --inlineTemplate=true|false True -> Includes template inline in the root component.ts file. False ->External template file is created and referenced in the root component.ts file. Default: false Aliases: -t --lintFix=true|false True -> Applies lint fixes after generating the application. Default: false --module=module Declaring NgModule. Aliases: -m --prefix=prefix Prefix to apply to the generated component selector. Aliases: -p --project=project Name of the project. --selector=selector HTML selector to use for this component. --skipImport=true|false True -> Does not import this component into the owning NgModule. Default: false --skipSelector=true|false True -> Specifies if the component should have a selector. Default: false --skipTests=true|false True -> Does not create "spec.ts" test files for the new component. Default: false --style= css|scss|sass|less|styl File extension or preprocessor to use for style files. Default: css --type=type Adds a developer-defined type to the filename, in the format "name.type.ts". Default: Component --viewEncapsulation= Emulated|Native|None|ShadowDom View encapsulation strategy to use in the new component. Aliases: -v 3. Library ng generate library <name> [options] ng g library <name> [options] OPTION DESCRIPTION --entryFile=entryFile Path in which the library's public API file is created, relative to the workspace root. Default: public-api --lintFix=true|false True -> Applies lint fixes after generating the library. Default: false
  • 5. How to Implement Micro Frontend Architecture using Angular Framework © RapidValue Solutions Confidential 5 --prefix=prefix Prefix to apply to generated selectors. Default: lib Aliases: -p --skipInstall=true|false True -> does not install dependency packages. Default: false -- skipPackageJson=true|false True -> Does not add dependencies to the "package.json" file. Default: false --skipTsConfig=true|false True -> Does not update "tsconfig.json" to add a path mapping for the new library. The path mapping is needed to use the library in an app, but can be disabled here to simplify development. Default: false How to Implement Micro Frontend Architecture using Angular Framework The basic idea is to create an application that has the following characteristics, incorporating the new feature. The outline is as follows:- 1. Create a workspace named Next. 2. It has 2 projects named - User Management, Login. 3. It has a library named apiCall which is used across the 2 projects. Let's start creating it:- Step 1 Open git bash in the desired folder location. Type in:- ng new Next --create-application=false; Dive inside the Next folder. The created project structure is as follows:- WORKSPACE CONFIG FILES PURPOSE .editorconfig Configuration for code editors. .gitignore Specifies intentionally untracked files that Git should ignore.
  • 6. How to Implement Micro Frontend Architecture using Angular Framework © RapidValue Solutions Confidential 6 README.md Introductory documentation for the root app. angular.json CLI configuration defaults for all projects in the workspace, including configuration options for build, serve, and test tools that the CLI uses, such as TSLint, Karma, and Protractor. package.json Configures npm package dependencies that are available to all projects in the workspace. package-lock.json Provides version information for all packages installed into node_modules by the npm client. src/ Source files for the root-level application project. node_modules/ Npm packages to the entire workspace. Workspace-wide node_modules dependencies are visible to all projects. tsconfig.json Default TypeScript configuration for projects in the workspace. tslint.json Default TSLint configuration for projects in the workspace. Step 2 Create new project UserManagement. Type in:- ng generate application UserManagement Similarly create an application called Login following the same above commands. ng generate application Login The end result will be like:-
  • 7. How to Implement Micro Frontend Architecture using Angular Framework © RapidValue Solutions Confidential 7 Note - The Login and User Management are two separate Angular Applications. We also have an option to set the default when the workspace is served. All the features that can be used in Angular projects apply to each of these projects too. Additional to that, we can also share the styles, assets and services across all the projects inside the workspace. APP SUPPORT FILES PURPOSE app/ Component files in which your application logic and data are defined. assets/ Images and other asset files to be copied when you build your application. environments/ Build configuration options for particular target environments. By default there is an unnamed standard development environment and a production ("prod") environment. You can define additional target environment configurations. favicon.ico Icon used in the bookmark bar. index.html The main HTML page that is served when someone visits your site. The CLI automatically adds all JavaScript and CSS files when building your app, so you typically don't need to add any <script> or<link> tags here manually. main.ts The main entry point for your application. Compiles the application with the JIT compiler and bootstraps the application's root module (AppModule) to run in the browser. polyfills.ts Provides polyfill scripts for browser support. styles.sass Lists CSS files that supply styles for a project. The extension reflects the style preprocessor you have configured for the project. test.ts Main entry point for your unit tests, with some Angular-specific configuration. You don't typically need to edit this file. app/src/ Angular components, templates, and styles go here. The app/scr/ folder inside contain your project's logic and data. Step 3 –
  • 8. How to Implement Micro Frontend Architecture using Angular Framework © RapidValue Solutions Confidential 8 Create a library apiCall in the work space. Type in:- ng generate library apiCall It will look like the following in the editor:- Now the newly created apiCall library can be added as a dependency in both the Login and User Management applications created earlier. The library can be reused across the workspace.
  • 9. How to Implement Micro Frontend Architecture using Angular Framework © RapidValue Solutions Confidential 9 About RapidValue RapidValue is a global leader in providing digital product engineering solutions including Mobility, Cloud, Omni-channel, IoT and RPA to enterprises worldwide. RapidValue offers its digital services to the world’s top brands, Fortune 1000 companies, and innovative emerging start-ups. With offices in the United States, the United Kingdom, Germany, and India and operations spread across the Middle-East, Europe, and Canada, RapidValue delivers enterprise service and solutions across various industry verticals. Disclaimer: This document contains information that is confidential and proprietary to RapidValue Solutions Inc. No part of it may be used, circulated, quoted, or reproduced for distribution outside RapidValue. If you are not the intended recipient of this report, you are hereby notified that the use, circulation, quoting, or reproducing of this report is strictly prohibited and may be unlawful. © RapidValue Solutions www.rapidvaluesolutions.com/blogwww.rapidvaluesolutions.com +1 877.643.1850 contactus@rapidvaluesolutions.com