-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathblog.html
123 lines (123 loc) · 20.4 KB
/
blog.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!doctype html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="Docusaurus v2.0.0-beta.14">
<link rel="alternate" type="application/rss+xml" href="/blog/rss.xml" title="Orbit.js RSS Feed">
<link rel="alternate" type="application/atom+xml" href="/blog/atom.xml" title="Orbit.js Atom Feed">
<link rel="alternate" type="application/json" href="/blog/feed.json" title="Orbit.js JSON Feed"><title data-react-helmet="true">Blog | Orbit.js</title><meta data-react-helmet="true" property="og:title" content="Blog | Orbit.js"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" name="description" content="Blog"><meta data-react-helmet="true" property="og:description" content="Blog"><meta data-react-helmet="true" property="og:url" content="https://orbitjs.com/blog"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="blog_posts_list"><link data-react-helmet="true" rel="icon" href="/img/favicon.ico"><link data-react-helmet="true" rel="canonical" href="https://orbitjs.com/blog"><link data-react-helmet="true" rel="alternate" href="https://orbitjs.com/blog" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://orbitjs.com/blog" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.74aa2cd0.css">
<link rel="preload" href="/assets/js/runtime~main.b1b77a52.js" as="script">
<link rel="preload" href="/assets/js/main.8aa9b469.js" as="script">
</head>
<body>
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
<div><a href="#" class="skipToContent_1oUP">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/orbitjs-text.svg" alt="Orbit.js" class="themedImage_1VuW themedImage--light_3UqQ"><img src="/img/orbitjs-text.svg" alt="Orbit.js" class="themedImage_1VuW themedImage--dark_hz6m"></div></a><a class="navbar__item navbar__link" href="/docs/intro">Docs</a><a class="navbar__item navbar__link" href="/docs/api">API</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/blog">Blog</a></div><div class="navbar__items navbar__items--right"><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a class="navbar__link" href="/docs/intro">0.17</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/docs/intro">0.17</a></li><li><a class="dropdown__link" href="/docs/0.16/intro">0.16</a></li><li><a class="dropdown__link" href="/docs/0.15/intro">0.15</a></li><li><a class="dropdown__link" href="/versions">All versions</a></li></ul></div><a href="https://github.com/orbitjs/orbit" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link header-github-link"></a><div class="toggle_71bT toggle_3Zt9 toggleDisabled_3cF-"><div class="toggleTrack_32Fl" role="button" tabindex="-1"><div class="toggleTrackCheck_3lV7"><span class="toggleIcon_O4iE">🌜</span></div><div class="toggleTrackX_S2yS"><span class="toggleIcon_O4iE">🌞</span></div><div class="toggleTrackThumb_xI_Z"></div></div><input type="checkbox" class="toggleScreenReader_28Tw" aria-label="Switch between dark and light mode"></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper blog-wrapper blog-list-page"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_2ahu thin-scrollbar" aria-label="Blog recent posts navigation"><div class="sidebarItemTitle_2hhb margin-bottom--md">All Blog Posts</div><ul class="sidebarItemList_2xAf"><li class="sidebarItem_2UVv"><a class="sidebarItemLink_1RT6" href="/blog/2022/01/31/v0-17-released">v0.17 is finally final!</a></li><li class="sidebarItem_2UVv"><a class="sidebarItemLink_1RT6" href="/blog/2021/07/16/welcome-to-the-new-orbitjs">Welcome to the new Orbitjs.com</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_GeHD" itemprop="headline"><a itemprop="url" href="/blog/2022/01/31/v0-17-released">v0.17 is finally final!</a></h2><div class="blogPostData_291c margin-vert--md"><time datetime="2022-01-31T00:00:00.000Z" itemprop="datePublished">January 31, 2022</time> · <!-- -->6 min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_1R69"><div class="avatar margin-bottom--sm"><a href="https://github.com/dgeb" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_1yU8" src="https://avatars.githubusercontent.com/u/29122?v=4" alt="Dan Gebhardt"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/dgeb" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Dan Gebhardt</span></a></div><small class="avatar__subtitle" itemprop="description">Orbit.js Creator</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>After two years, 28 beta releases, and over 400 commits, Orbit v0.17 is finally
ready! 🎉</p><p>Orbit's docs have been updated to reflect all the changes. If you are upgrading
from v0.16, the place to start is the <a href="/docs/whats-new">"What's new"</a> section.</p><p>Some highlights of this release include:</p><ul><li><p><strong>New API reference docs</strong> <!-- -->—<!-- --> At long last, Orbit v0.17 has <a href="/docs/api">API
docs</a> for all its packages. These docs are generated by
<a href="https://typedoc.org/" target="_blank" rel="noopener noreferrer">TypeDoc</a> from Orbit's typings and code annotations.
Although a bit sparse for now, this reference should only improve with time
and help from the community.</p></li><li><p><strong>Improved, strict typings throughout</strong> <!-- -->—<!-- --> By improving the quality of
Orbit's TypeScript, we have been able to refactor more confidently, provide
better documentation, and make for a better developer experience all around.</p></li><li><p><strong>Extraction of <code>@orbit/records</code> from <code>@orbit/data</code></strong> <!-- -->—<!-- --> As part of the
push to improve typings, it became clear that <a href="/docs/api/data"><code>@orbit/data</code></a>
contains a number of interfaces and classes that could prove useful for <em>any</em>
type of data, not just records. Thus, record-specific types and classes
were extracted into a new package: <a href="/docs/api/records"><code>@orbit/records</code></a>.
Apologies for the breaking changes with module imports. We wanted to get this
churn out of the way before the semver constraints that will come with v1.0.</p></li><li><p><strong>Multi-expression queries</strong> <!-- -->—<!-- --> Just as transforms can contain multiple
operations, queries can now contain multiple expressions. This allows sources,
such as <code>JSONAPISource</code>, to optionally perform these expressions in parallel.</p></li><li><p><strong>Per-expression/operation options</strong> <!-- -->—<!-- --> Along with the move to
multi-expression queries, we've introduced per-expression options. This can be
useful if, for instance, you want to specify a different target <code>url</code> per
expression. Similarly, transform operations can also each have their own
options.</p></li><li><p><strong>Full vs. data-only responses</strong> <!-- -->—<!-- --> All requests (queries and updates)
can now be made with the <code>{ fullResponse: true }</code> option to receive responses
in the form <code>{ data, details, transforms, sources }</code>. <code>data</code> will include the
primary data that would be returned without the <code>fullResponse</code> option.
<code>details</code> includes response details particular to the source, and <code>sources</code>
includes a named map of all the responses from downstream sources that
participated in this request. This allows you to access full response
documents, inverse operations, etc. <em>from the initial request call point</em>.</p></li><li><p><strong>Deprecation of <code>Pullable</code> and <code>Pushable</code> interfaces</strong> <!-- -->—<!-- --> Now that
responses can include full processing details, everything that was unique to
the <code>push</code> and <code>pull</code> methods on source is redundant. The <code>Pullable</code> and
<code>Pushable</code> interfaces have been deprecated to focus on the more capable
<code>Queryable</code> and <code>Updatable</code> interfaces for making requests.</p></li><li><p><strong>Transform buffers for faster cache processing</strong> <!-- -->—<!-- --> Record-cache-based
sources that interact with browser storage have had performance issues when
dealing with large datasets, especially when paired with read/write heavy
processors that ensure relationship tracking and correctness. A new paradigm
has been developed, the <code>RecordTransformBuffer</code>, that acts as a memory buffer
for these operations. For now, using this buffer is opt-in, with the <code>{
useBuffer: true }</code> option. You'll be reminded to explicitly set this option to
either <code>true</code> or <code>false</code> until you do. Early users are reporting promising
results with IndexedDB, such as <a href="https://github.com/orbitjs/orbit/issues/798#issuecomment-800544909" target="_blank" rel="noopener noreferrer">performance boosts of > 20x with large
numbers of
operations</a>.</p></li><li><p><strong>New serializers</strong> <!-- -->—<!-- --> Concepts of serialization have, up until now, been
very specific to usage by the <code>JSONAPISource</code>, and particularly the
<code>JSONAPISerializer</code> class. This class has been deprecated and replaced with a
series of composable serializers all built upon a simple and flexible
<a href="/docs/api/serializers/interfaces/Serializer"><code>Serializer</code></a> interface. This
interface, as well as some serializers for primitives (booleans, dates,
date-times, etc.) have been published in a new package,
<a href="/docs/api/serializers"><code>@orbit/serializers</code></a>. And of course, new serializers
particular to JSON:API have been added to
<a href="/docs/api/jsonapi"><code>@orbit/jsonapi</code></a>.</p></li><li><p><strong>New validators</strong> <!-- -->—<!-- --> A common source of problems for Orbit developers
has been using data that is malformed or doesn't align with a schema's
expectations. This can cause confusing errors during processing by a cache or
downstream source. To address this problem, we're introducing "validators",
which are shipped in a new package <a href="/docs/api/validators"><code>@orbit/validators</code></a>
that includes some validators for primitive types. Validators that are
record-specific have also been included in
<a href="/docs/api/records"><code>@orbit/records</code></a>. By default, each source will build its
own set of validators and use them automatically. You can instead share a
common set of validators via the <code>validatorFor</code> settings. And you can opt-out
of using validators entirely by configuring your sources with <code>{ autoValidate:
false }</code>.</p></li><li><p><strong>Record normalizers</strong> <!-- -->—<!-- --> When building queries and transforms, some
scenarios have been more tedious than necessary: identifying records by a key
instead of <code>id</code>, for instance, or using a model class from a lib like
ember-orbit to reference a record instead of its json identity. A new
abstraction has been added to make query and transform builders more flexible:
record normalizers. Record normalizers implement the
<a href="/docs/api/records/interfaces/RecordNormalizer"><code>RecordNormalizer</code></a> interface
and convert record identities and/or data into a normalized form. The new base
normalizer now allows <code>{ type, key, value }</code> to be used anywhere that <code>{ type,
id }</code> identities can be used, which significantly reduces the annoyance of
working with remote keys. Other normalizers,</p></li><li><p><strong>Synchronous change tracking in memory forks</strong> <!-- -->—<!-- --> Previously, memory
source forks behaved precisely like other memory sources: every trackable
update applied at the source level (and thus async). Now, the default (but
overrideable) behavior is to track changes at the cache level in forks. Thus
synchronous changes can be made to a forked cache and then merged back into
the base source. This better accomodates the most common use case for forks:
editing form data in isolation before merging coalesced changes back to the
base.</p></li><li><p><strong>Debug mode</strong> <!-- -->—<!-- --> A new <code>debug</code> setting has been added to the <code>Orbit</code>
global, that toggles between using a more verbose, developer-friendly "debug"
mode of Orbit vs. a leaner, more performant production mode. Since debug mode
is enabled by default, you'll need to set <code>Orbit.debug = false</code> in order to
eliminate deprecation warnings and other debug-friendly messaging.</p></li><li><p><strong>Increased reliance on The Platform™</strong> <!-- -->—<!-- --> Orbit's codebase continues to
evolve with the web, adopting new ES language and web platform features as
they are released. Custom utilities have been gradually deprecated and phased
out of the codebase (e.g. <code>isArray</code> -> <code>Array.isArray</code>), new language features
such as nullish coalescing and optional chaining have been adopted, and
platform features such as
<a href="https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID" target="_blank" rel="noopener noreferrer"><code>crypto.randomUUID</code></a>
have been adopted (with a fallback implementation if unavailable).</p></li></ul><p>These highlights are covered in more depth, including code samples, in the
<a href="/docs/whats-new">"What's new"</a> section of the main guides.</p><p>Thanks for your patience with this release. We expect that v0.18 will not take
nearly as long as v0.17 did. In fact, we plan to use this next release primarily
to remove deprecated interfaces in preparation for a lean and focused v1.0
release.</p></div><footer class="row docusaurus-mt-lg"><div class="col"><b>Tags:</b><ul class="tags_2ga9 padding--none margin-left--sm"><li class="tag_11ep"><a class="tag_1Okp tagRegular_3MiF" href="/blog/tags/release">release</a></li></ul></div></footer></article><article class="margin-bottom--xl" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h2 class="blogPostTitle_GeHD" itemprop="headline"><a itemprop="url" href="/blog/2021/07/16/welcome-to-the-new-orbitjs">Welcome to the new Orbitjs.com</a></h2><div class="blogPostData_291c margin-vert--md"><time datetime="2021-07-16T00:00:00.000Z" itemprop="datePublished">July 16, 2021</time> · <!-- -->One min read</div><div class="row margin-top--md margin-bottom--sm"><div class="col col--6 authorCol_1R69"><div class="avatar margin-bottom--sm"><a href="https://github.com/dgeb" target="_blank" rel="noopener noreferrer" class="avatar__photo-link avatar__photo"><img class="image_1yU8" src="https://avatars.githubusercontent.com/u/29122?v=4" alt="Dan Gebhardt"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/dgeb" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">Dan Gebhardt</span></a></div><small class="avatar__subtitle" itemprop="description">Orbit.js Creator</small></div></div></div></div></header><div class="markdown" itemprop="articleBody"><p>I'm excited to announce a complete refresh of Orbitjs.com! 🎉</p><p>Our site has been rebuilt using <a href="https://docusaurus.io/" target="_blank" rel="noopener noreferrer">Docusaurus</a>. The
source for this site now lives in <a href="https://github.com/orbitjs/orbit/tree/main/website" target="_blank" rel="noopener noreferrer">Orbit's
monorepo</a> right alongside
the packages that it describes. This will make it easier to update docs along
with code, preferably even in the same PRs.</p><p>I'm especially excited to announce that we are finally publishing API reference
docs, generated with <a href="https://typedoc.org/" target="_blank" rel="noopener noreferrer">TypeDoc</a>, alongside the Orbit
guides. The first API docs available are for the upcoming v0.17, which can be
accessed directly <a href="/docs/api">here</a> or by choosing from the documentation
version selector in the upper right.</p><p>While the current API docs are much better than nothing, the prose and examples
are pretty thin for most packages. Please be patient as we work to fill out
these docs through improved code annotations. Community contributions are
encouraged and most welcome! ❤️</p></div><footer class="row docusaurus-mt-lg"><div class="col"><b>Tags:</b><ul class="tags_2ga9 padding--none margin-left--sm"><li class="tag_11ep"><a class="tag_1Okp tagRegular_3MiF" href="/blog/tags/documentation">documentation</a></li><li class="tag_11ep"><a class="tag_1Okp tagRegular_3MiF" href="/blog/tags/docusaurus">docusaurus</a></li></ul></div></footer></article><nav class="pagination-nav" aria-label="Blog list page navigation"><div class="pagination-nav__item"></div><div class="pagination-nav__item pagination-nav__item--next"></div></nav></main></div></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Docs</div><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/docs/intro">Tutorial</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a href="https://gitter.im/orbitjs/orbit.js" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Gitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_3J9K"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></span></a></li><li class="footer__item"><a href="https://twitter.com/orbitjs" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_3J9K"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></span></a></li><li class="footer__item"><a href="https://stackoverflow.com/questions/tagged/orbit.js" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>Stack Overflow<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_3J9K"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></span></a></li></ul></div><div class="col footer__col"><div class="footer__title">More</div><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/blog">Blog</a></li><li class="footer__item"><a href="https://github.com/orbitjs/orbit" target="_blank" rel="noopener noreferrer" class="footer__link-item"><span>GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_3J9K"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></span></a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2014-2022 Cerebris Corporation.</div></div></div></footer></div>
<script src="/assets/js/runtime~main.b1b77a52.js"></script>
<script src="/assets/js/main.8aa9b469.js"></script>
</body>
</html>