views:

418

answers:

6

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 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.

+11  A: 

Classes that you write yourself versus classes that come with the framework

thekaido
There is even an extremely old MSDN vba article teaching you the benefits of writing your own "custom classes" http://msdn.microsoft.com/en-us/library/aa164936%28office.10%29.aspx (and yes this link is a joke)
thekaido
This is the part I never really understood. The Framework doesn't actually _do_ anything. Without "custom classes", nothing happens. So why even make the distinction?
John Saunders
Maybe "custom" is used in a context specific manner. They are "custom" to the application you are building. Or its just semantics.
thekaido
A: 

I'm tempted to make a joke but instead I will put in a serious two cents; People are used to making customizations -- when it comes to programing they must want a custom class.

Hogan
+2  A: 

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.

Aaronaught
Yes, I think the important point is that it tends to mean that the class is focused on adding implementation (not interface) to a body of code that it is not a part of. For instance in Swing a custom `TableModel` would implement `TableModel` but, unlike `DefaultTableModel` not be part of Swing or the JDK.
Tom Hawtin - tackline
+1  A: 

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!

John Weldon
A: 

I guess it is similar to custom code.

fastcodejava
And, do you have a definition of **custom code**?
John Saunders
Good point, nicely put!
fastcodejava
+2  A: 

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".

AMissico