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

Branch032-resources-within-namespaces_partials-grouped-by-context
Lines of Code1355
Rubycritic Score91.56

The previous version revealed the benefits of group controller within namespaces. This version will apply the same ideas to the view partials.

Let's see comparation between the previous and current structure:

Previous Current
app/views ├── shared │ ├── settings │ │ └── _header.html.erb │ ├── tasks │ │ ├── _add_new.html.erb │ │ └── _header.html.erb │ └── users │ ├── _header.html.erb │ ├── _reset_password_link.html.erb │ ├── _sign_in_link.html.erb │ ├── _sign_up_link.html.erb │ └── user_token.json.jbuilder ├── task │ ├── items │ │ ├── _delete_action.html.erb │ │ ├── _edit_action.html.erb │ │ ├── _toggle_status_action.html.erb │ └── lists │ ├── _delete_action.html.erb │ ├── _edit_action.html.erb │ ├── _view_items_action.html.erb
app/views ├── task │ ├── items │ │ ├── actions │ │ │ ├── _delete.html.erb │ │ │ ├── _edit.html.erb │ │ │ └── _toggle_status.html.erb │ ├── lists │ │ ├── actions │ │ │ ├── _delete.html.erb │ │ │ ├── _edit.html.erb │ │ │ └── _view_items.html.erb │ └── shared │ ├── _add_new.html.erb │ └── _header.html.erb ├── user │ ├── shared │ │ ├── _header.html.erb │ │ ├── links │ │ │ ├── _reset_password.html.erb │ │ │ ├── _sign_in.html.erb │ │ │ └── _sign_up.html.erb │ │ ├── settings │ │ │ └── _header.html.erb

🤔 Why is this structure more cohesive than the previous one?

To answer this, let's analyze the partials in the app/views/shared folder from the previous version. It was less cohesive because it knew all the application contexts (settings, tasks, and users).

The current version shows that these partials have been moved to task or user contexts. This change created a more cohesive structure because of the lower indirection and greater specificity of each partial's use.

🔎 What the next version will have?

Aiming increasing the cohesion of the application, the next version will move the mailer views under the entity user context.

Next version: 033-resources-within-namespaces_mailers-under-entity-context.

📣 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

  •  
  •