herbsjs / herbs2repl

Create a REPL for your domain based on Entities and Use Cases
Other
0 stars 4 forks source link

Explore Entities and Repositories #6

Open dalssoft opened 2 years ago

dalssoft commented 2 years ago

An user should be able to explore entities and repositories from a herbs application, as it does now with use cases.

Inspired by Django Shell, Rails Console and Laravel Tinker

maikmb commented 2 years ago

Hi @dalssoft! You can give me an example of how I can explore repositories and entities? Do you think of anything like this?

herbs shell --repository UserRepository --method Insert --payload { name: 'Joe', age: 21 }

or

herbs shell --entitiy User --payload { name: 'Joe', age: 21 }

I'm thinking about the pros of this feature because this involves the dependency of the repository.

dalssoft commented 2 years ago

with REPL you can use CLI options but mainly you should be able to navigate / interact with object list and read metadata to run methods and read docs like we do with use cases

image

maikvortx commented 2 years ago

It's cool! We can include the same behavior for Entities and Repositories.

maikvortx commented 2 years ago

How are we going to read the names of the methods from the repository? Can we add it as metadata in the repository?