Exam Reviews

Down and Dirty Code with Visual InterDev 6.0

Although Microsoft wants to make programming easier, this exam proves that you should retain your fascination with the difficult.

The increasing level of abstraction Microsoft is building into its products makes it easier to develop applications on the Windows platform. Wizards and abstractions mask programming complexity, so that applications that traditionally took developers months to complete can now be rolled out in a matter of days. Is programming nirvana at hand?

Not really. It may be getting easier to develop applications on the Windows platform, but the programming experience doesn’t seem to be getting any better when, for instance, an application you’ve developed begins to perform erratically in a given situation and the solution proves elusive. Wizards and templates can lull one into thinking that masking complexity is synonymous with eliminating problems. In reality, problems can become more difficult to solve because of a developer’s ignorance of lower-level layers.

Perhaps to emphasize the importance of a deeper understanding of its products beyond high-level tools and abstractions, Microsoft is making its newer certification exams probe details of its products not found in earlier exams. This was true of the Visual InterDev 6.0 beta exam 71-152, which I recently sat through.

The Visual InterDev exam is one of three associated with Microsoft’s new certification program called MCP+Site Building. The other two are Designing and Implementing Web sites with FrontPage 98 (70-055) and Designing and Implementing Commerce Solutions with Site Server 3.0, Commerce Edition (70-057). You’re required to pass two of three to achieve the new title.

Visual InterDev 6.0
Reviewer’s Rating:
“Microsoft wants users of Visual InterDev to look beyond abstractions and wizards and into where code is produced.”

Title: Designing and Implementing Web Solutions with Microsoft Visual InterDev 6.0

Number of questions in reviewed version of exam:
122 (fewer expected in live version)

Time allowed:
3 hours for beta exam (approx. 90 minutes in live version)

Current Status: Live as of December 1998.

Who should take it?
An elective for the MCSD and MCP+Site Building titles.

What classes prepare you?
• Course 1017: Mastering Web Application Development Using Microsoft Visual InterDev 6

Secrets of Scripting

Of the 122 questions, at least a third dealt with the tags, syntax, and programming features of HTML, ASP, VBScript, and JScript. The questions had a common format: You’re presented with six to 10 lines of code with, say, two lines of code missing. You have to identify the missing lines from options that look the same to the uninitiated. Since an Active Server Page is an HTML document with embedded server-side script logic, unless you have good knowledge of the features of HTML, VBScript, or JScript, your only hope is to play the guessing game.

Here’s a simple example. Let’s say you want to greet visitors to your Web site with a message that varies depending on the time of day (“Good Morning!” before noon and “Welcome!” after 12); you want to send the response in a blue font. The code sample, with lines 2 and 3 missing, is as follows (line numbers are for illustration only):

4. Welcome!
5. <% End If %>
6. </FONT>

The options could be

A. < If Time < 12:00:00 PM Then > Good Morning!
< Else >

B. < % If Time < #12:00:00 PM# Then % > Good Morning!
< Else >

C. <% If Time < #12:00:00 PM# Then % > Good Morning!
<% Else %>

D. <If Time < #12:00:00 PM# Then > Good Morning!
< % Else %>

For the experienced programmer, the answer is easy (C); but for anyone not versed in the nitty-gritty of ASP, this could be a challenge!

Other questions offer variations on this theme, only with more complexity and at even lower levels. For example, you may have to identify HTML table definition tags for a table with two columns, where the second column is further split into two rows and the second row in it into three columns (graphically creating a table is difficult in Visual InterDev, so this knowledge can come in handy). Or how about providing the error-handling syntax for capturing an error? Or what about the structure of the Global.asa file as it relates to events triggered when an application or a session starts or ends?

Even though Visual InterDev generates standard HTML and ActiveX scripting in its WYSIWYG (design view) editor, serious users must know how to customize the generated color-coded source code for debugging and enhancing performance.

Tip: Make sure you’re familiar with and know the differences between tags and delimiters, VBScript and JScript statements. Know the ActiveX Server Objects in Visual InterDev, particularly the Request, Response, and Server Objects, and how the Response Object methods interact with Request Forms. Learn how the predefined server environment variables in the Request Object and CreateObject method of the Server Object are used. Pay particular attention to the On Error VBScript command.

