Advanced Windows DNA Scripting with Visual InterDev

arunsnarayanan 2 views 23 slides Mar 12, 2025
Slide 1
Slide 1 of 23
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23

About This Presentation

"Windows Distributed interNet Applications Architecture" (DNA) was Microsoft's approach to building applications that could leverage both the Windows platform and the internet


Slide Content

ADVANCEDWINDOWS
®
DNA
PROGRAMMINGWITH
VISUALINTERDEV
Computer Call
April 08, 1999

WINDOWS DNA ARCHITECTURE
DISTRIBUTED INTERNET APPLICATIONS

◆Application server
◆Business objects
◆MTS
◆Packaged Apps
◆Site Server 3.0
◆Existing Systems
➢Mainframe, AS/400,
Unix, ERP Systems
◆Data Access
Database
ODBC
Web Server

Active Server Pages
(ASP)
Script engine
internet
information
server
Netscape
Navigator
Internet
Explorer
Any HTML 3.2
Browser
?
DCOM
HTTP
MICROSOFT
®
WEB PLATFORM
Visual Studio
Visual InterDev

VISUAL INTERDEV FEATURES
•Source and WYSIWYG Editing
with IntelliSense
®

•End-to-end debugging
•Site design and management tools
•Database tools
•Extensible, customizable shell
•Scripting Library
•New design-time control architecture and controls

VISUAL INTERDEV
SCRIPTING LIBRARY
•Components included with
Visual InterDev that provide:
•An object-oriented abstraction for building Web applications
•A consistent programming model for scripting with Dynamic HTML and
ASP
•Support for building applications with broad reach

SCRIPTING OBJECT
MODEL FEATURES
•Run-time layer that creates an ASP execution model similar to
DHTML
•Event and method dispatching
•State management for both client and server
•Script objects
•Single abstraction for ASP and DHTML
•Objects that support data binding
•Asynchronous remote execution of server script functions

ASP
<%xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxx%>
xxxxxxxxxx
xxxxxxx
<%xxxxxxxxx%>
xxxxxxxxx
xxxxxxxxxxxxxx
EXECUTION MODELS - ASP
•Active Server Pages are executed sequentially top-to-bottom
•Pages are typically streams of HTML and code

DHTML
onload
onclick
EXECUTION MODELS - DHTML
•Document Object Model exposes page as an object hierarchy
•Event-driven

DHTML
onload
onclick
ASP
onenter
onclick
EXECUTION MODELS
SCRIPTING OBJECT MODEL
•Symmetric object model in both ASP and DHTML pages
•Event driven ASP and DHTML programming

SCRIPTING OBJECT MODEL ASP
EXECUTION FLOW
Server Client
ASP
HTTP GET
Response
Browser
onenter
User navigates to the Active Server Page
onexit

SCRIPTING OBJECT MODEL ASP
EXECUTION FLOW
ASP
HTTP POST
Response
Browser
onexit
Server Client
User clicks a button
onbeforeserverevent
onenter
onclick

PAGE EVENTS FOR ASP
•Server
•onenter event is fired when ASP
processes a page
•TIP: Use firstEntered property to check for round-trips
•onexit event is fired at the end
of ASP processing
•Client
•onbeforeserverevent is fired before posting a page for server processing

Recordset
Label
Textbox
Button
Checkbox
Listbox
OptionGroup
RecordsetNavbar
Page object
page events, methods, and properties
SCRIPTING LIBRARY OBJECTS
•Data-bound objects

DESIGN-TIME CONTROLS
•ActiveX
®
Controls that provide a graphical drag-
and-drop design metaphor for Web programming
•Design-time controls persist HTML, script, and/or
components to implement run-time functionality

DESIGN-TIME CONTROLS
•Visual InterDev includes a design-time control for each Scripting
Library object
•Run-time uses the
Scripting Object Model
•Can target DHTML or broad reach
•RAD development with design-time controls simplifies using the
Scripting Object Model

USING THE PAGE OBJECT
•Expose methods and properties on a ASP page to client or server
script on the same page or other pages
•State management
•Page events in ASP
•Remote scripting calls

Page 1
<A HREF=‘Javascript:
Page2.navigate.Method1(parm1)’> Page 2
<%
Sub Method1(parm1)
End Sub
%>
PAGE OBJECT
PAGE NAVIGATION
•Export ASP script functions as page navigate methods
•Invoke methods from client or server script
•Make references to other pages
•Every page has a default “show” method

STATE MANAGEMENT
•Create page properties to store strings
•Values are maintained over the lifetime
of the page
•Properties are visible to both server
and client script
•Properties can optionally also be stored in Session or Application

PAGE OBJECT
PAGE PROPERTIES

REMOTE SCRIPT EXECUTION
•Export ASP script functions as page execute methods
•Call server methods from client script and process return values
without posting the form to the server
•Make references to other pages

REMOTE SCRIPT EXECUTION
Page 1
<A HREF=‘Javascript:
Page2.execute.Method1(parm1, MyCallback)’>
<SCRIPT>
function MyCallback(rscb)
{
MyForm.Textbox1.value = rsbb.return_value
}
Page 2
<%
Function Method1(parm1)
Method1 = parm + 1
End Sub
%>

REMOTE SCRIPTING BENEFITS
•Improve performance
•Reduce server load
•Conserve network bandwidth
•Better user experience

SCRIPTING LIBRARY
AND THE BIG PICTURE
•Great tool for broad reach Web and DHTML user
interfaces
•Enables rapid application development and lowers
total development cost
•Use in conjunction with...
•Middle-tier business logic
•MTS
Tags