Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Getting Started Right: A Guide to Project Struc...

GDG Montreal
April 19, 2024
35

Getting Started Right: A Guide to Project Structure & Architecture

A well-defined architecture and a clear folder structure are powerful tools for keeping your app flexible, maintainable, and efficient. Let's explore how architecture can be used to optimize your app for speed and flexibility.

GDG Montreal

April 19, 2024
Tweet

More Decks by GDG Montreal

Transcript

  1. What to discuss 1 2 3 4 5 Introduction Architecture

    & Folder Structure Packages & Tools Demo Conclusion
  2. You can apply it everywhere Adapt depending on purpose My

    opinionated version of architecture Names/terms might be different + + + Disclaimer +
  3. Foundation 2 3 4 1 Maintainable Project easy to read

    and to find issues Stable Following rules and principles Flexible Able to add or remove any features anytime Testable Able to test individually each part 5 Homogeneous Easy for the team to contribute
  4. “ … are typical solutions to commonly occurring problems in

    software design. They are like pre-made blueprints that you can customize to solve a recurring design problem in your code. Design Patterns refactoring.guru
  5. Dependencies Compose layers with logic or component needed Rules &

    Principles 2 3 4 1 Layers Presenter, Domain, Data and inner layers are independent Domain Split feature in different context
  6. Layers Domain Domain Feature (Settings) Presentation Domain Data Widget Component

    used in pages Example: Section widget Custom input Page Widget that represent a page or a route to the app Example: Settings page Profile page Use Case Action to perform Example: Save profile Clear cache Controller Handles user actions and update the UI Example: Profile controller Preferences controller Entity Model of the domain Example: Profile Preference Repository Interface of the data layer Example: Profile repository Preference repository Repository Implementa- tion based on the data source Example: Database profile In memory preferences Model Representa- tion of the data source model Example: Profile Preference Data Source Data execution layer Example: SQL In memory