-
Notifications
You must be signed in to change notification settings - Fork 109
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
adding a page on web standards #802
base: main
Are you sure you want to change the base?
Conversation
Deno aims to bridge the gap between the browser and the backend with a set of | ||
web standard APIs that are familiar to web developers. These APIs are designed |
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 sounds a little roundabout- maybe something along these lines: "Deno aims to narrow the gap between browser and server-side JavaScript by providing the exact same web standard APIs available client side in the server. This means if you know how to program a browser, you already know how to program Deno."
Deno also provides its global namespace APIS, to empower developers with | ||
low-level capabilities, often essential for system-level tasks. |
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.
Deno also provides its own Deno specific APIs, accessible under the Deno
global variable that are performant, simple ways to do server-side only operations.
## Web Platform APIs | ||
|
||
If you’ve ever built for the browser, you’re already on familiar ground. Deno | ||
supports standard web APIs (like fetch, WebSockets, and more) instead of | ||
proprietary alternatives. This means your existing web knowledge can be used in | ||
your Deno projects. | ||
|
||
For more information about the web platform APIs, see the | ||
[Web Platform APIs](/runtime/reference/web_platform_apis/) documentation. |
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 would be a good place to discuss spec deviations and other content contained in https://docs.deno.com/runtime/reference/web_platform_apis/
|
||
## Node.js Compatibility and APIs | ||
|
||
Deno’s Node.js compatibility isn’t about replacing Node, it’s about coexistence. | ||
Developers can gradually migrate their projects, leveraging Deno’s security | ||
features and built in tooling while benefiting from Node.js libraries. Many | ||
Node.js libraries are battle-tested and widely used. Deno’s compatibility allows | ||
developers to reuse this code seamlessly. No need for a complete rewrite—just | ||
import your favorite Node.js modules. | ||
|
||
For more information about Node.js compatibility, see the | ||
[Node.js Compatibility](/runtime/reference/node/) documentation. |
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 could be more exact. Instead of "Node.js Compatibility and APIs", I would call it "Node built-in APIs" the description could explain "these are imports that are prefixed with node:
, like node:fs
. They operate exactly as in Node"
I would image to find this content here: https://docs.deno.com/runtime/reference/node/#node.js-built-ins
For more information about Node.js compatibility, see the | ||
[Node.js Compatibility](/runtime/reference/node/) documentation. | ||
|
||
## Deno Namespace APIs |
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.
Just "Deno APIs" or "Deno specific APIs"
There isn't much meat to this section yet...
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, left two minor comments. Let me know what you think.
Deno aims to bridge the gap between the browser and the backend with a set of | ||
web standard APIs that are familiar to web developers. These APIs are designed | ||
to be compatible with the web platform, making it easier to write code that can | ||
run in both the browser and Deno. |
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 reads a little strange to me: Like we didn't design the APIs ourselves. I feel like we should be more direct than the phrasing here. Maybe something like
"Deno is built primarily around Web Platform APIs that you already know from working with browsers. There are very few additional Deno-specific APIs for more low level access which can be found on the Deno
global if needed."
I think the point we're trying to make here that Deno should be familiar to you already if you're a web developer. We can be a bit more "on the nose" with that here.
Existing Node.js ecosystem compatibility is provided through a set of Node.js | ||
compatible APIs and Deno namespace APIs. These APIs are designed to be | ||
compatible with Node.js, making it easier to port existing Node.js code to Deno. |
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.
The phrasing seems to suggest that the Deno
namespace APIs help with node compatibility. Maybe something like:
Existing Node.js ecosystem compatibility is provided through a set of Node.js | |
compatible APIs and Deno namespace APIs. These APIs are designed to be | |
compatible with Node.js, making it easier to port existing Node.js code to Deno. | |
Existing Node.js ecosystem compatibility is provided through a built-in compatibility layer that allows you to use any npm package directly in Deno. |
If you’ve ever built for the browser, you’re already on familiar ground. Deno | ||
supports standard web APIs (like fetch, WebSockets, and more) instead of | ||
proprietary alternatives. This means your existing web knowledge can be used in | ||
your Deno 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.
Love this!
wrong button, wanted to just leave a comment review
This is a starter for what should be documentation on the deno philosophy on the three api groups.