Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Feature: adds controllerid definition #793

Merged
merged 5 commits into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions content/en/api/actions/navigate/pushstack.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ Presents a new screen and puts it on the pile.

Your structure is represented by the attribute below:

| **Attribute** | **Type** | Required | **Definition** |
| :------------ | :--------------------------------------------- | :------- | :---------------- |
| route | [**Route**]({{< ref path="/api/actions/navigate/route/" lang="en" >}}) | ✓ | Navigation route. |
| **Attribute** | **Type** | Required | **Definition** |
| :------------ | :------- | :------- | :---------------- |
| route | [**Route**]({{< ref path="/api/actions/navigate/route/" lang="en" >}}) | ✓ | Navigation route. |
| controllerId | String | | The navigation controller id to be used during the navigation action, If missing, the default navigation controller will be used instead. |

## How to use it?

Expand Down
1 change: 1 addition & 0 deletions content/en/api/actions/navigate/resetapplication.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Your structure is represented by the attribute below:
| **Attribute** | **Type** | Required | Definition |
| :------------ | :-------------------------------------------------- | :------- | :---------------- |
| route | ​[**Route**]({{< ref path="/api/actions/navigate/route" lang="en" >}})**​** | ✓ | Navigation route. |
| controllerId | String | | The navigation controller id to be used during the navigation action, If missing, the default navigation controller will be used instead. |

## How to use it?

Expand Down
1 change: 1 addition & 0 deletions content/en/api/actions/navigate/resetstack.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Your structure is represented by the attribute below:
| **Attribute** | Type | Required | Definition |
| :------------ | :--------------------------------------------- | :------- | :---------------- |
| route | [**Route**]({{< ref path="/api/actions/navigate/route/" lang="en" >}}) | ✓ | Navigation route. |
| controllerId | String | | The navigation controller id to be used during the navigation action, If missing, the default navigation controller will be used instead. |

## How to use it?

Expand Down
4 changes: 2 additions & 2 deletions content/en/resources/cache/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Currently, there are **two cache labels** on Beagle:
- A volatile layer.
- A persistent layer.

The volatile layer today depends on the persistent layer, meaning that only curly items on the persistent layer are candidates to the volatile cache.
The volatile layer today depends on the persistent layer, meaning that only cached items on the persistent layer are candidates to the volatile cache.

## Cache's layers

Expand All @@ -37,7 +37,7 @@ On this cache layer, there are two types of localization:

This cache is used to optimize BFF's response - in terms of time and size -, in cases where there is no changes. The entries of this cache lasts until the server redeploy or the client is reinstalled.

The premisse to this cache works is that it has to always return the same JSON to the same request. To guarantee that, it's necessary that this cache is the same according to its endpoint and specific platform as we can see in [**component's platform specification.**]({{< ref path="/resources/components/platform-sorting" lang="en" >}})
The premisse to this cache works is that it has to always return the same JSON to the same request. To guarantee that, it's necessary that this cache is the same according to its endpoint and specific platform as we can see in [**component's platform specification.**]({{< ref path="/resources/platform-sorting" lang="en" >}})

In other words, an endpoint can return a static element because it can only work if it returns the same JSON, independently of any other specific platform.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Platform sorting
title: Components Canalization
weight: 95
description: >-
Here you'll find about Beagle's functionality to filter what elements are sent
Expand All @@ -8,9 +8,9 @@ description: >-

---

Some elements provided by Beagle can be better used in some platforms than other, for example, [**ScrollView**]({{< ref path="/api/components/layout/scrollview" lang="en" >}}) works better in mobile and it is not needed for web.
Some elements provided by Beagle will function in some platforms better than in others, for example, the [**ScrollView**]({{< ref path="/api/components/layout/scrollview" lang="en" >}}) works in mobile when you need to scroll on content but it won't be used for web, since browsers already have this functionality.

Beagle has a platform specification functionality, so it is able to control which elements are sent by BFF and which platforms will be used.
In order to filter some componentes, Beagle has a **platform specification** functionality called **canalization**, so it will be able to control which elements are sent by the BFF and select which platforms it will be sent to.

### How does it work?

Expand Down
1 change: 1 addition & 0 deletions content/en/resources/urls.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Urls
weight: 8
hasNewFeature: true
description: >-
Here, you'll find how Beagle deals with URLs between backend and frontend
(BFF)
Expand Down
4 changes: 4 additions & 0 deletions content/en/web/angular/angular-installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ description: >-

