Skip to content

Instantly share code, notes, and snippets.

@fkchang
Created August 26, 2017 23:23
Show Gist options
  • Save fkchang/664a2c3c2cc2e75227c2aa4aca38296f to your computer and use it in GitHub Desktop.
Save fkchang/664a2c3c2cc2e75227c2aa4aca38296f to your computer and use it in GitHub Desktop.

Title

COMPS - The All Ruby Isomorphic Application Architecture

Abstract

Building big apps is a big problem. There’s complexity on the frontend, complexity on backend, and one has to link the 2 together.

As popluar as React is, which has several comprehensive solutions for the frontend, there still no integrated front/backend framework (think Meteor) for React for JS.

COMPS - Components, Operations, Models, Policies, Stores is not only the 1st integrated front/backend architecture for React, but is also an all Ruby solution.

Build your big apps with the best that React and Rails have to offer in an integrated all Ruby architecture. For the Rubyist Joy, Productivity, Familiarity in 1 package

front backend, on front end many options flux, redux, mobx

A solution, ALl ruby

Hinging both front and back

Details

When webapps were primarily server rendered pages will small amounts of AJAX, Rails was a sublime solution. It still is. Rails is omokase, a carefully selected package that was designed to fit together, with a beautiful, programmer happiness inducing Ruby DSL. One thing that continues to bring, joy, productivity, and maintainability to Rails application is that “there’s a place for everything.”

Fast forward to today, where SPAs (Single Page Applications) are common place and Javascript rules the heap with a vibrantly expanding, but ever chaotic ecosystem that promises things such as Isomorphic code (running on both ends), Rails and thus Ruby is less relevant. One can integrate React.js with Ruby on Rails, but it’s still largely duct taped together, there’s no built integration. On top of that there 2 languates, 2 paradigms, 2 tool sets - a costly integration.

COMPS is the architecture that is offered by ruby-hyperloop, a framework that integrates React.js on the frontend with Ruby on Rails on the backend via a single Ruby DSL. Like Rails, there’s a place for everything. Components deliver interactive user experiences, Operations encapsulate business logic, Models magically synchronize data between clients and servers, Policies govern authorization and Stores hold local state.

Also like Rails, it is unified in a single Ruby DSL. Ruby is used to write front end logic, backend logic, logic that is shared by both front and backend and even markup via the React.rb DSL that can be rendered on both server and client side. As a Ruby framework, the toolset is that of Ruby, so there’s a single, stable toolset which Rubyists already know.

For Ruby web developers, it is a route to continued relevance and employability in a world where server rendered Ruby webapps are having less and less relevance.

Pitch

In a technology landscape where SPAs, speed, scaleability, concurrency, etc. are the hot topics, Ruby and Rails are less and less relevant. COMPS provides an all Ruby path for Ruby based web developers to stay relevant, productive, employable while continuing to enjoy the Joy of Ruby.

I am a core committer and contributor to aforementioned and related technologies and a would be evangelist for keeping Rubyist happy and future employable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment