oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button

Visual C++ Developer's Conference Interview

by John Osborn

What is the rationale that lies behind the enhancements to Visual C++ previewed at the recent Visual C++ Developer's Conference? And what role does Microsoft see for Visual C++ as the market for applications moves from the desktop to the Web?

O'Reilly Windows Programming editor John Osborn recently went to the Visual C++ Developer's Conference and discussed these and other topics with two leaders of the Visual C++ 7 project: Tony Goodhew, Microsoft's Visual C++ 7 Technical Product Manager, and Bill Dunlap, Microsoft's Visual Studio 7 Lead Product Manager.

Osborn: I'm wondering how you think the life of the Visual C++ programmer has changed.

Goodhew: Well, we're seeing the market evolve to a new generation of Web applications built around XML, a loosely coupled, heterogeneous sort of environment.

Dunlap: A lot of the raw programming power is moving away from the client and onto the server. There are two big paradigm shifts that we are trying to enable in Visual Studio 7: first, let developers more easily build scalable systems out of server-side components and second, let them connect to heterogeneous systems.

Visual Studio 7 is the tool that's going to make multi-tier development accessible to everybody. It's a very, very complex world out there when it comes to building multi-tier applications, because of the scalability requirements, because of the sort of data that you're handling. You need to understand transaction processing. You need to understand asynchronous messaging and message queuing. You need to understand Web servers and a host of protocols. You need to understand threading architecture.

What we're doing with Visual Studio 7 is we're trying to encapsulate middle-tier domain knowledge. We're going to allow developers to deal with these things as objects without having to get down to the bit level. We're doing the same for interoperability issues. You don't have to know all about a certain system, and you don't have to know about the details of interop between CORBA and COM, or how to invoke that Java component over there.

Osborn: So, will you provide support for Java and CORBA objects?

Dunlap: What we care about is Web Services, which is all about using XML to define what the method name is, what the input parameters are, and what the output return type is. That's all we care about: method name, input, and output. Whether it's written in COM, CORBA, Fortran, Cobol, Java, Perl, Python, VC [Visual C++] or VB [Visual Basic], whether it's running on that ubiquitous cell phone, a Solaris box, a Linux box, a Windows box -- we don't care. SOAP- and XML-enabled Web Services will make it easy to interoperate.

["Web Service" is a term Microsoft uses to describe a middle-tier business component whose methods have been exposed via standard Web protocols and XML. SOAP {Simple Object Access Protocol} is a standard that has been proposed by Microsoft and others for remote procedure calls and messaging over the Internet- John Osborn {JO}].

We know that some of the CORBA vendors are embracing this concept as well, and they are going to be including a SOAP or a Web Services listener as part of their package, and as long as they have that, we can discover what those methods are within CORBA and we can invoke them. And those guys who love to program in CORBA can discover our COM objects and program against them. You don't need some heavyweight instantiation mechanism in the middle. Show us your XML schema, and we can call it. [IBM also announced on April 27 that its Java platform and development tools will support SOAP. - JO].

Goodhew: And that's why the SOAP protocol is in front of the IETF [Internet Engineering Task Force] today.

Dunlap: It's not owned by Microsoft, the IETF has it, whatever they end up with we will absolutely support. But the whole industry can take advantage of this, and the business benefits are phenomenal.

In Visual C++ 7 Unveiled John Osborn reports on the Visual C++ Developers Conference.

