Skip to content

Eighteen versions of a web application and REST API, developed using Ruby on Rails, aim to fully leverage MVC/Rails by promoting modularization and orthogonality.

Notifications You must be signed in to change notification settings

solid-process/rails-way-app

 
 

Repository files navigation

MENU README | How to run locally | REST API doc | Web app screenshots

🚆 Rails Way App

Eighteen versions (gradually implemented) of a Web and REST API app made with Ruby on Rails that aims to get the most out of the MVC/Rails Way.

📚 Table of contents

💡 Summary

Branch070-orthogonal-models
Lines of Code1613
Rubycritic Score95.81

Orthogonality is the ability to change one thing without any unseen effect on other thing.

What this branch does is to decouple the User from the Account context to make the codebase even more orthogonal.

See how the two contexts are now separated:

Account User
app/models ├── account │ ├── member │ │ ├── authorization.rb │ │ └── entity.rb │ ├── member.rb │ ├── membership.rb │ ├── owner │ │ ├── creation.rb │ │ └── deletion.rb │ ├── task │ │ ├── item.rb │ │ └── list.rb │ └── task.rb └── account.rb
app/models ├── user │ ├── account_deletion.rb │ ├── password_resetting.rb │ ├── registration.rb │ ├── token │ │ └── entity.rb │ └── token.rb └── user.rb

🤔 Why this change matter?

The User model is now more focused on the user's behavior, while the Account model is more focused on the account's behavior.

This separation reduces the changes of undesired side effects when changing one of the models. This also happened when the Web and REST API resources were separated.

Another thing to notice is Rubycritic score which increased from 95.77 to 95.81, reflecting the high cohesion and low coupling of the codebase.

🔎 What the next version will have?

That's all folks! There is no other branch. 😉

After all these iterations, I hope you can see the enormous difference that focusing on cohesion and coupling can make in a codebase and how a framework like Rails (which has influenced so many others) is flexible enough to accommodate all these different approaches.

Ruby and Rails rocks! 🤘😎

📣 Important info

To understand the project's context, I'd like you to please read the main branch's README.

Check out the:

  1. disclaimer to understand the project's purpose.
  2. summary of all branches.

About

Eighteen versions of a web application and REST API, developed using Ruby on Rails, aim to fully leverage MVC/Rails by promoting modularization and orthogonality.

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •