6

Crystal for the curious Ruby on Rails Developer

 3 years ago
source link: https://dev.to/seesethcode/crystal-for-the-curious-ruby-on-rails-developer-1dc
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Have you been hearing about the language Crystal lately and you're curious what it's all about? Well, I'm right there with you! Specifically I'm curious how Crystal can be used to create web applications that are highly performant but use less resources.

A little about me

My name is Seth and I'm a self-taught full-stack Ruby on Rails developer. My strong suites are mostly back-end and infrastructure.

The goal of this article

Since I'm self-taught, and because of the way I learn, I rely heavily on video tutorials to help me build my understanding of how Ruby, Javascript, HTML/CSS and infrastructure work together to create functional web applications.

Crystal caught my attention because of it's similarity to Ruby, but with benefits of a compiled language that I think Ruby is naturally trying to move towards. The challenge I find myself having is... a lack of videos helping introduce the different frameworks and the language.

So, I decided I'll take multiple Crystal web frameworks for a test drive and we'll build the same app in each one to explore how each one is different. I plan to personally highlight the differences I notice between the Crystal framework and Rails because most of my app development experience is with Rails.

Crystal Web Frameworks I'll Be Exploring

Here's the list of frameworks I will be making videos for. I'll be creating the same simple blog app on each framework so that anyone following along can compare how each one. I'll update each list item with a link to the article specifically about the framework with links to the videos and the source code for anyone to clone/fork and play around with. So if you don't see a link yet, please check back in the future 😄

The order here is roughly based on the full featured-ness of the framework. I say that because from my current experience Lucky is more fully featured as an out of the box system, but I'm already working with Amber currently and I'm more familiar with it so I plan to start there. Kemal and Athena are much lighter weight and are better compared to a Sinatra type framework.

Blog Project Outline

I'm rarely this structured, but a simple blog site is a good way to explore a frameworks ORM, controller and view layer, routing, simple user authentication and all of the basic CRUD actions.

Since the purpose of this project is to explore the frameworks themselves I'll be using bootstrap for the front-end and making all of the projects look essentially the same with standard bootstrap styling. If I use any Javascript, it'll be through Webpack and using Stimulus or just plain Javascript (clearly I haven't decided yet).

Pages

  • Home: This will act as the index page for the posts, displaying up to 10 posts and paginating any additional posts.
  • Sign Up
  • Sign In
  • Post: the individual post page displaying the post contents. Post pages will accept comments from non-signed in users.
  • User Account: screen showing all of the posts belonging to the signed in user, with all of the CRUD actions for all the posts belonging to that user.

All pages will have a sticky top nav with links to sign in/out and create/manage posts.

And there you have it!

I'll update this post as I finish the videos and posts with each framework. If this has helped you, or caused you to have more questions that I didn't answer, please let me know. I'd love to get your feedback!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK