Skip to content
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

(DRAFT) Feature (mix task): Add a LiveView generator to scaffold the code by Domain, Resources and Actions on the Web layer #6

Open
Exadra37 opened this issue Jul 18, 2024 · 0 comments
Assignees
Labels
draft For issues that are being defined, thus not ready to work on

Comments

@Exadra37
Copy link
Collaborator

Mix Task to generate the LiveView Web folder structure organized by Domain, Resource and Actions

Github Sponsor: https://github.com/sponsors/Exadra37

Warning

→ Not sure if LiveView allows me to easily split the code into one module per action on a Domain Resource.
→ Requires some investigation. Maybe I should build the website to sell the templates while developing this generator 🤔

Why?

To enable developers to write Clean Code in a Clean Software Architecture that respects the Single Responsibility Principle.

The traditional approach in software development tends to group all actions for a resource under the same module, which violates the Single Responsibility Principle because the module has more than one reason to change, as many as the number of actions on the resource.

What?

What to expect from this task is that when the developer executes the mix scribe.gen.live ... command in the terminal, the result is a folder structure where a module is created for each action of a LiveViewr resource in a domain at lib/my_app_web/. This respects the Single Responsibility Principle because each module only has one reason to change: the web logic for the single action it is responsible for.

This generator will also invoke mix scribe.gen.domain (issue #4) to generate the Domain, Resource and Actions for the core business logic.

When?

The developer should use this generator whenever they need to create a new feature consumed by a LiveView app via Live endpoints.

Acceptance Criteria's

Let's base the acceptance criteria's on a developer tasked with building an Online Shop.

TODO: Define the acceptance criteria's

@Exadra37 Exadra37 added the draft For issues that are being defined, thus not ready to work on label Jul 18, 2024
@Exadra37 Exadra37 self-assigned this Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
draft For issues that are being defined, thus not ready to work on
Projects
None yet
Development

No branches or pull requests

1 participant