All About ADO

Dynamic database connectivity through ActiveX Data Objects (ADO) is another important component of the test. ADO is based on OLE DB and is the basis for Microsoft’s Universal Data Access. It provides connectivity to ODBC and non-ODBC (relational and non-relational) data sources, facilitating the development of powerful data-driven Web sites.

Familiarize yourself with ADO objects such as Design-Time Controls (DTC) that generate server-side scripting, including calls to establish database connections within a Web site, perform queries, and display results.

I didn’t see any GUI-level questions on the new features of Visual InterDev, such as the Data Environment or the command object, but I found many questions on the syntax of the code generated by a DTC on an ASP page. Let’s say you’ve created a connection called myConn and a DTC recordset called myRS. What’s the syntax for opening myConn and assigning a SQL query such as a SELECT statement to myRS? Also, how do you refer to fields (columns) in myRS? (Hint: There are several valid ways and you should know them all.) The Recordset Object is implemented as cursors.

Tip: You should know the different types of cursor processing—Static, Dynamic, and Keyset—and which to use when.

SQL Practice

I was surprised by the relatively large number of questions on SQL joins, stored procedures, and triggers. Master the proper use and syntaxes of INNER JOIN and LEFT, RIGHT, and FULL OUTER JOINs. Suppose you have two tables, author and publisher, where a primary key in author maps to a foreign key in publisher. Select the appropriate JOIN to display data from the two tables. Which Join would you use for verifying referential integrity?

If you haven’t practiced writing stored procedures and triggers, do so before taking the test. Suppose you’re given two tables, customer and order. Deleting a customer from the customer table should automatically delete the orders by that customer from the order table. Write the appropriate trigger. Be clear on which table the trigger is applied. Keep in mind that triggers are used to enforce business rules and data integrity.

You’ll be asked to identify the correct syntaxes for stored procedures, triggers, and data modification through INSERT, UPDATE, or DELETE. You should also be familiar with passing input parameters to and receiving output parameters from stored procedures. Finally, know how to invoke a stored procedure from within an ADO object in an Active Server Page.

Up a Step with Three-tier

Scalability and load balancing are key issues with the newer Microsoft products. The beta tests your understanding of how these features are deployed in the context of Visual InterDev. The requirement for a Web application is for it to seamlessly scale from, say, 100 transactions per hour to 100,000 transactions per hour. The traditional two-tier client/server application that groups presentation and business logic on the client and database logic on the server doesn’t scale well. It’s the three-tier architecture, separating business logic from presentation and database logic, that’s the right model for designing Web applications that are flexible to changing business needs and responsive to growing user demand.

You should have a clear understanding of how Visual InterDev helps implement the three-tier model, with Microsoft Transaction Server (MTS) serving as the middle tier. There were many scenario questions on planning and scalability of a Web application that I found relatively easy to answer by understanding how MTS works and how it’s the key to scalability.

Tip: The MTS environment consists of components and packages. Learn how you can get business rules into object design and distribute objects via MTS.

Side by Side

Be clear about the differences between server-side (ASP) and client-side (DHTML) scripting and the advantages and disadvantages of each with respect to load balancing, performance, and compatibility. Several scenario questions test your understanding of these two scripting models: rich, client-side DHTML vs. broad-reach, server-side processing.

For example, in an intranet where you know that everyone uses Internet Explorer 4.0, the applications can do most of their work on the client, thereby taking load off the server and reducing network traffic. On the other hand, if you target Netscape and other browsers for reach, processing must be done in ASP on the server. You should know how to insert ActiveX controls in HTML and ASP. Practice with the OBJECT tag and the CLASSID and CODEBASE parameters.

Fixes and Teamwork

Visual InterDev comes with a new and powerful debugger for line-by-line debugging of client and server-side scripts, including Java applets. Fast and reliable debugging is a critical tool for rapid application development, and the beta emphasizes it by testing your familiarity with it. Know the various debug windows (Immediate, Locals, Watch, Threads, Call Stack, and Running Documents) and the values displayed in them as code is executing. In which window should you, for example, change the value of a variable in your application at runtime?

