-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
docs: add a new section on content organization #5659
Conversation
package should be moved to "building blocks" and our documentation should be | ||
updated to reference the higher-level "framework" instead. | ||
|
||
List of packages that are considered as building blocks: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the rest are framework-level pacakges? If yes, we should mention that, else it feels like the list of framework-level pacakges is missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 69dcaa6
There is one thing that bugs me a bit: we also have utility packages like @loopback/build
or @loopback/testlab
that are technically not part of the framework, but they are not building blocks either in the sense that they should be mentioned in our framework documentation.
I guess "framework-level" is not the best term to use. Can we come up with a more accurate name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the extensions
and examples
packages? Those seem more like an adds-on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the
extensions
andexamples
packages? Those seem more like an adds-on.
Sure 👍
What I am trying to accomplish here is to distinguish between "building blocks" packages that should not be referred to in our docs, CLI templates and example apps; and everything else.
I used the term "framework-level" for "everything else", which is clearly misleading based on your feedback.
So, what would be a better term?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess "framework-level" is not the best term to use. Can we come up with a more accurate name?
They need not belong in the framework packages. They can be classified as helper/utility packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am adding the following clarification to the docs:
#### Framework-level packages
All packages not listed above are considered as framework-level.
We consider utilities like `@loopback/testlab` and example projects like
`@loopback/todo` as framework-level too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We consider utilities like
@loopback/testlab
and example projects like
@loopback/todo
as framework-level too.
Doesn't feel right. Anything that LoopBack developers would not (maybe even never) use in their project feels very odd to be classified under framework-level packages. We need a third category - helpers, utility, along that line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is subjective.
Let's land my PR as the first step, and then you can open a follow-up PR to discuss how to improve this initial categorization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.
docs/site/DEVELOPING.md
Outdated
groups: | ||
|
||
1. Building-blocks are lower-level packages that are typically not consumed by | ||
LoopBack projects directly, instead there is a higher-level package exposing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LoopBack projects
-> LoopBack applications
or LoopBack application projects
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I think this applies to most extension projects too, but let's not dwell on details. I am going to use "LoopBack applications" for now, we can improve this later as we get a better picture about the documentation for extension authors.
docs/site/DEVELOPING.md
Outdated
writing docs. While this is good for capturing the knowledge in a text form, it | ||
also makes the documentation difficult to follow by people new to LoopBack. | ||
Newcomers get quickly overwhelmed by the amount of concepts they need to | ||
understand and all the different packages they need to know about. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also mention the balance between modular design
and ease of use
.
- Module design leads to great flexibility and composability. As the number of modules grows, it also increases the complexity as developers need to know what to choose and how to use.
- We need to target high-level packages for application developers without dragging in lower-level details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to identify several personas of different interest/entry to LB here:
- Platform/extension developers
- Application developers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to identify several personas of different interest/entry to LB here:
- Platform/extension developers
- Application developers
Yeah, I agree that at some point, we need to step back and reorganize our docs to cater for different personas. As I see it, our current docs is mostly aimed at application developers. In this pull request, I am proposing how to make the docs easier to read for app developers. We can discuss how to better address other personas in #5113.
docs/site/DEVELOPING.md
Outdated
To prevent that issue, we have categorized all monorepo packages into two | ||
groups: | ||
|
||
1. Building-blocks are lower-level packages that are typically not consumed by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not consumed
-> not directly consumed
or not explicitly consumed
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we can find a better name for building blocks
. Maybe foundation-level
packages to be symmetric with framework-level
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or library-level
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not consumed
->not directly consumed
ornot explicitly consumed
?
English is not my mother tongue, but I believe that my current version is grammatically correct while conveying the same meaning.
lower-level packages that are typically not consumed by LoopBack projects directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we can find a better name for
building blocks
. Maybefoundation-level
packages to be symmetric withframework-level
?
I like "foundation-level" + "framework-level".
In #5659 (comment), we were discussing with @hacksparrow that "framework-level" may not be the best description. However, I think with building blocks renamed to "foundation-level", the term "framework-level" is ok.
69dcaa6
to
8368999
Compare
@hacksparrow @dhmlau @raymondfeng thank you for the suggestions. I rewrote most of the new content to incorporate your feedback, does the new version LGTY now? |
How do we handle "breaking changes" in docs organization? For example a framework-level package underwent some refactoring and ended up becoming a foundation-level package. |
At the moment, we have a single version of docs only ("the latest"). I think we will eventually need to introduce versioning (e.g. docs for In the current state, where there is a single version of docs only: When a framework-level package becomes foundation-level, I am envisioning the following process:
Is there any specific concern you have, @hacksparrow? |
My concern was looking at outdated references. Versioning should help.
Sounds good for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
- [packages/http-server](https://github.com/strongloop/loopback-next/tree/master/packages/http-server) | ||
- [packages/metadata](https://github.com/strongloop/loopback-next/tree/master/packages/metadata) | ||
- [packages/openapi-v3](https://github.com/strongloop/loopback-next/tree/master/packages/openapi-v3) | ||
- [packages/repository-json-schema](https://github.com/strongloop/loopback-next/tree/master/packages/repository-json-schema) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This package depends on @loopback/core
and @loopback/repository
. It should be moved out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This package depends on
@loopback/core
and@loopback/repository
. It should be moved out.
Please note the criteria is not whether a package depends on something else from @loopback/*
namespace, but whether LB application developers should depend on that package directly.
Both @loopback/repository-json-schema
and @loopback/openapi-v3
are not meant to be used directly. They are building blocks used by @loopback/rest
. Applications are importing their APIs and functionality from @loopback/rest
, as can be seen e.g. in examples/todo/src/controllers/todo.controller.ts
- [packages/express](https://github.com/strongloop/loopback-next/tree/master/packages/express) | ||
- [packages/http-server](https://github.com/strongloop/loopback-next/tree/master/packages/http-server) | ||
- [packages/metadata](https://github.com/strongloop/loopback-next/tree/master/packages/metadata) | ||
- [packages/openapi-v3](https://github.com/strongloop/loopback-next/tree/master/packages/openapi-v3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this one either:
"dependencies": {
"@loopback/core": "^2.7.1",
"@loopback/repository-json-schema": "^2.4.3",
}
Signed-off-by: Miroslav Bajtoš <[email protected]>
8368999
to
76c218d
Compare
Based on the discussion in #5550, I am updating the documentation for developers with the definition of "building-blocks", a list of packages considered as building blocks, and finally instructions on how to treat these packages in our docs, CLI templates and examples.
After this PR is approved, I'll created follow-up stories to ensure proper use of the following packages:
@loopback/core
for packages consistently #5625@loopback/express
from framework-level documentation #5693@loopback/metadata
from framework-level documentation #5696@loopback/openapi-v3
from docs, examples and CLI templates #5692The following packages are already not exposed:
Checklist
👉 Read and sign the CLA (Contributor License Agreement) 👈
npm test
passes on your machinepackages/cli
were updatedexamples/*
were updated👉 Check out how to submit a PR 👈