Exam Reviews

70-305: Tangled Web

Microsoft's Visual Studio .NET has revolutionized the way we write Web applications. But does that ease of development necessarily mean a lack of complexity? Hardly, as this exam shows.

I've taken all the exams for Visual Studio.NET so far (in their beta form); but because I have the most experience developing ASP.NET applications, I thought this exam would definitely be a cakewalk for me. Well, I was wrong. After spending a few hours contemplating life, death and code, I realized that the devil truly is in the details. I needed to spend more time looking at what happens behind the scenes in an ASP.NET application. If you want to pass this exam, I'd recommend that you do the same, too. Remember, just because something may seem fairly easy at first glance doesn't make it so!

How To Be a Control Freak
In the beginning, there was HTML. And the developers looked upon the static Web pages they created, and they said it was good. The sun shone in the sky, peace reigned supreme, until one day the developers' brows darkened, and they said, "We need to link a database to the Web pages." And thus, the need for technologies such as ASP, PERL, and PHP became apparent. Now, many years later, after many development efforts with ASP, we have arrived at the next generation: ASP.NET.

When creating ASP.NET pages, make sure you understand the two distinct sections of the page: the HTML section and the code-behind pages. You place all of your ASP objects on the HTML section and write your business logic in the code-behind pages. (Code-behind refers to code for your ASP.NET page contained within a separate class file. This allows you to separate your HTML from your presentation logic.) Remember that ASP.NET is designed to behave much like Windows Forms development. You shouldn't have to mess with too much HTML to align your controls appropriately on the screen.

Visual Basic .NET Web Applications

Reviewer's Rating
"Although developing dynamic Web sites is definitely easier with Visual Studio.NET, you wouldn't realize it by taking this test."

Exam Title
70-305: Developing and Implementing Web Applications with Microsoft Visual Basic .NET and Microsoft Visual Studio .NET

Status
Beta in June 2002; live version expected in September 2002.

Who Should Take It
Core credit for MCAD and MCSD

What Courses Prepare You
Course 2389: Programming with Microsoft ADO .NET
Course 2310: Developing Web Applications Using Microsoft Visual Studio .NET

You need to be familiar with terminology new to ASP.NET such as "server control," which is a form control like a button, textbox or drop down list that has the "runat=server" attribute set. Another critical term is "postback," which is the process of submitting form values to the server. A common mistake occurs when a developer tries to load data into a combo box, for instance, and every time he or she loads the page, the data populates the box multiple times. Make sure you know programmatically how to avoid this pitfall!

Also important to the Web development scene is the ability to use components and Web services. Remember: Just because the Page_Load event is available doesn't mean you should put all the application's logic into it! You need to be able to invoke many different types of components, from native .NET objects to legacy COM and COM+ components. Although the exam doesn't focus on Web services, be sure you know how to use one from an ASP.NET application.

Another area I'd recommend getting versed with is globalization. Microsoft seems to be focused on internationalizing applications, especially those on the Web. Make sure you can format pages and control layouts so they're considered acceptable in multiple cultures. Issues surrounding currency are also key here -- if you don't make money, you might as well throw in the towel!

Finally, be familiar with the "old ASP objects of yore": Application, Session, Request, and Response objects. Know how to retrieve and set values in them, and know what they can and can't do. Remember the ToString( ) function; it's important here!

Tip: Do some research on the concept of ViewState. It's a new and important type of session management in ASP.NET.

Master of Manipulation
Twisting and contorting information in a database has always been one of the primary tasks a developer performs. Whether it's for a Windows or Web application, knowledge of data retrieval is an absolute must. Simply put, you need to know SQL Server inside and out. Be able to build ad hoc queries as well as complicated stored procedures that are not only functionally correct, but also help your application perform well.

Long gone are the days where relational data is the one true path. Now XML is a standard in data technology. The .NET Framework has many built-in libraries for parsing, writing and even validating XML documents. You need to be familiar with the System.Xml namespace as well as the System.Xml.XPath namespace. If you don't know the technology, XPath is similar to SQL, but used to select specific nodes within an XML document. You need to be able to write XPath queries that retrieve the data out of a specified XML document.

Also necessary to the world of .NET database development is the ability to integrate ADO.NET DataSets with XML technology. For example, you should know how to extract data as XML from a DataSet and vice versa. Know how to deal with different types of schemas, such as XSD and XDR. Finally, know how to use the XmlDataDocument class to manipulate data in both relational and XML format.

Finally, know how to tune up your data access code. You should expect to be queried (no pun intended) on different ways to perform a similar task. Remember, you need to select the best choice when it comes to these types of questions. Read carefully and make certain you understand exactly what the question is asking.

Get the Pesticide
For me, debugging an application is about as much fun as an afternoon at the dentist without Novocain. Unfortunately, it's a staple of development and can't be avoided. On that note, it's imperative that you understand how to debug an application. If you're a Visual Studio 6.0 developer, this shouldn't be much different from what you're used to.

Spend some time with the Command Window, which is similar to the Immediate Window in Visual Studio 6.0. You can print variables or write ad hoc statements during the debugging process to see if you're getting the expected results. You can also set Watch Points that will break if a condition is true. You can view the current object stack as you step through code to see if the objects are producing the expected results

The nicest thing about Visual Studio.NET is the fact that debugging Web applications is easy. If you're a vet at developing, you know what I mean when I talk about the fun hours spent trying to configure IIS and Visual InterDev to allow interactive ASP debugging! I've had no trouble setting up Visual Studio.NET to easily debug ASP.NET applications.

Tip: Be sure you can output errors to text files as well as the Event Viewer in Windows 2000 and Windows XP.