Tip: You should also be able to predict values of variables that will be displayed in these windows as code is executing after you’ve set breakpoints.

You should also know how to integrate Visual SourceSafe with Visual InterDev. Visual SourceSafe is a source code control system that provides version control, project tracking, and check-in (Get Working Copy) and check-out (Release Working Copy) capabilities for team projects. The key points to note are: a) install Visual SourceSafe on the machine running IIS 4.0; b) check the “Enable Integration” option during Visual SourceSafe setup; c) Apply “Add to Source Control” to the Web application to put it under source control; and d) use the new Local Mode to test parts of a project against a local Web server and then synchronize changes to the shared master Web server.

Additional Information
The official Microsoft Course 1017 (Mastering Web Application Development Using Microsoft Visual InterDev 6) was under development at the time of the beta, so I had to look for alternate sources of help.

Working with the product itself is imperative. What I found most helpful was the Guided Tour shipped with the March Pre-Release Visual InterDev 6.0. The tour allowed me to build a Web application for Fitch & Mather, a fictitious hardware and garden supply company. The experience was invaluable. Without the tour, I would have been a stranger lost in the labyrinth of Visual InterDev. In particular, I found the exercises with Data Environment, Debugging on the client and the server, Cascading Style Sheets (CSS) editor, Team support tools, and invoking COM components from ASP extremely useful.

Microsoft Press is scheduled to publish a number of books on Visual InterDev 6.0 shortly that I’m sure will help too. One that promises to be interesting is called Programming Microsoft Visual InterDev 6.0 by Nicholas D. Evans, Ken Miller, Ken Spencer, and Eric Vincent.

The print version of Visual InterDev 6.0’s Online Help is already available from Microsoft Press and is called Microsoft Visual InterDev 6.0 Programmer’s Guide. I didn’t use it, so I can’t comment on it.

Visual InterDev 6.0 is a catalyst; it uses services from an array of Microsoft products to build something new and powerful—a scalable, multi-tier Web application. To pass the test, therefore, you must have working knowledge of the supporting cast: IIS 4.0, IE 4.0, MTS, and SQL Server 6.5+, complemented by knowledge of HTML, ASP, ActiveX, COM and COM+, and Visual Basic.

In other words, the road to MCP+Site Building certification passes through MCSE+Internet and MCSD.

To learn more about the exam, visit Microsoft’s site at www.microsoft.com

—Hasan Rahim

Pulling It Together

Other items of interest on the exam include mechanisms for uploading content to Web servers, applying Cascading Style Sheets (CSS) to a Web page, updating ActiveX controls and defining an update schedule on the desktop via the Channel Definition Format (.cdf) file, applying consistent site navigation within and between pages, and using snap-ins in the Microsoft Management Console (MMC).

One of the design goals of Visual InterDev is to bring the same look and feel and coding style to Web programming that Visual Basic brings to Win32 programming. Therefore, VB programmers should find this product easy to embrace (and the test easy to pass too!).

Visual InterDev takes advantage of the technologies Microsoft has developed for client/server applications, such as COM and COM+. It integrates them with Microsoft’s Internet products, such as IIS and Internet Explorer, providing a RAD environment for multi-tier, enterprise Web applications. Developers can use Visual Basic, Visual C++, or Visual J++ to create components to encapsulate data access or business rules, and then use Visual InterDev as a command center to pull the components together and flesh out the rest of the infrastructure to create a scalable Web application. It’s an important product for Microsoft and rightly so.

Visual InterDev has been designed to achieve Visual Basic-style simplicity for Web developers. The product has mostly succeeded in achieving this goal. Still, as a proof of its mastery, as shown in beta exam 71-152, Microsoft wants users of Visual InterDev to look beyond abstractions and wizards and into where code is produced. In this, Microsoft seems to be telling us, while we should welcome the abstractions, as developers we must continue to maintain our fascination with the difficult.

comments powered by Disqus
Most   Popular