Skip to content

Commit a411ce0

Browse files
committed
Updated documentation
1 parent 6abfb5f commit a411ce0

20 files changed

+807
-181
lines changed

api/configuration/services.md

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ interface ConverterService {
2121
}
2222
```
2323

24+
For an explanation of the `ComponentLifecycle` see [Generic component Lifecycle](../lifecycle/index.md).
25+
2426
```ts
2527
interface ContainerService {
2628
createContainer(details: any): Promise<ComponentGetter>;

api/index.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
# API
22

3-
...
3+
The following documents explain the API structure of Picard.js. In general we distinguish between:
4+
5+
- The actual component API - what you need to know for actually crafting experiences relying on Picard.js
6+
- The configuration and setup API - what you need to know to customize and build your orchestration behavior on Picard.js
7+
- The internal APIs - what you need to know for betting extending and understanding Picard.js
8+
9+
We'll start with the [component API](./components/index.md).

data/diagrams.drawio

+429-1
Large diffs are not rendered by default.

guide/components/pi-component.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
The `pi-component` can be used to render a component from a micro frontend on a website.
44

5+
![`pi-component`](../../images/pi-component.svg)
6+
57
Consider the following HTML:
68

79
```html

guide/components/pi-part.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ The `pi-part` component is available exclusively on the server. On the client, t
44

55
This component is essentially a replacement rule that is applied by the `decorate` function of Picard.
66

7+
![`pi-part`](../../images/pi-part.svg)
8+
79
Consider the following HTML:
810

911
```html

guide/components/pi-slot.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
The `pi-slot` component introduces a micro frontend independent rendering slot. It will automatically look into all currently loaded micro frontends - trying to locate exposed components by the given `name` attribute. All found components will be rendered inside the `pi-slot`.
44

5+
![`pi-slot`](../../images/pi-slot.svg)
6+
57
Consider the following HTML:
68

79
```html

guide/features.md

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Picard.js is your comprehensive solution for orchestrating micro frontends, prov
44

55
## Multi Platform
66

7+
![Multi Platform](../images/multi-platform.svg)
8+
79
Picard.js is designed to be versatile and adaptable across various environments. Whether you're working in a browser, Node.js, Deno, or Electron, Picard.js seamlessly orchestrates micro frontends, ensuring consistent performance and compatibility.
810

911
## Multi Format
@@ -12,6 +14,8 @@ With Picard.js, you can integrate and manage multiple micro frontend formats eff
1214

1315
## Multi Framework
1416

17+
![Multi Framework](../images/multi-framework.svg)
18+
1519
Picard.js excels at integrating various frameworks, including single-spa, HTML fragments, and web components. This multi-framework support allows you to choose the best tools for each part of your application, fostering innovation and efficiency.
1620

1721
## Error Handling
@@ -32,4 +36,6 @@ Debugging with Picard.js is straightforward and integrates seamlessly into your
3236

3337
## Islands Architecture
3438

39+
![Islands Architecture](../images/islands-architecture.svg)
40+
3541
Picard.js facilitates the creation of island architectures, enabling server-side rendered (SSR) applications that can hydrate and continue on the client side. This approach optimizes performance and user experience, combining the best of SSR and client-side rendering.

guide/why.md

+12
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,34 @@ Today, a rich collection of libraries, tools, and frameworks for creating micro
88

99
### Interoperability
1010

11+
![Interoperability Restrictions](../images/interoperability.svg)
12+
1113
One of the reasons why Picard.js might be interesting for you is that it allows to easily bring in micro frontends. So, instead of requiring to set up some bundler or go into specifics, all you need to do is grab a script and add a web component. That's it!
1214

1315
For owners of existing micro frontend solutions the integration of other micro frontends will no longer break due to technology incompatibilities. If two micro frontends have been written - one using Module Federation and another one using Native Federation - you will no longer require some frankenstein solution, but instead can just embed both; and it will just work.
1416

17+
👉 Want to see this in action? [Example online](https://github.com/picardjs/picard/blob/main/examples/10-dependencies-sharing/index.html)
18+
1519
### Error Handling
1620

21+
![Error Handling Problems](../images/error-handling.svg)
22+
1723
Error handling has been one of the largest problems in solutions like Module Federation or Native Federation. The low-level nature of these building blocks ensured that you'd need to build something from the beginning. Unfortunately, this meant that you are rather creating and maintaining a micro frontend framework than actually solving a business problem.
1824

1925
With Picard.js error handling is integrated from the ground up. You reference an invalid component? Nothing bad will happen. The component crashes or does not accept the given inputs? The solution will just continue - if you care you can pick up the error and display something else instead.
2026

27+
👉 Want to see this in action? [Example online](https://github.com/picardjs/picard/blob/main/examples/06-static-page-single-spa/mfs/red/src/Product.jsx#L87)
28+
2129
### Technology Agnostic
2230

31+
![Technology Enforcement](../images/tech-agnostic.svg)
32+
2333
A design goal of Picard.js was to work without any tooling. As such owners of existing projects (let's say an existing page created with PHP or some other SSR technology such as ASP.NET) don't need to integrate additional tooling. They just add some additional markup to their generated HTML response and everything works.
2434

2535
One advantage of this approach is that - out-of-the-box - Picard.js is technology agnostic. While other approaches require specific tooling to work we don't need this here. As a result, Picard.js can also be used with tooling that is rather micro frontend hostile such as the Angular CLI. As long as there is some HTML somewhere you can add the script and use the web components.
2636

37+
👉 Want to see this in action? [Example online](https://github.com/picardjs/picard/blob/main/examples/01-static-page/index.html)
38+
2739
## Why use a Library as Orchestrator?
2840

2941
Because a library is lightweight and does not stand in your way. Of course, you can use a full framework or invent your own thing (and in some scenarios that might be the right thing to do), but usually the orchestration itself should be *just* done. No questions asked.

images/error-handling.svg

+3
Loading

images/interoperability.svg

+3
Loading

0 commit comments

Comments
 (0)