Osborn: The code was flying across the screen pretty fast in your demo this morning. [At the Visual C++ Developer's Conference] What were the key things you were hoping the audience would notice?

Dunlap: There are four key things we wanted people to walk away with today:

  1. One is certainly our addition of attributes and attributed programming to the Visual C++ language. Attributed programming is about having a shorthand [attributes] for common programming tasks. By adding declarative attributes to Visual C++ we remove the complexity of programming in COM, we remove the complexity of binding to a database, along with some other key tasks. You simply put a declarative statement in your code and enough information for the compiler to fill in some of the grunt C++ details that we used to have to ask you to hand-code. The result is less code that is more maintainable.

  2. Another key feature is the brand new, unified, integrated development environment [IDE]. Now there's only one IDE to learn, whether you're a VB or VC developer. There are significant innovations and power productivity features within this environment, and this is the shell that developers will use to more rapidly build those scalable Web applications we have been discussing.

  3. A third feature is ATL Server. This is a technology that will allow C++ developers to more rapidly expose business functionality as a Web Service. In the past, if you really wanted to-the-metal performance you had to handwrite an ISAPI DLL. We've encapsulated all the programming for ISAPI [Microsoft Internet Information Server API] into extensions to the Active Template Library, and we've made it very easy for developers to create ISAPI and custom application DLLs. They can do it in 50 percent of the time that it used to take to do a hand-coded solution, but you get 95 percent of the performance. Our long-term goal is to have no measurable performance degradation between a hand-coded solution and one that we provide via ATL Server.

  4. The final point is that by using the new IDE, ATL Server and attributes, the Visual C++ 7 programmer will be able to easily expose the business functionality of an app as a Web Service, which means that any platform, any language, any device will be able to invoke your functionality remotely.

Osborn: When you demonstrated attributes at the 1998 Professional Developer's Conference in Denver, I thought, "Oh, this is an extension to integrate IDL [The interface definition language used by Microsoft COM developers.] into C++." But now it seems to be taking on a larger role.

Goodhew: Originally we were going to allow anyone to create fully extensible attributes. When we started usability testing, we realized that it was just going to be a nightmare, because with attributes being randomly declared, suddenly you no longer could guarantee how code executed, like templates and classes gone crazy. And so we decided, "Okay, let's just focus on COM." So we implemented a series of attributes specifically for COM. Then our own developers started using it. They would say, "Hey, it would be cool if we could do IDL as well," or, "It would be cool if we could hook up some loosely coupled events using an attribute as well." So we added a few more things.

When we rolled out attributes to customer focus groups they said, "Okay, you know, it would be great if we could do this and this and this." So now we have a better understanding of what customers want. And we have tried to provide a set of attributes many of them will use.

Osborn: Where are attributes handled?

Goodhew: It's actually done at compile time. It's all done before the linker hits the source.

Osborn: So attributes have their own syntax?

Goodhew: Yes, you'll have an open square bracket, then an attribute, and then a close square bracket. There will be a set of keywords. It's not rocket science. It's not like you're learning Portuguese. It's actually quite simple.

Osborn: Does the addition of attributes reflect an inherent weakness in C++?

Dunlap: The issue is simply one of productivity. C++ is widely praised for its performance and power, but it's never been the easiest language in the world to program in. There's just lots of code, lots of things that developers have to maintain by themselves.

Osborn: At VBITS in San Francisco [February, 2000] you announced enhancements that will make VB more like VC++-. Are you making VC++ more like Java?

Dunlap: Well I wouldn't go that far (laughs). Attributes are one of several productivity enhancements that simplify C++ development while maintaining its power and flexibility.

Goodhew: You know, if you speak to long-time C++ developers they'll tell you that the greatest asset of C++ is its power and flexibility. And then if you ask them what its worst liability is, they'll say, "Its power and flexibility." Because you can do everything in C++, it's often complex to do anything in C++. Visual C++ 7 preserves the power and flexibility of C++ while simplifying your programming task where we can by providing a wizard, a template or class library, a Visual tool or an attribute to generate a lot of code for you. You can elect to use these features, but you don't have to. You have complete freedom to implement in raw C++. Everything is C++ under the covers. We're just here to try to help you out.

Osborn: Where can people go to keep an eye on how this is evolving?


Osborn: I hear people saying, C++ is a generation behind in terms of its suitability for object-oriented development, and that Java does a better job of solving a number important object-oriented programming issues.

Dunlap: Java is a very nice language, and from a syntactical perspective it's a beautiful language, and we fully embrace Java in the Visual J++ product. The question is: can you really build the business systems that you need with the platform and the set of run-time libraries that come with Java, and with the performance of the Java VM [Virtual Machine]?

We're finding that most developers cannot, that they try Java, they build that prototype and it seems to go okay, but then when they start adding real logic behind that prototype, it doesn't work, there's still significant bugs in the VM, the library functionality isn't there; they still have to call out the native code all the time and the JNI interface is not that great.

And so they abandon their projects and they move back to C++. FedEx doesn't use Java anymore. A lot of the large financial institutions are struggling with Java. So, lots of experimentation, but the number of people who say they use Java on a daily basis as part of their job, as part of their important business processes, it's about 5 to 6 percent of the entire development world.

Java has not affected the VB numbers at all. It has affected the C++ numbers, but we think that with the productivity features we have in VS7 and VC7, that we have something that will enable developers to simplify and have an exciting language that really solves their business problems.

Osborn: So you're not feeling any pressure to create a new language that does a better job of dealing with, say, interfaces or includes features that make Java a better language for object oriented development in the eyes of many programmers?

Dunlap: We are actively looking at ways to make the C++ language more productive. You may have heard about COOL. [Several trade publications reported a year ago that Microsoft was working on a Java-like language named COOL. -Ed] COOL is a search for ways to add productivity features to Visual Studio tools, including C++. Attributes are part of the COOL project. There are lots of things that are part of the global COOL project, and, absolutely, we want to make C++ a more productive language.

Osborn: On another subject, there seems to be a fair amount of developer interest in the Windows Template Library (WTL) that Microsoft released in the latest platform SDK [WTL is a C++ template library for building Windows applications and is viewed by some developers as an alternative to the Microsoft Foundation Classes. - JO]. Does Microsoft have plans to support or add to it?

Goodhew: WTL is code that was released unsupported and we have no intention of updating it. We have no intention of continuing its availability. Frankly, it should never have been released and it will be removed from the platform SDK at the time of the next SDK revision.

Osborn: What would you think about an outside group adopting WTL and maintaining it as an open source development project?

Goodhew: Anyone can create his or her own template libraries. There are very successful third-party companies that market their own template libraries and their own class libraries for C++. We're not going to do that. The WTL is something that we are not going to support or continue at Microsoft.

Osborn: On newsgroups I sometimes see Visual C++ programmers recommend the SGI STL library [Silicon Graphics Incorporated Standard Template Library], or other STL libraries, over the STL library that is part of Visual C++ 7. Will you enhance your STL in Visual C++ 7?

Goodhew: We're going to continue to enhance our STL. One of the problems that we had is that Bill Plauger, whose STL library we use, significantly updated his library between our release numbers, so we were unable to include his release in Visual C++ 6. Because one of the things we try not to do with service packs is to introduce new functionality. We just try and fix bugs in service packs, and if we had updated to Bill's latest version in our most recent service pack, we would have been introducing new functionality, which is something we try not to do.

Osborn: But that is something you will do in the next release?

Goodhew: We are absolutely focused on making STL better in the next release, in Version 7.0.

Osborn: I have been surprised to see that there is a modest effort underway to port the GNU C++ tools to the Windows platform. The name of the project is "MinGW", which stands for "minimum gnu tools for Windows."

Dunlap: Wow.

Osborn: One of their issues is Win32 documentation. Developers who are using mingw tools wish Microsoft would make a download of the Win32 API documentation available.

Goodhew: It's actually available. You can go to the MSDN Web site and find a downloadable version there.

Osborn: Well, that's what I thought. I believe the mingw folks are aware of that, but find it inadequate.

Goodhew: This is, unfortunately, one of the common myths that the ABM crowd [Anything But Microsoft] and the Linux bigots like to seize upon. There is this concept that somewhere there's an API that we haven't documented. I like to call it the "WinMakeOursBetter" API, and of course (smiles) there are ANSI and UNICODE versions of that as well.

We document every API that is available. But you ought to get Andrew Shulman's wonderful book on UnDocumented Windows. He identified an API used by Excel that was actually deprecated. It was an internal API; it shouldn't have been used. It was deprecated because, in fact, there was a more efficient API in Windows 3.0. But, of course, somehow the use of that deprecated API made Excel so much better than Lotus 1-2-3 in Windows. It's just a myth. There's no truth to it. We document everything. It's all there for you. It's in the platform SDK, which can be downloaded from MSDN.

Osborn: How about the Win32 header files or the import files?

Goodhew: You can get them all from the platform SDK. Free download on the Web from MSDN.

Osborn: Well, thank you both very much for your time. We will be waiting for a look at the Visual Studio 7 beta with great interest along with everyone else.