bearsunday / bearsunday.github.io

BEAR.Sunday manual
https://bearsunday.github.io/
10 stars 48 forks source link

Enhance acyclic dependencies principle explanation in manuals #274

Closed koriym closed 5 months ago

koriym commented 5 months ago

Clarified the Acyclic Dependency Principle descriptions in both Japanese and English versions of the tech manual. Added supporting images to better illustrate the principle. Made explicit the separation of concerns and emphasized the independence and unidirectional dependencies of the framework packages.

coderabbitai[bot] commented 5 months ago

ウォークスルー

BEAR.Sundayフレームワークにおける変更は、循環しない一方向の依存関係を強調するADP(非循環依存性原則)の導入に焦点を当てています。この原則に従い、パッケージ間の階層的な構造が再編され、独立したパッケージ更新が可能となり、関心の分離とDI原則への準拠が強化されています。

変更点

ファイル 変更内容
manuals/1.0/.../15.tech.md ADP(非循環依存性原則)を導入し、BEAR.Sundayフレームワーク内でパッケージ間の一方向で循環しない依存関係を強調。パッケージの階層的な構造の再編成、独立した更新の可能性、関心の分離、およびDI原則に基づくルートオブジェクトの構築がクラリファイされました。

Recent Review Details **Configuration used: CodeRabbit UI** **Review profile: CHILL**
Commits Files that changed from the base of the PR and between 677fdf13131e6ff2d1588a55d1c26443d353fe09 and 8d4a432015672911073247b6ec3e251b4f47a157.
Files ignored due to path filters (2) * `images/screen/clean-architecture.png` is excluded by `!**/*.png` * `images/screen/package_adp.png` is excluded by `!**/*.png`
Files selected for processing (2) * manuals/1.0/en/15.tech.md (1 hunks) * manuals/1.0/ja/15.tech.md (1 hunks)
Additional Context Used
LanguageTool (92)
manuals/1.0/en/15.tech.md (88)
Near line 9: Add a space between sentences. Context: ...ctive technologies and features of BEAR.Sunday are explained in the following chapters... --- Near line 16: Add a space between sentences. Context: ...ilosophy-and-quality) * [The Value BEAR.Sunday Brings](#the-value-bearsunday-brings) ... --- Near line 22: Add a space between sentences. Context: ...ource Oriented Architecture (ROA) BEAR.Sunday's ROA is an architecture that realizes ... --- Near line 22: Add a space between sentences. Context: ...web application. It is the core of BEAR.Sunday's design principles, functioning as bot... --- Near line 26: Add a space between sentences. Context: ...he Web and is also at the heart of BEAR.Sunday's ROA. By assigning URIs to all resourc... --- Near line 34: Add a space between sentences. Context: ... of resource. #### Hypermedia In BEAR.Sunday's Resource Oriented Architecture (ROA),... --- Near line 38: Add a space between sentences. Context: ...on of State and Representation In BEAR.Sunday's ROA, the state of a resource and its ... --- Near line 42: Add a space between sentences. Context: ...ation. #### Differences from MVC BEAR.Sunday's ROA (Resource Oriented Architecture) ... --- Near line 42: Add a space between sentences. Context: ...sponse. In contrast, a resource in BEAR.Sunday, following the Single Responsibility Pr... --- Near line 46: Possible spelling mistake found. Context: ...rom the request object, while resources declaratively define the required variables as argume... --- Near line 46: Possible spelling mistake found. Context: ...ore, input validation is also performed declaratively using JsonSchema, and the arguments and... --- Near line 46: Possible spelling mistake found. Context: ...n is also performed declaratively using JsonSchema, and the arguments and their constraint... --- Near line 52: Style-wise, it’s not ideal to insert an adverb (‘horizontally’) in the middle of an infinitive construction (‘to divide’). Try moving the adverb to avoid split infinitives. Context: ...nage the dependencies between them. DI helps to horizontally divide one responsibility into multiple functions. The divided fu... --- Near line 54: Add a space between sentences. Context: ..., forming a tree of dependencies. BEAR.Sunday's DI uses a separate package called [Ra... --- Near line 54: Add a space between sentences. Context: ... DI uses a separate package called [Ray.Di](https://github.com/ray-di/Ray.Di), whi... --- Near line 60: Add a space between sentences. Context: ...self-descriptiveness of the code. * Ray.Di performs dependency resolution at compi... --- Near line 65: If this is a compound adjective that modifies the following noun, use a hyphen. Context: ...vg" width="180" alt="Ray.Di logo"> ### Aspect Oriented Programming (AOP) Aspect-Oriented Prog... --- Near line 69: Add a space between sentences. Context: ... configure them based on context. BEAR.Sunday's AOP uses a separate package called Ra... --- Near line 69: Add a space between sentences. Context: ... AOP uses a separate package called Ray.Aop, which declaratively binds cross-cuttin... --- Near line 69: Possible spelling mistake found. Context: ... separate package called Ray.Aop, which declaratively binds cross-cutting processes by attach... --- Near line 69: Add a space between sentences. Context: ... attributes to classes and methods. Ray.Aop conforms to Java's [AOP Alliance](https... --- Near line 71: Unpaired symbol: ‘'’ seems to be missing Context: ...e existing order". However, its raison d'être is not to exercise power beyond con... --- Near line 77: Add a space between sentences. Context: ...ategy with Modern CDN Integration BEAR.Sunday realizes an advanced event-driven cachi... --- Near line 77: Possible spelling mistake found. Context: ...with instant purge-capable CDNs such as Fastly, with Resource Oriented Architecture (R... --- Near line 77: Possible spelling mistake found. Context: ... CDN and server-side caches, as well as ETags (entity tags), in response to resource ... --- Near line 79: Possible spelling mistake found. Context: ...ent content on CDNs, it not only avoids SPOF (Single Point of Failure) and achieves ... --- Near line 83: Add a space between sentences. Context: ...antic Methods and Dependencies In BEAR.Sunday's ROA, each resource operation is given... --- Near line 85: Possible spelling mistake found. Context: ...ity Confirmation and Fast Response with ETag By setting ETags before the system boo... --- Near line 87: Possible spelling mistake found. Context: ...and Fast Response with ETag By setting ETags before the system boots, content identi... --- Near line 91: Add a space between sentences. Context: ...pdates with Donut Caching and ESI BEAR.Sunday adopts a donut caching strategy and use... --- Near line 93: Add a space between sentences. Context: ... caching efficiency. In this way, BEAR.Sunday and Fastly's integration of ROA-based c... --- Near line 93: Possible spelling mistake found. Context: ...ficiency. In this way, BEAR.Sunday and Fastly's integration of ROA-based caching stra... --- Near line 93: Opting for a less wordy alternative here can improve the clarity of your writing. Context: ...tegration of ROA-based caching strategy not only realizes advanced distributed caching but also enhances application performance and fault toler... --- Near line 97: This verb may not be in the correct tense. Consider changing the tense to fit the context better. Context: ...tup In the original world of DI, users avoid dealing directly with the injector (DI ... --- Near line 97: Add a space between sentences. Context: ...point to start the application. In BEAR.Sunday's DI, there is virtually no DI containe... --- Near line 103: Add a space between sentences. Context: ...r Experience ### Ease of Testing BEAR.Sunday allows for easy and effective testing d... --- Near line 105: Possible typo: you repeated a whitespace Context: ... the stateless nature of REST requests. Since the state and representation of re... --- Near line 122: Add a space between sentences. Context: ...P Interfaces and SQL Execution In BEAR.Sunday, the execution of SQL statements for in... --- Near line 124: Possible missing comma found. Context: ...tically bound. This helps keep the code concise as the client is not responsible for pa... --- Near line 130: Add a space between sentences. Context: ... to concurrently execute different BEAR.Sunday applications within the same PHP runtim... --- Near line 138: Add a space between sentences. Context: ...dual Migration from Other Systems BEAR.Sunday provides a gradual migration path and e... --- Near line 138: Add a space between sentences. Context: ... developers to gradually introduce BEAR.Sunday's features into their existing codebase... --- Near line 142: Add a space between sentences. Context: ...exibility in Technology Migration BEAR.Sunday protects investments in preparation for... --- Near line 142: Add a space between sentences. Context: ...go to waste. In a PHP environment, BEAR.Sunday applications can be integrated as Compo... --- Near line 142: Add a space between sentences. Context: ...ges and continuously utilized, and BEAR.Thrift allows efficient access to BEAR.Sunday ... --- Near line 142: Add a space between sentences. Context: ....Thrift allows efficient access to BEAR.Sunday resources from other languages. When no... --- Near line 144: Add a space between sentences. Context: ... versions of PHP can coexist using BEAR.Thrift. ## Design Philosophy and Quality ###... --- Near line 150: Add a space between sentences. Context: ...mination of Proprietary Standards BEAR.Sunday has a design philosophy of adopting sta... --- Near line 150: Possible spelling mistake found. Context: ...content negotiation for JSON format and www-form format HTTP requests by default and use... --- Near line 150: Possible spelling mistake found. Context: ... HTTP requests by default and uses the [vnd.error+json](https://github.com/blongden... --- Near line 150: Possible spelling mistake found. Context: ...ests by default and uses the [vnd.error+json](https://github.com/blongden/vnd.error)... --- Near line 150: Possible spelling mistake found. Context: ... for links between resources and using [JsonSchema](https://json-schema.org/) for validati... --- Near line 156: Add a space between sentences. Context: .... ### Object-Oriented Principles BEAR.Sunday emphasizes object-oriented principles t... --- Near line 160: Possible spelling mistake found. Context: ...runtime by design is the resource class `BEAR\Resource\ResourceObject`, but the methods of ResourceObject exi... --- Near line 160: Possible spelling mistake found. Context: ...rce\ResourceObject`, but the methods of ResourceObject exist solely for other classes to use. ... --- Near line 160: Add a space between sentences. Context: ...lasses to use. There is no case in BEAR.Sunday where a user calls a method of a framew... --- Near line 168: Add a space between sentences. Context: ...surance of Backward Compatibility BEAR.Sunday is designed with an emphasis on maintai... --- Near line 168: Add a space between sentences. Context: ...sting have become a challenge, but BEAR.Sunday has avoided this problem. BEAR.Sunday ... --- Near line 170: Add a space between sentences. Context: ....Sunday has avoided this problem. BEAR.Sunday not only adopts semantic versioning but... --- Near line 170: Opting for a less wordy alternative here can improve the clarity of your writing. Context: ... has avoided this problem. BEAR.Sunday not only adopts semantic versioning but also does not perform major version upgrades that... --- Near line 176: Add a space between sentences. Context: ...idirectional and non-circular. The BEAR.Sunday framework adheres to this principle and... --- Near line 176: Add a space between sentences. Context: ...nd do not form cycles. For example, Ray.Aop is not even aware of the existence of R... --- Near line 176: Add a space between sentences. Context: ... not even aware of the existence of Ray.Di, and Ray.Di is not aware of the existen... --- Near line 176: Add a space between sentences. Context: ...are of the existence of Ray.Di, and Ray.Di is not aware of the existence of BEAR.S... --- Near line 176: Add a space between sentences. Context: ...i is not aware of the existence of BEAR.Sunday. フレームワーク構造が非循環依存性原則に従っている --- `180-180`: 後方互換性が維持されているため、各パッケージは独立して更新できます。さらに、他のフレームワークで見られるような、システム全体をバージョン番号でロックすることはありません。オブジェクト間の横断的な依存関係を保持するオブジェクトプロキシのメカニズムもありません。これにより、関心の分離が明確に保たれます。 --- `182-182`: 非循環依存性原則は、DI(依存性注入)原則と調和しており、BEAR.Sunday のブートストラッププロセス中に生成されるルートオブジェクトも、この非循環依存性原則の構造に従って構築されます。 --- `184-184`: [](/images/screen/clean-architecture.png) --- `186-186`: ランタイムにおいても同様です。リソースにアクセスする際には、まず、メソッドにバインドされた AOP アスペクトの横断的処理が実行され、その後、メソッドがリソースの状態を決定します。この時点で、メソッドはそれにバインドされたアスペクトの存在を認識していません。リソースの状態に埋め込まれたリソースも同様で、外層や要素の知識を持っていません。関心の分離は明確に定義されています。
--- Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.