SubjectOrientedProgramming - crowlogic/arb4j GitHub Wiki

Subject-Oriented Programming

Subject-oriented programming is a paradigm that extends and varies from traditional object-oriented programming. Here are its key characteristics:

Key Characteristics

  1. Subject as the Central Concept:

    • The central concept in subject-oriented programming is the 'subject', akin to an object in OOP.
    • Subjects are focused on specific areas or aspects of the application, encapsulating relevant data and behavior.
  2. Separation of Concerns:

    • This paradigm emphasizes dividing the application into distinct subjects, each responsible for a specific functionality.
    • This leads to more modular and maintainable code, as each subject can be developed and understood independently.
  3. Collaboration Between Subjects:

    • Subjects often need to collaborate to fulfill the application’s goals.
    • This is managed through well-defined interfaces, allowing for interaction without exposing internal details.
  4. Composition of Behavior:

    • The paradigm allows for the composition of behavior from different subjects.
    • This flexibility enables mixing and matching behaviors as needed for reusable code.
  5. Aspect-Oriented Programming Influence:

    • Subject-oriented programming shares similarities with aspect-oriented programming (AOP), especially in separating concerns and modularizing functionalities.

Summary

Subject-oriented programming extends object-oriented concepts, focusing on dividing a program into 'subjects' that encapsulate specific functionalities or concerns. This approach enhances organization, modularity, and maintainability, particularly in complex applications.