Beagle Angular's current:[![badge](https://img.shields.io/npm/v/@zup-it/beagle-angular?logo=Angular)](https://github.com/ZupIT/beagle-web-angular)

{{% alert color="info" %}}
If you still do not have an Angular project, learn at the [official documentation](https://angular.io/guide/setup-local) how to create one!
{{% /alert %}}

### Step 1: Install Beagle's library

To follow the installation process, navigate to the root of your angular project and run one of the commands below according to the package manager of your preference.
Expand Down
4 changes: 4 additions & 0 deletions content/en/web/react/react-installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ description: >-

Beagle React's current version:[![badge](https://img.shields.io/npm/v/@zup-it/beagle-react?logo=React)](https://github.com/ZupIT/beagle-web-react)

{{% alert color="info" %}}
If you still do not have a React application, learn how to get started with [Create React App](https://create-react-app.dev/docs/getting-started).
{{% /alert %}}

### Step 1: Install Beagle's library

Navigate to the root of your react project and run one of the commands below according to the package manager of your preference.
Expand Down
1 change: 1 addition & 0 deletions content/pt/api/actions/navigate/pushstack.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ A sua estrutura é representada como mostrado abaixo:
| **Atributo** | **Tipo** | Obrigatório | **Definição** |
| :----------- | :-------------------------------------------- | :---------: | :----------------- |
| route | [Route]({{< ref path="/api/actions/navigate/route/" lang="pt" >}}) | ✓ | Rota de navegação. |
| controllerId | String | | O id do controlador de navegação a ser usado durante a ação de navegação. Se ausente, o controlador de navegação padrão será usado. |

## Como usar?

Expand Down
1 change: 1 addition & 0 deletions content/pt/api/actions/navigate/resetapplication.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ A sua estrutura é representada como mostrado abaixo:
| **Atributo** | **Tipo** | Obrigatório | **Definição** |
| :----------- | :---------------------------------------------- | :---------: | :----------------- |
| route | ​[Route]({{< ref path="/api/actions/navigate/route/" lang="pt" >}})​ | ✓ | Rota de navegação. |
| controllerId | String | | O id do controlador de navegação a ser usado durante a ação de navegação. Se ausente, o controlador de navegação padrão será usado. |

## Como usar?

Expand Down
1 change: 1 addition & 0 deletions content/pt/api/actions/navigate/resetstack.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ A sua estrutura é representada como mostrado abaixo:
| **Atributo** | **Tipo** | Obrigatório | **Definição** |
| :----------- | :--------------------------------------------- | :---------: | :----------------- |
| route | ​[Route]({{< ref path="/api/actions/navigate/route" lang="pt" >}})​ | ✓ | Rota de navegação. |
| controllerId | String | | O id do controlador de navegação a ser usado durante a ação de navegação. Se ausente, o controlador de navegação padrão será usado. |

## Como usar?

Expand Down
2 changes: 1 addition & 1 deletion content/pt/backend/get-started/installing-beagle.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: >-
{{% alert color="danger" %}}
Antes de iniciar a instalação, é importante você saber que as etapas abaixo são para linguagens da JVM.

Para outras linguagens, seu servidor precisa servir o JSON seguindo nossa API. Veja a implementação de [**cache**]({{< ref path="/resources/cache/" lang="pt" >}}) e em [**mecanismos específicos de cada linguagem**]({{< ref path="/resources/components/platform-sorting" lang="pt" >}}).
Para outras linguagens, seu servidor precisa servir o JSON seguindo nossa API. Veja a implementação de [**cache**]({{< ref path="/resources/cache/" lang="pt" >}}) e em [**mecanismos específicos de cada linguagem**]({{< ref path="/resources/platform-sorting" lang="pt" >}}).
{{% /alert %}}

## Requisitos
Expand Down
2 changes: 1 addition & 1 deletion content/pt/resources/cache/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Nesta camada de cache, existem duas localizações. São elas:

Este cache é usado para otimizar a resposta do BFF - tanto em tempo quanto em tamanho -, em casos que não há mudança. As entradas neste cache duram até o servidor refazer o deploy ou o cliente ser reinstalado.

A premissa para que este cache funcione é que ele deve sempre retornar o mesmo JSON para a mesma requisição. Para que uma requisição seja considerada igual, é necessário que tenha o mesmo endpoint e a mesma plataforma especificada como mostra nossa [**especificação de plataformas**.]({{< ref path="/resources/components/platform-sorting" lang="pt" >}})
A premissa para que este cache funcione é que ele deve sempre retornar o mesmo JSON para a mesma requisição. Para que uma requisição seja considerada igual, é necessário que tenha o mesmo endpoint e a mesma plataforma especificada como mostra nossa [**especificação de plataformas**.]({{< ref path="/resources/platform-sorting" lang="pt" >}})

{{% alert color="danger" %}}
É importante destacar que o mecanismo de cache **não deve** ser utilizado em **endpoints** que não atendam a essa **premissa**. Ele pode ser ativado ou desativado no BFF por endpoint ou para o BFF inteiro.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Especificação de componentes por plataforma
title: Canalização de componentes
weight: 95
description: >-
Nesta seção, você encontra mais sobre como filtrar os elementos que são
Expand All @@ -8,21 +8,20 @@ description: >-

---

Alguns elementos fornecidos pelo Beagle podem ser mais direcionados à uma plataforma e, talvez, não fazer tanto sentido para outra. Por exemplo, o uso do [**ScrollView**]({{< ref path="/api/components/layout/scrollview" lang="pt" >}}) funciona melhor na plataforma Mobile, mas não é necessário na Web.

Isso acontece porque o Beagle possui a funcionalidade de **Especificação de Plataforma**, que te permite ter controle de quais elementos são enviados pelo BFF e quais plataformas serão usadas.
Alguns componentes fornecidos pelo Beagle podem ser direcionados à uma plataforma espefica, pois, podem não fazer tanto sentido para outra. Por exemplo, o uso do [**ScrollView**]({{< ref path="/api/components/layout/scrollview" lang="pt" >}}) na plataforma Mobile é necessário para rolar conteúdos, mas não é necessário na Web.

Isso é possível pois o Beagle possui a funcionalidade de **Especificação de Plataforma** ou **Canalização**, que te permite ter controle sobre quais elementos são enviados pelo BFF e quais plataformas serão vão utiliza-los.
### Como funciona?

O Beagle faz uso de um cabeçalho personalizado, `beagle-platform`**,** com os possíveis valores:
O Beagle faz uso de um cabeçalho personalizado chamado `beagle-platform` que pode conter os valores:

- `ALL`;
- `MOBILE`;
- `ANDROID`;
- `IOS`;
- `WEB`;

Dessa forma, a resposta do BFF é interceptada e os elementos filtrados de acordo com a plataforma para qual ela está sendo enviada.
Dessa forma, a resposta do BFF é interceptada e os elementos são filtrados de acordo com a plataforma para qual ela está sendo enviada.

### Como acessar?

Expand Down
4 changes: 4 additions & 0 deletions content/pt/web/angular/angular-installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ description: >-

Versão atual do Beagle Angular: [![badge](https://img.shields.io/npm/v/@zup-it/beagle-angular?logo=Angular)](https://github.com/ZupIT/beagle-web-angular)

{{% alert color="info" %}}
Se você ainda não tem um projeto Angular, aprenda na [documentação oficial](https://angular.io/guide/setup-local) como criar um!
{{% /alert %}}

### Passo 1: Instalar a biblioteca Beagle

Para seguir com o processo de instalação, navegue até a raiz do seu projeto angular e execute um dos comandos abaixo de acordo com o gerenciador de pacotes de sua preferência.
Expand Down
4 changes: 4 additions & 0 deletions content/pt/web/react/react-installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ description: >-

Versão atual do Beagle React: [![badge](https://img.shields.io/npm/v/@zup-it/beagle-react?logo=React)](https://github.com/ZupIT/beagle-web-react)

{{% alert color="info" %}}
Se você ainda não tem um projeto React, aprenda a criar um com o [Create React App](https://create-react-app.dev/docs/getting-started).
{{% /alert %}}

### Passo 1: Instalando a biblioteca Beagle

Para seguir com o processo de instalação, navegue até a raiz do seu projeto e execute um dos comandos abaixo de acordo com o gerenciador de pacotes de sua preferência.
Expand Down
2 changes: 1 addition & 1 deletion themes/devrel