Since I have not prepared a tutorial for Paladin *Guilty Look*, I guessed I will just post some tips and tricks whenever I am free. Hopefully, as time goes on, they can be compiled into something useful. Today, we will be looking at Preserving Code Changes in Paladin.
I will presume that you are using BEWizard, the code-generator that comes with the framework to generate the foundation codes. The immediate problem that you will notice from this tool is that it regenerates all code files everytime you run it. While, this maybe acceptable if we do not make any customizations to the code files, it can be very frustrating if we do.
I'm sure everyone of us will add in our own custom properties, methods and other codes into the Entity classes that were generated. And everytime, there is a change in the framework or our database, we will need to copy-and-paste back our changes.
Therefore, to remedy the problem or to reduce the effort required to restore the custom code, I have came up with this implementation strategy. When you first create your classes using the BEWizard, select Inherited Implementation in the Choose Implementation Method step. If you are not sure on how to get this, check the Standard Classes and Base Classes checkboxes in the Implementation Options.
This will effectively cause BEWizard to generate the framework implementation code in Base classes while leaving you with empty class files for your own implementation. You can then implement all of your custom code in this code file (or class).
Subsequently, when you need to regenerate the foundation code (in the event of database changes or a new framework release), select Base Implementation in the Choose Implementation Method step - achievable by unchecking the Standard Classes checkbox in the Implementation Options. BEWizard will then regenerate the Base classes only and leave your custom code in the inherited classes intact.
I hope this tip is useful to you. If you have any questions, please feel free to post them.
Home »Unlabelled » Paladin.Tips.&.Tricks.#1
Popular Post
-
H ave been trying to download Office 2007 Beta 1 Refresh for the past few days but the line traffic condition was so bad. With just below 10...
-
Check out new Tiger Baby single Landscapes ...taken from the band's new album Open Windows Open Hills . Predictably, this is catc...
-
Is it Hunting Season again? Everyone I know seems to be looking (or have looked) for greener pastures nowadays. I was so surprised to find ...
-
Time to leave the bad stuff behind, so here's the wonderful new video by Acid House Kings for their absolutely wonderful single Would Y...
-
M y Streamyx was down for approximately five days. The technician told me that it is a problem with my port over in their headquarters. Acco...
-
The Uri (Namibia) Uri. From the Namibian word for "jump", this extremely able 4x4 is perfect for the real off road path. Made in N...
-
T eam Foundation Server has finally shipped! This completes the Visual Studio Team System family. Incase you are unaware, Team Foundation S...
-
When working with the process templates in Visual Studio Team System (VSTS) , we are offered a choice of two comprehensive templates - MSF f...
No comments:
Post a Comment