Introduction to Rapid Prototyping
Using SilverModel you can quickly and rapidly prototype any new app ideas that you might have. By using SilverModel for rapid prototyping you can easily do weeks of work in a day.
First, we will look at the three main reasons that you would want to use SilverModel to rapidly prototype your application
- Quick design
- Generated Code
- Easily Extend
Then we will have a look at rapidly prototyping a ToDo app. Notably, even this simple application when creating a Database, Rest API and Angular front end requires more than 30 code files, which could take many days to program manually. However, these 30 code files can be created in minutes with SilverModel.
Quick Design
Using UML you can rapidly design the model that you want and then turn that model into code. Using UML allows you to focus on designing the solution for the problem in a visual layout which can then be translated into reliable code.
This helps to massively boost productivity as what can be designed in minutes with UML can take days or weeks to write in code.
It is a lot easier to spot design issues when looking at the model, as all the architecture is right in front of you. With code (rather than a UML model), an issue can easily be hidden in a different file that you never notice.
You can quickly design different solutions for your software and test them out, as it is very quick to add and remove classes and relationships on the model.
Generated Code
Most apps are full of thousands of lines of plumbing code. That is just code that is required for you to be able to take data from the web client to the database. e.g Database to REST API, JSON serialization etc. Writing this code is extremely time-consuming to write. SilverModel can create this code from your UML models in seconds.
They say that a picture is worth a thousand words. In this case, the UML model is worth a thousand lines of code!
Easily Extend
Once you have your base model in place, you can easily add more classes to the model and with the click of the button, create all the files you require to support the updated model. All the database, API and web client code to support the new model will be created for you.
When using SilverModel you can delete any unwanted code or modify the output as you require. It is extremely flexible. The power of using SilverModel you have the bulk of your code generated for you, to get you off to the most efficient start to the project.
Example: ToDo App
Let’s look at an example of creating a to-do app that will use a Database, Rest API, and Angular.
First, we need to create the UML model for the to-do app.
The above diagram only took five minutes to create. Using UML is a quick and effective way of modeling your apps.
This model allows us to create users and assigns those users tasks. Also this help to demonstrate parent-child relationships in UML and code generation.
Once we have created the model we will need to choose the code generators for the code we want to generate.
In this case we will want to choose the Entity Framework, Web API and Angular code generators.
When we press the “Generate All” button SilverModel quickly creates the files which we can then open in Visual Studio
Then we can run the application
The source code for the Todo app is on Github at https://github.com/Silverdawn/Todo-Sample-.NetCore