Advanced Windows DNA Scripting with Visual InterDev
arunsnarayanan
2 views
23 slides
Mar 12, 2025
Slide 1 of 23
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
Size: 1.52 MB
Language: en
Added: Mar 12, 2025
Slides: 23 pages
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
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