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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>C++</strong> Class Frameworks and the Visual Component Model<br />

So where is this <strong>in</strong>dustry go<strong>in</strong>g? The wave of the future appears to be components, but it is<br />

apparent that there will be a need for class libraries like MFC and OWL for quite some time<br />

to come. Some of you who are now us<strong>in</strong>g MFC or OWL will abandon them <strong>in</strong> favor of<br />

programs like <strong>C++</strong>Builder and Delphi. Others of you will use both your old tool and the new<br />

RAD tools. Still others will stick with what you know best. In any event, it is important to<br />

realize that each of these frameworks is a tool. My advice is simple: Use the most appropriate<br />

tool for the current job.<br />

If you have never used OWL or MFC, you don’t have to worry about what you are miss<strong>in</strong>g.<br />

<strong>C++</strong>Builder and VCL allow you to build robust applications <strong>in</strong> much less time than you could<br />

with one of the <strong>C++</strong> frameworks. This is particularly true when you take <strong>in</strong>to account the<br />

learn<strong>in</strong>g curve of VCL compared to that of MFC or OWL. Programm<strong>in</strong>g <strong>in</strong> <strong>C++</strong>Builder is<br />

much easier to learn, and you can write programs faster, too.<br />

Workshop<br />

The Workshop conta<strong>in</strong>s quiz questions to help you solidify your understand<strong>in</strong>g of the<br />

material covered and exercises to provide you with experience <strong>in</strong> us<strong>in</strong>g what you have learned.<br />

You can f<strong>in</strong>d answers to the quiz questions <strong>in</strong> Appendix A, “Answers to Quiz Questions.”<br />

Q&A<br />

Q What is a framework?<br />

A A framework, also called a class library, is a set of classes that simplifies W<strong>in</strong>dows<br />

programm<strong>in</strong>g. A good framework implements object-oriented design and objectoriented<br />

programm<strong>in</strong>g to apply an object-oriented approach to writ<strong>in</strong>g W<strong>in</strong>dows<br />

applications.<br />

Q Is VCL a <strong>C++</strong> framework?<br />

A No. VCL is a framework that works with <strong>C++</strong> <strong>in</strong> <strong>C++</strong>Builder, but it is written <strong>in</strong><br />

Object Pascal rather than <strong>C++</strong>. VCL is written <strong>in</strong> Object Pascal because it was<br />

<strong>in</strong>itially created for <strong>Borland</strong>’s Delphi.<br />

Q Am I supposed to know how to program <strong>in</strong> Pascal and <strong>C++</strong> <strong>in</strong> order to write<br />

W<strong>in</strong>dows programs with <strong>C++</strong>Builder?<br />

A No. The fact that VCL is Pascal is virtually transparent to you. As far as you are<br />

concerned, you are just programm<strong>in</strong>g <strong>in</strong> <strong>C++</strong>. Advanced <strong>C++</strong> users might notice<br />

some situations where VCL limits their choices, but most users of <strong>C++</strong>Builder<br />

will not.<br />

163<br />

5

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

Saved successfully!

Ooh no, something went wrong!