views:

66

answers:

2

Ok, so is it better to create my own components (Either inherit them from existing ones or creating them from scratch) or to use the ones that come by default?

I'm asking this under the umbrella of scalability, overhead and other factors that my contribute on each of the choices.

UPDATE: Sorry if I'm to vague. I don't really know how to explain myself better. Isn't it a good idea to inherit each default component? For example what if I'm to design a rather large application and for example i need to change the display format on a DateTimePicker. Wouldn't it better to think ahead and inherit it and use the inherited component instead of the defaults?

But, wouldn't it add a lot of overhead in small applications?

+2  A: 

I don't think your question has a certain answer - it depends on the functionality that you need. If standard components fulfill your needs then I don't think creation of your own components makes sense.

Andrew Bezzub
+2  A: 

This is a difficult question to answer, and may get closed as subjective. It depends on what you are doing, and whether the supportability of scaling it over an existing component is less than that of wrapping a whole new component (inherited or not) and all the entailing support work.

For instance, suppose we have a textbox where we always want to have the text be green. We could just set the font property for the textbox and be done, that would be simple and straight forward, and not need a custom component. However, what if we wanted it to always be green, not be changeable and be enforced regardless of what might be put into the textbox? That would require more code and a certain amount of design work in the app, or we could create a custom component to do this work for us, and have it appear as a textbox to everyone who implements it. Simplifying the deployed code in essence (by hiding it inside the control) and making the overall design cleaner. If we only need this textbox in one place, it is probably overkill, however if this textbox is pivotal to our app it might be worth the time.

GrayWizardx