12.12.2012 Views

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

138 Day 5<br />

Another strength of MFC, accord<strong>in</strong>g to some, is that it is a th<strong>in</strong> wrapper around the W<strong>in</strong>dows<br />

API. Aga<strong>in</strong>, for W<strong>in</strong>dows programmers who are mov<strong>in</strong>g from programm<strong>in</strong>g <strong>in</strong> C to<br />

programm<strong>in</strong>g <strong>in</strong> <strong>C++</strong> with MFC, this is an advantage. They can beg<strong>in</strong> to use MFC and feel<br />

somewhat at home.<br />

F<strong>in</strong>ally, MFC has the dist<strong>in</strong>ct advantage of belong<strong>in</strong>g to Microsoft. The advantage is that as<br />

new W<strong>in</strong>dows features and technologies come along, MFC can be first to implement them.<br />

Microsoft can release a new technology, and MFC can already have support for that<br />

technology when it is announced. That certa<strong>in</strong>ly doesn’t hurt!<br />

MFC has its weaknesses too. First and foremost, it is a th<strong>in</strong> wrapper around the W<strong>in</strong>dows<br />

API. “Wait a m<strong>in</strong>ute!” you say. “I thought you said that was one of MFC’s strengths!” Yes,<br />

I did. It’s also one of its weaknesses. Some folks would consider MFC’s close tie to the API<br />

a strength. I consider it a weakness. The whole idea beh<strong>in</strong>d a class library is to shield the user<br />

from th<strong>in</strong>gs he or she doesn’t need to know about. MFC fails that test <strong>in</strong> many cases. Folks<br />

who are com<strong>in</strong>g from W<strong>in</strong>dows programm<strong>in</strong>g <strong>in</strong> C consider that a strength. You can form<br />

your own op<strong>in</strong>ion. Along those same l<strong>in</strong>es, MFC is not OOP friendly. Sometimes it appears<br />

to be a hastily implemented collection of classes that don’t work and play well together rather<br />

than someth<strong>in</strong>g planned and designed from the ground up to work as a unit.<br />

Another problem with MFC is that the latest version is 32-bit only, as is the Visual <strong>C++</strong> 4.0<br />

compiler. Although you can still write 16-bit programs us<strong>in</strong>g Microsoft’s Visual <strong>C++</strong> 1.5<br />

(which comes with Visual <strong>C++</strong> 4.0), you will likely f<strong>in</strong>d a disappo<strong>in</strong>t<strong>in</strong>g development<br />

environment.<br />

So Who’s W<strong>in</strong>n<strong>in</strong>g?<br />

Without question, MFC is more widely used than OWL. Part of the reason is that both MFC<br />

and the Visual <strong>C++</strong> compiler bear the Microsoft name. It’s no secret that Microsoft is k<strong>in</strong>g<br />

of the hill <strong>in</strong> the PC software <strong>in</strong>dustry. It is also no secret that Microsoft has market<strong>in</strong>g power<br />

that other companies can only dream about. In addition, there is a prevail<strong>in</strong>g attitude of (to<br />

slightly modify a co<strong>in</strong>ed phrase) “No one ever got fired for buy<strong>in</strong>g Microsoft.”<br />

I firmly believe that OWL is the better framework. Few who have used both OWL and MFC<br />

extensively would argue that po<strong>in</strong>t. But MFC is undoubtedly the <strong>C++</strong> framework of choice<br />

today. There are many reasons, some of which I’ve alluded to already. Other reasons <strong>in</strong>clude<br />

a perceived lack of direction on <strong>Borland</strong>’s part <strong>in</strong> recent years. Some managers prefer to play<br />

it safe and buy a product produced by “the big M” regardless of technical merit. Hopefully<br />

that attitude won’t eventually lead us to a software <strong>in</strong>dustry with a gross lack of competition.<br />

This <strong>in</strong>dustry desperately needs companies like <strong>Borland</strong> that will push the envelope.<br />

So what is the future of <strong>C++</strong> frameworks? It’s nearly impossible to guess at this po<strong>in</strong>t. It could<br />

be that both MFC and OWL are los<strong>in</strong>g to the new kid on the block—components. Let’s take<br />

a look at the Visual Component Library now.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!