diff --git a/src/pages/blog/introducing-space.md b/src/pages/blog/introducing-space.md index 1b172654..42319bcc 100644 --- a/src/pages/blog/introducing-space.md +++ b/src/pages/blog/introducing-space.md @@ -6,7 +6,7 @@ description: "" ---
- +

@@ -23,7 +23,7 @@ Deta Space is a new personal computer that lives in the cloud — a ‘personal ## Build it for yourself
- +
As a developer, Space gives you your own environment to build, just like in Deta Cloud. Your Space is for you: to build, deploy, and use your ideas. But it packs a lot of new power. @@ -33,7 +33,8 @@ As a developer, Space gives you your own environment to build, just like in Deta We’ve brought some of the same friendly infrastructure to Space like [Deta Base](https://deta.space/docs/en/reference/base/about) and [Deta Drive](https://deta.space/docs/en/reference/drive/about). But now they’re a part of [Deta Collections](https://deta.space/manual/features/collections), a home for your data.
- + +
As a part of the merge, we’ve created a tool to [easily migrate your Bases and Drives from Deta Cloud to Collections](https://deta.space/migration/guides/import-a-project) in Space. @@ -42,7 +43,7 @@ As a part of the merge, we’ve created a tool to [easily migrate your Bases and ### Deta Micros: completely recharged
- +
We’ve also upgraded the core experience around Deta Micros. We’ve completely refreshed them to support many more runtimes and frameworks. This includes frontend libraries like [React and Svelte](https://deta.space/docs/en/quickstart-guides/static), alongside their full-stack complements [Next.js](https://deta.space/docs/en/quickstart-guides/next) and [Nuxt](https://deta.space/docs/en/quickstart-guides/nuxt). Space also supports new backend languages like [Go](https://deta.space/docs/en/quickstart-guides/go), with [Rust](https://deta.space/docs/en/quickstart-guides/rust) coming soon. The community has also created templates for running a number of other languages like Deno, Crystal, Nim and Dart using our “custom” runtime feature. @@ -57,7 +58,7 @@ As part of the upgrade, we’ve also completely redesigned and re-engineered our But we’re most excited about two core new interaction components in the frontend, **Canvas,** and **Teletype**.
- +
**Canvas** is your personal cloud’s homepage, where you can rearrange all your apps and projects. Soon you’ll be able to pin just about anything to Canvas – like a Collection, Base, or Drive – to personalize your experience even further. @@ -67,7 +68,7 @@ But we’re most excited about two core new interaction components in the fronte ## See it run anywhere
- +
Once you have an app that you’re happy with in your Space, you can click a button or send a command. From this point, Deta can run it anywhere, around the world, for anyone with an internet connection, in their own Space. Your app will keep running forever (as long as Space exists), with no work from you needed. diff --git a/src/pages/blog/merging-space.md b/src/pages/blog/merging-space.md index d20079de..85fbefac 100644 --- a/src/pages/blog/merging-space.md +++ b/src/pages/blog/merging-space.md @@ -6,7 +6,7 @@ description: "We have merged old and new Space into one." ---
- +

@@ -37,7 +37,7 @@ Under the old system, a Space app was available under `alias.username.deta.app`. You can see both the old and new domains for any Space app by clicking the `...` and then `Settings` from an app's card on your Space's Canvas:
- +

diff --git a/src/pages/blog/moving-to-space.md b/src/pages/blog/moving-to-space.md index 9f330bbb..949d5810 100644 --- a/src/pages/blog/moving-to-space.md +++ b/src/pages/blog/moving-to-space.md @@ -6,7 +6,7 @@ description: "We will be upgrading and merging Deta Cloud into Deta Space on Feb ---
- +
Following [our motivation](https://deta.space/motivation/) for building [Deta Space](https://deta.space/) last week, we’d like to follow up with what this means for [Deta Cloud](https://deta.sh/). @@ -49,14 +49,14 @@ It also includes a modifiable “custom” runtime engine, which the community h The second most common request from our community is for a modernized User Interface. Here’s how the Deta Cloud UI looks:
- +

And here’s Space:
- +

@@ -87,7 +87,7 @@ The landing pages on [deta.sh](http://Deta.sh) and [web.deta.sh](http://web.Deta We are creating a product for data on Space called Deta Collections. A Collection is similar to a Cloud Project with Bases and Drives, but without Micros. We’ll provide a tool where you’ll be able to automatically move a Deta Cloud Project to a “Collection” (but your Micros will remain in the old UI). Here’s how Collections looks:
- +

diff --git a/src/pages/blog/post-16.mdx b/src/pages/blog/post-16.mdx index d50e6758..cc74fd3b 100644 --- a/src/pages/blog/post-16.mdx +++ b/src/pages/blog/post-16.mdx @@ -3,36 +3,38 @@ title: "Browser SDK & more" date: "30 Aug 2023" layout: "@blogs" description: "Great improvements for base fans & server haters alike." +topic: "changelog" --- import Image from '@/components/Image.astro' -VIDEO HERE +For developers, much of the power of the [personal cloud](https://deta.space/docs/en/learn/what-is-pc) is the [auth model](https://deta.space/docs/en/build/fundamentals/the-space-runtime/authentication). -For developers, much of the power of Space and the [personal cloud](https://deta.space/docs/en/learn/what-is-pc) is the [auth model](https://deta.space/docs/en/build/fundamentals/the-space-runtime/authentication). +In Space you can build a personal app for yourself, and you can see it run for just about anyone in the world with an internet connection. No need to consider sign-in, sign-up, users, or data separation. The power of auth on the personal cloud is… not thinking about auth. Because it just works. -You can build a personal app for yourself, assuming you're the only user. As soon as you've done so, you can see it run for just about any user in the world with an internet connection. You don't think about sign-in, sign-up, users, data separation, and the like. The power of auth on the personal cloud is that you *don't* think about auth, it "just works". +From today—you can think even less. With version 2 of the Deta JavaScript SDK you can now use [Deta Base](https://deta.space/docs/en/build/fundamentals/data-storage#deta-base) or +[Deta Drive](https://deta.space/docs/en/build/fundamentals/data-storage#deta-drive) straight from your browser. So, for many apps, you can stop worrying about backends entirely. -However, in building a personal app that stores data using [Deta Base](https://deta.space/docs/en/build/fundamentals/data-storage#deta-base) or [Deta Drive](https://deta.space/docs/en/build/fundamentals/data-storage#deta-drive), you still need to create an entire backend, writing APIs that route user requests in the browser to the data in Base or Drive. This is a whole lot of drudgery, coming from the client needing to go through a backend [Micro](https://deta.space/docs/en/build/fundamentals/the-space-runtime/micros) to store and retrieve data. It also adds a lot of latency to user actions, as they are waiting on a backend Micro to respond (cough cough, cold starts). +Previously, when building a personal app, you needed to create an entire backend, writing APIs that routed user requests in the browser and back to the data in Base or Drive. That meant a whole lot of drudgery and clients having to go through a backend [Micro](https://deta.space/docs/en/build/fundamentals/the-space-runtime/micros) to store and retrieve data. It also added latency to user actions as they waited on a backend Micro to respond (cough cough, cold starts). For many apps, that’s in the past now. -From today, things will get a whole lot better in this regard (for many applications). That's because *you can now use Deta Base and Deta Drive straight from the browser*, with **version 2.0.0 of the Deta JavaScript SDK**. When you do, you *don't* have to think about backends. +Read on to discover how you can start living backend-worry free in v2. -## Deta JavaScript SDK v2 -To get started using Deta Base or Drive in the browser, install the latest Deta SDK from npm (or yarn): +## Deta JavaScript SDK, v2 + +To get started using Deta Base or Drive in the browser install the latest Deta SDK from npm (or yarn): ```bash npm install deta@latest ``` -Alternatively, import it in your app from Space's CDN: +Or import it into your app from Space’s CDN: ```js const deta = await import("https://cdn.deta.space/js/deta@2.0.0/deta.mjs"); ``` -In either case, your app can start reading and writing data in the browser: - +Now your app can start reading and writing data in the browser: ```js const base = deta.Base('my-base'); @@ -48,20 +50,27 @@ console.log(await base.fetch()); console.log(await drive.list()); ``` -If your app is running on Deta Space it will just work. No need for keys or a backend. Just low latency personal applications. Check out [this repo](https://github.com/deta/todo-app) for an example app that uses the new SDK on the client. +If your app is running on Deta Space it will just work. No need for keys or a backend, Just low-latency personal applications. Check out [this repo](https://github.com/deta/todo-app) for an example app that uses the new SDK on the client. -Maxu, author of [PingBack](https://deta.space/discovery/@maximilianheidenreich/pingback) and Deta Team member, had this to say after getting his hands on an early release: +Deta Team member and author of [PingBack](https://deta.space/discovery/@maximilianheidenreich/pingback), Maxu, had this to say after getting his hands on an early release: > *"Some ppl. try to avoid writing API routes and use React & Next.JS server components. I avoid both with the Browser SDK. Instant 10x."* +Checkout this tutorial from Deta CEO, Mustafa, using the Browser SDK to build a full app in a stingle HTML file: + + + +
+
A few notes: - The Browser SDK supports all the same methods and features as the existing SDK - The Browser SDK will not work on [public Micros or Public Routes](https://deta.space/docs/en/build/fundamentals/the-space-runtime/authentication#public-micros-and-routes) +- The Browser SDK ## More Fun Things ### Base Sort Order -After many wishes and hacky hacks, we're pleased to share that you can now sort your Base items by `ascending` or `descending` key-order. Simply pass a `desc` value to any Fetch call ([docs](https://deta.space/docs/en/build/reference/sdk/types#fetchoptions)). +After persistent requests and hacky hacks, we’re pleased to share that you can now sort your Base items by ascending or descending key order. Simply pass a desc value to any Fetch call ([docs](https://deta.space/docs/en/build/reference/sdk/types#fetchoptions)). With Python: ```py @@ -76,11 +85,11 @@ const db= deta.Base('random-base'); db.fetch({desc: true}) ``` -*P.S: this works in the browser with the new SDK ;)* +*This works in the browser with the new SDK ;)* -If you check the key column in any [Base UI](https://deta.space/docs/en/use/your-data/guis#base-ui) view, you'll also notice a little toggle that gives you the same ability. +If you check the key column in any [Base UI](https://deta.space/docs/en/use/your-data/guis#base-ui) view, you'll also notice a toggle that gives you the same ability. -### Python SDK: Async Interactions with Base +### Python SDK: Async Base We now have support asynchronous interactions with Deta Base in the Python SDK. See the "Python (async)" tab [in the docs for more](https://deta.space/docs/en/build/reference/sdk). @@ -100,7 +109,7 @@ await db.close() ``` -### Even More +### Even More Fixes - Removed `detalib` from the JS SDK, which was causing a lot of errors: [more](https://github.com/deta/deta-javascript/pull/63/files) - Pushed an error message fix in JS SDK: [more](https://github.com/deta/deta-javascript/pull/64/files) - Fixed wrong exit code in the CLI: [more](https://github.com/deta/space-cli/pull/147/files)