Build everything into components
Seiji Villafranca
github.com/SeijiV13
Senior Developer, CoDev
Microsoft MVP
Auth0 Ambassador
Community Lead, AngularPH,
Author
seijivillafranca.com
what is it?
"Micro" means small
"micro web services" was first used by Dr. Peter Rogers in 2005
A developed architecture which is intended to solve the monolithic maintainability dilemma
early companies who adapted microservice architecture
What does it "Solve"
Monolithic Architecture
the common thing we "do"
App1
A big chunk of App with a single repository or codebase
service 1
service 2
service 2
Well, we know it's a single codebase
A big chunk of App with a single repository or codebase
Application 1
Code Change (Has errors)
All code are affected
The Solution
Smaller Fine Components
Single Responsibility Principle
S1
S2
S3
S4
Client
API
Gateway
Service
Service
Service
Service
Orchestration
Storage
Client
API
Gateway
Service
Service
Service
Service
Storage
Event Bus
first came up in ThoughtWorks Technology Radar at the end of 2016
Microservice concepts going into frontend world
Well idea is not new, it has a lot in common with Self Contained Systems
The Monolithic Structure
Frontend with Verticals
Client
API
Gateway
Service
Service
Service
Service
Orchestration
MF4
MF3
MF2
MF1
Orchestration
Design Pattern
What are the goals
Components
Cloud
Document
Collaborate
CI/CD
What is Bit.dev?
Cloud-collaborative platform for hosting UI components using different frameworks
"If a component library is like a music CD-Album, then bit.dev is like iTunes or Spotify for UI components."
https://blog.bitsrc.io/15-reasons-to-build-your-component-library-in-bit-dev-93a514878863
Why use Bit.dev
https://blog.bitsrc.io/15-reasons-to-build-your-component-library-in-bit-dev-93a514878863
automatically generate a package.json file for every component
reusable dev-environments
Why use Bit.dev
https://blog.bitsrc.io/15-reasons-to-build-your-component-library-in-bit-dev-93a514878863
Different components Different Versions
Why use Bit.dev
https://blog.bitsrc.io/15-reasons-to-build-your-component-library-in-bit-dev-93a514878863
Components are easy to organize:
Why use Bit.dev
https://blog.bitsrc.io/15-reasons-to-build-your-component-library-in-bit-dev-93a514878863
component shared to bit.dev is analyzed, hosted, rendered and documented in one place
Bit.cloud
Where compoents are deployed, rendered, documented and can be imported
Components from your network
Components from the community
Workspace
development workspaces where you create new components, use existing components, modify existing components, and export changes.
Workspace
Bit provides templates that we can use for easy setup
Components
Can be a Node Module, React Components, Angular Modules
Creating a component
── ui/my-button # Component directory
├── index.ts # Main component file.
├── my-button.tsx # Implementation of the component.
├── my-button.spec.tsx # Test file of the component.
├── my-button.composition.tsx # Compositions for simulating the component in different states.
└── my-button.docs.mdx # Docs file for the component.Components are powerful!
contains the history of its source code, dependencies (packages and other Components), artifacts, and metadata
Component Actions
Inspect
Check logs and history
Tag
Snap
create a snap copy of the component for component collaboration (not for release)
create a snapshot of the component marked with a release version (for consuming)
Scopes
defines ownership on components
collaboration server for components
A mixture of React, Angular and Node modules
starting a local scope server
Installing Bit CLI
Creating new workspace
List templates
Create new components
Starting Bit Locally
Create our own workspace
Create components
Create local and remote scopes in bit.cloud
visualize the dependencies
Create our CI/CD
Thank you
and happy coding!