# Best Practices  for Structuring Pega Applications

**URL:** <https://forums.pega.com/t/best-practices-for-structuring-pega-applications/10334>\
**Category:** Knowledge Share\
**Tags:** platform, low-code-app-development, other-industry, app-studio, dev-designer-studio, testing-applications, senior-system-architect, pega-platform\
**Created:** [December 4, 2025, 8:48pm UTC](https://forums.pega.com/t/best-practices-for-structuring-pega-applications/10334 "2025-12-04T20:48:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeandroTaveira](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/leandrotaveira/32/23391_2.png) [@LeandroTaveira](https://forums.pega.com/u/LeandroTaveira)\
**Post date:** [December 4, 2025, 8:48pm UTC](https://forums.pega.com/t/best-practices-for-structuring-pega-applications/10334/1 "2025-12-04T20:48:19Z")

</div>

## Introduction

As Pega Platform continues to evolve, its recommendations for application structuring and development workflows have become increasingly aligned with modern DevOps principles. A key shift in best practice, particularly from Pega Platform, is the formal recommendation to establish a **dedicated Testing Application**. This approach significantly improves isolation, governance, and integration with Continuous Integration/Continuous Delivery (CI/CD) pipelines.

This article outlines the latest best practices for structuring your Pega applications, focusing on the essential **framework vs. implementation layers** and the modern **three-layer application environment structure** required for a robust, scalable, and maintainable Pega solution.

## 1. Framework vs. Implementation Applications

The foundation of a well-structured Pega solution remains the strategic use of the **Situational Layer Cake™** architecture, which promotes reuse and specialization.

|   
  
Application Type  
  
 | Purpose | Best Practice |
| --- | --- | --- |
|   
  
**Framework Application**  
  
 |   
  
Serves as a reusable template for multiple implementations, containing common business logic, data models, and UI components.  
  
 |   
  
Only create a Framework when there is a clear, proven need for shared assets across multiple distinct lines of business or geographies. Typically resides at the **organization layer** or a high-level division layer.  
  
 |
|   
  
**Implementation Application**  
  
 |   
  
Built for a specific business unit, line of business, or geography. It specializes the Framework by adding specific business rules and processes.  
  
 |   
  
Should leverage the Framework (if one exists) and be kept lean and purpose-driven. It represents the actual solution delivered to the end-user.  
  
 |

**Key Principle:** Avoid creating unnecessary frameworks. A single, well-designed Implementation Application is often the most agile starting point. Frameworks introduce complexity and should only be adopted when the benefits of reuse outweigh the overhead of maintenance.

## 2. The Modern Three-Layer Application Environment Structure

To fully support agile development, robust testing, and automated deployment via Deployment Manager, Pega now recommends a clear separation of concerns across three distinct application layers: Development, Test, and Production.

### A. Development Application (The Active Workspace)

This application is the primary workspace for developers.

- **Purpose** : To manage features and changes that are actively in progress.
- **Structure** : It is built on the **Test Application** (or the Production/Target Application if a Test App is not yet established).
- **Rulesets** : Contains unlocked Rulesets for active development work.
- **Workflow** : Developers log in via a dedicated Access Group. Once work is complete, changes are merged into the Production/Target Application’s Rulesets.

### B. Testing Application (The Quality Gate)

This is the critical new layer that ensures quality and isolation. It is a **separate, dedicated application** , not merely a set of testing rulesets within the main app.

- **Purpose** : To house and execute all automated and manual test cases (e.g., Pega Unit Tests, Scenario Tests) without polluting the core business logic.
- **Structure** : It is a **locked application** built on the **Production/Target Application**.
- **Rulesets** : Contains dedicated, separate Rulesets solely for test assets.
- **Benefit** : By being a separate application, it can be deployed to a subset of environments and its assets can be managed and promoted independently by Deployment Manager, acting as a dedicated quality gate in the CI/CD pipeline.

### C. Production/Target Application (The Deployable Core)

This application represents the stable, deployable version of the business solution.

- **Purpose** : To contain the core, validated business logic ready for deployment to higher environments (Staging, Production).
- **Structure** : It is the base application that the Development and Testing applications are built upon.
- **Rulesets** : All Rulesets are locked. It contains **no** development-in-progress or testing-specific rulesets.

| Layer |   
  
Built-on Application  
  
 |   
  
Ruleset Status  
  
 |   
  
Primary Function  
  
 |
| --- | --- | --- | --- |
|   
  
Development  
  
 |   
  
Test or Production  
  
 |   
  
Unlocked  
  
 |   
  
Feature development and in-progress work.  
  
 |
|   
  
Test  
  
 |   
  
Production  
  
 |   
  
Locked  
  
 |   
  
Automated and manual test case execution.  
  
 |
|   
  
Production  
  
 |   
  
Base Pega Platform  
  
 |   
  
Locked  
  
 |   
  
Stable, validated business logic for deployment.  
  
 |

## 3. CI/CD and DevOps Alignment

This three-layer structure is essential for modern Pega DevOps, particularly when using **Deployment Manager 5**.

### ### A. PegaDevOpsFoundation

To enable seamless pipeline integration, the **PegaDevOpsFoundation** application must be added as a built-on application to your **Production/Target Application**. This component provides the necessary capabilities for Deployment Manager to execute pipeline tasks and integrate with Dev Studio and App Studio.

### ### B. Application Packaging and Versioning

Pega recommends packaging the **entire application** via the Product Rule for deployment. This practice offers several advantages:

**Consistency** : Ensures that every environment receives the exact same, validated set of rules.

**Recoverability** : Allows for convenient recreation of an environment if corruption occurs.

**Simplicity** : Reduces the burden on developers to manage complex delta deployments, as Pega Platform automatically handles the difference between versions.

For application versioning, the best practice is to use **Lock and Roll** for small patches and **Skimming** for major or minor version increments, ensuring a clear version history and maintainability.

## ## Conclusion

Adopting the modern Pega application structure—characterized by the clear separation of Framework and Implementation layers, and the crucial addition of a **dedicated Testing Application** is a critical best practice. This layered approach ensures **scalability** , **maintainability** , and **compliance** with Pega’s latest guardrails, enabling smoother CI/CD integration and significantly reducing deployment risk.

## References

**[1] Pega Documentation: Best practices for application configuration - Deployment Manager 5** [Pegasystems Documentation](https://docs.pega.com/bundle/deployment-manager/page/deployment-manager/dm/best-practices-for-application-development-dm5.html)

Details the recommended three-layer application structure (Development, Test, Production), the role of PegaDevOpsFoundation as a built-on application, and best practices for packaging entire applications via Product Rule for deployment.

**[2] Pega Academy: Application Structure** [Application structure | Pega Academy](https://academy.pega.com/topic/application-structure/v5)

Covers the foundational concepts of application organization, the Situational Layer Cake™ architecture, and Framework vs. Implementation application design patterns.

**[3] Pega Documentation: Testing Pega Applications** [Pegasystems Documentation](https://docs.pega.com/bundle/platform/page/platform/devops/testing-pega-applications.html)

Explains the need for dedicated testing assets, automated unit testing using PegaUnit, scenario testing, test automation setup, and the role of testing in CI/CD pipelines.

**[4] Pega Academy: Application Versioning** [Application versioning | Pega Academy](https://academy.pega.com/topic/application-versioning/v6)

Provides comprehensive guidance on application and Ruleset versioning strategies, including when to use Lock and Roll versus Skimming for version management.

**[5] Pega Academy: Locking and Rolling Ruleset Versions** [Locking and rolling ruleset versions | Pega Academy](https://academy.pega.com/topic/locking-and-rolling-ruleset-versions/v2)

Details the Lock and Roll process for creating incremental patches and minor versions, including best practices for version control in the DevOps pipeline.
