Best practices for custom web parts

We are in the process of implementing an enterprise application that is going to be hosted in Kentico. We will have a database structure consisting of multiple database tables with one to many relationships. The in house Kentico developer suggested we use custom tables option to generate the database tables.

I would like to know what would be the best practice for setting up a back-end database tables?

From my research, if we use custom tables option, we won't be able to use Linq queries while .NET Entity framework will work perfectly with Linq. Also we are required to use TDD so we need to implement clear separation of data layer and business logic.

I would like to know what would be the best approach for such a situation.

Correct Answer

Although Roman has already said that. We recently are heavily banking on custom modules to implement a lot of relational data and have immensely benefited from a lot of features that it does provide.

A Quick way to build relational data. Of course not as flexible as real DB however once you get past the required learning curve, spinning up custom modules will be a cake walk.

You will also be able to have versioning control on your data if you do care about that will not be possible with Custom tables. CT are too bland.

Kentico will generate and of course you will have to press the regenerate button to generate code for Info and Provider classes. This will give you a robust boilerplate code that could be useful at other places.

Most Kentico will provide REST API on top of your Custom Modules data that makes providing this data to other teams just too easy. We do this a lot. It's hassle free.

Cons

Learning curve is high. You will have to bang your heads for few days before things will fall into place. Martin Hejtmanek, Kentico's CTO has an amazing lecture series on this which I found better than the documentation. I am providing you with link to the first article of the series. You can follow links to read all other artciles of this series.

We have faced a lot of problems moving data from one server to another while using Custom Modules. We faced a lot of problems where keys end up not matching and also using staging service for CM data. Just a heads up.

Regardless of everything we are banking a lot on CM this year to architect things we did in nascent stages between 2013-2015. We are really liking it.

P.S - We have done 10+ CM implementations as of now across different projects.

From my research, when you create custom modules, the object classes are generated for you within the Kentico solution. Can these data classes be moved to a different project? We are required to use TDD so we need to have a clear separation of the data layer so we can write tests on the data access.

Also any particular reason for choosing custom modules/Object Query over manual tables/EF?