#1 2017-06-30 17:32:49

rballz
Member
Registered: 2016-03-22
Posts: 5

Breaking Up The Big Ball Of Mud

I know the docs show some ways to use mORMot in legacy code, but I was wondering:

Has anyone used or have begun using mORMot to refactor a huge legacy code base with any tips / direction?

Anyone due consulting for pay on this sort of thing?

It's very hard to figure out where to stop.

99% of data access is via TTables (With nexusdb), all ui mixed with business logic.  Every single issue you would expect from legacy Delphi done wrong smile

Offline

#2 2017-06-30 18:08:42

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,240
Website

Re: Breaking Up The Big Ball Of Mud

RAD was not wrong, it was fine for its purpose.
But mixing UI, logic and DB has been identified to be a factor limiting the project maintainability and expansion.

About general code refactoring, see https://www.slideshare.net/ArnaudBouche … conference
Idea is to identify software "seams", then encapsulate them with SOA and publish them, and also include testing.

There is a lot of practical steps in this presentation.
Also some general rules, like "don't rewrite everything" or "always add tests".

Offline

#3 2017-06-30 18:39:28

rballz
Member
Registered: 2016-03-22
Posts: 5

Re: Breaking Up The Big Ball Of Mud

It's mostly a huge datamodule and all data aware controls.  There's almost no classes and hard to ID seams.

So I was thinking of breaking the huge datamodule into smaller, then refactor what each micro datamodule touches into eventual SOA pieces?

Offline

#4 2017-06-30 19:18:21

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,240
Website

Re: Breaking Up The Big Ball Of Mud

Yes it is a good idea to start from the db in such cases.

Offline

#5 2017-07-03 20:19:31

leus
Member
Registered: 2012-09-05
Posts: 79

Re: Breaking Up The Big Ball Of Mud

This is the most important topic for mORMot to really take off, in my opinion.

Offline

Board footer

Powered by FluxBB