Introduction

What is DesiGen?

DesiGen is a design and code generation tool. This application is intended to help developers using agile methodologies to design the solution for their dev tasks, and from that design generate some of the code needed to deliver the solution.

DesiGen is a little bit like of the CASE tools of the 1990s, but with some important differences. Firstly, the application is intended to be simple and lightweight. The user interface is intended to be easy to use, and require less up-front learning of new design or modelling techniques - specifically, there is no need to learn or use UML. Secondly, there is intended to be no vendor lock-in.

You should be able to get up and running with DesiGen quite quickly. Since we have avoided the lock-in of other tools, if you do not find it valuable then you can just stop using it again.

There is very little to lose. Why not give it a try?

Why Use DesiGen?

DesiGen has been developed to enable development teams to move quickly without feeling like they have to cut corners. It does so by bringing together two industry best practices under one roof: design and code generation. These techniques are the dynamic duo of the development world.

Each of these techniques is valuable, but bringing the two together helps challenge people's fears of each. Some people fear that design will take too long, but the tool intends to dispel this fear. Have a look at one of demo videos for an example of how fast it can be; as you will see, the use of code generation buys back all of the time spent doing design. Some people are concerned that code generation is too inflexible, or takes too long to customise. DesiGen is simple to use and extensible to suit your needs.

Thinking is one of the most valuable things that a development team can do, but is so often undervalued by the team and their managers. Optimising the time that can be spent thinking about important aspects of a solution by speeding up those that are less important helps a team to do much more valuable work.

DesiGen also encourages the completion of a lightweight risk assessment as part of the development process. This can help the team deliver more secure software - an area in which the industry is currently struggling. Data breaches are all too common, and the lack of secure thinking in development teams is a major contributor to this.

If you want to move quickly, do the right work, create a codebase that is open to change and offer security to your customers, then DesiGen is for you.

What is Design?

Design is thinking. It is the process of thinking through the solution to the current task or problem and planning what will be delivered.

Good design starts with identifying the possible solutions to a problem and choosing the best of the available options. There is almost always more than one solution to a given problem. By taking a few moments to identify the possible options and reasoning about which is the best for the given situation, we can avoid doing work that needs to be redone at a later stage.

Once the most appropriate option has been chosen we can then consider what items are needed to fulfil the solution, considering which of the patterns we use will best deliver working, reliable and maintainable code.

Why Do Design?

Thinking about the code that is needed is an important first step in development. A codebase has value and that value is much greater when the codebase is easy to change and enhance. Code that has been built after thought is much better structured than code that has not. It may also work better.

Whilst it is always tempting to dive into coding straight away, this is almost always a mistake. It is common for a developer's first attempt at solving a problem to be based on an incomplete understanding of the problem at hand. This often leads to the first code written to be a poor solution. Often, the fist code is thrown away, or changed dramatically. Whilst it can be fun to make the necessary changes, it is not very efficient.

It is possible for a good developer to come up with a good solution without doing design, but it is almost always less efficient than designing it first. If the design process is lightweight and streamlined, it is quicker to do a bit of design first than to try to code straight away.

Design also offers an opportunity to step back from the proposed solution and consider the risk of the changes being undertaken. This risk management strategy is a valuable tool in improving the security of the system being developed. The development of insecure systems is a huge problem in the industry and is worsened by teams having no security gate in their development process - a point at which a developer is challenged with the question "Is this a secure solution?"

More information on agile software design and its benefits can be found at getdesigning.dotnotstandard.com

What is Code Generation?

Code generation is the creation of code using a tool. Code generation is performed by combining
a predefined template with a model which describes attributes of what is to be generated.

Code generators can generally be divided into two categories: active and passive. An active code generator is able to regenerate code without losing any customisations applied to the previous version. Whilst this may sound like the holy grail of generators, active generators generally impose limitations upon developers in terms of the types of customisations that can be made. These limitations can restrict how you can use the created code, resulting in frustration.

DesiGen is a passive code generator. There is no attempt to preserve customisations. This makes the code generation process much simpler, and avoids any restrictions in what you can do to the generated code. However, DesiGen makes code generation repeatable for code that is not customised, offering a little of the benefits of both strategies.

Why Use Code Generation?

Code generation can offer a number of important benefits over manual coding:

  1. Speed. Code generation is almost always faster than writing the same code by hand.
  2. Consistency. Generated code is always consistent with other code generated from the same templates.
  3. Best Practice. Generation templates are a place in which the very best practices of the team can be defined, ensuring that those best practices are employed by all of the members of the team, no matter what their level of experience.

The code generated by DesiGen produces a quickstart for development of a finished solution. The output from generation is expected to require customisation. We think that a developer's experience and their ability to customise the solution always offers great value. Code generation enhances the abilities of developers by automating the bits of code that offer less value, leaving more time for the creation of the custom parts of any solution that only skilled craftspeople can deliver.