Sunday, September 6, 2009

A quick analyze of the MFC evolution

Let’s have a look to see what the tool CppDepend shows when comparing MFC 2005 with MFC 2008 ones. I will use a few CQL Queries to get fact from the code base of the Framework.

A view of the work achieved

SELECT METHODS WHERE CodeWasChanged OR WasAdded

The following treemap shows in blue, new methods (i.e WasAdded) and methods that have been refactored (i.e where CodeWasChanged). A rectangle represents a method and the size of the rectangle is proportional to the size of the method (in terms of Code Line ). It is pretty impressive to see that a big part of the framework is still evolving.



The Info panel of CppDepend shows that MFC 2008 is bigger twice than MFC 2005



New Types

SELECT TYPES WHERE WasAdded

367 new types added including:

• Menus
• Toolbars
• Panes
• Ribbon Control
• Outlook Alert
• Controls
• Dialog Boxes
• Customization
• Visualization





New Namespaces

SELECT NAMESPACES WHERE WasAdded



Only 1 namespace was added it contains classes to integrate Winform into MFC.

Methods where visibility changed



Only the visibility of the CHtmlEditCtrl destructor was changed from protected to public.
It was a design bug in MFC 2005, you can discover here why it was problematic.

Types Removed



All classes relative to ISAPI were removed; it’s a break change that can be very embarrassing for developers who used them before.

Conclusion

The major evolution of MFC includes a new types to support modern user interface (UI) elements such as the Office Fluent UI, docking windows and MDI tabbed windows similar to those used in some releases of Visual Studio, enhanced toolbars, a rich new set of controls, support for controlling the overall visual style, support for desktop alerts, and much more.

but no big changes concerns the MFC design,it's true that MFC now use more manager classes as controlers than before



but the design of the new functionalities still unchanged, for example only one namespace is added.

No comments:

Post a Comment