You'll find the talks here
Approaching frontend as a backend developer, Svelte feels surprisingly pythonic. Let's take a quick look at what's familiar, what's foreign, and how to explore the gap.
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| "os" | |
| "database/sql" |
You'll find the talks here
Approaching frontend as a backend developer, Svelte feels surprisingly pythonic. Let's take a quick look at what's familiar, what's foreign, and how to explore the gap.
(see YouTube channel for individual videos)
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>Alpine.js Todo Demo</title> | |
| <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet"> | |
| <script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.js" defer></script> | |
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tailwindcss/ui@latest/dist/tailwind-ui.min.css"> | |
| <meta charset="utf-8"> | |
| </head> |
Fauna doesn't (yet?) provide guaranteed expiration/TTL for ABAC tokens, so we need to implement it ourselves if we care about it.
3 javascript functions, each of which can be imported into your project or run from the command-line
using node path/to/script.js arg1 arg2 ... argN:
deploy-schema.js: a javascript function for creating supporting collections and indexes in your Fauna database.I heard some points of criticism to how React deals with reactivity and it's focus on "purity". It's interesting because there are really two approaches evolving. There's a mutable + change tracking approach and there's an immutability + referential equality testing approach. It's difficult to mix and match them when you build new features on top. So that's why React has been pushing a bit harder on immutability lately to be able to build on top of it. Both have various tradeoffs but others are doing good research in other areas, so we've decided to focus on this direction and see where it leads us.
I did want to address a few points that I didn't see get enough consideration around the tradeoffs. So here's a small brain dump.
"Compiled output results in smaller apps" - E.g. Svelte apps start smaller but the compiler output is 3-4x larger per component than the equivalent VDOM approach. This is mostly due to the code that is usually shared in the VDOM "VM" needs to be inlined into each component. The tr
| "use strict"; | |
| const _ = require("lodash"); | |
| const chalk = require("chalk"); | |
| const Promise = require("bluebird"); | |
| const ServiceBroker = require("../src/service-broker"); | |
| const { MoleculerError } = require("../src/errors"); | |
| // --- SAGA MIDDLEWARE --- | |
| const SagaMiddleware = function() { |
I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.
But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.
Svelte is a language.
Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?
A few projects that have answered this question:
TL;DR: The proposal looks good, except the handler chaining part, which adds a lot of magical complexity to cater to rare use cases. Chaining can always be added at a later stage without breaking backwards compatibility, if its lack is deemed unbearable.
As I see it, the biggest issues in current Go usage the proposal tackles are:
if err != nil {return nil, err} littering Go codeTo fix these issues, I believe the proposed check keyword with a single handler per function are sufficient. Using stacks of handlers for proper cleanup is best left to defer, which is already a familiar tool. Thus, handle should only exist as a default "report more context in case of an error and return the error" mechanism. Where a single handler appears insufficient because the nature of error handling required changes throug
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/signal" | |
| "strconv" |