Hi there!
In Outsystems' best practices, it is generally stated that having more than 20 site properties in one module is considered bad design.
From what perspective is this "bad design" being pointed out?
I understand that if the number of site properties increases too much, it becomes difficult for administrators to keep track of the settings, and the time required for configuration changes also increases proportionally.
However, I do not think that splitting modules to reduce the number of site properties per module is the best practice to address this issue.
I believe the intention is to decide whether to manage it in a database table or with site properties.
Could you please explain what this criticism actually refers to?
OutSystems Platform Best Practices
Logic and development
Hello Ryosuke
Before listing the reasons for restricting the number of site properties, I would suggest go through below documentation.
Having that background let me share reasons for this restriction.
1. Site properties holding configurations usually drives considerable amount of logic implemented in a module. Having too may of them implies module contains considerable amount of logic, which is very likely to make the module monolith and that itself is a bad design.
2. With too many site properties, it is likely that unexperienced developers are encouraged to treat them as variables and go on adding more of them. This would result in cache reset of module causing impact on application as explained above.
3. Too many site properties leads to configuration and maintenance overhead as you also agree.
4. During deployments too the team responsible has to ensure that each of those site properties have to have a proper value configured for the module to work properly. This remains the overhead even when you split the module, but then it is likely that you don't deploy all the modules together, hence reducing the maintenance and configuration overhead.
Hope it helps!
Junaid
Hi Ryosuke Tachibana ,
Site properties are cached for faster access. If you have more than 20 site properties in the module indicates a potential for poor code , increased complexity, and performance issues due to the way site properties are cached and updated, leading to unnecessary database overhead when too many are modified frequently
Thanks
Hi,
Limiting the number of site properties to fewer than 20 per module, as recommended by OutSystems best practices, is mainly focused on ensuring maintainability, performance, and scalability.
This is because site properties are meant to hold configuration values that don't change frequently, and a large number of them within one module indicates potential overreliance on site properties for managing application behavior, which can lead to harder maintenance and less clarity in your application logic.
ご回答いただいた皆様へ、
皆様、迅速なご返信をいただき、誠にありがとうございました。
私はあなたの回答を次のリンクと一緒に確認しました、そして私は今、より明確な理解を持っていると信じています:
私が収集した情報によると、モジュールごとに 20 を超えるサイト プロパティを配置すると、次のことにつながる可能性があります。
あなたの洞察は非常に役に立ちました。またよろしくお願いいたします!