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.

136 Day 5<br />

the limits of your knowledge regard<strong>in</strong>g <strong>C++</strong>. Leave the complicated stuff for next month. But<br />

notice how the framework designers use private, protected, and public access <strong>in</strong> classes.<br />

Notice how and when they implement <strong>in</strong>l<strong>in</strong>e functions. Notice how th<strong>in</strong>gs that should be<br />

kept hidden from the user aren’t <strong>in</strong> public view. Study<strong>in</strong>g a good <strong>C++</strong> class library can teach<br />

you a great deal about <strong>C++</strong> and object-oriented design.<br />

The <strong>C++</strong> Framework Wars<br />

The frameworks need to be separated <strong>in</strong>to two categories: <strong>C++</strong> frameworks and VCL. First<br />

I’ll discuss the <strong>C++</strong> frameworks and then I’ll move on to VCL. There are really only two viable<br />

<strong>C++</strong> frameworks, and they are <strong>Borland</strong>’s OWL and Microsoft’s MFC.<br />

<strong>Borland</strong>’s Object W<strong>in</strong>dows Library<br />

<strong>Borland</strong> took the lead role <strong>in</strong> the framework race with OWL a few years back. First there was<br />

OWL 1.0. This first version of OWL was a separate product sold by <strong>Borland</strong> for use with its<br />

<strong>Borland</strong> <strong>C++</strong> 3.0 compiler. (Actually, the very first OWL was written for Turbo Pascal and<br />

was later converted to <strong>C++</strong>.) OWL 1.0 was a good framework, but because of some<br />

proprietary syntax and other issues, it wasn’t the design that <strong>Borland</strong> would eventually stick<br />

with for the future of OWL. OWL 1.0 did, however, do the entire W<strong>in</strong>dows programm<strong>in</strong>g<br />

community a service—it got the framework ball roll<strong>in</strong>g. Although OWL 1.0 was not the first<br />

framework ever written, it certa<strong>in</strong>ly was the first to ga<strong>in</strong> mass-market appeal.<br />

After OWL 1 came OWL 2.0. OWL 2 was a masterpiece. It implemented many of the latest<br />

<strong>C++</strong> language features—not because they were new, but because they made sense. Best of all,<br />

OWL 2 was <strong>in</strong>cluded as part of the <strong>Borland</strong> <strong>C++</strong> 4.0 compiler. From this po<strong>in</strong>t on, <strong>Borland</strong><br />

would <strong>in</strong>clude OWL as part of its <strong>Borland</strong> <strong>C++</strong> package. <strong>Borland</strong> <strong>C++</strong> compilers have always<br />

been first to implement new <strong>C++</strong> features, and OWL 2 put those features to good use. OWL<br />

2 also did away with the proprietary syntax that plagued OWL 1. OWL 2 was all standard<br />

<strong>C++</strong> that could be compiled with any <strong>C++</strong> compiler—at least <strong>in</strong> theory. As it was, there were<br />

few <strong>C++</strong> compilers implement<strong>in</strong>g the latest and greatest <strong>C++</strong> features, so OWL 2 was<br />

typically used only with <strong>Borland</strong> compilers.<br />

<strong>Borland</strong> released a revision to OWL 2.0 called OWL 2.5. For the most part, the changes were<br />

m<strong>in</strong>or. They were m<strong>in</strong>or <strong>in</strong> the sense that they didn’t add a lot to OWL 2 itself; a few bug<br />

fixes here and there and a few new classes. But <strong>in</strong> one way OWL 2.5 was a major release—<br />

it added OLE (object l<strong>in</strong>k<strong>in</strong>g and embedd<strong>in</strong>g) support <strong>in</strong> a new set of classes called the Object<br />

Components Framework (OCF). OCF is not technically part of OWL. It works very well<br />

with OWL, but at the same time it can be used <strong>in</strong>dependently of OWL.

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

Saved successfully!

Ooh no, something went wrong!