Many questions here on SO ask about custom classes. I, on the other hand, have no idea what they're talking about. "Custom class" seems to mean the same thing that I mean when I say "class".
What did I miss, back in the '80s, that keeps me from understanding?
I know that it's possible to purchase a packaged system - for Accounting, ERP, or something like that. You can then customize it, or add "custom code" to make the package do things that are specific to your business.
But that doesn't describe the process used in writing a .NET program. In this case, the entire purpose of the .NET Framework is to allow us to write our own code. There is nothing useful out of the box.
Classes that you write yourself versus classes that come with the framework
The term "custom code" is generally used to refer to code you can write to extend an existing library or framework. I suppose a "custom class" would be a class that you can plug in to a library or framework, perhaps by implementing an interface or inheriting from an abstract base class.
I'd probably call it a "customization class" instead, but it's certainly not the first awkwardly-named computing concept I've heard of here.
Working with Custom Classes in dBASE, Ken Mayer, Senior SQA Engineer, January 30, 2001 at http://www.dbase.com/knowledgebase/int/custom_classes/custclas.htm
What is a Class, and What is a Custom Class?
A Class is a definition of an object -- it stores within its definition all of the properties,events and methods associated with the object (this is, by the way, 'encapsulation').
A Custom Class is a developer defined class, based on one of the stock classes (classes built-in to dBASE). A really good example of a Custom Class file ships with dB2K -- it is in the CLASSES (in Visual dBASE 7.x this is the CUSTOM folder) directory, and is called DATABUTTONS.CC. We will briefly look at one of the buttons defined in this class file, but most of the code we will look at will be a bit different than what's defined here.
Microsoft uses the term "custom" in its documentation for any extension of its supplied libraries.
If you wanted to extend a ListBox
you would create a "custom control". If you wanted to extend a Timer
, you would create a "custom component". Extend the DataTable
, create a "custom class". They have done this for a long time. The earliest reference I can remember is the Visual Basic 5.0 manuals, which I think was 1996/1997.
There were "Custom App Wizard" projects, "Custom Business Objects in RDS [ADO]", "Custom Click Events", "Custom Properties in SQL Server MDX", "Custom OCX Controls", "Custom Controls with DHTML", and the list goes on and on. I estimate that the MSDN Library of October 2001 has over 300 index entries starting with the word "custom".
The only thing that makes sense to me is either extending an existing class in a framework or library or something, or simply writing a class in an otherwise boilerplate code solution??
Excellent question!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With