by mojombo on 3/10/20, 6:13 PM with 167 comments
by sytse on 3/10/20, 7:27 PM
Edit: The twitter thread from the author is a great summary of Redwood and its benefits https://twitter.com/mojombo/status/1237441122097487873
by mhd on 3/11/20, 8:13 AM
I've heard GraphQL proponents call joins "premature optimization", and I don't even know how to respond to that…
by mojombo on 3/10/20, 6:24 PM
by zaiste on 3/10/20, 8:08 PM
I'm working on something similar. I hope to pick up some ideas ;)
My project is about helping create more traditional JavaScript applications, not necessarily JAMstack. It is inspired by the Self programming environment created at Sun Microsystems in '95, so it's not a framework per-se, but a combination of a framework, an editor (VS Code plugin) and (in the future) infrastructure.
The project is called Huncwot: https://github.com/huncwotjs/huncwot
* it supports TypeScript out of the box * it provides background processing (via Postgraphile Worker) * it aims to support only PostgreSQL, so that we could conveniently use all those beautiful PostgreSQL features that are usually «hidden» by ORMs * I'd also like to make SQL more popular ;) * there is a bit of inspiration from Clojure * it favors the function composition, e.g. for handlers * it comes with a built-in authentication/authorization, which you shouldn't probably use in production just yet * it is still very alpha * for the front-end you can use React, but also Vue.js and possibly Angular or Svelte * and many other things which I haven't yet described in the README as I work on this on the side, mostly alone
There is also fantastic Dark Lang (https://darklang.com/) in the same, quite similar yet different.
by Zaheer on 3/10/20, 6:59 PM
by yatsyk on 3/10/20, 9:22 PM
I like rails, but in js world may be not so good idea to reimplement or integrate everything related to ui, routing etc. Meteor.js was not very successful with this model. I think routing or UI on react-native/web/blessed/VR is too different to be part of one framework.
But I see the usefulness of framework with functionality related to data fetching and business logic.
I consider perfect stack for this things is Postgress->Hasura (or also Prisma)->mst-gql->mobx-state-tree. You create database schema and everything up to models on client is autogenerated and each part of this stack could be updated, customized or completely rewritten. This stack could be used on react-native or web or any other js platform.
by jaredcwhite on 3/10/20, 6:53 PM
Then I saw Tom Preston-Werner's involvement and my interest level raised considerably. I'm still not sure if there's a market for this per se, but the bone-fides of the dev team is certainly a good sign.
by davedx on 3/11/20, 8:35 AM
Will be watching it with great interest. Good luck!
by tehin on 3/11/20, 3:44 AM
It should be closer to the mongo api.
await prisma.users.findOne({ where: { id: 1 } })
should just be await prisma.users.findOne({ id: 1 })
for example.It is trying to do too much. There is a hard limit of where ORMs try to take over too many of the things you do in SQL and become slow and complex and a big black hole. prisma tries to do migrations, table creation, etc, etc. These things rarely work properly.
Lazy loading never works. Somewhere litered in your code you access a field that is outside the scope of the pulled in data and it is in a loop and suddenly you have 100 requests. You have to look through your entire function to understand which fields are inside and outside of the scope of the query, and add more includes or whatever.
There are security issues with ORMs that traverse and save relationships, as github itself found out. You add user__roles form field maliciously on the client side to a form that was just supposed to update the user and not the roles, then suddenly you find your user.save() method on the server-side has traversed and added new roles to a user.
I am writing a kind of orm today based on the mongo api without all the $ signs, much like prisma, but closer and without all the additional things. github username is thebinarysearchtree.
ORMS should just be for fairly simple, single table tasks. That way they get out of the road and don't become some big complex thing that ruins performance and adds its own complexity.
by rmetzler on 3/10/20, 8:18 PM
by swyx on 3/10/20, 6:19 PM
as a React dev as well, I particularly like the integration of GraphQL into the Cell format. This will work especially well with render-as-you-fetch React Suspense. I think if you throw in scoped css you'll have the ultimate vision of the React Single File Component format.[1]
1: https://www.swyx.io/writing/react-distros/#what-other-react-...
by gnalck on 3/10/20, 7:52 PM
I find that JAMstack is great until the need for recurring or out-of-band processes comes up. In Rails of course there are jobs that can be backed by Sidekiq or what have you, and additionally on a VM one can always set up a cron job to invoke some Rails tasks.
For JAMstack there is no clear alternative, as far as I can see. Manually setting up a recurring lambda function (granted, I have not yet done it) seems to be annoying enough that I would rather just deal with a VM instead.
by chvid on 3/11/20, 6:18 AM
I took a look at the example:
https://github.com/redwoodjs/example-blog
As I understand "JAM Stack" the point of the M is to have large chunks of your application pre-rendered.
However in this example; the blog pages are client-side rendered based on a graphql query that goes into postgres database.
Am I missing the point of this? It looks like a standard rich-client with API backend architecture.
by miguelmota on 3/11/20, 12:34 AM
by chaostheory on 3/10/20, 6:33 PM
by sandGorgon on 3/11/20, 8:21 AM
- frontend and backend in the same code https://nextjs.org/docs/api-routes/introduction
- graphql based - https://github.com/zeit/next.js/tree/canary/examples/api-rou...
- hybrid static page support - https://nextjs.org/blog/next-9-3#next-gen-static-site-genera...
- jest - https://github.com/zeit/next.js/tree/canary/examples/with-je...
- CMS providers - https://nextjs.org/blog/next-9-3#collaboration-with-cms-prov...
- pretty url routing - https://github.com/zeit/next.js/tree/canary/examples/with-pr...
by larrywright on 3/11/20, 3:56 PM
That said... am I the only one that thinks that anything that is JS based seems ridiculously complicated to use? I don’t do much UI work, but any time I look at using react or similar it feels like there are a lot of moving parts and a lot of steps to perform before you can even get started on something useful.
by beardedman on 3/11/20, 7:21 AM
Building any "Rails for JS" idea is a huge undertaking, purely from the sheer scope of the Javascript (inc. NodeJS) ecosystem.
by spamalot159 on 3/10/20, 9:29 PM
by frequentnapper on 3/11/20, 5:17 AM
by insomniacity on 3/10/20, 7:47 PM
I recently stepped through this tutorial, which does somthing similar, and uses FaunaDB - turned out pretty nicely.
https://egghead.io/playlists/building-a-serverless-jamstack-...
Code for the DB part is here - I know it doesn't use Prisma, would be great to see Redwood support this: https://pastebin.com/aJvFSjsa
by chrysoprace on 3/11/20, 5:09 AM
I only had time for a brief look through it but searching for "redux" and "state" didn't bring up anything; do you have an opinionated approach to global state management?
Keen to check this out when I have more time this week!
by cies on 3/10/20, 11:24 PM
by kostarelo on 3/10/20, 9:03 PM
One question, is the React app being pre-rendered at all before being stored on the CDN? If not, how does it qualifies as a JAMstack project? If the React app is being completely rendered on client side, then I don't see any difference with a regular Next.js (without generating a static site) project but I certainly see lots of differences with Gatsby for example.
by Etheryte on 3/11/20, 9:58 AM
by msoad on 3/10/20, 8:16 PM
I hate docker in development!
by cfv on 3/10/20, 10:52 PM
We already have all those pieces in place, along with the ability of swapping any one piece with a different one; say, if we wanted to go RESTful we only need to swap one block.
It does look gorgeous tho; how would one go about gradually adopting it?
by z3t4 on 3/10/20, 8:41 PM
by sodez117 on 3/21/20, 6:08 AM
by vvoyer on 3/11/20, 6:28 AM
Just like Next.js was built for zeit/now, redwood was built for Netlify.
Since Top Prester-Werner (Author) is in the board of Netlify this makes sense. But is it a good idea for frameworks to be tied to specific deployment platforms? Unsure, we’ll see!
by jcarlosweb on 3/11/20, 7:54 PM
by yingw787 on 3/10/20, 8:41 PM
by doctorbuttes on 3/10/20, 8:11 PM
by kingpiss on 3/10/20, 9:30 PM
by wmichelin on 3/10/20, 9:45 PM
by jaequery on 3/10/20, 11:03 PM
by thegagne on 3/11/20, 1:05 AM
by siquick on 3/11/20, 1:02 AM
by ctb9 on 3/10/20, 6:54 PM
by harryadelb on 3/11/20, 2:21 PM
by LessDmesg on 3/11/20, 7:04 AM
No thanks, we have Blazor now.