Nice things of this week

Hi all,




I have been spending half of the preceeding week coding a little usefull tool : let's say a metacode tool. How many time have you been written the same style business objects, having only accessors (getter and setter) and DAO (Data Acces Objects) functionalities changed. When you have done it twice, you are bored and you don't want to repeat it.

That's why I have stopped all personnals stufs last saturday and have written a Developer experience librarie. Let me give more details about it.


Okay first of all I have set up a basic data acces class with all necessary code to get in to my Sql server database. The tool enable me then to generate automaticcaly the objects acces and manipulations classes with respect to some little conventions. See the sample right there

DevelopersExperienceLibraries.ObjectGenerator myGenerator
= new DevelopersExperienceLibraries.ObjectGenerator();
System.Collections.ArrayList myTypes = new ArrayList();
DevelopersExperienceLibraries.TypeInformation tiIdModule = new DevelopersExperienceLibraries.TypeInformation("_idModule","int",string.Empty,true,true);
DevelopersExperienceLibraries.TypeInformation tiCodeModule = new DevelopersExperienceLibraries.TypeInformation("_codeModule","string","string.Empty",true,true);
DevelopersExperienceLibraries.TypeInformation tiIntitule = new DevelopersExperienceLibraries.TypeInformation("_intitule","string","string.Empty",true,true);
DevelopersExperienceLibraries.TypeInformation tiDureeModule = new DevelopersExperienceLibraries.TypeInformation("_dureeModule","int",string.Empty,true,true);

myGenerator.TypeList = myTypes;
myTypes.Add(tiIdModule);
myTypes.Add(tiCodeModule);
myTypes.Add(tiIntitule);
myTypes.Add(tiDureeModule);

myGenerator.ObjectFileName = "D:\\Elsam\\Internals\\GeneratedClasses\\Module.cs";
myGenerator.ObjectName = "Module";
myGenerator.ObjectNameSpace = "GBusinessDataAcces";
myGenerator.GenerateObjectAccessorsFile();

DevelopersExperienceLibraries.DAOGenerator myDAOGenerator = new DevelopersExperienceLibraries.DAOGenerator();
myDAOGenerator.GeneratorObject = myGenerator;

myDAOGenerator.DataAccesConnectionString = "server=ALAINLOMPO\\\\MYSQLSERVER;DataBase
=TrainingManagement;Uid=muGamma;password=tri_dHg64_dsj";
myDAOGenerator.IdName = "IdModule";
myDAOGenerator.GenerateDAOFile();


I hope the rendering will be nice.
It has been very usefull for me this week, enabling me to generate 18 acces and DAO classes in 4 hours. And everything was going right

Comments

Popular posts from this blog