DNN + 2sxc = #DNNCMS - This tool helps web designers and developers prepare great looking content in DNN (DotNetNuke). It's like mixing DNN with Umbraco and Drupal :)
In the current setup of a 2sxc app, each site-specific local app folder allows the creation of an AppCode directory for C# code. This code is then available for use across any view and Razor template within that app. However, for environments with multiple sites hosted on a single DNN installation, where on each site we import the same 2sxc app template, this approach can results in the duplication of AppCode files per each site, leading to unnecessary redundancy.
Expected Behavior
To optimize code reuse and reduce duplication, it would be highly beneficial to introduce support for a shared AppCode directory. Specifically:
Developers could place the AppCode directory in a shared (global) location, such as /Portals/_default/2sxc/appFolder/, accessible by all sites on the DNN host.
If a 2sxc app on a specific site does not have a local AppCode directory, it should automatically fallback to using its AppCode in the shared location.
This change would enable developers to maintain a single set of AppCode files for use in the multiple installations of the same 2sxc app across multiple sites, simplifying maintenance and ensuring consistency.
Benefits
Improved Code Reuse: By leveraging a shared AppCode directory, developers can avoid redundant code duplication across same 2sxc apps in different sites.
Simplified Maintenance: Changes made to the shared AppCode files would automatically work across same 2sxc app in all sites, ensuring consistency and reducing the risk of outdated code.
Optimized Development Workflow: This feature would streamline the development process, in multi-site DNN installations, making it easier to manage and update C# code used in 2sxc apps.
I'm submitting a
Affects:
Current Behavior
In the current setup of a 2sxc app, each site-specific local app folder allows the creation of an
AppCode
directory for C# code. This code is then available for use across any view and Razor template within that app. However, for environments with multiple sites hosted on a single DNN installation, where on each site we import the same 2sxc app template, this approach can results in the duplication ofAppCode
files per each site, leading to unnecessary redundancy.Expected Behavior
To optimize code reuse and reduce duplication, it would be highly beneficial to introduce support for a shared
AppCode
directory. Specifically:AppCode
directory in a shared (global) location, such as/Portals/_default/2sxc/appFolder/
, accessible by all sites on the DNN host.AppCode
directory, it should automatically fallback to using itsAppCode
in the shared location.AppCode
files for use in the multiple installations of the same 2sxc app across multiple sites, simplifying maintenance and ensuring consistency.Benefits
AppCode
directory, developers can avoid redundant code duplication across same 2sxc apps in different sites.AppCode
files would automatically work across same 2sxc app in all sites, ensuring consistency and reducing the risk of outdated code.