Is C# output required?

  • ted creedon

    ted creedon - 2006-11-09

    I'm using MyGeneration, ME Enterprise Library DAAB and EasyObjects to generate sql queries and C# Objects directly from the Norma designed database.

    It isn't clear what advantage EasyObjects or C# from Norma have over each other.

    Any guidance is welcome.

    • Tyler

      Tyler - 2006-11-09

      From what I've seen from a -very- cursory glance at, it's an Object/Relational Mapping tool.... the "other ORM".  So here's the deal:

      Object/Relational Mapping (O/R-M)takes an existing database and creates a data access layer.  I'm sure you're well aware of this, since you use it!  The key point, I think, is that an O/R-M tool can only express what it sees in the database.  In fact, there may be triggers or sprocs in the database that create constraints which the O/R-M tool cannot account for.

      Conversely, an Object Role Modeling (ORM, the "true ORM" ;-)  ) tool such as NORMA is designed to use the conceputal model as the basis for all generated databases or data access layers.  Or web services, user interfaces, etc., etc.  How far the generated code supports the conceputal model depends on the transform you're using.  Since I'm not in a position at the moment where I'm doing any .NET, I haven't seen how well the generated C# is in NORMA.  Somebody who's active on the project would be better to answer that question.

      So which is better?  EasyObjects might generate a more robust data access layer at the moment.  If that's the case, I'd say continue enterprise development with that.  If the NORMA transforms suit your needs, it might be worth your time to use those and give feedback to the NORMA project on bugs or requested features.  There's a whole lot more that you can do from a conceputal model than just database I/O, and getting familiar with the process could be very useful to you.

      -- Tyler

    • ted creedon

      ted creedon - 2006-11-09

      Are concrete classes supposed to be created by Norma to implement something like Patient.LoadAll?

      Or the only .cs files Abstract.PLiX.cs, Implementation.PLix.cs and Support.PLix.cs?

      I'm trying to create a class that can be used as a DataSource using NORMA_Lab1.ppt as an initial project.


      • jbriggs

        jbriggs - 2006-11-13

        The code gen from the NORMA tool generates an abstract factory that you have to reference and then create your objects. We do all the validation, for the constraints you specified in the ORM model, in the implimentation classes that are generated in the one file.
        For example... 'Each Person has exactly one FirstName' in C# you would create a Person like this:
        Person jaron = ModelName.CreatePerson("Jaron");
        Where ModelName is the name of your model. The FirstName is mandatory and unique and this is all validated in the factory before the object is created.
        There are a few options for hooking up those object to the generated database.
        Currently there is work being done to generate a data access layer on the fly. This is available if you download the source and run FirstTimeBuildAll.bat. There currently are some issues being worked out in the DAL generation.
        Right now the in memory implimentation (Abstract Factory) is all that is available if you just installed the bits and not the actual source.
        If you choose to stick with the in memory implimentation you would have to create your own DAL to store your data in a database. - Jaron


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks