Code generation dependency of Inertia and Momentum

Aug 15, 2013 at 7:11 PM
Hi Serena, both Inertia and Momentum depends on Sql Server, i was thinking that maybe you can remove that dependency for Inertia, shared business entities are very simple, its possible to do the Inertia code generationg taking as source any Entity Framework Model ?

So for the ones that dont use Sql Server, still can use Business Entity generation.

Any chance to put "code hooks" into code generation to do more "personal" code generation stuff ? I already read that you cant release source code :(

Awesome job girl.

Aug 16, 2013 at 12:53 AM

Both Inertia and Momentum use the SQL Server Management Objects (SMO) to read database catalogs and schemas. I have some ideas to develop an Entity designer tool but due to my limited skills in graphics programming, I was not able to develop something that cool :(

Momentum is designed to read from database and therefore cannot support reading from Entity Framework. It was intentionally done in that manner so that the database specific details (i.e. table names, column names, keys, relationships) do not need to be coded into the entities. For Entity Framework support, LASG can only be used from Motion (BC) and above.

I foresee that support for Entity Framework will not be a focus in the near future (depending on available time) as I find it too slow and inflexible for my applications. More focus will be given on building the automation for the current stack of technologies first.

There are thoughts on allowing customized Templates to be fed into the code-generators but somehow, I couldn't figure out how to execute T4 templates in an external assembly. If I can do that, then perhaps the idea of having customized templates can be better materialized :)

Thank you for your support!

Aug 16, 2013 at 7:16 PM
Ok, thanks, let me switch the point of view, given that i have the whole business data in some Informix database, and lets say i want to use your architecture (sample) as basis for a new application and take advantage of your code generation tools, how do you think i should proceed ?

My current idea is:
Generate the Entity Framework Model from the DB, manually build and code all shared entities and DAC classes (lot of prone error work) then i can use Motion code generator and continue with the upper level things. There is a better aproach ?

Also, for the cross-cutting concerns, should i be ok if i use Enterprise Library ? last version ? with Unity for dependency injection of these concerns?

Hugs to u too.
Aug 19, 2013 at 1:40 AM
Yup, the recommended approach when using LASG with EF is to target at BC level and upwards. If you need to see a reference implementation, you can check out the layer EF samples in Most likely if I build any automation, I will build it looking like that.

You can use Enterprise Library or any other frameworks that you wish :) However, I'm not sure if Enterprise Library supports Informix. You may need to do a little research on that though.

Aug 21, 2013 at 3:56 PM
Edited Aug 21, 2013 at 3:59 PM
Ok, thanks i started from the layersample to reach the codegen tools.

The concerns im interested is validation and securty, we already have logging tool, ill see how it goes, about Informix i already have a lot of experience making ms tools work with it :S