Refactoring block #1 #43
Labels
code quality
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
Milestone
Although we should implement refactoring as a constant part of our dev process, we started off with a rather rapid prototyping and left things a bit unmanaged due to the fast paced development cycles. Therefore we should introduce constant refactoring with an initial refactoring sprint.
Estimated effort: 1 week, two devs
Objectives
Resources
We can access the books via our Uni VPN
Tasks
Backend @alessandrobelli
To refactor the backend logic efficiently, we follow a structured set of rules. Key points include:
MVC Paradigm: Models interact with the database, Controllers process data, and Views present the results.
Separation of Concerns: Each component has a distinct responsibility, improving maintainability.
DRY Principle: Encourage code reuse and avoid duplication.
Consistent Naming: Use consistent naming conventions across all components.
Encapsulation: Encapsulate business logic and validation within models or service classes.
Review and Refactor Models:
$fillable
,$timestamps
,$primaryKey
,$auditExclude
,$casts
and other properties correctly.Review and Refactor Controllers:
index
,show
,store
,update
,destroy
) when possible.Optimize Database Interactions:
Implement Form Requests:
Review and Improve Policies:
app/Policies
.For an in-depth document on general guidelines about refactoring, check this document: backend refactoring guidelines.
Frontend @jankapunkt
The text was updated successfully, but these errors were encountered: