English 中文(简体)
Using constant fields vs initial data
原标题:

I m designing some new class diagrams for extending an existing office automation application. In a special case I have an option to use extra fields on Entity1 to determine something or use additional data rows in Entity2 to determine that. I believe first approach is better because it does not force us to insert initial data while deploying our application in new installations but the BOSS insists that the second approach is better because it injects no change into current class diagrams (Entity1 and Entity2 both exist now and are in use).

I m wondering which one is really better and if I m right, so how can I convince him that my approach is better?

UPDATE: In the following class diagram, SendingInforamtion is Entity1 and LetterStatus is Entity2.

class diagram http://www.freeimagehosting.net/uploads/dddc2e0f51.png

[If image is not visible try clicking here or here

最佳回答

It is really hard to say for certain without seeing the whole program, knowing the whole situation, and knowing the intended implementation. Having said that if I remember right one of the key points in object oriented programming is the creation and re-use of objects. If there is a way to reuse the existing entities (if I am understanding the question properly) than I believe that may be the most cost effective way to go about solving this problem. Also you have to look at where else the two entities are used and how any changes to this code would effect their other uses. Hope this was at least a little help for you.

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签