How dws-2025/project-grupo-18 works
Project Type & Purpose
• The file structure and naming conventions (e.g., “JobmatcherApplication.java”) indicate a web application.
• The use of packages like controller, service, repository, and model confirms an MVC (Model–View–Controller) architecture.
• The presence of static resources (CSS, JavaScript, images) and templates in the “src/main/resources” directory shows that the UI is server-rendered.
Analyzing the File Structure
• Top-Level Structure: The project uses Maven (pom.xml, mvnw, etc.) for build and dependency management.
• Package Organization: The “es/grupo18/jobmatcher” package clearly separates concerns:
• Controllers: Manage HTTP requests and dispatch responses (e.g., BlogController, ImageController, etc.).
• Models: Represent domain entities such as Company, Post, Review, and User.
• Repositories: Likely use Spring Data JPA to interact with the database.
• Services: Contain business logic (e.g., CompanyService, DataGeneratorService, PostService, etc.).
• Resources: The “src/main/resources” folder contains application properties, static assets, and Thymeleaf (or similar) templates for views, highlighting the MVC architecture.
• Tests: A typical unit/integration test suite structure is provided under “src/test”.
a. Main Components:
• Web Layer (Frontend):
▪ View Templates: HTML files under the templates directory.
▪ Static Assets: CSS, JavaScript, and image files in the static folder.
• Controller Layer:
▪ Controllers (e.g., BlogController, CompaniesController, etc.) responsible for receiving and processing web requests.
• Service Layer:
▪ Business Logic Services (e.g., UserService, CompanyService) that act as an intermediary between controllers and repositories.
• Data Access Layer:
▪ Repositories (e.g., UserRepository, CompanyRepository) that perform CRUD operations typically via an ORM (likely Hibernate/JPA).
• Domain Layer:
▪ Models (e.g., User, Company, Post, Review) that represent the core business entities.
• External Components:
▪ Database: While not explicitly shown in the tree, it is implied by the existence of repository interfaces.
▪ Possibly other integrations (e.g., error handling through CustomErrorController, external API integrations if any).
b. Relationships and Interactions:
• The client (browser) makes HTTP requests to the controllers.
• Controllers delegate to Services to process business logic.
• Services perform data operations through Repositories.
• Data flows from the database to the domain models, then to the presentation layer via templates.
• Static resources provide front-end styling and behavior for a better user experience.
c. Architectural Patterns & Design Principles:
• MVC Pattern: Explicit separation into Model (domain objects), View (templates/static resources), and Controller (handlers).
• Layered Architecture: Distinct separation among controllers, services, and data access (repositories), which improves maintainability and scalability.
• Use of Dependency Injection: While not visible in the file tree, Spring Boot conventionally employs dependency injection to promote modularity.
d. Technologies and Frameworks:
• Java, Spring Boot, Spring MVC, Spring Data JPA.
• Maven for dependency management and building the project.
• Thymeleaf or a similar templating engine for generating dynamic HTML views.
• Static resources (CSS, JavaScript) enhancing user experience.
• Likely a relational database (implied by the repositories) and possibly JPA/Hibernate as ORM.