-
Notifications
You must be signed in to change notification settings - Fork 1.1k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
RFC: Cause of the documentation issue and proposal for a possible solution #5551
Comments
Thank you for starting the discussion, @hacksparrow. One one hand I agree with you that the current template for building REST+Repository applications may look complex. On the other hand, we are discussing support for other ORMs like TypeORM and Mongoose/Typegoose, and other transport protocols like Kafka (and pub/sub style in general). Application-level mixins like Implementation-wise, where would you define the class constructor that's combining The current design allows users to choose the version of repository/service-proxy/boot package to use in their project, e.g. they can use the latest version of boot but the previous semver-major version of repository. I am not sure how important this trait is, maybe most users don't care and want to use the latest versions? Either way, we should consider this aspect and be explicit about our decision. To conclude, I like the idea of simplifying the default application template 👍 Now we need to find a solution that would not break those good parts of the current design that we want to preserve.
A very loosely related discussion: RFC: Reorganize code & docs along abstraction levels #5550 In my opinion, the fact that LoopBack is primarily perceived as a REST API framework is because we didn't get to implement non-REST parts that have been always on our long-term roadmap, e.g. GraphQL (#5545) and Kafka (#1925). I am not sure if it's a good idea to further reinforce the REST-centric point of view. |
The user would express their strategy in a config object (code or file), our framework should be able to figure out the implementation for them. I haven't thought about how to do it, yet. However, I am sure this is something that's not impossible. If done, it would be a wonderful experience for our users.
If changing the concept of LoopBack is too disruptive, maybe
Our current design is pretty solid as a meta framework, no doubt about it. We need not change it; what I am suggesting is to carve out a new entity specifically for the REST framework, and we need not name it LoopBack. A lot of confusion goes away once LoopBack is looked at as a meta framework, not a REST API framework. However, our documentation, tooling, and examples present it primarily as a REST API framework. One example:
If the REST aspect of LoopBack is as important as any other, the bias should be removed from the documentation, tooling, and examples to avoid confusion. If the bias is an indication of its importance and demand, maybe we should create a new entity for the LoopBack REST framework and give it a name. What I feel is that we need another level of abstraction for our users. It will have very little (almost insignificant) affect on the implementation, but documentation based around this new abstraction will be a lot simpler and less confusing. The new framework need not be hard-coded to REST. It could work something like this: export class MyApplication extends Venus {
constructor(options: ApplicationConfig = {}) {
super(options);
}
}
const app = new MyApplication({
transport: 'graphql' // 'rest' | 'graphql' | 'kafka'
}); or simply: const app = new Venus({ transport: 'graphql' }); |
Great discussion. I can see it could bring confusion for having
I'm not sure if we're ready to split LoopBack into various parts for different purpose. :). Like some other projects, they can have different flavor, e.g. Node.js, Java, PHP, and not necessarily to break the project/framework into parts. Perhaps as a start, having what we have now (more REST-style centric), we can start building the other flavor, i.e. GraphQL and Kafka as @bajtos mentioned above. If further down the road when we have more contents, we can decide whether there's a need to separate into different guides for other protocol. |
Cross-post: #5549 (comment) |
Few more questions to consider:
|
|
This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
looks much better from a users's perspective, than:
Mixins are our tools for composability; it is a great pattern for the people developing the framework but is not a great DX for the users of the framework, especially new users. We should shield them from internal implementation and present a simple
RestApplication
class, which they can use for creating their REST apps.RestApplication
should then be documented as a first class entity (almost as LoopBack itself). Not suggesting we should modify the currentRestApplication
, just a name used for the example."But LoopBack can be used for creating other types of apps that may not use services and/or repositories."
The majority of our users are looking to use LoopBack for developing REST apps, even our app scaffolder creates a REST app by default. Therefore
RestApplication
should be a principal in the framework.In my opinion, the confusion in the current documentation is caused by the drastic differences in the view of what LoopBack is, according to "us, the developers of the framework" and our users.
Users: LoopBack is a REST framework.
We: LoopBack is a powerful framework that can be used to build all sorts of apps. REST apps are just one of the many possibilities.
The organization and content of our documentation is a correct reflection of our view, but our users are looking for the documentation of their view.
That makes me wonder if creating two identities out of the current work would help.
Now creating LoopBack apps would look like this:
A documentation around the
LoopBack
class is what our users are looking for. The current documentation is that of the meta framework.The text was updated successfully, but these errors were encountered: