INFO: When to Use Design-Time Controls on a Web Page (285117)



The information in this article applies to:

  • Microsoft Visual InterDev 6.0

This article was previously published under Q285117

SUMMARY

This article describes the advantages and disadvantages of using Visual InterDev 6.0 Design-Time Controls (DTCs) to help you determine when to use DTCs and when not to use them.

MORE INFORMATION

A Design-Time Control (DTC) is a special kind of scripting control that is mainly intended for low volume, relatively simple data-oriented sites, as well as for applications that need to be developed as quickly as possible. DTCs are objects that are designed to provide functionality that can be added to your Web page with a visual interface. When a DTC is added to a page, JavaScript is generated behind the scenes. To see this JavaScript, right-click the control and click Show Runtime Text.

The code that is generated can be in the form of Active Server Pages (ASP), HTML, and Dynamic HTML (DHTML). In addition, the code uses many different technologies, including ActiveX Data Objects (ADO) and Remote Data Service (RDS), to "bind" Recordset DTCs to some of the other DTCs.

DTCs are typically used for rapid application development (RAD), for prototype Web pages, and as a great learning tool. You can make useful applications very quickly, writing a minimal amount of actual code.

Avoid using DTCs for sites:

  • That have databases with large numbers of records.
  • Where performance is a high priority.
  • That require a polished user interface.
  • That require a wide degree of flexibility in the functionality or user interface.
For example, when you add a Textbox DTC to a page, a 300-line include file is added, some of which is used, and some of which may not be used. More lines of code may not have a large impact on the performance of the page but could complicate application troubleshooting. The functionality that is provided by DTCs can always be replicated by hand coding. Hand coding allows for more efficient code, greater control, greater flexibility, and better application performance, though it usually requires more development expertise and development time.

Based on your project requirements or restraints, you must decide the best way to proceed. Here are some factors that you may want to consider as you make your decision:

  • The type of solution that you are developing.
  • The target audience.
  • The developers who are working on the solution.
  • The amount of time and money that you can spend.
Many times, there are several different ways to approach a particular functional requirement in an application, so sometimes you can combine the controls and some code to create a better-running solution.

In conclusion, DTCs are great for RAD, for sample pages, and as a learning aid; hand coding offers greater control, flexibility, and performance in many development scenarios.

Modification Type:MajorLast Reviewed:4/22/2001
Keywords:kbCtrl kbinfo KB285117