Windows Programming Environments Jim Fawcett CSE 775 Distributed

Windows Programming Environments Jim Fawcett CSE 775 – Distributed Objects Spring 2007

Windows Programming Environments • Win 32 API: • C++ Std Libraries: • Visual Studio Libraries and Facilities: • COM Libraries and Run-Time: • ATL Libs: • WTL: • MFC: • . Net Managed Environment: – virtually all of the programming functionality directly or indirectly used in any Windows program, e. g. , I/O, windows, controls, threads, sockets and other IPC, memory management, device management – Console I/O, file abstraction, math, STL containers …, memory allocation, … – Dialog designers, thread abstraction, COM related wrappers – smartpointers, BSTRs, … – Support for component models, e. g. , definition of interfaces, management of lifetime, image packaging in DLLS and EXEs, persistence, structured storage, RPC … – Wrappers around COM that simplify its programming model, wrappers for COM types and smart pointers – Wrappers around Win 32 windows and controls that provide a light-weight GUI framework – Classes, macros, and data structures that support the development of GUI applications in a heavy weight framework – New execution model, wrapping of most of the Win 32 API, library facilities that cover most of the C/C++ library functionality in a manner consistent with its managed environment, Win. Forms - a medium weight GUI framework

Strengths of Each Environment • Win 32 – Natively provides windows, controls, memory management, process management, threads, directory and file management, access to Registry. • C++ – Widely supported and powerful object model, very well designed abstractions for console I/O, file management, containers, math. • Visual Studio Libraries – Smoothly integrates into all the Windows programming environments. Supports a COMbased programming model. • COM – Early and effective support for Component Engineering, allowing modifications to parts of large complex systems without rebuilding the entire system. • ATL – Efficiently and effectively hides a lot of COM’s complexity and weak encapsulation. • WTL – Very light weight and flexible wrapping of Windows many GUI facilities. Integrates well with ATL programming model. • MFC – Rapid development of complex user interfaces, provided that you want to use its models. • . Net Managed Environment – Elegant and well encapsulated wrapping of most of the Win 32 API. Provides a very easy to use GUI framework, supports managed code.

What Environments Lack • Win 32 – No objects directly usable by applications – Byte and address oriented, no high-level types • C++ – No threads, sockets, directory management, windows • Visual Studio Libraries – Just support for other programming environments • COM – Weak object model - no inheritance of implementation, very limited types, weak encapsulation – Weak networking, no windows • ATL – Weak windowing, no networking other than COM’s limited facilities. • WTL – Focuses exclusively on providing support for GUIs, not supported by Microsoft • MFC – Focuses mostly on providing support for GUIs with a ridgid architectural model • . Net Managed Environment – Requires run-time and libraries not found by default on Windows systems (that will change with Vista), uses a shallow reference object model, not ideal for some applications, e. g. , scientific programming and memory intensive applications like medical imaging.
- Slides: 4