SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and githubAderemi Dadepo
 
Angular 2 Essential Training
Angular 2 Essential Training Angular 2 Essential Training
Angular 2 Essential Training Patrick Schroeder
 
Micro Frontends Architecture
Micro Frontends ArchitectureMicro Frontends Architecture
Micro Frontends ArchitectureRag Dhiman
 
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectJadson Santos
 
Android Development with Kotlin, Part 1 - Introduction
Android Development with Kotlin, Part 1 - IntroductionAndroid Development with Kotlin, Part 1 - Introduction
Android Development with Kotlin, Part 1 - IntroductionAndreas Jakl
 
Angular tutorial
Angular tutorialAngular tutorial
Angular tutorialRohit Gupta
 
Firebase Auth Tutorial
Firebase Auth TutorialFirebase Auth Tutorial
Firebase Auth TutorialBukhori Aqid
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework Serhat Can
 
A Basic Django Introduction
A Basic Django IntroductionA Basic Django Introduction
A Basic Django IntroductionGanga Ram
 
introduction to Vue.js 3
introduction to Vue.js 3 introduction to Vue.js 3
introduction to Vue.js 3 ArezooKmn
 
Globant development week / Micro frontend
Globant development week / Micro frontendGlobant development week / Micro frontend
Globant development week / Micro frontendGlobant
 
security misconfigurations
security misconfigurationssecurity misconfigurations
security misconfigurationsMegha Sahu
 
Google Chrome DevTools features overview
Google Chrome DevTools features overviewGoogle Chrome DevTools features overview
Google Chrome DevTools features overviewOleksii Prohonnyi
 

Was ist angesagt? (20)

Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and github
 
Angular 2 Essential Training
Angular 2 Essential Training Angular 2 Essential Training
Angular 2 Essential Training
 
Micro Frontends Architecture
Micro Frontends ArchitectureMicro Frontends Architecture
Micro Frontends Architecture
 
Introduction to angular with a simple but complete project
Introduction to angular with a simple but complete projectIntroduction to angular with a simple but complete project
Introduction to angular with a simple but complete project
 
Vue.js
Vue.jsVue.js
Vue.js
 
Android Development with Kotlin, Part 1 - Introduction
Android Development with Kotlin, Part 1 - IntroductionAndroid Development with Kotlin, Part 1 - Introduction
Android Development with Kotlin, Part 1 - Introduction
 
Angular tutorial
Angular tutorialAngular tutorial
Angular tutorial
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Angular 9
Angular 9 Angular 9
Angular 9
 
Firebase Auth Tutorial
Firebase Auth TutorialFirebase Auth Tutorial
Firebase Auth Tutorial
 
Selenium
SeleniumSelenium
Selenium
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
A Basic Django Introduction
A Basic Django IntroductionA Basic Django Introduction
A Basic Django Introduction
 
introduction to Vue.js 3
introduction to Vue.js 3 introduction to Vue.js 3
introduction to Vue.js 3
 
Globant development week / Micro frontend
Globant development week / Micro frontendGlobant development week / Micro frontend
Globant development week / Micro frontend
 
security misconfigurations
security misconfigurationssecurity misconfigurations
security misconfigurations
 
Google Chrome DevTools features overview
Google Chrome DevTools features overviewGoogle Chrome DevTools features overview
Google Chrome DevTools features overview
 
Tomcat
TomcatTomcat
Tomcat
 
Spring Security 5
Spring Security 5Spring Security 5
Spring Security 5
 
BitBucket presentation
BitBucket presentationBitBucket presentation
BitBucket presentation
 

Ähnlich wie 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
 
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework BasicMario 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 CloudMatt 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 FormsDigamber Singh
 
Angular4 getting started
Angular4 getting startedAngular4 getting started
Angular4 getting startedTejinderMakkar
 
Angularjs2 presentation
Angularjs2 presentationAngularjs2 presentation
Angularjs2 presentationdharisk
 
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.pdfBOSC Tech Labs
 
Azure machine learning service
Azure machine learning serviceAzure machine learning service
Azure machine learning serviceRuth 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 OneAaron Saunders
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015Pushkar 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 agentsAndrey Karpov
 
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 jvmAnton Shapin
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular applicationSuresh Patidar
 
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization modelEuropean Collaboration Summit
 
SaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
SaltConf14 - Ben Cane - Using SaltStack in High Availability EnvironmentsSaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
SaltConf14 - Ben Cane - Using SaltStack in High Availability EnvironmentsSaltStack
 

Ähnlich wie 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
 
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
 
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
 
SaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
SaltConf14 - Ben Cane - Using SaltStack in High Availability EnvironmentsSaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
SaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
 

Mehr von 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-SpaRapidValue
 
Play with Jenkins Pipeline
Play with Jenkins PipelinePlay with Jenkins Pipeline
Play with Jenkins PipelineRapidValue
 
Accessibility Testing using Axe
Accessibility Testing using AxeAccessibility Testing using Axe
Accessibility Testing using AxeRapidValue
 
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 KotlinRapidValue
 
Automation in Digital Cloud Labs
Automation in Digital Cloud LabsAutomation in Digital Cloud Labs
Automation in Digital Cloud LabsRapidValue
 
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 BenefitsRapidValue
 
Uploading Data Using Oracle Web ADI
Uploading Data Using Oracle Web ADIUploading Data Using Oracle Web ADI
Uploading Data Using Oracle Web ADIRapidValue
 
Appium Automation with Kotlin
Appium Automation with KotlinAppium Automation with Kotlin
Appium Automation with KotlinRapidValue
 
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 360RapidValue
 
Python Google Cloud Function with CORS
Python Google Cloud Function with CORSPython Google Cloud Function with CORS
Python Google Cloud Function with CORSRapidValue
 
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 ChannelRapidValue
 
Automation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDDAutomation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDDRapidValue
 
Video Recording of Selenium Automation Flows
Video Recording of Selenium Automation FlowsVideo Recording of Selenium Automation Flows
Video Recording of Selenium Automation FlowsRapidValue
 
JMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeterJMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeterRapidValue
 
Migration to Extent Report 4
Migration to Extent Report 4Migration to Extent Report 4
Migration to Extent Report 4RapidValue
 
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 QARapidValue
 
Data Seeding via Parameterized API Requests
Data Seeding via Parameterized API RequestsData Seeding via Parameterized API Requests
Data Seeding via Parameterized API RequestsRapidValue
 
Test Case Creation in Katalon Studio
Test Case Creation in Katalon StudioTest Case Creation in Katalon Studio
Test Case Creation in Katalon StudioRapidValue
 
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 ValgrindRapidValue
 
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 RapidValueRapidValue
 

Mehr von 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
 

Kürzlich hochgeladen

Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
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
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
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
 
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
 
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
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
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
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 

Kürzlich hochgeladen (20)

Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
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...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
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
 
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)
 
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
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
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
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 

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