8 ms·
Hydrogen: React-based framework for building custom storefronts
- vlunkr 5y agoOff-topic, but I once used a Shopify framework called Batman.js. https://batmanjs.org/ https://batmanjs.org/. Somewhat Ember-ish, but more coffeescript oriented. I'm a bit sad that the github repo doesn't even exist anymore :( It never really gained traction but I'm curious if anyone else remembers.
- ChrisArchitect 5y agoRelated news announcement from StackBlitz about browser-based development/experiment interface: https://news.ycombinator.com/item?id=29150594 https://news.ycombinator.com/item?id=29150594
- igrigorik 5y agoI've demoed https://hydrogen.new https://hydrogen.new to many folks.. It's fun to see the eyes light up when they realize that, with one click, they have a fully virtualized and custom environment running in their browser. Amazing product & platform.
- rudasn 5y agoThat link doesn't work without JS..
- anonygler 5y agoSo does 95% of the internet at this point. The topic itself is a JS framework announcement.
- rudasn 5y agoYeah, with SSR as the main selling point, that's why I'm pointing this out..
- anonygler 5y agoSSR's main goal is to reduce the time to first interactive and improve SEO, not to bring the internet back to 1995. The page loads without JS, but JS libraries clearly load after the fact to decorate the page.
- kennywinker 5y agoLink only works in chrome...
- tootie 5y agoIs this a response to Vue Storefront?
- threatofrain 5y agoI wouldn't say so, because Vue Storefront supports a large variety of the e-commerce ecology. Shopify's Hydrogen is custom built for just Shopify.
- frankfrankfrank 5y agoI find it unfortunate that the combination of greed and failed oversight and responsibility by government to ensure people's rights, has essentially led to the wholesale destruction of the distributed and decentralized internet in the post-facebook era. Ascribing non-malicious intentions to Shopify, it seems their success has equally gone to their heads as it has gone to all the other tech companies, who have been inexcusably allowed to accumulate power far beyond what should have ever been permitted. We must start insisting on that people's rights simply cannot be abused because a corporate entity claims to have more rights to choose than a private person. The standard for antitrust should be that if there are no alternatives for legal products and services in an industry, it is a clear sign that a monopoly exists and the companies must be broken up or must fund competitors until a state of equilibrium and rights are restored.
- allanmacgregor 5y ago..ok, but how is that related at all with a web framework?
- benmarks 5y agoThanks for saying it so I didn't have to. I'm hard-pressed to see how Shopify are significantly harmful. They deserve their success.
- hermitwriter 5y agoSo you're saying that if a company is successful they should be penalized? That sounds like an awful incentive structure for any industry. The standard for anti-trust is that the company must behave in an anti-competitive way. I think this probably makes more sense.
- _eb4d 5y agoShopify banned my online store of 5 years with zero notice and no chance for appeal. That was after being invited onto the platform as a high volume merchant back in 2015. We sell adult comics, which was not a problem until randomly last month when they completed nuked the store. We even use our own Payment processor! Be careful with Shopify, they will pull the rug out from under you and there is nothing that can be done. I don't recommend building a platform on top of this.
- dbbk 5y agoNot sure that's relevant to the discussion at hand.
- eyelidlessness 5y agoSeems relevant to me. I wouldn’t choose a framework coupled to Shopify to sell adult content. It’s good for anyone working in tech for sex workers (and for sex workers using built on the Shopify platform) to know this is a risk.
- nawgz 5y agoModern business platforms are so toxic. There really needs to be platforms which are actually platforms and not walled gardens that own everything done in-platform. It's unbelievable that in 2021 we can have puritanical interests take legitimate businesses offline without recourse.
- benmarks 5y agoBigCommerce allows adult products. Other than that there are open source platforms which do the trick.
- hermitwriter 5y agoYou can always roll your own. When someone else rolls it for you, they are free to decide what can and cannot exist there. If you built your own shopping mall, you could decide whether or not to allow a Hooters on the property. This seems pretty fair to me.
- Buttsite 5y agoAre modern web developers ok?
- yaaang 5y agoWhat makes this noteworthy is that it's built on the still-heavily-WIP React Server Components ([1]), so unlike SSR frameworks, it doesn't require downloading full bundles of JS and raw data to re-render and hydrate your entire UI client-side. This is also the direction Next.js is heading ([2] and [3]), and will have significant ramifications for both architecture and performance of React applications for years to come. Here's a recent talk I gave on the general topic of partial hydration: https://www.youtube.com/watch?v=U28rjWrGVxk https://www.youtube.com/watch?v=U28rjWrGVxk I work on a no-code visual page builder for React-based sites like this (https://www.plasmic.app https://www.plasmic.app) - a major customer segment is headless commerce sites, so this is something we care a lot about. [1]: https://shopify.dev/api/hydrogen/framework/react-server-components https://shopify.dev/api/hydrogen/framework/react-server-comp... [2]: https://github.com/vercel/next-rsc-demo https://github.com/vercel/next-rsc-demo [3]: https://nextjs.org/blog/next-12#react-server-components https://nextjs.org/blog/next-12#react-server-components
- rglover 5y agoThank you for sharing your talk. Not on you, but this move (to RSC) looks like an absolute mess. All you're trying to do is render some HTML, CSS, and JavaScript to the browser. This is over-engineering at its finest. Looking at the demo repo gave me the shakes.
- fny 5y agoFor time to first paint, it's a strategy that's wildly effective. Github render_async and Rails Turbolinks are two other proven implementations.
- rglover 5y agoOkay, but what problem is that solving? This all looks like a solution chasing a problem. The only concrete case I can come up with is delivering content to users with high latency issues (e.g., closest data center is too far away) or slow network speeds. In that scenario, reducing bundle size and network requests can achieve a comparable (if not better) result while preserving code ergonomics. Speaking at least to the demo repo linked above, it looks like API ergonomics were an afterthought and pleasing the benchmark was first priority.
- yodon 5y agoIs there a sample store built with Hydrogen? (Apologies if I missed the mention of it in the article)
- blittle 5y agoA starter template is included with a CLI. If you have node installed, run `npx create-hydrogen-app`
- yodon 5y agoIf anyone from Shopify is reading this, being able to just visit a sample store would be great as a first step before having to go into a dev environment (which like many people I don't have on my phone where I'm first encountering the announcement)
- blittle 5y agoYou can go to https://hydrogen.new https://hydrogen.new to immediately spin up a full environment on stackblitz
- yodon 5y agoI don't get this weird objection to just letting visitors see the end result. I get that it's a dev tool. I still want to see an example end result before I invest time in learning the dev tool. I'm not alone in that. There's a reason why "Demo" links are common. They increase the odds people spend enough time with your product to get to the point of adopting it.
- yodon 5y agoYour link doesn't work on mobile. Yes, I get that it's a dev site, but as Shopify is aware most users encounter most sites for the first time on their mobile device. I'm not the only person hitting this page on their phone wondering "I wonder what this looks like - is this interesting enough for me to remember for later?" With no demo page the answers that gets a yes are far lower than if there were a demo page.
- themgt 5y agoI find this technology story a bit weird. Afaict stackblitz is based on WebContainer™ which has a "working group" and is supported in Chrome/Edge so far: https://github.com/stackblitz/webcontainer-core https://github.com/stackblitz/webcontainer-core But the FAQ says: Is there a developer API? Not yet. Once we reach General Availability for WebContainer we plan to release an API surface. Is this open source? Today no, but the API will be open source to developers at GA. The closest I can find from Stackblitz is this Github issue where the Stackblitz founder 4 years ago responds to "By any chance, are you open-sourcing the codebase?" with: Definitely! We're planning on open sourcing the core tech behind stackblitz (which is what this repo is for), but there's a lot that needs to happen between now & then. I'm going to fill out the readme a bit which should answer this in detail — will circle back shortly. https://github.com/stackblitz/core/issues/28#issuecomment-320375709 https://github.com/stackblitz/core/issues/28#issuecomment-32... To what extent is the Stackblitz or even underlying WebContainer tech open source / documented?
- ericmsimons 5y agoHi- cofounder of StackBlitz here. In regards to my comment 4 years ago, this was in reference to our v1 technology toolchain (turbo npm client, etc) which is all available as open source over at https://github.com/stackblitz/core https://github.com/stackblitz/core. In regards to WebContainer, it's still very much in beta and undergoing many internal API changes as we iterate, but we absolutely intend to release an OSS API once we hit GA. Our current docs/developer portal has some additional API/config information on StackBlitz, WebContainer, etc (albeit still WIP): https://developer.stackblitz.com/ https://developer.stackblitz.com/
- fny 5y agoI'm absolutely in love with the new completely psychotic web3.0 design trend. Reminds me of when the internet was properly weird. I guess we millennials are coming of age.
- qwtel 5y agoCame here to comment the design as well. Love to cinally see deviation from the stripe template and even more happy to see elements from 90s ui design reintroduced. One can even tell where the buttons are!
- ChrisArchitect 5y agoRelated eng post: Building Blocks of High Performance Hydrogen-powered Storefronts https://news.ycombinator.com/item?id=29152846 https://news.ycombinator.com/item?id=29152846
- jjtheblunt 5y agoWill the fixed point, of iterating improved web app rendering/responsive/reactivity, look like X11/Xlib.
- amlib 5y agoEagerly awaiting for the day we have xdamage over the browser, for it to then be promptly trumped by xcomposite over the browser.
- yodon 5y agoThe docs say "Hydrogen can only be used to build Shopify web storefronts. Currently, Hydrogen doesn't support building other types of custom storefronts, including mobile apps, video games, and smart devices." I get that the shopify components expect to receive shopify-format data, but are there other restrictions we should understand? The docs do say Hydrogen apps can hit 3rd-party API's, so how do we think about the dividing line between what Hydrogen can and can't do?
- jplhomer 5y agoNot in particular — this was meant as way to clarify that Hydrogen isn't a drop-in solution for e.g. Android or Unity apps. Though we're exploring the use of Hydrogen + React Native > Android/iOS.
- yodon 5y agoAh - I think I answered my own question. The doc comment is focusing on you can only use it to build _web_ storefronts and I was reading it as you can only use it to build web _storefronts_. It's a general purpose React web framework built on Shopify, but it doesn't yet do React Native or etc.
- eyelidlessness 5y agoWhile I personally prefer JSX-based tools, I’d be remiss not to mention Marko[1], a component framework developed by eBay. It has (and has had for years) everything mentioned above the fold (s/React Server Components/automatic partial hydration/) other than, of course, any built in Shopify functionality. 1: https://markojs.com/ https://markojs.com/
- GingerBoats 5y agoI used MarkoJS / LassoJS for a startup a ~4 years ago and it was an extremely successful product. Moving away from it into ReactJS felt like taking a huge step backwards in terms of capabilities and speed. It's a bummer it's not more popular.
- austinhutch 5y agoThis is going to standardize headless/SPA Shopify builds. Agencies were selling unknowing merchants on the newest hype and then ended up handcuffed to the agency and no internal tech talent. If an agency is not using Hydrogen (within a reasonable timeframe) I would have to look really closely at why.
- kennywinker 5y agoInteresting. This seems like it could be used as an entry point for a shopify competitor. In the past, shopify themes were pretty deeply linked to shopify itself. I could imagine vendors developing hydrogen compatibility layers for quickly porting your hydrogen storefront to a new backend. This move was needed - shopify's themes were one of it's weakest links, in my experience - but if I had a competing service I'd be looking at this with dollar signs in my eyes.