⚡ Introduction
If you work in software development, you’ve probably had to repeatedly create similar forms across multiple screens. This repetition consumes time and increases the chance of errors. We faced a very similar situation at JJConsulting.
⚠️ Our Problem
Some time ago, we developed a product and started implementing it for several clients. Each one required specific fields and custom business rules. Initially, we replicated the code for each client, adapting it to their needs. This approach quickly proved unsustainable.
We then decided to parameterize the rules within a single system, allowing us to enable or disable fields and features as needed. However, as more clients were added, the complexity of the parameterization grew exponentially, making the system increasingly difficult to maintain.
In search of a more effective solution, we explored open-source alternatives and discovered the concept of a Data Dictionary. Large ERP companies use this approach to let each client customize the system according to their needs while maintaining a single codebase.
We couldn’t find any open-source solution in .NET that met our needs for configuring fields and business rules efficiently. So we decided to create our own library: JJMasterData. At first, it seemed like a bold idea, but the result exceeded our expectations. We've adopted JJMasterData in multiple systems, and its flexibility and efficiency transformed our development process.
📘 What is a Data Dictionary?
The Data Dictionary is a centralized repository that documents everything about a system’s data: field names, types, sizes, validation rules, sources, relationships, indexes, etc. It serves as the technical contract that aligns your database with your business rules.
But the dictionary alone isn’t enough. How do we generate forms from the data dictionary? That’s where JJMasterData comes in.
JJMasterData is an open-source .NET library that allows you to rapidly create CRUDs — forms to create, read, update, and delete data — directly from data dictionaries, as well as other features like data import and export. You can also generate Web API endpoints to integrate with other systems.
When necessary, you can write custom code in JJMasterData to adapt the generated forms to your specific business rules.
🔧 How JJMasterData Works
JJMasterData is a data management tool that stores your system's data structure and automatically generates forms, removing the need to code each screen manually.
It starts with filling out the data dictionary, where you define tables, fields, types, validations, and relationships. These definitions are saved in a central table — like a “table of tables” — that forms the base for dynamic form generation.
When a form needs to be displayed, JJMasterData reads the dictionary and builds the UI automatically. Any changes, like adding a new field or modifying a rule, are reflected instantly in the UI without needing to recompile the application.
JJMasterData also supports custom business rules, such as specific validations or automatic calculations — all without altering the main codebase. This speeds up development, simplifies maintenance, and reduces errors significantly.
We’ve separated everything into 3 main layers: the data layer is called JJMasterData.Commons
, which
abstracts SQL script generation.
Then there’s JJMasterData.Core
, which renders the HTML based on the retrieved data. This layer uses our
own DSL in C# to generate HTML components.
Finally, we have JJMasterData.Web
, our Razor Class Library. Routes under /DataDictionary manage
the dictionary entries, stored centrally in JSON format (or in a NoSQL DB, if you implement the interface). The
/MasterData routes render the end-user forms. You can use ASP.NET Core configuration to secure them.
🌟 Advantages of Using JJMasterData
With our library, you gain more agility, flexibility, and control over your system’s data and UI.
Still unsure? Here are some advantages:
- Avoids code duplication
- Automatic form generation from the data dictionary
- Quick adaptation to new business rules without changing the codebase
- Drastically reduces CRUD development time
- Makes maintenance and application evolution easier
- Easy integration with other systems
- Supports data import/export in various file formats
This blog itself is managed through a JJMasterData form 🚀.
The biggest benefit in my opinion is combining database structure documentation with fast, no-recompile development. It speeds up understanding and improving the system significantly.
🐙 See More on GitHub
I work on this library along with Lucio Pelinson. The code is open, and you can access it, contribute to it, or fork it as needed. Visit our official GitHub repository to learn more.