Videos
Development - Where the Plan is Put Into Place
For the past six years, RedSky Engineering has been a strong advocate and implementer of the React library, with over 90% of our projects utilizing React. Throughout this period, we have created a wide variety of projects, ranging from live video e-commerce apps to 3D mapping websites similar to Google Earth, and even self-driving lawn mower applications bundled using Cordova/PhoneGap. The common thread in all these applications is the use of the ReactJS library.
Before settling on ReactJS, we experimented with several other technologies. For instance, we built jQuery-based websites with index.html files exceeding 3,000 lines. We also explored Framework 7, which allowed us to mimic iOS and Android native controls in conjunction with Apache Cordova, making the apps feel just like native ones. However, when we were first introduced to class-based ReactJS and its componentization structure, it was clear that this approach provided a much better way to organize our code and eliminate the cumbersome, large index.html files that had been a challenge for larger projects. Additionally, Framework 7 offered an equivalent component library with a router already bundled into React, making the transition even smoother.
Unfortunately, we found that using a framework became problematic when we started attempting to code scenarios that the original library authors never intended. We spent countless hours trying different workarounds, often having to abandon them or fork the library to add customizations that never made it back to the main branch. It became so problematic that we vowed to build everything in-house from then on.
Thus, we built our own web router library, ignoring the existence of react-router. We also developed our own framework UI library, humorously named Framework 996 (in reference to the Chinese working hour system of 9 a.m. to 9 p.m., 6 days a week). All our components included Storybook examples. The great thing about React was that it was simply a library and didn’t impose any restrictions on how we did things.
Up to this point, we had built mostly web or mobile applications that relied little on SEO optimization or page rank. When we encountered our first project where SEO mattered—with OpenGraph tags, JSON-LD, meta descriptions, and dynamic content from CMS integration—we ran into the challenges of using only client-side rendering with React. While Google and Bing typically render these pages before indexing, this wasn’t the case for other popular sites and systems like Slack, Facebook, LinkedIn, etc.
We tried using prerender.io to render and statically cache the page for these crawlers, but it seemed fragile and didn’t provide the ultimate solution we were looking for. At the same time, people were raving about Next.js and its capabilities, including server-side rendering with client-side hydration, static site generation, and more.
We created a sample application to try out Next.js as a potential replacement for our homebrewed solution. At this time, Next.js had just released version 13 with a whole new App router system, including files and folders to store pages and routes. It sounded intriguing, but the experience was less than stellar. The system, in our opinion, and from what I’ve read from many others, was not ready for prime time. While it has improved since then, there are still many negative comments and lots of people choosing to stick with the old page router system.
Around the same time, a former co-worker suggested that we try out Svelte, as he had found it to be a dream and extremely easy to get up and running. Just like with Next.js, we created a sample application in Svelte (technically SvelteKit) and found it to be an all-around positive experience. We enjoyed being able to write less code than our react counterpart. We found things were simple to understand and easy to work with. For example the two way binding present on input forms made it so much nicer than having an onChange() handler with a setState() method. The stores that Svelte by default provided gave us the state management reactivity throughout our app without having to reach for third party libraries like Recoil or Zustand.
We soon faced a crossroads. We had a new application that needed to be developed for a customer within a short timeframe, requiring deployment on Web, iOS, and Android simultaneously with a small team. We could either stick to our tried-and-true homebrewed ReactJS system or take a leap of faith and try something brand new with Svelte.
In the end, we chose Svelte/SvelteKit. In addition to leveraging SvelteKit, we decided to use some of the other popular ecosystems being praised by YouTubers, such as TailwindCSS, ShadCN (Svelte edition), and Superforms. All of these proved to be fantastic libraries created by authors who take pride in their work. We have since donated money to these projects, contributed to issue tickets, and participated in Discord discussions whenever possible.
We recently completed the project and have significantly grown our in-house Svelte knowledgebase in the process. While this mobile application relied on a Node.js backend, we also completed another project that utilized the backend capabilities of SvelteKit using the node-adapter deployment. Having both the frontend and backend in a single Svelte codebase has provided an excellent developer experience. I believe we will continue down this path for small to medium projects. Large projects or those that require websockets will likely still be divided between a SvelteKit frontend and a Node.js backend for the time being.
In a future blog, I will discuss the specifics of how we achieved fast performance and bundled our project into an iOS/Android application using CapacitorJs, along with simultaneous deployment to a web server.
Software is ubiquitous in business. Whether it's to streamline processes, improve customer experience, or to gain a competitive edge, software is a critical investment for companies looking to grow and succeed.
What is a style guide? This article discusses what a style guide is and how to use one effectively.
In this special edition of Dev Shop Stories, Josh and Tanner discuss the shocking horror stories that they have seen in their careers. They recount tales of other developers, both experienced and inexperienced, who ended up causing issues in their software.