I'm rather confused on when i would use and what the following libraries( of frameworks[not sure what they are] ) would be used by a programmer. If anyone could please give a simple understandable definition i would greatly be appreciated.

ATL
MFC
COM

pretty much when would the following be used by a programmer and in what situations?

MFC and ATL are both pretty old libraries that wrap win32 api functions. Neither are recommended for new programs. In c++ use Windows Forms and .NET franework, or more commonly called CLR/C++. I wouldn't bother learning MFC or ATL until you work for a company that has existing code you need to maintain. There are a number of books on the market that explain them, and the learning curve is pretty steep. If you are using VC++ 6.0 -- stop right now because that compiler is very old now and not very compliant with c++ standards. It also knows nothing about .net. Uninstall that compiler and get vc++ 2010 (the Express edition is free, but does not support either MFC nor ATL).

COM is often used to transfer data between applications and client/server. There are other ways to do the same thing such as sockets. For in-depth description you will need to buy a book.

Let me expand a little bit on this.

COM (or Common Object Model) is essentially a "plugin" system. There are many variations or extensions to it, but the basic principle is to have a solution for the problem of interfacing Object-Oriented code, possibly programmed in different programming languages, distributed across different modules (exe or dll), and even different computers (client-server). It is a set of standards to define how to publish a public interface of a class (in the OOP sense) with set/get functions for data members, and member functions. It is, of course, more elaborate than that, but the point is that it allows you to compile a class (referred to as Object Model) with a COM interface, and then it can be reused by other applications without recompilation or the need of header files for it. It was a nice idea and has been a largely successful project (often cited as one of the best things Microsoft ever came up with, from the point-of-view of a programmer). Today, it has a large amount of legacy code and is still used a lot, but it is a low-level thing that isn't really important for a beginner to get acquainted with (if fact, I have never learned to use it either, because it is not that important for main-stream programming). There are also many extensions to it, the most notable being ActiveX (which you have probably heard about too).

ATL is another light-weight library that simply provides ways to create COM components in a way that abstracts away the low-level details of setting up a COM interface. It just makes COM easier to use. COM components can be used to write commercial library components (it is not really useful in the world of open-source since the source can just be recompiled for each new kernel changes). For example, I have seen automation engineering companies who would develop their control software for an automated manufacturing plant as COM components, that's just one example.

MFC is a wrapper for the Win32 API. It is basically an object-oriented GUI library for making Windows applications. It has never been much appreciated by programmers, as far as I know, and it is now outdated. I wouldn't learn it unless you have to, i.e., you have a job that requires you to use it.

Today, Microsoft has decided to move away from all of the above. They are now focusing on .NET which replaces the need of using COM by making everything run on the .NET platform natively, meaning the "object model" is common to all programs by design, since they all run on the same platform. ATL is not required either, obviously. Similarly, GUIs can be designed in WinForms. .NET is also a platform with memory management, so plain old C++ doesn't work with it. It requires that you use managed programming languages like C++/CLI (or Managed C++), C#, F#, Java, etc. In some sense, .NET is similar to Java's virtual machine or run-time environment, they are heavy-weight software platforms that run on top of the OS, which is a flawed concept to start with, in my opinion (micro-kernel concepts are far superior if you ask me).

what is most popular language to program on .net currently?

>>what is most popular language to program on .net currently?

Well, that's not really related to the thread, but I would say it is C#, and then, C++/CLI. And wikipedia seems to agree with me, for what it's worth.

thanks mike_2000_17

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.