No one has answered RenderMan yet so I’ll open a parenthesis for him now then continue with TheMaster.
A namespace is an organize way to store information. You may see it as folders. Like folders, they can be organized with a hierarchy (many levels). They may contain objects such as classes, structures, enumerations, delegate function and so on. On the other part, classes are complex objects that contain data, functions, events and so on. You may see them as a file. A structure is a special case of class as they essentially contain only data and they do not support encapsulation. Like a directory, a namespace is a container and could contain all the above objects; they do not have to be in a class (although Autodesk usually organize them in classes).
If you open the arxmgd.chm file from the C:\ObjectARX 2013\docs directory, you’ll find a section called “Moved API”. In there, you will find a list of all the objects that have been moved. The first item is the EventHandler Idle. It is mentioned that it has been moved from Autodesk.AutoCAD.ApplicationServices.Application to Autodesk.AutoCAD.ApplicationServices.Core.Application. The class here is Application and everything before is the namespace.
So, to answer your question, AutoCAD.ApplicationServices is indeed a namespace and Application is the class.
If someone likes to play with words, yes you can always say that if you move a file from a disk to another, it is not the same file anymore and so, if you move a class from one namespace to another, it is not the same class anymore. I don’t think anyone has being confused up to now.
Here is a modified PrintSCreen of the Object Browser that you can open with the F2 key. In the left pane, you’ll find symbol names with their respective icon, on the upper right pane is the content of the symbol and finally, in the lower right pane if the definition. I’ve used Visual Studio 2008 for the example because it is a version I own in English.
To return to TheMaster, I don’t want to extend this discussion about whether or not I’m confusing classes or namespace because I find this trivial but:
- There were absolutely no link between the image and the declaration you’ve used.
- Kean and I were absolutely correct when we stated that some declarations have been moved from one namespace to another. You can always read the arxmgd.chm file or continue that topic on Kean’s blog.
- I didn’t realize that you’ve mentioned that the Open method is an extension. Sorry for the delay. This is something that we have to talk about.
- I’ll be very glad to talk about other subjects then confusing namespace and classes since I feel that it is a privilege to be able to exchange idea on this site.
Here is a first quote of yours: “The Open() method is an extension method in 2013, but it is
not in a different namespace. It would seem that the author has namespaces and classes confused. » and this other quote: “If you are not familiar with extension methods (as your article clearly suggests), then visit MSDN and read more about them, and how they are used.”. These are 2 misleading affirmations that I’m sure I’ll take time to analyze.
About Extension method, please first, read this link to learn more about them:
http://msdn.microsoft.com/en-us/library/bb383977.aspx.
Extension methods have been introduced in C # 3.0 as a solution to allow the mapping syntax to run correctly with LINQ IEnumerable, without having to change the IEnumerable itself (which would cause enormous problems existing code). Unfortunately if they are convenient for this case (and are actually the best solution), 95% of cases, they pose serious problems of versioning, and should be used with extreme caution. Extension methods are also mainly aimed to those who do not currently own the source code. I don’t think that this is the problem at Autodesk.
In my article, I was not talking about extension methods but rather about new things in AutoCAD 2013, and indirectly what’s new in the Framework 4.0, hence the Managed Extensibility Framework (or MEF).
Many of the Microsoft’s technologies overlap. Sometime, it happens when a new paradigm arises. But they are never 100% equal. According to Glenn Block (PM for the MEF in .Net 4.0) MEF is the preferred way for building composable apps.
Again, to avoid confusing technologies, I suggest learning about: