Visual Basic

Mixed Languages with Visual Studio

In this relatively short chapter, I want to discuss the concept of mixed language programming (MLP). I'll go into some of the pros and cons and considerations of doing MLP with Visual Studio. Be warned, though-as the title implies, this chapter cannot be free from other languages; it contains Java, C, and C++ code (and mentions other languages, too, such as FORTRAN and COBOL). None of the other languages is explained in detail, so you might want to skip the code sections of this chapter if you're not up to speed with some of the basics of these particular languages.

What Is Mixed Language Programming?

From a conceptual point of view, MLP is about connecting together code, data, and components that have been constructed using different programming languages. (Did you know that most developers use an average of 2.2 language tools?) However, from a design point of view, MLP is also about choosing the right language up front for the job-the so-called Horses for Courses approach (that is, each language being employed for the purpose for which it is best suited)-and about building reusable code blocks.

One of the most popular approaches to developing components is to apply object-oriented techniques. Object-oriented analysis and design are useful because they enable application designers to approach software development from a higher level of abstraction. Viewing an application as a collection of objects (which have both attributes [state] and behaviors [method]) that interact with each other enables a designer to more effectively model the problem and create an appropriate solution. An object design should be more comprehensible than a series of algorithms. We'll be touching on more object "stuff" throughout this chapter.

In short, MLP lets you take advantage of language-specific features and data structures available in languages outside your main language. Therefore, MLP has the potential to exploit fully the complete range of programming languages within your chosen working set.

by BrainBellupdated