Layered Architecture of the Accelerator
  • 22 Nov 2023
  • 3 Minutes to read
  • Dark
    Light

Layered Architecture of the Accelerator

  • Dark
    Light

Article summary

In today's rapidly evolving digital landscape, RESTful APIs have become the cornerstone of seamless and efficient web applications. However, developing a robust and secure backend to support these applications presents its challenges. The Agile.Now Accelerator offers a comprehensive solution, designed with a multi-layered architecture that ensures security, efficiency, and consistency in REST-style web API implementations. In this article, we will delve into this architectural model, emphasizing its benefits and design patterns.

The Agile.Now Accelerator offers OutSystems developers a harmonized approach to REST API development. By adopting a consistent layered architecture, it guarantees each step of the request-processing pipeline is not only modular and secure but also predictable and uniform. This article dissects the layers of this architecture, highlighting their functions, and the overarching benefits of such a consistent design.

The Layers of the Agile.Now Accelerator

One of the hallmarks of the Agile.Now Accelerator is its structured layered architecture. Layers ensure related code is cohesively organized, and dependencies remain logical and purposeful.
AN-Accelerator-Layers

  1. Schema and Endpoint Validation Layer

    • Purpose: Acting as the initial checkpoint, this layer validates the legitimacy of incoming requests.
    • Functionality: It checks if the incoming data aligns with predefined schemas and if the targeted endpoint exists and is accessible.
  2. Authentication Layer (JWT Token)

    • Purpose: This layer ensures the sanctity of the API by allowing only authenticated users or systems to access it.
    • Functionality: Leverages JSON Web Tokens (JWT) for the authentication process, making sure only entities with valid credentials proceed.
  3. Input Data Validation and Enrichment Layer

    • Purpose: Beyond format checks, this layer ensures data integrity and can enhance it if needed.
    • Functionality: It validates the completeness of incoming data, potentially augmenting it to meet specific requirements or standards.
  4. Authorization Layer (RBAC & ABAC)

    • Purpose: Authentication is only half the battle; this layer ensures the authenticated entity has the right permissions.
    • Functionality: Employs Role-Based Access Control (RBAC) and Attribute-Based Access Control (ABAC) mechanisms for permission checks.
  5. Data Fetches & Saves or Custom Code Callback Layer

    • Purpose: Depending on the nature of the request, this layer either interacts with the database or triggers custom logic.
    • Functionality: Handles database interactions or seamlessly integrates custom code callbacks for specialized operations.
  6. Error Handling Layer

    • Purpose: Any system can face errors, but handling them gracefully is the key.
    • Functionality: Detects, logs, and manages exceptions, ensuring stability and user-friendly error feedback.
  7. Result Set Layer

    • Purpose: After processing, this layer compiles and dispatches the result.
    • Functionality: Gathers results from preceding layers, structures the response, and serves it to the requester.

Key Benefits of Agile.Now Accelerator's Architecture

  • Consistency: All REST services designed with Agile.Now Accelerator adhere to the same structured format and best practices.
  • Global Error Handling: Errors are managed uniformly across layers, ensuring consistency in error responses.
  • Efficiency: The layered approach streamlines data processing, reducing redundancy and speeding up request handling.
  • Scalability: The architecture is built to accommodate future complexities and enhancements.
  • Security: Each layer adds an additional level of security checks, ensuring data integrity and protection against unauthorized access.

Design Patterns and Practices

The architecture's strength lies in its underlying design patterns:

  • Splitting the Domain Model: Divides logic and in-memory data, ensuring clarity.
  • Repository Pattern: Offers an encapsulated CRUD access mechanism.
  • Global HTTP Exceptions: Provides a uniform error response mechanism across the API.
  • Constructor-based Entity Validation: Ensures only valid entities are created.

Conclusion

The Agile.Now Accelerator's layered architecture is more than just a systematic approach to REST API development. It's a commitment to consistency, efficiency, and scalability. This unified design ensures not only the robustness of individual layers but also brings overarching benefits that enhance the entire development lifecycle. Embracing such an architecture offers profound insights into modern, efficient, and consistent API development practices.


Was this article helpful?