Microsoft Visual Studio

Creating a Web Page in Visual InterDev

In this exercise, you will use Microsoft Visual InterDev to create a Web page and add JavaScript and VBScript to push buttons .

  1. From the Windows Start menu, point to Programs , Microsoft Visual InterDev and click Visual InterDev 1.0 .
  2. From the File menu, click New .
  3. Click the Projects tab and select Web Project Wizard .
  4. For the Project Name , type MyWebProject .
  5. Set the Location to WA\Practice\Ch04\MyWebProject and click OK .
  6. Set the default server name to localhost and click Next .
  7. Click Finish to accept the default settings.
  8. From the File menu, click New .
  9. From the File tab, select HTML Page . Enter a File Name of MyFirstPage and click OK .

You will see the following line of code highlighted:

 <!-- Insert HTML here --> 
  1. Press the BACKSPACE key to delete the highlighted code.
  2. Type the following into the code editor:
 <form> 

<input type = "button" value = "Test JavaScript"

name = "cmdJavaCode" OnClick="bln=JavaCode()">

<input type = "button" value = "Test VBScript"

name = "cmdVBCode">

</form>


<script language="javascript">

var bln = false

function JavaCode() {

alert("Hello from JavaScript!")

return true

}

</script>


<script language="VBScript">

Sub cmdVBCode_OnClick

MsgBox "Hello from VBScript!"

End Sub

</script>

  1. From the File menu, click Save .

* To preview your Web page

  1. From the Workspace window, right-click MyFirstPage.htm .
  2. Click Preview in Browser .

    The default Visual InterDev browser will display the Web page.

  3. Click Test JavaScript and click OK to the message box.
  4. Click Test VBScript and click OK to the message box.
  5. In the Workspace window, double-click MyFirstPage.htm to return to the script window.
  6. Save your work and exit Visual InterDev.
* To test your new Web site
  1. Start Internet Explorer.
  2. Browse to the following address:
      http://localhost/MyWebProject/MyFirstPage.htm  
  3. Test both push buttons.
  4. Exit Internet Explorer.

Microsoft Visual J++

Visual J++ is Microsoft's visual Java object-oriented development environment. It uses the same user interface as Microsoft Visual C++. Visual J++ development can only be done on Windows 95 or Windows NT 4.0. However, the generated code can be executed on any platform that supports the Java Virtual Machine.

The Java Virtual Machine

The Java Virtual Machine is needed to execute Java programs. The Virtual Machine is a virtual processor emulated in software. The instructions (Java bytecodes) executing on a virtual processor are the same no matter which operating system the Virtual Machine is running on.

click to view at full size.

Figure 4.3 Visual J++

This means that the Java code can run on any platform that has a Java Virtual Machine. The Virtual Machine reads the bytecode and executes the native instructions appropriate to the local operating system. This gives Java its machine independence.

Advantages of Visual J++

Visual J++ allows developers to:

  • Build 100 percent Java-compatible cross-platform applets and applications, or extend them to integrate with existing applications. An applet is a Java program that can be included in an HTML page. When a user browses an HTML document with an attached Java applet, the applet's code is transferred to the user's system, compiled, and executed by the browser.
  • Leverage existing Java development skills and code.
  • Compile code at more than 10,000 lines of code per second.
  • Find and fix bugs faster; the Visual J++ debugger can debug multiple applets simultaneously from within a browser.
  • Develop high-performance database access using DAO and RDO.
  • Use ActiveX components with Java applications and create reusable ActiveX components with Java.

Microsoft Visual FoxPro

Microsoft Visual FoxPro is an object-oriented environment for database construction and application development. It allows you to construct objects and classes that feature true inheritance, encapsulation, and all other traits of a robust object-oriented development environment.

Visual FoxPro provides you with the necessary tools to organize tables of information, execute queries, create integrated relational database management systems (DBMS), or program fully developed data management applications. The Visual FoxPro database engine is a full-featured file-server relational database engine that is optimized for large datasets.

Microsoft Visual FoxPro brings several unique strengths to the Visual Tools family, including:

  • An object-oriented tool set for creating reusable components.
  • A data-centric tool set with a strong local database engine and client/server connectivity.
  • A powerful interactive data manipulation environment.

Like Microsoft Visual Basic, you can use Visual FoxPro to create Automation servers to expose functionality that can be used and reused by other applications. For example, you can utilize existing data manipulation code in an Automation server application that can be called from any Microsoft Office application or by the Internet Information Server. This allows you to leverage existing code while taking advantage of the latest advances in component technologies.

In the same manner as Visual Basic, a Visual FoxPro Automation server supports Remote Automation to create true distributed multitier client/server applications.

Advantages of Visual FoxPro

Visual FoxPro provides the following features:

  • A robust database engine that is optimized for large data sets, and is a powerful choice for Xbase developers.
  • Use of customer's legacy Xbase applications in Windows NT and Windows 95.
  • The Visual Class Designer, which allows you to create classes without learning object syntax.
  • Rapid application development using object-oriented programming techniques.
  • Class libraries that can be used to quickly assemble applications from pretested components.


Microsoft Windows Architecture Training
Microsoft Windows Architecture for Developers Training Kit
ISBN: B00007FY9D
EAN: N/A
Year: 1998
Pages: 324

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net