Skip to content

make the App the root of whole application and introduce Home as a subapp #2240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sio4 opened this issue Apr 17, 2022 · 0 comments
Open
Assignees
Labels
breaking change This feature / fix introduces breaking changes enhancement New feature or request
Milestone

Comments

@sio4
Copy link
Member

sio4 commented Apr 17, 2022

The name App sounds like the only root of the application structure (could be a singleton) but actually, it is also a container of a group of URLs that is independently configurable with middlewares and error handlers. The App.Group() and App.Resource() return a new App which is a child of the root App, it's OK, but they have the whole functions of App which is not desirable.

By #2226, a quick fix for #2185, I changed some of the internal implementations of App while keeping the external behavior the same, but there are still some issues caused by the current design. Since we are now discussing v1, the future of buffalo, so I would like to suggest that we keep this structure for the current version and improve the core when we move to the next version.

TODO

  • make the Home the container of a group of URLs and its independent middlewares and error handlers (half done)
  • make Home as a child of the App.
  • make App as a singleton (but we need more consideration for this since it is not always a good thing.)

Context

@sio4 sio4 added enhancement New feature or request breaking change This feature / fix introduces breaking changes labels Apr 17, 2022
@sio4 sio4 added this to the v1.0.0 milestone Apr 17, 2022
@sio4 sio4 self-assigned this Apr 17, 2022
@sio4 sio4 mentioned this issue Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This feature / fix introduces breaking changes enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant