Using Model First Design to improve your development productivity
Do you want to be able to create 10’000’s of lines of computer code in an hour? With Model First Design and Code Generation you can! I will give some examples and explain some of the key concepts in this article.
Model First Design Project Examples
An invoicing project that I am currently working on took one hour to design with Model First Design tools. This design then created the first 17000+ lines of code for this project. This following list is part of the code stack SilverModel created.
- Database
- Rest API
- Angular Site
- Mobile Apps(iOS and Android)
How long would it take you to create 17,000+ lines of working code? More than an hour? This is a simple example of the power of Model First Design.
With another existing project I imported the Model from the code. Then I was able to create the first 100,000+ lines of code I needed for my new Mobile and Web Apps. This only took a few minutes to do.
The time savings for using by Model First Design and Code Generation are amazing. We don’t write our code using assembly language anymore because it’s way too slow. You can get the same boosts by moving to Model First Design
from C#, JavaScript etc.
Sample Application Architecture
This is a diagram of a sample web applications architecture and what code can be automatically generated using Model First Design.

The blocks of code in blue are the easiest to automate the code creation for using Model First Design. SilverModel currently has code generations that will create the code blocks in blue for you. So with the use of Model First Design Tools you can build models that will create the core of your application.
For blocks of code in orange I am working on design tools that will model more advanced logic too. There is a lot that can be done here(even with the current version of SilverModel) and I will follow this up in future articles.
Where to start with Model First Design and Code Generation
When getting starting with Model First Design and Code Generation these are the easiest places to start with:
- Database
- View Models
- Translations Models
- Serialisation Code e.g. Json to C# Objects
- REST API
- Forms (Web and Mobile)
- etc
As you can see there are lots of places to start with. A great place is your database layer as everything builds from their.
So what other benefits are there from Model First Design
- Output the code in the language of your choice (e.g. JavaScript, C# etc)
- Robust code
- Fix issues once and roll out changes to all affected code.
- Add new features quickly e.g. Add Extra Logging to Rest API calls
- Automatically create Unit Tests
Model First Design does have a small learning curve but once you get started you will quickly find lots of areas to automate the code generation for.
The more code you can generate the more flexible the application will become and the more your productively will increase.
If you need to move from a Database to a Key Value store. No problem, just write a new Code Generator. See our sample on GitHub that does exactly this. How long would this take you manually? In the above sample it was just a few clicks of the mouse!
If you needed to move from web forms in Angular to React. No problem, just write a new Code Generator and the rest will be done for you. This method will be a lot quicker than manually rewriting the code
Getting Started with Model First Design.
First download SilverModel for Model First Design. You can download the free community edition of SilverModel to get started.
Learn about UML Class Diagrams. These provide the core functionality of Model First Design with SilverModel.
Have a look at the sample applications generated using SilverModel on GitHub.
Create your first Code Generator
Closing thoughts
My goal is to create amazing Model First Design tools so developers like you can be super productive. Download SilverModel for free today and start you journey with Model First Design.
I would love to here from you so if you have any questions please ask.