Open the Floodgates
Once the development process is finished, and you're certain that your application is ready, it's time to deploy. Unlike Visual Studio 6.0, .NET makes deployment considerably easier. Of course, it was easy to deploy an ASP application if you had just ASP pages, but that was rarely the case. Often, COM components were a part of the picture, which complicates matters considerably.

Now, once all the code has been written, there are several options. First, if your application will be standalone and none of the components will be used in other applications on the machine, you can simply copy the application to the target directory, set the permissions, and mark the directory as an application in IIS, and you're set! If you want to get fancier, like providing uninstall support, you can create an MSI file and use the Windows Installer to perform the installation.

Finally, if you feel that components in your application will be used in other applications on the same machine, you may want to install the components in the Global Assembly Cache. This involves using SN.EXE to sign the component with a strong name and then using GACUTIL.EXE to install the object in the cache. This will allow multiple applications to use this component without giving each application a copy of the component's DLL file.

Tip: Research how the .NET Framework handles versioning when multiple versions of a component exist in the Global Assembly Cache.

Configuration Calamities
Of course, writing code and pushing it out aren't the only decisions you have to make when writing a Web application. You need to decide how you're going to store common global data like connection strings as well as the overall security mechanism your application is going to have. Know how to interact with web.config and machine.config. Be sure you can handle complicated situations that surround these files. For example, know which one takes precedence if you have a web.config file in your virtual directory and in the root application.

The security level that your application has is also an important choice. You need to choose whether you will use Windows authentication or anonymous authentication. The best choice for an Internet application is probably going to be anonymous mode with security information stored in a database. Intranet applications are more likely to use Windows-based security.

Finally, you need to make choices that will support the ability for your application to scale to a large number of simultaneous users. A big item to address in this arena is management of session state. In the old version of ASP, session state could be directly managed with a Session variable or in a cookie. Now, with a simple setting in the web.config file, running a simple SQL script, and the flip of a switch (turning the ASP.NET Session Service on), session state can be maintained in a database. This allows the ability to scale out to multiple Web servers in a Web farm without having to worry about tricky load balancing solutions.

10 Things To Practice
  1. Create a simple Web service. Ensure that you can set a Web reference to it in an ASP.NET application and return a simple value.
  2. Create an ASP.NET page that uses ADO.NET to retrieve data into a DataSet. Write the contents of the DataSet to the screen as a test.
  3. Do the same as #2, but put the data from the DataSet into an XML document. Use an XSD schema to validate the data.
  4. Enable the ASP.NET Session Service. Perform all necessary configuration to make this work properly. View the database as a session runs to verify that it's working correctly.
  5. Create a simple COM component in Visual Studio 6.0. Use that COM component in an ASP.NET page.
  6. Place several Web controls on an ASP.NET page. Retrieve data from a database and populate the controls with data by databinding them.
  7. Create a custom error page to be displayed whenever an error occurs. Configure the application and code to display this page at the appropriate times.
  8. Create a custom module that will log error messages to a text file. View the text file to ensure success.
  9. Create a Windows Installer package to install a Web application on an IIS machine. Ensure that you can use "Add and Remove Programs" to remove it if necessary.
  10. Configure the Web application to use Windows authentication. Turn anonymous access on the Web server off and ensure that it works appropriately.

(Exam objectives can be found at www.microsoft.com/traincert/exams/70-305.asp.)

You may also be able to decrease the load on your Web server by enabling ASP.NET caching and by programmatically using the Cache object in your Web sites. Of course, you need to be careful when you do this because not everything belongs in the cache. You want to ensure that you only put data in that's static in nature and used by a majority of people who hit a specific area of your Web application. Otherwise, this can actually be detrimental to performance.

Practice with ASP.NET
All in all, this exam was pretty tough. I'd recommend studying hard and getting a few months of ASP.NET development under your belt before running out to try this one. But if you cover the material diligently and make sure you know the topics thoroughly, you'll pass it in no time! Good luck!

comments powered by Disqus

Reader Comments:

Mon, Mar 7, 2005 sivakumar chennai

useless things need to go to trash

Tue, Feb 15, 2005 Kamran Karachi, Pakistan

this is an excellent article for Asp.net developer who is planning for taking an 305 exam... at the place i was thinking i know alot for the exam but after reading this article i was wrong ... i need to word hard

Thanks Chris :-)

Thu, Dec 19, 2002 Sasikala Chennai

I passed this exams after the hard study for a month. Go in the right track for passing. Concentrate more in security,deployment, debuging, testing issues, This review gives an exact outline for the preparation. Make sure you are very apt without any dilema.

Mon, Nov 4, 2002 Anonymous Anonymous

I passed the exam after 6 weeks of hard study. This review skims the surface although is a pointer in the right direction. Do plenty of practice tests to gain insight into the huge scope of this exam.

Tue, Sep 24, 2002 Anonymous Anonymous

I took the transcender exam a on this one as was surprised at how little I knew. I still managed to get an 80% but passing is listed at 85% much studying later I took the second transcender exam and got a SOLID 80%, I knew what I was doing at least, and felt more confident about that score. I'm in study mode before taking the third practice test, but learning so much each time. This test is NOT easy and is definately a challenge just as this article describes. Hopefully it will be behind me by this weekend.

Wed, Sep 18, 2002 Anonymous Anonymous

i'm saving this article in my Certification resource folder for review when i begin to tackle the .NET exams.

Add Your Comment Now:

Your Name:(optional)
Your Email:(optional)
Your Location:(optional)
Comment:
Please type the letters/numbers you see above

Redmond Tech Watch

Sign up for our newsletter.

I agree to this site's Privacy Policy.