Rank: Member
Joined: 8/8/2008 Posts: 7 Location: paris
|
Hello, I need to add some informations on gallery and album. Is it possible to do that without breaking gallery server pro and continu to have benefit of updates ? I think about the .net authentification system. storing all in 1 field in xml format ? after you just have to add in your web.config the description of the field you want to add... Thanks in advance,
|
Rank: Administration
Joined: 8/3/2007 Posts: 847 Location: Fort Atkinson, WI
|
There is no simple way to modify the code while making it easy to integrate with future releases. You could go the XML route as you suggest, but I am not a big fan of that, as then you have to parse it, and it can be difficult and non-intuitive to access.
Consider creating a new interface and adding your functionality to that. For example, instead of adding a property to IAlbum, create a new interface IAlbum2 that implements IAlbum and add your property to that. Then make the Album class implement IAlbum2 instead of IAlbum. That shouldn't break any existing code, and then in those places where you need access to the new property, just make sure you cast the object to an IAlbum2.
Similarly, you can create an IGalleryObject2.
Roger Martin Lead Developer for Gallery Server Pro
|
Rank: Member
Joined: 8/8/2008 Posts: 7 Location: paris
|
Thanks for that nice solution. For the moment, I just use an intermediate table (which it use for the datarelation) and store additional information about the gallery in it... I really don't want to brake your nice code ;-) (if I use your code, i need to completly understand it and i think it's a bit long...) Thanks for your answer.
|