Someone mentioned fluent programming recently.

Someone mentioned fluent programming recently.

Breaking code of the day after the ORM got out of sync with the DB and many lines of manually typed code needed to be updated.

  (Application.MainForm.ActiveMDIChild as TMyForm).AutoFillNewOrderTab(OrmGeneratedDataSet.FieldByName(ConstFieldNameOrmGeneratedFieldNameW).AsString,
    OrmGeneratedDataSet.FieldByName(ConstFieldNameOrmGeneratedFieldNameX).AsInteger, OrmGeneratedDataSet.FieldByName(ConstFieldNameOrmGeneratedFieldNameY).AsInteger,
    OrmGeneratedDataSet.FieldByName(ConstFieldNameOrmGeneratedFieldNameZ).AsFloat);

A few of the error messages:

[DCC Error] MainForm.pas(210): E2010 Incompatible types: 'TObject' and 'string'
[DCC Error] MainForm.pas(211): E2010 Incompatible types: 'string' and 'Integer'

Comments

  1. I don't understand why your ORM is generating datasets... It's not an ORM then. And what this code has to do with fluent programming?

    ReplyDelete
  2. Agreed. It's just plain old dataset statements. Unless we're now regarding any line with more than one dot-expression in it as "fluent", which I don't believe is either accurate or relevant.

    ReplyDelete

Post a Comment