While Remix runs on the server, it is not actually a server per se. Regarding the server-side framework part of Remix, if you're familiar with server-side model-view controllers like, well, Warevel or Rails, Remix is the controller and the view and it lives the model up to the developer. From the browser framework perspective, once a document is served to the browser, Remix will pretty much be responsible for iterating that page with the browser build JavaScript models. So, for instance, if a user clicks a link, instead of making a round trip to the server for the entire document and for all the assets, Remix will simply fetch the data for your next page, update the UI. This has many performance benefits over making a full document request, like these assets don't need to be downloaded or pulled from the cache, they don't need to be parsed by the browser again, and the data that it's fetched is much smaller than the entire document.
So, yeah, this is super, super great, and this is a very small introduction about what Remix is. But yeah, still speaking about it, what is its philosophy? Well, Remix embraces the server-client model fully. You can make your server fast. What you cannot do is control your user network. Sometimes, well, we've all experienced this, it seems to be working very good for us, then we check our code, our application in user network, and just because they don't have the same bandwidth or whatever that we do, then the application is small. Takes more time to load. So Remix helps you by decreasing the amount of stuff that you send over the network, so we don't need to ship all the skeleton UI, because Remix fetches and can even prefetch at times the data before the page is rendered, and this, well, will make it easier for us to send applications to our users.
Like I said previously, Remix works with the foundations of the web. In this scenario, browsers, HTTP and HTML. These are technologies that have been around for a long time, and they're pretty great, and Remix fully embraces them. By combining stuff like HTTP caching, Remix focus on the URL for assets, dynamic server rendering, and HTML features like the link attribute with the prefetch, you have all the tools you need to make your application pretty great, and like I said, browsers and these other types of things that have been around for about 20 years, they are very, very good, and Remix fully leverages it. Remix uses JavaScript to augment the user experience by emulating the browser behavior. While most recent frameworks only have APIs for read and data, Remix has both read and write. Why, you might ask? By leveraging HTML forms. HTML forms have been around for a long time, and they have been the staple for data mutation since the 90s, so Remix will embrace this and fully augment that API. This will enable the data layer of a Remix function to work with or without JavaScript on a page. So this means that JavaScript, when we talk about Remix, is what is called progressive enhancement. If you decide to add JavaScript to your application, it allows Remix to speed up your user experience in two ways. On a page transition, I mean. By not downloading and evaluating JavaScript and CSS assets, and by only fetching data for the parts of the layout that changes. Finally, and the last point of philosophy with Remix is that it doesn't over-abstract the underlying technologies. And this is why it's said, one Remix, accidentally one the web. Because if you get good at Remix, you'll accidentally get good at web development in general. Remix makes it convenient to use, like I said, browser, HTTP, JavaScript. But these things are not hidden and they are not abstracted.
Comments