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

Branch040-models-within-namespaces
Lines of Code1359
Rubycritic Score91.56

The previous versions already showed the benefits of organizing the codebase. This version goes further by grouping models within namespaces.

Beyond the code structure, check out the model's implementation to see how the associations reflect the namespace structure.

Here is the comparison of the models' directory structure (before and after):

Before After
app/models ├── account.rb ├── application_record.rb ├── current.rb ├── membership.rb ├── task_item.rb ├── task_list.rb ├── user.rb └── user_token.rb
app/models ├── account.rb ├── application_record.rb ├── concerns ├── current.rb ├── membership.rb ├── task │ ├── item.rb │ └── list.rb ├── user │ └── token.rb └── user.rb

🤔 Why this change matter?

Cohesion + consistency = maintainability.

🔎 What the next version will have?

Seven iterations have been since version 021-multi-controllers-per-entity_rest_actions_only, but the Rubycritic score has remained the same (91.56).

But what was the reason?

The same controllers handle both the web application and the REST API. In other words, there needs to be more cohesion since each request format serves different purposes.

Because of this, the next version will perform this separation, and with this, it will be possible to determine whether or not this care in promoting cohesion will improve the quality score.

Next version: 050-separation-of-entry-points.

📣 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