diff --git a/_data/sidebars/scos_dev_sidebar.yml b/_data/sidebars/scos_dev_sidebar.yml index 2f6757395d3..fccffbcc2bc 100644 --- a/_data/sidebars/scos_dev_sidebar.yml +++ b/_data/sidebars/scos_dev_sidebar.yml @@ -3789,6 +3789,61 @@ entries: url: /docs/scos/dev/front-end-development/yves/custom-twig-functions-for-yves.html - title: Multi-theme url: /docs/scos/dev/front-end-development/yves/multi-theme.html + - title: Oryx + include_versions: + - "202212.0" + url: /docs/scos/dev/front-end-development/oryx/oryx.html + nested: + - title: Set up + url: /docs/scos/dev/front-end-development/oryx/set-up-oryx.html + - title: Boilerplate + url: /docs/scos/dev/front-end-development/oryx/oryx-boilerplate.html + - title: Feature sets + url: /docs/scos/dev/front-end-development/oryx/oryx-feature-sets.html + - title: Packages + url: /docs/scos/dev/front-end-development/oryx/oryx-packages.html + - title: Routing + url: /docs/scos/dev/front-end-development/oryx/oryx-routing.html + - title: Versioning + url: /docs/scos/dev/front-end-development/oryx/oryx-versioning.html + - title: Presets + url: /docs/scos/dev/front-end-development/oryx/oryx-presets.html + - title: Supported browsers + url: /docs/scos/dev/front-end-development/oryx/oryx-supported-browsers.html + - title: Dependency injection + url: /docs/scos/dev/front-end-development/oryx/dependency-injection/dependency-injection.html + nested: + - title: Oryx service layer + url: /docs/scos/dev/front-end-development/oryx/dependency-injection/oryx-service-layer.html + - title: Using services + url: /docs/scos/dev/front-end-development/oryx/dependency-injection/dependency-injection-using-services.html + - title: Defining services + url: /docs/scos/dev/front-end-development/oryx/dependency-injection/dependency-injection-defining-services.html + - title: Providing services + url: /docs/scos/dev/front-end-development/oryx/dependency-injection/dependency-injection-providing-services.html + - title: Advanced strategies + url: /docs/scos/dev/front-end-development/oryx/dependency-injection/dependency-injection-advanced-strategies.html + - title: Application orchestration + url: /docs/scos/dev/front-end-development/oryx/oryx-application-orchestration/oryx-application-orchestration.html + nested: + - title: Application + url: /docs/scos/dev/front-end-development/oryx/oryx-application-orchestration/oryx-application.html + - title: Application environment + url: /docs/scos/dev/front-end-development/oryx/oryx-application-orchestration/oryx-application-environment.html + - title: Application feature + url: /docs/scos/dev/front-end-development/oryx/oryx-application-orchestration/oryx-application-feature.html + - title: Application plugins + url: /docs/scos/dev/front-end-development/oryx/oryx-application-orchestration/oryx-application-plugins.html + - title: Reactivity + url: /docs/scos/dev/front-end-development/oryx/reactivity/reactivity.html + nested: + - title: Key concepts + url: /docs/scos/dev/front-end-development/oryx/reactivity/key-concepts-of-reactivity.html + - title: Reactive components + url: /docs/scos/dev/front-end-development/oryx/reactivity/reactive-components.html + - title: Integration of backend APIs + url: /docs/scos/dev/front-end-development/oryx/reactivity/oryx-integration-of-backend-apis.html + - title: Migration guide - Remove support of IE11 url: /docs/scos/dev/front-end-development/migration-guide-remove-support-of-ie11.html - title: Migration guide - Switch from Yarn to NPM v8 diff --git a/_drafts/oryx/reactivity/index.md b/_drafts/oryx/reactivity/index.md deleted file mode 100644 index 3f2b48b0f75..00000000000 --- a/_drafts/oryx/reactivity/index.md +++ /dev/null @@ -1,20 +0,0 @@ -# Reactivity table of contents - -- [Reactivity](./reactivity.md) - -- [Key concepts of Reactivity](./key-concepts-of-reactivity.md) - - - [Reactive data streams](./key-concepts-of-reactivity.md#reactive-data-streams) - - [Application state](./key-concepts-of-reactivity.md#application-state) - - [Application layers](./key-concepts-of-reactivity.md#application-layers) - - [Updating data in the DOM]('./key-concepts-of-reactivity.md#updating-data-in-the-DOM') - -- [Reactive components](./reactive-components.md) - - - [Updating data in the DOM](./reactive-components.md#updating-data-in-the-DOM) - - [Multiple data streams](./reactive-components.md#multiple-data-streams) - -- [Integration of backend APIs](./integration-backend-api.md) - - - [Data models](./integrate-backend-api.md#data-models) - - [Qualification of requests](./integrate-backend-api.md#qualification-of-requests) diff --git a/_includes/diagrams/oryx/backend-integration.svg b/_includes/diagrams/oryx/backend-integration.svg new file mode 100644 index 00000000000..8a2c9417a9a --- /dev/null +++ b/_includes/diagrams/oryx/backend-integration.svg @@ -0,0 +1,228 @@ + \ No newline at end of file diff --git a/_includes/diagrams/oryx/packages.svg b/_includes/diagrams/oryx/packages.svg new file mode 100644 index 00000000000..ea8a9836f47 --- /dev/null +++ b/_includes/diagrams/oryx/packages.svg @@ -0,0 +1,233 @@ + \ No newline at end of file diff --git a/_includes/diagrams/oryx/reactivity-high-level.svg b/_includes/diagrams/oryx/reactivity-high-level.svg new file mode 100644 index 00000000000..f519a227044 --- /dev/null +++ b/_includes/diagrams/oryx/reactivity-high-level.svg @@ -0,0 +1,245 @@ + \ No newline at end of file diff --git a/_includes/diagrams/oryx/reactivity-interaction.svg b/_includes/diagrams/oryx/reactivity-interaction.svg new file mode 100644 index 00000000000..930a572643b --- /dev/null +++ b/_includes/diagrams/oryx/reactivity-interaction.svg @@ -0,0 +1,274 @@ + \ No newline at end of file diff --git a/_drafts/oryx/dependency-injection/dependency-injection-advanced-strategies.md b/docs/scos/dev/front-end-development/202212.0/oryx/dependency-injection/dependency-injection-advanced-strategies.md similarity index 96% rename from _drafts/oryx/dependency-injection/dependency-injection-advanced-strategies.md rename to docs/scos/dev/front-end-development/202212.0/oryx/dependency-injection/dependency-injection-advanced-strategies.md index cd765e431a7..7c4e03f8030 100644 --- a/_drafts/oryx/dependency-injection/dependency-injection-advanced-strategies.md +++ b/docs/scos/dev/front-end-development/202212.0/oryx/dependency-injection/dependency-injection-advanced-strategies.md @@ -5,7 +5,7 @@ template: concept-topic-template last_updated: Apr 13, 2023 --- -This document describes advanced strategies of using [dependency injection (DI)](_drafts/oryx/dependency-injection/dependency-injection.html). +This document describes advanced strategies of using [dependency injection (DI)](/docs/scos/dev/front-end-development/{{page.version}}/oryx/dependency-injection/dependency-injection.html). ## The INJECTOR token diff --git a/_drafts/oryx/dependency-injection/dependency-injection-defining-services.md b/docs/scos/dev/front-end-development/202212.0/oryx/dependency-injection/dependency-injection-defining-services.md similarity index 91% rename from _drafts/oryx/dependency-injection/dependency-injection-defining-services.md rename to docs/scos/dev/front-end-development/202212.0/oryx/dependency-injection/dependency-injection-defining-services.md index 85ea9cb8a60..f1b31301155 100644 --- a/_drafts/oryx/dependency-injection/dependency-injection-defining-services.md +++ b/docs/scos/dev/front-end-development/202212.0/oryx/dependency-injection/dependency-injection-defining-services.md @@ -56,4 +56,4 @@ export class DefaultCartService implements CartService { ## Next step -[Providing services](./dependency-injection-providing-services.md) +[Providing services](/docs/scos/dev/front-end-development/{{page.version}}/oryx/dependency-injection/dependency-injection-providing-services.html) diff --git a/_drafts/oryx/dependency-injection/dependency-injection-providing-services.md b/docs/scos/dev/front-end-development/202212.0/oryx/dependency-injection/dependency-injection-providing-services.md similarity index 91% rename from _drafts/oryx/dependency-injection/dependency-injection-providing-services.md rename to docs/scos/dev/front-end-development/202212.0/oryx/dependency-injection/dependency-injection-providing-services.md index 9e5924d5165..e1e15a19e68 100644 --- a/_drafts/oryx/dependency-injection/dependency-injection-providing-services.md +++ b/docs/scos/dev/front-end-development/202212.0/oryx/dependency-injection/dependency-injection-providing-services.md @@ -38,4 +38,4 @@ In this example, the customized cart service is provided by specifying the provi ## Next steps -[Advanced dependency injection strategies](/_drafts/oryx/dependency-injection/advanced-dependency-injection-strategies.html) +[Advanced strategies](/docs/scos/dev/front-end-development/{{page.version}}/oryx/dependency-injection/dependency-injection-advanced-strategies.html) diff --git a/_drafts/oryx/dependency-injection/dependency-injection-using-services.md b/docs/scos/dev/front-end-development/202212.0/oryx/dependency-injection/dependency-injection-using-services.md similarity index 90% rename from _drafts/oryx/dependency-injection/dependency-injection-using-services.md rename to docs/scos/dev/front-end-development/202212.0/oryx/dependency-injection/dependency-injection-using-services.md index c0d07a7e420..59f0f191eb0 100644 --- a/_drafts/oryx/dependency-injection/dependency-injection-using-services.md +++ b/docs/scos/dev/front-end-development/202212.0/oryx/dependency-injection/dependency-injection-using-services.md @@ -37,4 +37,4 @@ A typical Oryx application usually uses one global DI container, which is set up ## Next steps -[Defining services](./dependency-injection-defining-services.md) +[Defining services](/docs/scos/dev/front-end-development/{{page.version}}/oryx/dependency-injection/dependency-injection-defining-services.html) diff --git a/_drafts/oryx/dependency-injection/dependency-injection.md b/docs/scos/dev/front-end-development/202212.0/oryx/dependency-injection/dependency-injection.md similarity index 89% rename from _drafts/oryx/dependency-injection/dependency-injection.md rename to docs/scos/dev/front-end-development/202212.0/oryx/dependency-injection/dependency-injection.md index b2f3eddd7eb..41c81807d81 100644 --- a/_drafts/oryx/dependency-injection/dependency-injection.md +++ b/docs/scos/dev/front-end-development/202212.0/oryx/dependency-injection/dependency-injection.md @@ -13,4 +13,4 @@ The key advantage of using Oryx's DI implementation is that it is vanilla JavaSc ## Next step -[Oryx service layer](./oryx-service-layer.md) +[Oryx service layer](/docs/scos/dev/front-end-development/{{page.version}}/oryx/dependency-injection/oryx-service-layer.html) diff --git a/_drafts/oryx/dependency-injection/oryx-service-layer.md b/docs/scos/dev/front-end-development/202212.0/oryx/dependency-injection/oryx-service-layer.md similarity index 91% rename from _drafts/oryx/dependency-injection/oryx-service-layer.md rename to docs/scos/dev/front-end-development/202212.0/oryx/dependency-injection/oryx-service-layer.md index b5836235d34..70a0cfc40c7 100644 --- a/_drafts/oryx/dependency-injection/oryx-service-layer.md +++ b/docs/scos/dev/front-end-development/202212.0/oryx/dependency-injection/oryx-service-layer.md @@ -22,4 +22,4 @@ In a typical Oryx application, the application orchestrator automatically handle ## Next steps -[Using services](./dependency-injection-using-services.md) +[Using services](/docs/scos/dev/front-end-development/{{page.version}}/oryx/dependency-injection/dependency-injection-using-services.html) diff --git a/_drafts/oryx/oryx-application-orchestration/oryx-application-environment.md b/docs/scos/dev/front-end-development/202212.0/oryx/oryx-application-orchestration/oryx-application-environment.md similarity index 100% rename from _drafts/oryx/oryx-application-orchestration/oryx-application-environment.md rename to docs/scos/dev/front-end-development/202212.0/oryx/oryx-application-orchestration/oryx-application-environment.md diff --git a/_drafts/oryx/oryx-application-orchestration/oryx-application-feature.md b/docs/scos/dev/front-end-development/202212.0/oryx/oryx-application-orchestration/oryx-application-feature.md similarity index 91% rename from _drafts/oryx/oryx-application-orchestration/oryx-application-feature.md rename to docs/scos/dev/front-end-development/202212.0/oryx/oryx-application-orchestration/oryx-application-feature.md index 35f9aca2068..3a02e48799a 100644 --- a/_drafts/oryx/oryx-application-orchestration/oryx-application-feature.md +++ b/docs/scos/dev/front-end-development/202212.0/oryx/oryx-application-orchestration/oryx-application-feature.md @@ -10,11 +10,11 @@ template: concept-topic-template - Components - Providers -- [Plugins](./app-plugins.md) +- [Plugins](/docs/scos/dev/front-end-development/{{page.version}}/oryx/oryx-application-orchestration/oryx-application-plugins.html) - Resources - [Feature options](#feature-options) -- [Builder options](./index.md#options) +- [Builder options](/docs/scos/dev/front-end-development/{{page.version}}/oryx/oryx-application-orchestration/oryx-application-orchestration.html#customization-of-options) Features are useful to structure and organize code and functionality into logical groups and to make them easier to reuse in different scenarios. diff --git a/_drafts/oryx/oryx-application-orchestration/oryx-application-orchestration.md b/docs/scos/dev/front-end-development/202212.0/oryx/oryx-application-orchestration/oryx-application-orchestration.md similarity index 57% rename from _drafts/oryx/oryx-application-orchestration/oryx-application-orchestration.md rename to docs/scos/dev/front-end-development/202212.0/oryx/oryx-application-orchestration/oryx-application-orchestration.md index a8df4925516..6730d2314d7 100644 --- a/_drafts/oryx/oryx-application-orchestration/oryx-application-orchestration.md +++ b/docs/scos/dev/front-end-development/202212.0/oryx/oryx-application-orchestration/oryx-application-orchestration.md @@ -6,15 +6,15 @@ template: concept-topic-template An Oryx application starts with the application orchestration. It lets you bootstrap and configure your application from reusable bits and pieces, such as the following: -- [Features](./app-feature.md) +- [Features](/docs/scos/dev/front-end-development/{{page.version}}/oryx/oryx-application-orchestration/oryx-application-feature.html) - Components - Providers - Themes -- [Resources](./resources.md) -- [Environment](./app-environment.md) +- Resources +- [Environment](/docs/scos/dev/front-end-development/{{page.version}}/oryx/oryx-application-orchestration/oryx-application-environment.html) Application orchestration is used to configure and customize Oryx applications. As Oryx is a framework, it provides different pieces of functionality for different use cases, like B2B, B2C, Back Office, or Fulfillment. And orchestration lets you select specific functionality from Oryx to match your use case. @@ -22,24 +22,24 @@ Also, application orchestration defines how functionality is loaded in an applic ## Application builder -To start using orchestration, you need to import [`appBuilder`](./app-builder.md) from `@spryker-oryx/core`. Then, you can add functionality, like features and theme, to your application. +To start using orchestration, you need to import `appBuilder`from `@spryker-oryx/core`. Then, you can add functionality, like features and theme, to your application. -`appBuilder` uses a chain pattern where each customization is added using a respective `.with*` method. This is the minimum boilerplate code required for an application to work. Once you start building more complex use cases, instead of using a preset, we recommend extending a preset or creating your own feature set. +`appBuilder` uses a chain pattern where each customization is added using a respective `.with*` method. This is the minimum boilerplate code required for an application to work. Once you start building more complex use cases, instead of using a [preset](/docs/scos/dev/front-end-development/{{page.version}}/oryx/oryx-presets.html), we recommend extending a preset or creating your own feature set. Application builder lets you compose and customize different pieces of functionality. The builder is chainable and pluggable, and it supports the following built-in plugins: -- [Features](./app-feature.md) (`withFeature`) +- [Features](/docs/scos/dev/front-end-development/{{page.version}}/oryx/oryx-application-orchestration/oryx-application-feature.html): `withFeature` -- Components (`withComponents`) +- Components: `withComponents` -- Providers (`withProviders`) +- Providers: `withProviders` -- Themes (`withTheme`) -- [Options](#options) (`withAppOptions`) -- [FeatureOptions](./app-feature.md) (`withOptions`) -- [Environment](./app-environment.md) (`withEnvironment`) -- [Resources](./resources.md) (`withResources`) -- [Plugins](./app-plugins.md) (`with`) +- Themes: `withTheme` +- [Options](#customization-of-options): `withAppOptions` +- [FeatureOptions](/docs/scos/dev/front-end-development/{{page.version}}/oryx/oryx-application-orchestration/oryx-application-feature.html): `withOptions` +- [Environment](/docs/scos/dev/front-end-development/{{page.version}}/oryx/oryx-application-orchestration/oryx-application-environment.html): `withEnvironment` +- Resources: `withResources` +- [Plugins](/docs/scos/dev/front-end-development/{{page.version}}/oryx/oryx-application-orchestration/oryx-application-plugins.html): `with` Also, you can add custom plugins by using the `with` API. @@ -49,7 +49,7 @@ Here is an example of a simple B2C application setup: ```ts import { appBuilder } from '@spryker-oryx/core'; -import { b2cFeatures, b2cTheme } from '@spryker-oryx/presets'; +import { b2cFeatures, b2cTheme } from '@spryker-oryx/oryx-presets'; const app = appBuilder() .withFeature(b2cFeatures) @@ -86,8 +86,8 @@ appBuilder().withAppOptions({ components: { root: 'my-root-app' } }); For more details about application orchestration, see the following documents: -- [Setup the environment](./app-environment.md) -- [Add features](./app-feature.md) +- [Set up the environment](/docs/scos/dev/front-end-development/{{page.version}}/oryx/oryx-application-orchestration/oryx-application-environment.html) +- [Add features](/docs/scos/dev/front-end-development/{{page.version}}/oryx/oryx-application-orchestration/oryx-application-feature.html) - Add components @@ -96,5 +96,5 @@ For more details about application orchestration, see the following documents: - Add resources - Add theme -- [Add plugins](./app-plugins.md) -- [Interact with application](./app.md) +- [Add plugins](/docs/scos/dev/front-end-development/{{page.version}}/oryx/oryx-application-orchestration/oryx-application-plugins.html) +- [Interact with application](/docs/scos/dev/front-end-development/{{page.version}}/oryx/oryx-application-orchestration/oryx-application.html) diff --git a/_drafts/oryx/oryx-application-orchestration/oryx-application-plugins.md b/docs/scos/dev/front-end-development/202212.0/oryx/oryx-application-orchestration/oryx-application-plugins.md similarity index 96% rename from _drafts/oryx/oryx-application-orchestration/oryx-application-plugins.md rename to docs/scos/dev/front-end-development/202212.0/oryx/oryx-application-orchestration/oryx-application-plugins.md index aecbb009f1b..1d857790823 100644 --- a/_drafts/oryx/oryx-application-orchestration/oryx-application-plugins.md +++ b/docs/scos/dev/front-end-development/202212.0/oryx/oryx-application-orchestration/oryx-application-plugins.md @@ -121,7 +121,7 @@ Instead of relying on the order of registration of the plugins to the Oryx appli {% endinfo_block %} -For more information on how to access registered plugins, see [interacting with plugins](./app.md#interacting-with-plugins). +For more information on how to access registered plugins, see [interacting with plugins](/docs/scos/dev/front-end-development/{{page.version}}/oryx/oryx-application-orchestration/oryx-application.html#interact-with-plugins). ## Plugin use cases diff --git a/_drafts/oryx/oryx-application-orchestration/oryx-application.md b/docs/scos/dev/front-end-development/202212.0/oryx/oryx-application-orchestration/oryx-application.md similarity index 87% rename from _drafts/oryx/oryx-application-orchestration/oryx-application.md rename to docs/scos/dev/front-end-development/202212.0/oryx/oryx-application-orchestration/oryx-application.md index 3a351c659a0..15a9db04f82 100644 --- a/_drafts/oryx/oryx-application-orchestration/oryx-application.md +++ b/docs/scos/dev/front-end-development/202212.0/oryx/oryx-application-orchestration/oryx-application.md @@ -12,7 +12,7 @@ It lets you do the following: - Wait for application ready state when all plugins have been initialized: `whenReady`. - Destroy and cleanup the application: `destroy`. -The `App` instance is available in the Dependency Injection under the `AppRef` token, which you can inject: +The `App` instance is available in the [Dependency Injection](/docs/scos/dev/front-end-development/{{page.version}}/oryx/dependency-injection/dependency-injection.html) under the `AppRef` token, which you can inject: ```ts import { AppRef } from '@spryker-oryx/core'; diff --git a/_drafts/oryx/boilerplate.md b/docs/scos/dev/front-end-development/202212.0/oryx/oryx-boilerplate.md similarity index 82% rename from _drafts/oryx/boilerplate.md rename to docs/scos/dev/front-end-development/202212.0/oryx/oryx-boilerplate.md index d9a6ca8379a..7a666eea54e 100644 --- a/_drafts/oryx/boilerplate.md +++ b/docs/scos/dev/front-end-development/202212.0/oryx/oryx-boilerplate.md @@ -1,5 +1,5 @@ --- -title: Oryx boilerplate +title: "Oryx: Boilerplate" description: Create maintainable and upgradeable applications using the Oryx boilerplate last_updated: Apr 3, 2023 template: concept-topic-template @@ -14,11 +14,11 @@ The Oryx boilerplate is provided in the [Composable Frontend repository](https:/ In Oryx, we use the following tactics to prevent boilerplate code: 1. Bootstrap the application from [npm packages](https://www.npmjs.com/org/spryker-oryx) instead of source. -2. Expose a function to set up the [app orchestrator](./app-orchestrator.md) conveniently. -3. Provide [presets](./presets.md) for the standard application setup, including the feature sets and UI themes. +2. Expose a function to set up the [app orchestrator](/docs/scos/dev/front-end-development/{{page.version}}/oryx/oryx-application-orchestration/oryx-application-orchestration.html) conveniently. +3. Provide [presets](/docs/scos/dev/front-end-development/{{page.version}}/oryx/oryx-presets.html) for the standard application setup, including the feature sets and UI themes. 4. Provide the source code in a [public repository](https://github.com/spryker/oryx) to enable developers to read the source code. 5. Provide configurable components and business logic. -6. Allow for customizations with [dependency injection](./dependency-injection.md). +6. Allow for customizations with [dependency injection](/docs/scos/dev/front-end-development/{{page.version}}/oryx/dependency-injection/dependency-injection.html). By using these tactics, we greatly reduced the amount of boilerplate code required in Oryx projects. This simplifies maintaining and upgrading code over time, and lets you focus on building features instead of maintaining the underlying framework. @@ -32,7 +32,7 @@ By separating out the application logic, we eliminated the boilerplate code from Another source of boilerplate code is the configuration required to get your application up and running. To simplify this process, we introduced the concept of presets in Oryx. -The [preset packages](https://www.npmjs.com/package/@spryker-oryx/presets) provide configurations and data structures that are designed to get your project up and running quickly without providing a lot of configuration yourself. Presets can be considered as "demo applications", as they typically represent a demo application for a specific business model, like a B2C Demo Shop. By using presets, you can quickly configure an application without writing any code. This is useful for starting the first project, running a demo, or for testing things out. +The [preset packages](https://www.npmjs.com/package/@spryker-oryx/oryx-presets.html) provide configurations and data structures that are designed to get your project up and running quickly without providing a lot of configuration yourself. Presets can be considered as "demo applications", as they typically represent a demo application for a specific business model, like a B2C Demo Shop. By using presets, you can quickly configure an application without writing any code. This is useful for starting the first project, running a demo, or for testing things out. ### appBuilder @@ -68,7 +68,7 @@ The bare minimum `package.json` includes the following dependencies: { ... "dependencies": { - "@spryker-oryx/presets": "^1.0.0" + "@spryker-oryx/oryx-presets": "^1.0.0" }, "devDependencies": { "vite": "^4.0.0" @@ -84,7 +84,7 @@ We recommend fronting the dependencies with a caret notation (`^`), so that the {% endinfo_block %} -Vite is the recommended build system, but you can use alternative build systems. For more details, see [Set up Oryx](./set-up-oryx.md). +Vite is the recommended build system, but you can use alternative build systems. For more details, see [Set up Oryx](/docs/scos/dev/front-end-development/{{page.version}}/oryx/set-up-oryx.html). ### `index.html` @@ -102,7 +102,7 @@ While `index.html` can have a few more details, the following is the required ba