Skip to content
Ameen Abozaid
Planned lessonJNR-013-L06

Package by feature, layer within

  • Lesson 6 of 8
  • Junior
On This Lesson 4 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

organize code by feature.

Planned topics

  • Package by layer (controllers/, services/) scatters one feature across the project.
  • Package by feature (products/, orders/) keeps related code together.
  • Inside each feature: ProductController, ProductService, ProductRepository, DTOs.
  • Features talk through services, not by reaching into each other's repositories.
Draft outline details

Demonstration

tree: com.shop.api.products with controller, service, repository, dto folder; sibling orders.

Check your understanding

Which makes a feature easier to find?

Show answer

Package by feature.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.