Gary Ditsch

My intro projects with RedwoodJS

Written: 5/18/2021

I enjoy learning about new tools that can make my life easier, especially when it comes to developing a new web application. I enjoy programming. I love to solve problems that are encountered when building something new. However, I get a lot more enjoyment and satisfaction out of having a product I can share with people. The process of receiving that feedback and improving the product or application are the experiences I am seeking when I create something new.

That is why I appreciate tools that can decrease the time it takes to go from idea to working prototype. The most recent tool that I’ve been playing around with is RedwoodJS.

I heard a podcast interview with Tom Preston-Werner talking about RedwoodJS in the early days of the pandemic, but never had the time or project idea to try it out. Then in late 2020 I had an idea to create a ‘happiness and purpose’ tracker.

When I decided to try and build it with RedwoodJS, the first step I took was to go through the tutorial. Their tutorial series is excellent and I would recommend you try it out. Since that time they have added a second tutorial series.

Here are some highlights from that first project:

Cells. I really enjoyed the concept of using ‘Cells‘ to help fetch data. I have never used this approach for fetching data in any of the other React or graphql applications that I have worked on. This design really helped clarify where data was being pulled in and how to get it to the appropriate components.

Authentication. I really dislike having to deal with authentication on applications. The ability to use Netlify Identity and the simple process Redwood gives you to make this happen, feels a little like magic.

Scaffolding and Generators. Again the ability to get something working quickly is a key selling point and being able to use the generators to get a basic CRUD feature built is a huge time-saver. It reminds me of all the things I loved about using Django, while allowing me to stay within the javascript world. The team working on RedwoodJS often share their love of Ruby on Rails and while I have only worked on one Rails project in the past, I see their inspiration.

Community. The RedwoodJS forum and discord is very helpful with a welcoming group of developers.

The dashboard of my first RedwoodJS project: DailyPulse

Things I need to learn more about:

Prisma. This is used as the ORM to interact with the database. Initially I ignored most of the setup and features associated with Prisma and allowed RedwoodJS to handle everything for me, however I have now run into several issues where having a better knowledge of Prisma would help.

Data Migrations. I feel like I understand the different pieces of the migration requirements, however I have run into a couple issues recently where the postgresql database, prisma schema and graphql interface get out of sync. As noted, I need to understand Prisma better, however how to appropriately handle changes to the schema and the resulting database changes is something I need more detailed knowledge.

The challenges so far:

Storybook. I wanted to get storybook working on my second test project and was not successful, so I stopped. I need to circle back and dig deeper into the issue. The second tutorial has now shown how to utilize storybook within a RedwoodJS project, so maybe that will make it easier.

Scaffolding. I love how quickly the generators allow you to get some CRUD features set-up, however it creates a lot of code. When you want to go back and change something, it can require a lot of searching to update code. I now weigh the benefit of having this speed to get something set up with the potential time cost to update later. In my second test project I really didn’t have a clear idea on what I wanted to create, therefore I’ve faced a lot more problems with code that was generated.

My Current Takeaway.

I really enjoy the RedwoodJS framework to get projects set up quickly. I like that it utilizes several of the technologies I already use. The framework is currently on version 0.32.2 and being progressively pushed forward. The upside is that the framework continues to get improved regularly. The downside is that there are some features and items they are still trying to workout. Additionally, the documentation is very good, but if you are looking for tutorial videos on youtube there won’t be as much as you may be used to finding.