How is M# different from Code Generators (e.g. Iron Speed)?


Iron Speed Designer, like other similar Code Generators, transforms a database schema into a basic application code for CRUD operations (Create, Read, Update and Delete).

It is a competitor of many similar tools out there including: 

  • Code Smith
  • LLBLGen
  • Code On Time
  • Telerik OpenAccess ORM
  • CodeCharge
  • ...

Such tools can give you a quick way of building basic data management applications with very little business logic. However they are natively agnostic of business rules when it comes to understanding or handling complexities of real world transactional applications.

Serious applications are way beyond CRUD. They have or need:

  1. Workflows
  2. Multi-user security and complex rules around visibility or ownership of data
  3. Business rules and logic
  4. Complex user interfaces mixing several types of entity types involving multiple database tables and non-database types.
  5. Customised and design-driven look and feel
  6. Integration with other systems
  7. ....

Iron Speed and the like, are simply driven by database tables and views. If you want to do anything interesting, you have to shift your core business logic layer to the database (in the form of SQL Functions, triggers, etc) which in effect means that you will lose all the good stuff that .NET can give you out of the box.

When you decide to use them, you will inevitably have to face the following problems:

  • Can't use proper business logic layer in C#
  • Can't use object-oriented programming
  • Lose static type checking (as your business logic will be written in T-SQL)
  • Can't do unit-testing and Test Driven Development
  • Can't define your customisations natively. You will have to override hundreds of hard-to-learn methods in each module.
  • End up with a messy source code, full of bits of unused generated code.
  • Ugly control names in the generated markup and C# code.
  • Every change in the database structure will make your custom code (method overrides) incorrect as they will be hard coded to the old names, structure, etc.
  • Scattered business logic, which will be partly written in the database and partly in the modules.
  • Non-standard, proprietary controls and components used in the target code.


Furthermore those tools create other problems which are not exactly of a technical nature, but very important for the business.

  • Developers don't enjoy using forms-based development tools.
  • They can't apply TDD, design patters, and other things they WANT to do which they code take pride in.
  • The generated code will be a nightmare to maintain without the original Code Generator tool. Clients don't want to absorb that risk.
  • It will take a lot of time to learn these tools, thus adding to the overall cost.
  • Due to their messy nature of programming, they kill the sense of quality and joy of programming.

How will M# solve these problems?

M# gives you a high level programming language with which you can define any structure, behaviour, logic, look and feel. Where the intended logic is beyond M#, you will be able to use C# to fill the gaps, without leaving M# or without having to manually modify the generated code. So you can keep building, changing, and regenerating the code and get absolutely every thing done from within M#. That makes M# architecturally a "language" as opposed to a "Code Generator" in the conventional sense.

  • The generated .NET code will be clean, object-oriented, based on best design patterns, and a joy to look at and work with.
  • The generated code will be always displayed side-by-side next to the M# code, so the developers will feel at home when programming using M#.
  • It encourages TDD and gives you a first class support to do things the right way.
  • Your business logic layer will be well written in C# based on good object-oriented methods.
  • No proprietary controls will be used, just standard .NET and jQuery plug-ins.
  • It's easy to learn and feels very natural to programmers.
  • Naming conventions will be clean. All control names will be automatically updated when you change things.
  • You get Intellisense when writing custom code.
  • ...

After all, your will find M# several times more productive than the likes of Iron Speed when you start using it.