Skip to content

Commit

Permalink
Refine explanation of BEAR.Sunday's architectural comparison
Browse files Browse the repository at this point in the history
The commit revises the section in the manual explaining the differences between BEAR.Sunday's Resource-Oriented Architecture (ROA) and the traditional Model-View-Controller (MVC) structure. The tweaked statement provides clearer insights into how the interactions and responsibilities are organized in the former compared to the latter.
  • Loading branch information
koriym committed Apr 17, 2024
1 parent 043cbce commit 81f2792
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
2 changes: 0 additions & 2 deletions manuals/1.0/en/15.tech.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,12 @@ By using BEAR.Sunday's ROA, scalable and loosely coupled applications that align

### Differences from MVC

BEAR.Sunday's ROA takes a different approach than the traditional MVC architecture.
BEAR.Sunday's ROA takes a different approach compared to the traditional MVC architecture. MVC structures an application with three components: Model, View, and Controller. In practice, however, the Controller freely manipulates the Model and View at runtime, literally controlling everything.

In contrast, with BEAR.Sunday, the View is injected into the Resource object, and the Resource is unaware of the View, just as the View is unaware of the Resource. The Resource object does not manipulate the injected View and does not even know what kind of View has been injected. Only when the Resource object is evaluated as a string does the injected View render the Resource's state into a string representation. In this way, the Resource and View are loosely coupled, and their responsibilities are clearly separated.

Furthermore, unlike the unconstrained relationship between Controller and Model, Resources have constraints on including other Resources, which can be done declaratively. The Resource also depends on different Resources, forming a tree structure similar to DI dependencies. Other differences include:

* While MVC Controllers have no constraints and are free to operate, BEAR.Sunday Resources have semantic methods (semantically clear methods), making operations explicit.
* BEAR.Sunday Resources provide possible operations (affordances) by declaring relationships. Clients can dynamically manipulate Resources using this as a clue. It is self-descriptive.
HAL (Hypertext Application Language) is adopted for links, standardizing the links between Resources.
* Unlike MVC Models, Resources can be directly called from various clients, including the console.
Expand Down
1 change: 0 additions & 1 deletion manuals/1.0/ja/15.tech.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ BEAR.SundayのROAは、従来のMVCアーキテクチャとは異なるアプロ

また、コントローラーとモデルの関係に制約がないのと対照的に、リソースは他のリソースを含むことに制約があり、宣言的に行うことができます。そのリソースはまた違うリソースに依存し、まるでDIの依存性のようにツリー構造を形成します。その他以下のような違いがあります。

* MVCのコントローラーの操作に制約はなく自由ですが、BEAR.Sundayのリソースはセマンティックなメソッド(意味的に明確なメソッド)を持ち、操作が明確になります。
* BEAR.Sundayのリソースはリレーションを宣言することで、可能な操作(アフォーダンス)を提供します。クライアントはこれを手がかりにリソースを動的に操作できます。自己記述的です。 リンクにはHAL(Hypertext Application Language)を採用し、リソース間のリンクを標準化します。
* MVCのモデルと違って、コンソールを含む多様なクライアントから直接コールすることができます。
* HTMLサイトとAPIサイトを別々に構築する必要がなく、同じリソースを使ってHTMLサイトとAPIサイトを同時に構築できます。
Expand Down

0 comments on commit 81f2792

Please sign in to comment.