Full HTML for

Basic foilset FMS: Forces Modeling and Simulation Handout

Given by Wojtek Furmanski, Subhash Nair, Tom Pulikal at JSU HPC Summer Institute for Undergraduates, Jackson MS on June 15 1998. Foils prepared July 5 98
Outside Index Summary of Material


FMS Training Space
ASP For Web linked Databases
NetMeeting Collaboration
CORBA Collaboration
JWORB
Rational Rose
OMBuilder
VBA-Tutor
WebFlow
COM
Visual Authoring for Jager
TVR/DirectX

Table of Contents for full HTML of FMS: Forces Modeling and Simulation Handout

Denote Foils where Image Critical
Denote Foils where Image has important information
Denote Foils where HTML is sufficient

1 Forces Modeling and Simulation Demos and Lab Exercises
2 FMS Lab Demonstrations
3 Students Contributing Lab Materials:
4 Demos: FMS Training Space
5 PPT Slide
6 PPT Slide
7 Demos: ASP for Web / Databases
8 Active Server Pages
9 ASP - Built-in Objects
10 ASP - Example Code I
11 ASP - Example Code I (contd.)
12 ASP - Example Code I (contd.)
13 ASP - Example Code II
14 ASP - Example Code II
15 ASP - Example Code II (contd.)
16 ASP - Example Code II (contd.)
17 ASP - Example Code II (contd.)
18 ASP - Example Code II (contd.)
19 ASP - Example Code II (contd.)
20 Demos: NetMeeting Collaboration
21 Netmeeting in Careweb
22 Demos: CORBA Collaboration
23 CORBA - Common Object Request Broker Architecture
24 CORBA - Common Object Request Broker Architecture
25 Summer `97
26 CORBA
27 IIOP:
28 Services & Facilities.
29 Simple GuideLines For Collaboration
30 2nd Generation Java-based Collaboration API's
31 Collaboration Environments - The Next Frontier
32 CORBA, RMI and Java (Convergence Of Object Models)
33 Java CORBA combination
34 JDCE Features
35 Dynamics Of Collaboration
36 Dynamics of Collaboration(contd)
37 Exception Hierarchy
38 JDCE Client Exceptions
39 Data Bahn Exceptions
40 Client Events - A Reporting mechanism.
41 JDCE Messages
42 JDCE MessageQueue
43 JDCE Worker Threads
44 Starting the servers & setting up JDCE
45 Starting the servers & setting up JDCE
46 Binding to the sessionScheduler (CORBA) Vs (RMI)
47 Getting a handle to the DataBahn (CORBA)
48 Getting a handle to the DataBahn (RMI)
49 Publishing the Client Object Reference (CORBA)
50 Publishing the Client Object Reference (RMI)
51 PPT Slide
52 PPT Slide
53 Demos: JWORB
54 JWORB - Java Web Object Request Broker
55 JWORB Demo for HTTP+IIOP Integration
56 JWORB Demo for HTTP+IIOP Integration
57 JWORB Performance
58 Demos: Rational Rose
59 UML Support in Rational Rose
60 Unravelling CMS Source
61 Demos: OMBuilder (Excel+VBA)
62 PPT Slide
63 PPT Slide
64 Demos: VBA Self-Tutor
65 Objects and the Object hierarchy
66 Objects and the Object hierarchy
67 What is VBA ?
68 PPT Slide
69 Objects and the Object hierarchy
70 Special Features
71 PPT Slide
72 PPT Slide
73 PPT Slide
74 Expressions and Operators
75 PPT Slide
76 PPT Slide
77 Working with numbers and Strings of Text
78 Numerical operations
79 String Operations
80 PPT Slide
81 Working with Objects
82 PPT Slide
83 PPT Slide
84 PPT Slide
85 Working with Excel Objects
86 PPT Slide
87 Working with Menus
88 PPT Slide
89 PPT Slide
90 PPT Slide
91 Recognizing Events
92 PPT Slide
93 PPT Slide
94 Forms and Dialog Boxes
95 PPT Slide
96 PPT Slide
97 PPT Slide
98 PPT Slide
99 PPT Slide
100 PPT Slide
101 Using VBScript in Outlook
102 Outlook Script Editor
103 PPT Slide
104 PPT Slide
105 PPT Slide
106 PPT Slide
107 PPT Slide
108 PPT Slide
109 PPT Slide
110 PPT Slide
111 PPT Slide
112 PPT Slide
113 PPT Slide
114 PPT Slide
115 PPT Slide
116 PPT Slide
117 VBA for Project-98
118 Demos: WebFlow
119 WebFlow SC'97 Demo
120 WebFlow - Demo Snapshots
121 WebFlow/HPcc - Demo Snapshots
122 Before Summer `97
123 PPT Slide
124 WebFlow HPC Architecture
125 WebFlow Server
126 WebFlow Front-End & Middlware
127 WebFlow Middleware & Backend
128 Use of WebFlow/JWORB in WebHLA
129 Writing a Module
130 PPT Slide
131 PPT Slide
132 PPT Slide
133 PPT Slide
134 Registering the Module
135 Demos: Visual Authoring for Jager
136 WebHLA -RTI 1.0 Jager demo
137 Visual HLA Authoring for Jager
138 WebFlow+OMBuilder for Jager
139 WebFlow based Visual Simulation Tools
140 Demos - TVR / VRML
141 TVR Architecture (JSDA and CORBA Server versions)
142 TVR Demo Snapshots
143 Demos: TVR / DirectX-DirectPlay
144 Direct X Framework
145 PPT Slide
146 WebHLA based Virtual Prototyping Environment
147 Basic steps for using DirectDraw
148 Basic steps for using DirectPlay
149 PPT Slide
150 PPT Slide
151 PPT Slide
152 PPT Slide
153 PPT Slide
154 PPT Slide
155 PPT Slide
156 PPT Slide
157 PPT Slide
158 PPT Slide
159 PPT Slide
160 PPT Slide
161 PPT Slide
162 PPT Slide
163 PPT Slide
164 THE EXTENSIBLE MARK-UP LANGUAGE (XML)
165 What is XML
166 Continued
167 Continued
168 Drawbacks Associated with HTML
169 Drawbacks Continued
170 Use of XML
171 Use of XML Continued
172 ORIGIN OF XML
173 Continued
174 A Sample XML Document
175 An XML Document
176 Continued
177 The DTD File for the XML Document
178 The use of the Schema for the XML Document
179 Continued
180 Applications of XML
181 Continued
182 The Extensible Style-up Language

Outside Index Summary of Material



HTML version of Basic Foils prepared July 5 98

Foil 1 Forces Modeling and Simulation Demos and Lab Exercises

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Wojtek Furmanski, Subhash Nair and Tom Pulikal
Northeast Parallel Architectures Center
Syracuse University, Syracuse NY
furm@npac.syr.edu
presented at JSU HPC Summer Institute
June 15, 1998, Jackson, MS

HTML version of Basic Foils prepared July 5 98

Foil 2 FMS Lab Demonstrations

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
FMS Training Space
ASP For Web linked Databases
NetMeeting Collaboration
CORBA Collaboration
JWORB
Rational Rose
OMBuilder
VBA-Tutor
WebFlow
COM
Visual Authoring for Jager
TVR/DirectX

HTML version of Basic Foils prepared July 5 98

Foil 3 Students Contributing Lab Materials:

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Praveen Aravamudham
Bruno Goveas
Meryem Ispirli
Sunil Samuel Jos
Subhash Nair
Hasan Ozdemir
Zeynep Ozdemir
Shrideep Pallickara
Tom Pulikal
Mahesh Rengaswamy
Sachin R. Shanbhag
Abbasaheb Yadav

HTML version of Basic Foils prepared July 5 98

Foil 4 Demos: FMS Training Space

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
We start with a Site Tour to illustrate the content organization in the FMS Training Space
We then illustrate Web / Access Database support for SPEEDES, CMS and other software packages
Next, we show document editor support and we verify changes in the Access Database
Finally, we show PowerPoint foils database with SPEEDES talks by by Jeff Steinman

HTML version of Basic Foils prepared July 5 98

Foil 5 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 6 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 7 Demos: ASP for Web / Databases

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
We illustrate here Active Server Pages i.e. Microsoft IIS support for dynamic generation of HTML
VBS code, inlined as <%..%> bracket is pre-processed by the server in the server-side-include style (similar to Netscape's LiveWire)
ASP model offer convenient support for database inserts via the ADO (Abstract Data Object) interfaces (on top of OLE-DB)

HTML version of Basic Foils prepared July 5 98

Foil 8 Active Server Pages

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Server side scripting environment for dynamic and interactive webpage development
Easy to develop using VBScript or JScript
Extensible using ActiveX server components
Rapid application development using other Microsoft technologies like ADO, ODBC etc.,

HTML version of Basic Foils prepared July 5 98

Foil 9 ASP - Built-in Objects

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Application Object
  • shared by all users of the application
Request Object
  • holds the HTTP request from the client
Response Object
  • the response send back to the client
Server Object
  • provides access to methods and properties on the server
Session Object
  • stores information for a particular user-session

HTML version of Basic Foils prepared July 5 98

Foil 10 ASP - Example Code I

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
<!-- #Include file="utils.asp" --> <!--include file containing some variable declarations-->
<!-- The file that lists the classes in the left frame // sp_classes_list.asp --->
<html>
<head><title>Speedes Database - sp_classes_table Table List</title></head>
<body bgcolor="#ffffff">
<%
Dim selid, clsid
selid = request.querystring("id") 'get the id from the querystring
if(selid = "") then
selid = 1
end if
` open up a database connection and execute the SQL query
Set OBJdbConnection = Server.CreateObject("ADODB.Connection")
OBJdbConnection.Open "speedes"
` select id and name of all classes from the classes table
SQLQuery = "SELECT clsid,cname FROM sp_classes_table"
`execute the SQL query and get the resultset
Set typelist = OBJdbConnection.Execute(SQLQuery)
%>

HTML version of Basic Foils prepared July 5 98

Foil 11 ASP - Example Code I (contd.)

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
<%
if typelist.EOF then `if no records are present then print a message
%>
<!-- There are no records in the system -->
<% else %> <!-- otherwise print the data -->
<table border="0" cellspacing="2" cellpadding="2" bgcolor="<% = tabbgcol %>"
align="center" valign="middle" width="90%">
<tr align="left" valign="middle">
<%
Do While Not typelist.EOF ` print the data in a loop and construct the url
clsid = typelist("clsid") ` on the fly
sx = "<a target=main href=sp_classes_rec.asp?id=" & clsid & ">"
` if the record is the selected one then change the
` background color
if(StrComp(selid,clsid,vbBinaryCompare) = 0) then
sx = sx & "<font color=" & thfgcol & ">" & typelist("cname") & "</font></a>"
%>
<th align="left" valign="middle" nowrap bgcolor="<% = hgltcol %>" width="90%">
<% = sx %>

HTML version of Basic Foils prepared July 5 98

Foil 12 ASP - Example Code I (contd.)

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
<% else
sx = sx & "<font color=" & thfgcol & ">" & typelist("cname") & "</font></a>"
%>
<th align="left" valign="middle" nowrap width="90%" bgcolor="<% = trbgcol %>">
<% = sx%>
<% end if %>
</th></tr>
< tr align="left" valign="middle">
<%
typelist.MoveNext ` loop through the records until it reaches EOF
Loop
%>
</tr></table>
<%
end if 'end of outer if
OBJdbConnection.close ` close the connection at the end
%>
</body>
</html>

HTML version of Basic Foils prepared July 5 98

Foil 13 ASP - Example Code II

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
<!-- #Include file="utils.asp" --> <!--include file with certain variable declarations-->
<html><head><title>Speedes Database - sp_classes_table Record</title></head>
<body bgcolor="#ffffff">
<%
Dim id,cname,SQLQuery,listurl
id = request.querystring("id") ` get the id of the record to display
` open a database connection and execute the query
Set OBJdbConnection=Server.CreateObject("ADODB.Connection")
OBJdbConnection.Open "speedes"
SQLQuery = "SELECT * from sp_classes_table where clsid = " & id
Set typelist = OBJdbConnection.Execute(SQLQuery)
if typelist.EOF then ` check if there are any records
%><!-- There are no sp_classes_table records -->
<%
else
cid = typelist("clsid")
%>

HTML version of Basic Foils prepared July 5 98

Foil 14 ASP - Example Code II

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
<! -------- Class descriptions ---Print the record information here -------->
<table border="0" cellspacing="2" cellpadding="2" width="100%"
bgcolor="<% = tabbgcol %>" align="center" valign="middle">
<tr><td align="left" valign="middle" width="100%">
<blockquote><b>#include </b> <%= typelist("cinclude") %>
</blockquote>
</td></tr>
<%
if (typelist("cheader").ActualSize > 0) then ` check if value is present and print
%>
<tr><td align="left" valign="middle" width="100%">
<blockquote>
<font size="+1"><%= typelist("cheader") %></font>
</blockquote>
</td></tr>
<% End if %>
</table>
<!--------- Print the rest of the data here .... --->
<!--------- End of class descriptions ---------->

HTML version of Basic Foils prepared July 5 98

Foil 15 ASP - Example Code II (contd.)

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
<%
` list the class member functions by using the subroutine
printFunction "Public"
printFunction "Protected"
printFunction "Private"
printFunction "Free Standing Function"
`list the class member variables by using a subroutine
printData "Public"
printData "Protected"
printData "Private"
end if ` end of outer if
OBJdbConnection.close ` close connection once everything is done
%>
<% listurl = "sp_classes_list.asp?id="&id %>
<!-- client side script executed in the browser -->
<script LANGUAGE="VBScript">
Sub Window_OnLoad <!-- update the list frame every -->
window.top.list.navigate("<% = listurl %>") <!-- time a class record is displayed-->
end sub
</script>

HTML version of Basic Foils prepared July 5 98

Foil 16 ASP - Example Code II (contd.)

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
<% `subroutine to print the member functions
Sub printFunction(ByVal attrib)
FuncQuery = "select fname from sp_functions_table where "
FuncQuery = FuncQuery & " fattrib ='"&attrib&"' AND fclsid = " & cid
FuncQuery = FuncQuery & " order by fname"
Set funclist = OBJdbConnection.Execute(FuncQuery) `form the query and execute it
if(StrComp(attrib,"Free Standing Function") = 0) then
attrib = "Free Standing"
end if
attrib = attrib & " Methods"
if(Not funclist.Eof) then ` if result set is not empty then print them
printRecord attrib,funclist
end if
End Sub
%>

HTML version of Basic Foils prepared July 5 98

Foil 17 ASP - Example Code II (contd.)

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
<% `print the member variables depending on the attribute
Sub printData(ByVal attrib)
DataQuery = "select dname from sp_data_table where "
DataQuery = DataQuery &" dattrib ='" & attrib &"' AND dclsid = " & cid
DataQuery = DataQuery & " order by dname"
`form the query and execute it
Set datalist = OBJdbConnection.Execute(DataQuery)
attrib = attrib & " Data"
if(Not datalist.Eof) then ` if the result set is not empty then print it
printRecord attrib,datalist
end if
End Sub
%>

HTML version of Basic Foils prepared July 5 98

Foil 18 ASP - Example Code II (contd.)

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
<% ` print the record set passed for the class member
Sub printRecord(ByVal attrib, ByVal list)
cnt = 0
if(Not list.Eof) then
%>
<center><table width="100%" border="0">
<tr BGCOLOR="<% = trbgcol %>">
<td align="left" valign="middle" nowrap width="100%">
<font size="2" face="Arial" color="<% = thfgcol %>">
<b><% = attrib %> </b></font>
</td></tr> </table>
<table width="80%" border="0">
<%
Do While Not list.EOF
cnt = cnt + 1
if( (cnt Mod 2) > 0) then ` print it in two rows
%>
<tr>
<% end if %>

HTML version of Basic Foils prepared July 5 98

Foil 19 ASP - Example Code II (contd.)

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
<td align="left" width="80%" valign="middle">
<% For Each fld in list.Fields %>
<% = fld.Value %> ` use the generic field object to display the value
<% Next %>
</td>
<%
list.MoveNext ` loop through the record list
Loop
%>
</table></center>
<%
End if ' for record display
End Sub
'------------------------------------------
%>
</body>
</html>

HTML version of Basic Foils prepared July 5 98

Foil 20 Demos: NetMeeting Collaboration

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Microsoft's real-time collaboratory env: supports audio, video, chat, whiteboard, browser sharing
To be used as real-time collaboratory option in the FMS Training Space
Current demo illustrates NetMeeting in action within our other collaboratory space for telemedicine, CareWeb.

HTML version of Basic Foils prepared July 5 98

Foil 21 Netmeeting in Careweb

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 22 Demos: CORBA Collaboration

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Our base communication framework to support distributed simulation, computing and collaboration is Object Web RTI, i.e. DMSO RTI as CORBA service over JWORB
Here we show a demo of a similar but simpler collaboratory system JDCE (Java Distributed Collaboratory Env) by Shrideep Pallickara at NPAC
JDCE implements collaboratory as a Java CORBA service (or pure Java, using RMI = Remote Method Invocation)

HTML version of Basic Foils prepared July 5 98

Foil 23 CORBA - Common Object Request Broker Architecture

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Facilities
Object Bus over IIOP (Internet Inter-ORB Protocol)
Services

HTML version of Basic Foils prepared July 5 98

Foil 24 CORBA - Common Object Request Broker Architecture

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 25 Summer `97

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 26 CORBA

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
The CORBA standard tries to obviate problems resulting from boundaries such as networks, programming languages, and operating systems
An implementation of the standard defines
  • a language and
  • platform-independent object bus called an ORB (Object Request Broker), which lets objects transparently make requests to, and receive responses from, other objects located locally or remotely
Each implementation of the CORBA standard is able to communicate with any other implementation of the standard., the protocol used to achieve this end is the Internet Inter-ORB Protocol (IIOP).

HTML version of Basic Foils prepared July 5 98

Foil 27 IIOP:

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
The IIOP specification defines a set of data formatting rules, called CDR (Common Data Representation), which is tailored to the data types supported in the CORBA Interface Definition Language (IDL)
Using the CDR data formatting rules, the IIOP specification also defines a set of message types that support all of the ORB semantics defined in the CORBA core specification
The messaging formats and the CDR constitute the General Inter-ORB Protocol (GIOP).
IIOP is the GIOP message format sent over the Transmission Control Protocol/ Internet Protocol (TCP/IP).
  • Using IIOP any CORBA client can speak to any other CORBA Object.The architecture states that CORBA objects are location transparent.

HTML version of Basic Foils prepared July 5 98

Foil 28 Services & Facilities.

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
CORBAservices are widely available object services that virtually all CORBA objects are most likely to use.
  • Event Notification, Persistence, Lifecycles, Naming, Concurrency Control, Relationships, Transactions, Collections, Externalization, Time, Security, Query Service, Licensing, Trading, Change Management, Properties
CORBAfacilities are commonly occurring object frameworks that many CORBA applications could possibly use
  • Facilities that possess a wide user-base are known as Horizontal Facilities.
    • User Interface, Information Management, Systems Management, Task Management.
  • Others that one would expect to see a wide use by the market, or by the industry, are referred to as Vertical Facilities.
    • Imagery, Internet, Computer Integrated Manufacturing, Distributed Simulation, Finance and Accounting, Application Development, Mapping, Telecommunications, Health Care Providers

HTML version of Basic Foils prepared July 5 98

Foil 29 Simple GuideLines For Collaboration

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Identification Of
  • Actions that should be exclusively under the preview of the user
  • Actions that would propagate state changes to users working on copies of a particular tool in an established collaborative environment.

HTML version of Basic Foils prepared July 5 98

Foil 30 2nd Generation Java-based Collaboration API's

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Habanero from NCSA
  • Habanero uses the Presentation-Abstraction-Control model to administer the session and the users visual environment.
  • The cross-platform collaboration of different tools is facilitated by sharing Java-objects which implement "The Wrapped Object Model".
JSDT (Java Shared Data Toolkit) from Javasoft
  • JSDA provides a Shared Framework for Java at the data level
  • Data objects are shared over, specific instances of Channels- between two or more Clients.

HTML version of Basic Foils prepared July 5 98

Foil 31 Collaboration Environments - The Next Frontier

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Distributed Objects: Residing on the Distributed Engine provided by any of the following approaches to Distributed Processing.
  • CORBA: Common Object Request Broker Architecture (OMG)
  • RMI: Java Remote Method Invocation (part of the Java VM)
  • COM: Component Object Model (Microsoft).
Java Beans : The Only Component Framework for Java.

HTML version of Basic Foils prepared July 5 98

Foil 32 CORBA, RMI and Java (Convergence Of Object Models)

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Java with its mobile code facility handles inter-object communications within its native environment.
  • The Java RMI and Java Serialization interfaces allow Java-Objects to migrate around the network, heedless of what hardware platform they land on, and then control each other remotely.
Only the Java Programming language has an inverse mapping to IDL.
  • This allows the programmer to stay in the Java world during the developmental stage of distributed applications.
Convergence of Object models.
  • Support for the notion of abstract interfaces distinct from implementations or classes
  • Interface inheritance mechanisms are mostly identical.

HTML version of Basic Foils prepared July 5 98

Foil 33 Java CORBA combination

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Java's multi-threading feature facilitates the optimal framework for
  • Clients to have richer presentations and
  • Object-Implementation Servers to support more clients.
Java-CORBA greatly simplifies software upgrades of Clients in large distributed systems.
  • This is more so in Java because of the mobile byte codes.
  • In CORBA its due to the Dynamic Invocation Interface.
The onset of ORB-lets, dynamically downloadable or browser-resident as in the case of Netscape/Visigenic ORB.
  • CORBA boasts an even tighter integration with Java towards the evolving computing paradigm often referred to as the Object Web.

HTML version of Basic Foils prepared July 5 98

Foil 34 JDCE Features

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
A distributed-approach towards Collaborative Environments.
Support for IIOP- and RMI- based Transport Protocols.
  • The environment provides for Collaboration between an RMI-Client and a CORBA-client
A Distributed Event and Exception Heirarchy.
Based on the CORBA Naming Service.

HTML version of Basic Foils prepared July 5 98

Foil 35 Dynamics Of Collaboration

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
The Client initiates a bind to the sessionScheduler Object.
  • Given that this is successful, the Client is now ready to invoke the IDL-defined operations defined in the previous slides
It starts with the createBahn(String PartyName, String _applicationServerName) throws jdceBahnException function.
  • This would return a true in the event that a new dataBahn Object has been instantiated or
  • a jdceBahnException is raised to signify the prior existence of the desired Bahn.
The Client now has the option to decide whether he wishes to join an existing Bahn (party) or initiate the existence of a new one. In the latter case Step[2] is repeated as mentioned earlier.
  • Once the process is over, the Client gets a handle to the dataBahn Object by invoking jdce.byteways.dataBahn getDataBahnHandle(String PartyName, String _applicationServerName) throws jdceBahnException .

HTML version of Basic Foils prepared July 5 98

Foil 36 Dynamics of Collaboration(contd)

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Once Steps II and III are over and done with, the Client in a Distributed Collaboration mode.
The Client can invoke operations specified in IDL definitions for the dataBahn. These operations are preceded by public int register(String _clientName, clientProxy _clientObjRef) throws jdceBahnException, jdceClientException .
  • The registration process is a pre-requisite to switching to the Collaboration mode.
Once the registration process is over and done with the Client could invoke operations such as public boolean broadcastMessage(jdceMessage _message), public boolean whisperMessage(jdceMessage _message, String _clientName) throws jdceClientException, jdceBahnException etc.

HTML version of Basic Foils prepared July 5 98

Foil 37 Exception Hierarchy

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
class java.lang.Object
  • interface jdce.util.exception.jdceException.
class java.lang.Throwable (implements java.io.Serializable)
  • class java.lang.Exception
    • class org.omg.CORBA.UserException
    • class jdce.util.exception.jdceBahnException (implements java.io.Serializable, jdce.util.exception.jdceException)
    • class jdce.util.exception.jdceClientException (implements java.io.Serializable, jdce.util.exception.jdceException)
    • class jdce.util.exception.jdceRMIBahnException (implements java.io.Serializable, jdce.util.exception.jdceException)
    • class jdce.util.exception.jdceRMIClientException (implements java.io.Serializable, jdce.util.exception.jdceException)

HTML version of Basic Foils prepared July 5 98

Foil 38 JDCE Client Exceptions

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
If a Client exception has occurred. The following exception types can occur:
  • NAME_IN_USE - a client with a similar name exists.
  • ALREADY_BOUND - The client & the object Reference have been registered.
  • CLIENT_NOT_REGISTERED - The registration process failed.
  • NOT_BOUND : The client has not been bound to the Session Scheduler, Collaboration mode not yet activated for Client.
  • INVALID_OPERATION: Client not authorized for the particular operation.
  • UNKNOWN : Reason unknow to the JDCE Environment.

HTML version of Basic Foils prepared July 5 98

Foil 39 Data Bahn Exceptions

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
If a Bahn exception has occured. The following exception types could occur.
  • BAHN_CREATION_FAILED : The Bahn was not created successfully.
  • BAHN_EXISTS : The Bahn exists, i.e. there is Bahn for a given application under the same name.
  • BAHN_JOIN_FAILED : Join to the dataBahn failed.
  • NO_SUCH_BAHN: Reference to a non-existant dataBahn.
  • PERMISSION_DENIED: One of the operations on the dataBahn (expel, invite etc ) not completed due to insufficient permissions for the client which invoked the operation.
  • UNKNOWN : Reason unknow to the JDCE Environment

HTML version of Basic Foils prepared July 5 98

Foil 40 Client Events - A Reporting mechanism.

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
module jdce {
module util {
  • module event {
    • extensible struct jdceEvent {
  • long type; string clientName;
    • };
  • };
};
};
IDL Definition
java.lang.Object
  • jdce.util.event.jdceEvent implements java.io.Serializable
There are three types of client changes:
  • CLIENT_JOIN - a client has joined the dataBahn.
  • CLIENT_LEAVE - a client has left the dataBahn.
  • CLIENT_EXPEL - a client has been expelled by the creator of the bahn.

HTML version of Basic Foils prepared July 5 98

Foil 41 JDCE Messages

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
module java {
module lang { extensible struct Object;
};
};
module jdce {
module util {
module message {
extensible struct jdceMessage {
string sender;
string applicationType;
string messageType;
string protocolType;
::java::lang::Object content;
};
};
};
};
IDL DEFINITION
The Message Object Implementation consists of the following methods, which conform to the JavaBeans Design Patterns.
  • getApplicationType()
  • getBahnName()
  • getContent()
  • getProtocol()
  • getSender()
  • setApplicationType(String)
  • setBahnName(String)
  • setContent(Object)
  • setProtocolType(String)
  • setSender(String)

HTML version of Basic Foils prepared July 5 98

Foil 42 JDCE MessageQueue

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
The jdceMessageQueue is implemented as a Linked List for faster operations of addition/removal of messages.
The message queue provides for reporting availability of data on the queuebesides providing for returning the queue Contents as a stream of bytes or an array of Strings.
The queue has a in-lined class the QueueEnumerator which provides an Enumeration of the QueueContents.
The queueWidget has pointers to the preceeding Element and the elements successor.
class QueueWidget {
Object object;
QueueWidget prev;
QueueWidget next;
QueueWidget(Object object,
QueueWidget queueWidget1, QueueWidget queueWidget2) {
this.object = object;
prev = queueWidget1;
next = queueWidget2;
}
}
Besides the operations mentioned above, the queue provides for handling priority messages expressed by the addItemToTop() method.

HTML version of Basic Foils prepared July 5 98

Foil 43 JDCE Worker Threads

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
For every client (RMI or CORBA) there are worker threads assigned to handle the call-backs from the server-side.
  • The RMIWorker Thread contains references to the corresponding RMIClient.
  • The CorbaWorker contains references to the CorbaClient.
  • class java.lang.Thread (implements java.lang.Runnable)
    • class jdce.util.message.jdceRMIWorker
    • class jdce.util.message.jdceWorker
Both the RMIWorker and CORBAWorker Threads are scheduled by the jdceThreadScheduler. The fact that the ThreadScheduler schedules both the RMI and CORBA threads facilitates collaboration involving RMI and CORBA Clients.

HTML version of Basic Foils prepared July 5 98

Foil 44 Starting the servers & setting up JDCE

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Starting the Active Object Server, the default port it binds to is 14000 % osagent
Starting the Gatekeeper which acts as a HTTP-tunneler for Callbacks through firewalls, the default port it runs on is 15000 % gatekeeper
Starting up the RMIregistry on some port, (ports less than 1024 require administrative priveleges) say 7000 % rmiregistry 7000
Starting the Naming Service, with the nameContext Root as JDCE %java -DORBservices=CosNaming -DSVCnameroot=JDCE -DJDKrenameBug com.visigenic.vbroker.services.CosNaming.ExtFactory JDCE namingLog
Starting the main Object Server, which starts up both the RMI/CORBA sessionScheduler. %java -DORBservices=CosNaming -DSVCnameroot=JDCE jdce.impl.corba.sessionServer

HTML version of Basic Foils prepared July 5 98

Foil 45 Starting the servers & setting up JDCE

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
The HTML file, for the JDCE applet.
<applet code=demos.chat.ChatUser.class width=400 height=350>
<param name=org.omg.CORBA.ORBClass
value=com.visigenic.vbroker.orb.ORB>
<param name=ORBservices value=CosNaming>
<param name=SVCnameroot value=JDCE>
</applet>

HTML version of Basic Foils prepared July 5 98

Foil 46 Binding to the sessionScheduler (CORBA) Vs (RMI)

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
CORBA Binding Process.
private void getSessionSchedulerHandle() {
try {
// Initialize the ORB.
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(this, null);
// Calculate Start time
long startTime = System.currentTimeMillis();
// Bind to the Scheduler Object
/* Get a reference to the Naming Service */
org.omg.CORBA.Object nameServiceObj =
orb.resolve_initial_references("NameService");
if (nameServiceObj == null) {
System.out.println("Name Service Object = null");
return;
}
org.omg.CosNaming.NamingContext nameService =
org.omg.CosNaming.NamingContextHelper.narrow(nameServiceObj);
if (nameService == null) {
System.out.println("nameService = null");
return;
}
NameComponent[] collabName =
{ new NameComponent("Collaboration", "Scheduler")};
_chatSession=
jdce.scheduler.sessionSchedulerHelper.narrow(nameService.resolve(collabName));
} catch(Exception e) {
System.out.println("Exception: " + e);
}
}
RMI Binding Process
private void getSessionSchedulerHandle() {
try {
remoteObject =
Naming.lookup("rmi://jojo.npac.syr.edu:7000/Scheduler");
} catch (java.lang.Exception exec) {
System.out.println("Unable to lookup created Scheduler");
}
_chatSession = (jdce.scheduler.RMISessionScheduler) remoteObject;
}

HTML version of Basic Foils prepared July 5 98

Foil 47 Getting a handle to the DataBahn (CORBA)

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
public void getDataBahnHandle() {
try {
_chatSession.createBahn(partyName, "Chat");
System.out.println("New Party created");
} catch (jdceBahnException e) {
System.out.println("Exception in creations" +e);
} catch (Exception e) {
e.printStackTrace();
}
long startTime = System.currentTimeMillis();
try {
// Initialize the ORB.
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(this, null);
/* Get a reference to the Naming Service */
org.omg.CORBA.Object nameServiceObj =
orb.resolve_initial_references("NameService");
if (nameServiceObj == null) {
System.out.println("Name Service Object = null");
return;
}
org.omg.CosNaming.NamingContext nameService =
org.omg.CosNaming.NamingContextHelper.narrow(nameServiceObj);
if (nameService == null) {
System.out.println("nameService = null");
return;
}
NameComponent[] collabName =
{ new NameComponent("Collaboration", partyName+"Chat"+"Coordinator")};
_chatBahn=
jdce.byteways.dataBahnHelper.narrow(nameService.resolve(collabName));
} catch(Exception e) {
System.out.println("Exception: " + e);
}
long stopTime = System.currentTimeMillis();
System.out.println("Avg Ping to invoke = "
+ ((stopTime - startTime)/1000f) + " msecs");
}

HTML version of Basic Foils prepared July 5 98

Foil 48 Getting a handle to the DataBahn (RMI)

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
public void getDataBahnHandle() {
try {
_chatSession.createBahn(partyName, "Chat");
System.out.println("New Party created");
} catch (jdceRMIBahnException e) {
System.out.println("Exception in creations" +e);
} catch (Exception e) {
e.printStackTrace();
}
// long startTime = System.currentTimeMillis();
try {
_chatBahn = _chatSession.getDataBahnHandle(partyName, "Chat");
} catch (jdceRMIBahnException e) {
System.out.println("Exception in creations" +e);
} catch (Exception e) {
e.printStackTrace();
}
}

HTML version of Basic Foils prepared July 5 98

Foil 49 Publishing the Client Object Reference (CORBA)

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
{ // Initialize the ORB. org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(thisClient);
// Create the ClientControl object. ClientControlImpl control = new ClientControlImpl(thisClient); orb.connect(control);
try { /* Get a reference to the Naming Service */ org.omg.CORBA.Object nameServiceObj = orb.resolve_initial_references("NameService");
if (nameServiceObj == null) {
System.out.println("Name Service Object = null");
return; }
org.omg.CosNaming.NamingContext nameService = org.omg.CosNaming.NamingContextHelper.narrow(nameServiceObj);
if (nameService == null) {
System.out.println("nameService = null"); return; } NameComponent[] collabName =new NameComponent ("Collaboration", thisClient.partyName+"Chat"+"Coordinator")
}; System.out.println(thisClient.partyName+"Chat"+"Coordinator");
try { int id= thisClient._chatBahn.register(thisClient.clientName, (jdce.client.clientProxy)control); thisClient.clientID=id; System.out.println("Registration Succeeded"); } catch (jdceBahnException e) { System.out.println(e.typeToString(e.getType())); System.out.println("Registration Failed"); } catch (jdceClientException e){}

HTML version of Basic Foils prepared July 5 98

Foil 50 Publishing the Client Object Reference (RMI)

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
try {
control = new RMIClientControlImpl(thisClient);
identity= "rmi://jojo.npac.syr.edu:7000/" + thisClient.clientName; Naming.rebind(identity, control); System.out.println("ClientControl Export done.");
} catch (RemoteException re) { System.out.println("Exception in ClientControlImpl.main: " + re); }
catch (MalformedURLException e) {
System.out.println("MalformedURLException CoordinatorImpl.main: " + e);
}
try { int id= thisClient._chatBahn.register(thisClient.clientName, control);
thisClient.clientID=id;
System.out.println("Registration Succeeded");
} catch (jdceRMIBahnException e) {
System.out.println(e.typeToString(e.getType()));
System.out.println("Registration Failed"); }
catch (jdceRMIClientException e){}
catch (RemoteException e) {
System.out.println("OPOOOOuch!!");
}
}

HTML version of Basic Foils prepared July 5 98

Foil 51 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 52 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 53 Demos: JWORB

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
JWORB (Java Web Object Request Broker) is our multi-protocol (now HTTP + IOOP) middleware server
Difficult to demo as middleware invisible...
We illustrate HTTP and IIOP integration by timing a ping call over IIOP channel while invoking a Web page from JWORB - to notice a transient ping performance drop

HTML version of Basic Foils prepared July 5 98

Foil 54 JWORB - Java Web Object Request Broker

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 55 JWORB Demo for HTTP+IIOP Integration

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 56 JWORB Demo for HTTP+IIOP Integration

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 57 JWORB Performance

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 58 Demos: Rational Rose

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
We now move towards demos of high level visual authoring tools
Rose by Rational is the leading implementation of the new standard UML (Uniform Modeling Language)
UML supports OO design for various object-oriented languages in terms of a family of diagram topologies (class, sequence, interaction, activity, deployment..)
Microsoft has a similar product called Visual Modeller as part of Visual Studio Enterprise Edition

HTML version of Basic Foils prepared July 5 98

Foil 59 UML Support in Rational Rose

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 60 Unravelling CMS Source

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 61 Demos: OMBuilder (Excel+VBA)

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Another approach for object modeling was taken by HLA OMT (Object Model Template)
Since HLA objects are simple (no methods, only attributes), a database / tabular / spreadsheet approach sounds more practical
OMDT tool by Aegis Corp is one such editor
We developed OMBuilder by using VBA scripting to customize Excel spreadsheet editor

HTML version of Basic Foils prepared July 5 98

Foil 62 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 63 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Object Model Builder (OMBuilder) at NPAC

HTML version of Basic Foils prepared July 5 98

Foil 64 Demos: VBA Self-Tutor

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
VBA (Visual Basic for applications) offers powerful macro programming capabilities on top of COM based Microsoft application suite
We are also developing VBA self-tutor tools to aid VBA scripting inside various applications
We are now customizing other applications for their use in WebHLA, for example PowerPoint, Outlook98, Project98 etc.

HTML version of Basic Foils prepared July 5 98

Foil 65 Objects and the Object hierarchy

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Visual Basic for Applications is essentially Visual Basic with the services of the Microsoft Office Object hierarchy exposed to it
Everything you do in VBA involves manipulating objects, as every unit of content is an object. The entire content of the the application is encapsulated in these objects. Working with these objects and manipulating them to suit the requirements gives functionality to the application.

HTML version of Basic Foils prepared July 5 98

Foil 66 Objects and the Object hierarchy

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Some examples of objects include Excel Worksheet, Workbooks, Word Documents and PowerPoint slides.
The way the objects that make up the application are arranged relative to each other together with the way the content and functionality are divided among the object is called the Object Hierarchy or the Object Model.

HTML version of Basic Foils prepared July 5 98

Foil 67 What is VBA ?

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
VBA is short for Visual Basic for Applications. It is a powerful interactive programming language which tightly integrates with the Microsoft Office. It support a BASIC-like command structure whose interpreted coding style makes it an ideal scripting tool for the Office family of applications. Also it inherently supports OLE automation.
In the dark days of Windows application programming, the developer had to struggle with the vast array of functions called the Windows API. This had to be tightly coupled with the main procedures and the something called the `Message-Loop' which is used by windows to process events. Visual Basic changed all that by providing the developer with a simple intuitive BASIC-like syntax to program Windows applications. This concept radically changed the world of Windows programming and brought the arcane art to the mainstream.

HTML version of Basic Foils prepared July 5 98

Foil 68 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Microsoft soon released its Office suite of applications. The large base of Win95 users and the ever-growing popularity of the applications themselves rendered the release of customized or multi-featured versions of Office unfeasible. Consequently in order to maintain the user-base something had to be provided to allow the user to customize his working environment to his own convenience. Care had to be taken to see that any such medium would not be very complicated to use and would easily facilitate rapid development. The ease-of-use and its tight bond with the Windows environment rendered Visual Basic as the ideal medium for this purpose.
Visual Basic was soon selected as the standard scripting language for the Office family of applications. It was then endowed with a vast array of so-called Object Libraries specific to each application in the Office Suite. The programming core remained the same. Thus was born Visual Basic for Applications

HTML version of Basic Foils prepared July 5 98

Foil 69 Objects and the Object hierarchy

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
The top-level object in the hierarchy is the Application Object. Eg. Microsoft Word is the Application object. Each object can in turn have child objects. Eg. The Workbook Object has the Worksheet object as the child.
Every Objects has Properties and supports some Methods. Working with these objects involves manipulating these properties by using these methods.

HTML version of Basic Foils prepared July 5 98

Foil 70 Special Features

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
VBA uses a core language which is surrounded by a hierarchy of usable objects which encapsulate most of the functionality of the application.
Objects group features into a hierarchy that is more understandable than a flat macro language consisting of a myriad of commands.
VBA allows customizability of almost every conceivable feature of Office application using macro procedures, that can be manipulated using the user-interface of the application.

HTML version of Basic Foils prepared July 5 98

Foil 71 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Exposure to the entire suite of Microsoft Office Objects : Each Office application exposes its functionality as a set of programmable objects. VBA makes it possible to access these objects and manipulate them to suit the need of the application.
Consistent syntax across applications : VBA makes it possible to use BASIC-like code syntax across the entire suite of Office applications eliminating the need to learn a new language to use a different application.
Ability to use Active-X Controls: VBA supports the use of a powerful new software development medium called Active-X Control. These are reusable software components which are pre-built to function as individual modules carrying out a specific task. They are like manufactured spare parts ready to be plugged into the cars on the assembly-line.

HTML version of Basic Foils prepared July 5 98

Foil 72 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
A powerful development environment: The integrated development environment of VBA is available with most of the major Office Applications. It sports a consistent look and feel throughout removing the need for retraining and speeding up application development.
- VBA programs can call other VBA programs even if they exist in another application

HTML version of Basic Foils prepared July 5 98

Foil 73 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
A powerful development environment: The integrated development environment of VBA is available with most of the major Office Applications. It sports a consistent look and feel throughout removing the need for retraining and speeding up application development.
- VBA programs can call other VBA programs even if they exist in another application

HTML version of Basic Foils prepared July 5 98

Foil 74 Expressions and Operators

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
- An expression is a group of items that yield a value which can be a number, string, Boolean or even an object
- Expressions can be made of any combination of functions, operators, variables and constants.

HTML version of Basic Foils prepared July 5 98

Foil 75 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Some examples of expressions are
2+2 -- Returns a numeric value
me AND you -- returns a Boolean value
ActiveSheet -- Returns the currently active sheet object in Excel
Now -- Returns today's date

HTML version of Basic Foils prepared July 5 98

Foil 76 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
In Expressions, elements are glued together with the help of operators.
Some operators include :
Numerical -- +, -, /, * ^
String -- & Concatenates two strings
Numerical and String comparisons -- =, <>, >=, >, <, <=
Logical -- Not, And, Or, Xor.
Object Comparison -- Is Checks to see
if the two objects are the same.

HTML version of Basic Foils prepared July 5 98

Foil 77 Working with numbers and Strings of Text

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Besides the basic operators VBA provides many built-in functions for playing with numbers and strings and objects.
These functions make life easier for the programmer and remove the necessity for writing his own functions for performing basic operations.
Some operations which can be performed are summarized below.

HTML version of Basic Foils prepared July 5 98

Foil 78 Numerical operations

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Abs -- Returns the absolute value of a no.
Exp -- Returns the exponent of a no.
Log -- Returns the natural logarithm of a no.
Sgn -- Returns the sign of a no.
Sqr -- Returns the square root of a no.
Rnd -- Returns a random no. between 0 and 1
Cbool -- Convert a value to a Boolean value
Cdate -- Converts a value to a date value
CStr -- Converts a value to a string data type
Int -- Removes the fractional part of a real no.
Sin -- Returns the sine of an angle expressed in radians
Cos -- Returns the cosine of a no, expressed in radians
Atn -- Returns the arc tangent of an angle in radians

HTML version of Basic Foils prepared July 5 98

Foil 79 String Operations

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Instr -- Finds a substring in a longer string
Strcomp -- Compares two strings
Asc -- Converts a single character to its ASCII value,
Chr -- Converts a no. to a character with its ASCII value.
Val -- Converts a string to a numeric value
Lcase -- Converts a string to its lower case,
Ucase -- Converts a string to its upper case.
Lset -- Left Justifies a string
Rset -- Right- Justifies a string
Mid -- Returns a no. of characters from any position .
Trim -- Removes blanks from the left & right sides of a string.
Space -- Creates a string containing blank spaces.
String -- Creates a string containig repeated characters.

HTML version of Basic Foils prepared July 5 98

Foil 80 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Some invisible string charters used in programming are.
TAB -- Chr (9)
LF (linefeed) -- Chr (10)
CR (carriage return) -- Chr (13)
Common String Characters

HTML version of Basic Foils prepared July 5 98

Foil 81 Working with Objects

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Objects in Visual Basic are similar to objects in the real-world
They are arranged in some kind of hierarchy in the object library of the application.

HTML version of Basic Foils prepared July 5 98

Foil 82 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Objects have properties as well as methods which in effect define the objects interface and its existence.
Properties set or return information about the state of the object such as the width of a column of cells in Excel or the background of a PowerPoint slide.
Methods perform some action on an object such as printing a Word Document
Properties can appear on either side of an equal sign. The can be set (left-hand side) or their value can be used (right-hand side)
Method can only be used on the right-hand side when their return value is being used.

HTML version of Basic Foils prepared July 5 98

Foil 83 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Methods may or may not return a value
The syntax of using properties is
  • Object.property = some value
  • Variable = object.property
  • Eg. Selection.value = 45
  • Currentcol = Range("a5").column
The syntax of using methods is
Variable = Object.method [(arguments)]
Eg. Set currcell = Selection.Offset(1,1)

HTML version of Basic Foils prepared July 5 98

Foil 84 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Objects may provide a default property. When the object is being used without the property being specified by name, it is assumed by default.
An object can be specifically qualified by mentioning its entire hierarchy tree.
Eg Application.Documents(3).
VBA uses the active object when an object isn't qualified.
The With ... .End with statement lets you use the properties and methods of a specific object in a single block.
The Set statement can be used to create an object variable to refer to a specific object.

HTML version of Basic Foils prepared July 5 98

Foil 85 Working with Excel Objects

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
The Microsoft Excel Object Library provides a rich array of objects which can be used to manipulate the application right down to the cell value.
The top-level object (Application) controls the Excel Application, the files it loads and the windows it displays.
  • Workbook objects lets you access the parts of the workbooks and the items that are saved with it.

HTML version of Basic Foils prepared July 5 98

Foil 86 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Worksheet items describe the elements in a Microsoft Excel Worksheet. Eg. Range, chart
Charting objects include object used to create and modify charts. Eg. Data series, legends
Menu and Toolbar objects lets you access Microsoft Excel built-in menus and toolbars. They also allow you to create and manipulate your own custom menus and toolbars
Dialog box objects lets you create, display and manipulate your own or Excel's built-in dialog boxes and even make them respond to user events like a right mouse click.
Objects can also be contained in a collection. This characteristic is used when we are wish to manipulate objects in a group. Eg. The Workbooks collection of the Workbook object in Excel.

HTML version of Basic Foils prepared July 5 98

Foil 87 Working with Menus

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Visual Basic for Applications allows us to customize the menu system of the application dynamically by using the Menu object and the Menus Collection object.
The Menubar object and its associated collection Menubars allows us to manipulate a specific menubar in the worksheet. Each new menu is contained in its parent menubar. Hence creating a menu involves adding it to a menubar.
Different kinds of menus are the regular menus and the shortcut menus

HTML version of Basic Foils prepared July 5 98

Foil 88 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
The menuitem object of the menu object allows us to manipulate each item in the menu. The menuitems are what give functionality to the menu
Each new menuitem is contained in its parent menu. Hence creating a new menuitem involves adding it to a specific menu.
Some methods / Properties of the Menu object which will be used frequently are :
Add -- Adds a menu to its parent object i.e.. Menubar
Delete -- Deletes a menu from a menubar.
Enabled -- Enables a specific menu.
Caption -- Sets the caption of the menu

HTML version of Basic Foils prepared July 5 98

Foil 89 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Some methods / Properties of the Menu object which will be used frequently are :
Add - Adds a submenu to its parent menu
Delete - Deletes a submenu from a menu
Caption - Sets the caption of a menuitem,
Delete - Deletes the menuitem from the menu
Enabled - Enables/ Disables the menuitem
OnAction - Attaches to the item a subprocedure to be executed if the menuitem is selected
StatusBar - Sets or returns the text in the Status Bar when mouse moves over item

HTML version of Basic Foils prepared July 5 98

Foil 90 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
- A menu can be changed to a shortcut menu ( one which is displayed with a right mouse click ) during its creation. This is done by assigning the position parameter of the Add method to msoBarPopup. This is a predefined constant. Likewise there are many other constants defined which allow us to determine the position of the menu or menubar in the Excel Workbook

HTML version of Basic Foils prepared July 5 98

Foil 91 Recognizing Events

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Events are triggered by action such as mouse-clicks or key-presses.
Actions such as selecting a cell in Excel also trigger events.
Several objects respond to a predefined set of events.
When we want an object to respond to an event in a particular way we write a Visual Basic event procedure.

HTML version of Basic Foils prepared July 5 98

Foil 92 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Some events which are recognized in Excel are.
Activate -- Occurs when a Worksheet or WorkBook is activated
BeforeDoubleClick -- Occurs when the user double-clicks the worksheet
BeforeRightClick -- Occurs when the user right-clicks the worksheet.
SheetActivate -- Occurs when the user activates a sheet on the workbook.
WorkBookOpen -- Occurs when the user opens a workbook
NewWorkbook -- Occurs when the user opens a new workbook
WindowResize -- Occurs when the user resizes a window.

HTML version of Basic Foils prepared July 5 98

Foil 93 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Event procedures are named as follows.
Sub Objectname_Event()
I.e.. If a right-click event is to be detected by a sheet then use the following
Sub Worksheet_BeforeRightClick()
  • Events can also occur on forms and dialog boxes. Different controls present on the form can trigger different events.
  • Eg. A button control on the form can recognize the Clicked event
  • The naming convention for event procedures is as above.

HTML version of Basic Foils prepared July 5 98

Foil 94 Forms and Dialog Boxes

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
VBA allows us to create our own forms and dialog boxes. This capability can be utilized to accept user input in the application.
Forms consist of various controls arranged in some order. Controls are objects which are capable of accepting user inputs and detecting events. Examples of controls include :
Button, Label, text-field and list-box.
These controls and the form itself need to be assigned some properties. This can be done using the property sheet displayed in the designer. Default properties are already assigned to the objects. These can be changed by clicking in the sheet and typing in the required value.

HTML version of Basic Foils prepared July 5 98

Foil 95 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 96 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 97 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 98 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 99 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 100 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 101 Using VBScript in Outlook

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
To reference folders in the Folder list
To create, open and send custom items
To hide or show a form page
To change properties of a control on a page
To modify Outlook events
To automate Office document from outlook

HTML version of Basic Foils prepared July 5 98

Foil 102 Outlook Script Editor

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Available for each form
Used to add procedures to forms
  • to control an Outlook application
  • to control other Microsoft applications eg. Word, Excel, Access
  • to control Outlook folders, forms and items
  • to control the controls and propertoes in items

HTML version of Basic Foils prepared July 5 98

Foil 103 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Microsoft Outlook

HTML version of Basic Foils prepared July 5 98

Foil 104 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
VBScript code for opening Access db file

HTML version of Basic Foils prepared July 5 98

Foil 105 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Shows VBScript to open Access database from Outlook

HTML version of Basic Foils prepared July 5 98

Foil 106 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Shows Access form that was opened from Outlook

HTML version of Basic Foils prepared July 5 98

Foil 107 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Shows an Excel worksheet that was opened from Outlook

HTML version of Basic Foils prepared July 5 98

Foil 108 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Shows Word document that was opened from Outlook

HTML version of Basic Foils prepared July 5 98

Foil 109 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Project98-Gantt Chart View

HTML version of Basic Foils prepared July 5 98

Foil 110 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Pert Chart view

HTML version of Basic Foils prepared July 5 98

Foil 111 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Gantt Tracking View

HTML version of Basic Foils prepared July 5 98

Foil 112 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Resource Allocation View

HTML version of Basic Foils prepared July 5 98

Foil 113 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Resource Name and Resource Sheet View

HTML version of Basic Foils prepared July 5 98

Foil 114 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Using VBA to adjust dates

HTML version of Basic Foils prepared July 5 98

Foil 115 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Using VBA to open Access Database

HTML version of Basic Foils prepared July 5 98

Foil 116 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Using VBA to open Excel spreadsheet

HTML version of Basic Foils prepared July 5 98

Foil 117 VBA for Project-98

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Used in Macros
  • To Display or hide the frequently used toolbars.
  • To Display frequently used tables .
  • To Display frequently used views .
  • To Switch to a custom view .
  • To Generate standard report .

HTML version of Basic Foils prepared July 5 98

Foil 118 Demos: WebFlow

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
We present first a few typical WebFlow demos for image processing
Next, we show how to write a WebFlow module in Java
It's easy: each Java class can become a module after it implements webflow.Module interface with methods: init, run, destroy.

HTML version of Basic Foils prepared July 5 98

Foil 119 WebFlow SC'97 Demo

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 120 WebFlow - Demo Snapshots

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 121 WebFlow/HPcc - Demo Snapshots

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 122 Before Summer `97

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 123 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 124 WebFlow HPC Architecture

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 125 WebFlow Server

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 126 WebFlow Front-End & Middlware

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 127 WebFlow Middleware & Backend

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 128 Use of WebFlow/JWORB in WebHLA

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 129 Writing a Module

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Every module written for webflow, the class must implement the interface Module.
public class My_module implements Module { .... }
The Module interface is defined in package webflow.backend
public interface Module {
public MetaModule initialize();
public void run();
public void stop();
public void destroy();
}

HTML version of Basic Foils prepared July 5 98

Foil 130 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Example: This is an example of a module spawns an applet at the user side to input a text file and passes the file name to the next module which gets the image.
public MetaModule initialize() { mm = new MetaModule("Input Module "); //create an MetaModule instance
sp = new OutputPort(); // port for transmitting data to another module
mm.putPortID(sp.getPortID()); // registering a port which the module uses InetAddress local = java.net.InetAddress.getLocalHost(); //gets the host on //which the module reside hostName = local.getHostName(); //gets the host name of which the module //resides listener = new ServerSocket(0); //creates a new server socket for the module portNumber = listener.getLocalPort(); //port number on which the socket is //listening
contd..

HTML version of Basic Foils prepared July 5 98

Foil 131 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
// Html Code to Display Applet
String htmlString=new String(htmlFile);
/* String(htmlFile) must include the following This would allow the applet at the client side to interact with the module, by opening a socket connection since you pass the hostname and port number to the applet as parameters
CODE = "webflow.modules.demo.atest.InAp.class" //where //the applet resides WIDTH=300 HEIGHT=300 //dimensions PARAM Name=Host VALUE= hostName; PARAM NAME = portnum VALUE String.valueOf(portNumber); */ mm.setHTML(htmlString); //stores the html file in the //MetaModule object return(mm); //returns the MetaModule object }

HTML version of Basic Foils prepared July 5 98

Foil 132 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
public class OutputPort extends Port implements Serializable { public void send(Object str) { os= new ObjectOutputStream(getSocket().getOutputStream()); os.writeObject(str); } }
public class InputPort extends Port implements Serializable { public Object receive() { is= new ObjectInputStream(getSocket().getInputStream()); str = (String) is.readObject(); return(str); } }
Hence in the initialize method the statement
sp = new OutputPort() creates a new OutputPort object, the super class does the registering with the Connection Manager
mm.putPortID(sp.getPortID()) registering a port which the module uses it

HTML version of Basic Foils prepared July 5 98

Foil 133 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
public void run() {
filenamesocket = listener.accept(); //creates a socket connection ois = new ObjectInputStream(filenamesocket.getInputStream()); // to receive the input form the user fileName = (String) ois.readObject(); sp.send(fileName); //transmits the user input to the next module
}
public void stop():
This method stops the execution of the module.
public void destroy() { aSocket.close(); //closes socket connection with applet sp.destroyPort(); //closes socket connection with the other //module }

HTML version of Basic Foils prepared July 5 98

Foil 134 Registering the Module

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Register the module in the module.txt file
eg:
module's name - webflow.modules.myTest.myModule
module representation class - webflow.frontend.WebNodeWBClient
host - myhost.edu
port number -8888
then you would have an entry in the modules.txt file as follows
webflow.modules.myTest.myModule myhost.edu8888 webflow.frontend.WebNodeWBClient

HTML version of Basic Foils prepared July 5 98

Foil 135 Demos: Visual Authoring for Jager

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Jager is DMSO HLA application distributed together with the RTI release
It is a simple multi-player video game with minimal 2D interface and keyboard control
We integrated it with WebFlow and OMBuilder as a proof-of-concept visual authoring kit for HLA
User can specify game topology using Webflow and parameters using OMBuilder

HTML version of Basic Foils prepared July 5 98

Foil 136 WebHLA -RTI 1.0 Jager demo

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 137 Visual HLA Authoring for Jager

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 138 WebFlow+OMBuilder for Jager

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 139 WebFlow based Visual Simulation Tools

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 140 Demos - TVR / VRML

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
TVR is a joint project with IBM Watson on exploring scalable VRML/Java3D based multi-user collaboratory environments (worlds)
Previous demo used JSDA collab server and represented users as simple VRML avatars (cones)
New demo uses CORBA collaboratory server
We are also including avatar/humanoid animation

HTML version of Basic Foils prepared July 5 98

Foil 141 TVR Architecture (JSDA and CORBA Server versions)

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 142 TVR Demo Snapshots

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 143 Demos: TVR / DirectX-DirectPlay

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
We show first a few DirectX games that come with the release: Clowns, Duel, Paper Planes.
Next, we show a minimal Hello, World demo and we walk you though the source code to point out all essential elements

HTML version of Basic Foils prepared July 5 98

Foil 144 Direct X Framework

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Similar to HLA/RTI but
without object/database model
(OMT, OML, FOMs, SOMs)

HTML version of Basic Foils prepared July 5 98

Foil 145 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Direct X / Play Multiplayer Gaming Samples

HTML version of Basic Foils prepared July 5 98

Foil 146 WebHLA based Virtual Prototyping Environment

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index

HTML version of Basic Foils prepared July 5 98

Foil 147 Basic steps for using DirectDraw

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Create the DirectDraw object
Decide the application behavior
Change the display mode
Create flipping surfaces
Render to the surfaces
Flip the surfaces
Release and destroy the DirectDraw objects

HTML version of Basic Foils prepared July 5 98

Foil 148 Basic steps for using DirectPlay

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Enumerate the service providers
Create the DirectPlay object
Create or join a session
  • If joining a session, find it first.
Create a player
Send/Receive messages

HTML version of Basic Foils prepared July 5 98

Foil 149 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
/////////////////////////////////////////////////////////////////////
// Helloworld.cpp : Implementation source file for the helloworld //
// application using DirectDraw & DirectPlay //
// //
// Application : Demo application for DirectX/DirectPlay for JSU //
// summer institute //
// //
// Platform : Intel Pentium 166 MHz, WindowsNT 4.0, Visual C++ 5.0//
// //
// Author : Subhash Nair (subhash@cat.syr.edu) //
/////////////////////////////////////////////////////////////////////
#define WIN32_LEAN_AND_MEAN // For faster builds & smaller executables
#include <windows.h> // Our standard Windows header
#include <ddraw.h> // Header for DirectDraw
#include <dplay.h> // Header for DirectPlay
//Global Constants
const char *msg = "Hello World!"; //Our famous message, courtesy Kernighan & Ritchie!!
const int window_width = 640; // These 3 values for window width, window height and
const int window_height = 480; // and bits per pixel correspond to a standard display
const int bits_per_pixel = 8; // mode on most monitors
const DWORD UpdateDelay = 0; // How often our screen will be updated
const char sessionName[32] = "Welcome"; //Our session name
//Our session's Globally unique identifier
const GUID sessionGUID = { 0x6db0f1d1, 0xff0c, 0x11d1,
{ 0x9a, 0x17, 0x0, 0x0, 0xc0, 0x23, 0xca, 0xf3 } };
//The message structure we are going to send and receive
typedef struct _MESSAGE
{
int x;
int y;
}MESSAGE;
Global constants
Declaration

HTML version of Basic Foils prepared July 5 98

Foil 150 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
static HINSTANCE hinst; // The instance handle of our application
static RECT wndRect; // A rectangle object for the window's client area
static HWND hwndApp; // The handle of the application window
static LPDIRECTDRAW lpdd; // Pointer to DirectDraw object
static LPDIRECTDRAWSURFACE lpFrontBuffer; // Pointer to front buffer
static LPDIRECTDRAWSURFACE lpBackBuffer; // Pointer to back buffer
static LPGUID lpServiceProviderGuid; // Pointer to GUID of the service provider
static LPDIRECTPLAY lpDirectPlay1; // Pointer for the DirectPlay Object
static DPID playerID; // To store the player ID
static BOOL joinSession; // Join a session(TRUE) or create a new one(FALSE)
// Function declarations for forward references
static BOOL WinInit( HINSTANCE hInst, int nCmdShow ); //Initialize & set up Windows
static BOOL DXInit(void); //Initialize & set up DirectX components
static void UpdateFrame(char* direction);
static void CleanUp();
// Called by DirectX when enumerating service providers
static BOOL FAR PASCAL DirectPlayEnumerateCallback(
LPGUID lpSPGuid,
LPTSTR lpszSPName,
DWORD dwMajorVersion,
DWORD dwMinorVersion,
LPVOID lpContext
);
// Called by DirectPlay when enumerating sessions
static BOOL FAR PASCAL EnumSessionsCallback(
LPDPSESSIONDESC lpSessionDesc,
LPVOID lpContext,
LPDWORD lpdwTimeOut,
DWORD dwFlags
);
//Helper functions
static HRESULT CreateDirectPlayInterface();
static HRESULT FindSession();
static HRESULT OpenSession();
static HRESULT MakePlayer();
Variable &
Function
Declarations

HTML version of Basic Foils prepared July 5 98

Foil 151 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
//Entry point for the windows program
int PASCAL WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
MSG msg;
joinSession = FALSE; //By default create new session
if(strcmp(lpCmdLine,"join")==0)
joinSession=TRUE;
if( !WinInit( hInstance, nCmdShow ) ) // Initialize & set up Windows
return FALSE;
if( !DXInit() ) // Initialize & set up DirectX
return FALSE;
ShowCursor(FALSE); //Hide the mouse pointer
// Start windows loop
while( 1 )
{
if( PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) )
{
if( !GetMessage( &msg, NULL, 0, 0 ) )
return msg.wParam;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
else
{
UpdateFrame("NONE"); //Update the screen
}
}
}
The main Function - WinMain()
A command line argument
`join' must be supplied
to join an already existing
session
We update the screen even when
no keys are pressed because the
other player might have changed
position.

HTML version of Basic Foils prepared July 5 98

Foil 152 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
// WindowProc --- Handles messages for the main application window
static long FAR PASCAL WindowProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )
{
PAINTSTRUCT ps;
HDC hdc;
static BOOL fFirstPaint = TRUE;
switch( message )
{
case WM_KEYDOWN: //Check for key presses
switch( wParam )
{
case VK_UP:
UpdateFrame("UP");
break;
case VK_DOWN:
UpdateFrame("DOWN");
break;
case VK_LEFT:
UpdateFrame("LEFT");
break;
case VK_RIGHT:
UpdateFrame("RIGHT");
break;
case VK_ESCAPE:
case VK_F12:
PostMessage(hWnd, WM_CLOSE, 0, 0);
return 0;
}
break;
case WM_PAINT:
hdc = BeginPaint( hWnd, &ps );
EndPaint( hWnd, &ps );
return 1;
case WM_DESTROY:
// We're done, clean up
CleanUp();
break;
}
return DefWindowProc(hWnd, message, wParam, lParam);
}
The message processing function - WindowProc()

HTML version of Basic Foils prepared July 5 98

Foil 153 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
// WinInit --- Make window class and create window
static BOOL WinInit( HANDLE hInstance, int nCmdShow )
{
WNDCLASS wc;
BOOL rc;
// Save instance handle for later use
hinst = hInstance;
wc.style = CS_DBLCLKS;
wc.lpfnWndProc = WindowProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = NULL;
wc.hCursor = LoadCursor( NULL, IDC_ARROW );
wc.hbrBackground = GetStockObject(BLACK_BRUSH);
wc.lpszMenuName = NULL;
wc.lpszClassName = "HelloWorldClass";
rc = RegisterClass( &wc );
if( !rc )
return FALSE;
// Create window
hwndApp = CreateWindowEx(
WS_EX_APPWINDOW,
"HelloWorldClass",
"Hello World",
WS_POPUP | WS_VISIBLE,
0,
0,
640,
480,
NULL,
NULL,
hInstance,
NULL );
if( hwndApp == NULL )
return FALSE;
UpdateWindow( hwndApp );
return TRUE;
}
WinInit()
Initializes and sets up the
windows part of our application

HTML version of Basic Foils prepared July 5 98

Foil 154 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
//Initialize DirectX components
static BOOL DXInit()
{
HRESULT hr;
DDSURFACEDESC ddsd; // Structures needed for Surfaces
DDSCAPS ddscaps;
//-----------Set up Direct Play------------------
// Get the service provider you want to use
DirectPlayEnumerate(DirectPlayEnumerateCallback, hwndApp);
// Create the DirectPlay object
CreateDirectPlayInterface();
// If you want to join a session, find it
if(joinSession)
FindSession();
// Join/Create a session
OpenSession();
// Create a player
MakePlayer();
DXInit():
Initializes & sets up the DirectX
part of our application
Setting up
DirectPlay
Continued...

HTML version of Basic Foils prepared July 5 98

Foil 155 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
//----------Set up DirectDraw---------------------
// Create the DirectDraw object
hr = DirectDrawCreate( NULL, &lpdd, NULL );
if( hr != DD_OK )
return FALSE;
// Decide the application's behaviour
hr = lpdd->SetCooperativeLevel( hwndApp, DDSCL_EXCLUSIVE |
DDSCL_FULLSCREEN | DDSCL_ALLOWMODEX );
if( hr != DD_OK )
return FALSE;
// Set the display mode
hr = lpdd->SetDisplayMode( window_width, window_height, bits_per_pixel );
if( hr != DD_OK )
return FALSE;
ddsd.dwSize = sizeof( ddsd );
ddsd.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT;
ddsd.dwBackBufferCount = 1; //We are using one back buffer
//Specify surface capabilities
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_FLIP | DDSCAPS_COMPLEX;
hr = lpdd->CreateSurface( &ddsd, &lpFrontBuffer, NULL );
if( hr != DD_OK )
return FALSE;
// get pointer to back buffer
ddscaps.dwCaps = DDSCAPS_BACKBUFFER;
hr = lpFrontBuffer->GetAttachedSurface(&ddscaps, &lpBackBuffer );
if( hr != DD_OK )
return FALSE;
/* Initial screen layout & rendering can be done here if needed */
return TRUE;
}
Setting up
DirectDraw
640 X 480 X 8

HTML version of Basic Foils prepared July 5 98

Foil 156 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
// Update the screen with new coordinates
static void UpdateFrame(char* direction)
{
HRESULT hr;
HDC hdc;
LPDPID lpmsgFrom = new DPID; //ID of player sending the message
LPDPID lpmsgTo = new DPID; //ID of player who will receive the message
MESSAGE *pMessage = new MESSAGE;
DWORD msgSize = 8;
static SIZE size; //To store text size
static int xchange = 1; //Change along x direction
static int ychange = 1; //Change along y direction
//My initial coordinates
static int x = window_width/2;
static int y = window_height/2;
//The other player's initial coordinate
static int x1 = window_width/2;
static int y1 = window_height/2;
//-------- To introduce delay in updating screen-----------
static DWORD lastTickCount = 0;
DWORD thisTickCount;
thisTickCount = GetTickCount();
if((thisTickCount - lastTickCount) <= UpdateDelay)
return;
lastTickCount = thisTickCount;
//----------------------------------------------------------
UpdateFrame():
Redraws the objects at
their new position
Since we have used an
update delay of 0, this
doesn't take effect.
If we had used, say, 5ms,
this function wouldn't
continue execution until
5ms had elapsed
Continued...

HTML version of Basic Foils prepared July 5 98

Foil 157 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
//Check if any messages were received from the other player
hr = lpDirectPlay1->Receive(lpmsgFrom, lpmsgTo, DPRECEIVE_ALL, pMessage, &msgSize);
if(SUCCEEDED(hr)) //If yes, ...
{
// Update his coordinates
x1 = pMessage->x;
y1 = pMessage->y;
}
//Erase the back buffer to remove 'Hello World!' from previous position
DDBLTFX ddbltfx;
ddbltfx.dwSize = sizeof( ddbltfx );
ddbltfx.dwFillColor = PALETTEINDEX(0);
hr = lpBackBuffer->Blt( NULL,
NULL,
NULL,
DDBLT_COLORFILL | DDBLT_WAIT,
&ddbltfx);
if(lpBackBuffer->GetDC(&hdc) == DD_OK)
{
GetTextExtentPoint32(hdc, msg, strlen(msg), &size );
//Update my coordinates
if(strcmp(direction,"UP")==0) //If UP arrow was pressed
if(yɬ) y-=ychange;
if(strcmp(direction,"DOWN")==0) //If DOWN arrow was pressed
if((y+size.cy) < window_height) y+=ychange;
if(strcmp(direction,"LEFT")==0) //If LEFT arrow was pressed
if(xɬ) x-=xchange;
if(strcmp(direction,"RIGHT")==0) //If RIGHT arrow was pressed
if((x+size.cx) < window_width) x+=xchange;
Continued...
Fills the back buffer
with the color specified
in ddbltfx.dwFillColor

HTML version of Basic Foils prepared July 5 98

Foil 158 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
SetBkColor( hdc, PALETTEINDEX(0) );
//Draw the other player at his new position
SetTextColor( hdc, RGB(255, 255, 255) );
TextOut(hdc,x1,y1,msg, strlen(msg));
//Draw myself at my new position
SetTextColor( hdc, RGB(196, 0, 38) );
TextOut(hdc,x,y,msg, strlen(msg));
//Send my new position to the other player
pMessage->x = x;
pMessage->y = y;
hr = lpDirectPlay1->Send(playerID, 0, DPSEND_GUARANTEE, pMessage, 8);
lpBackBuffer->ReleaseDC(hdc);
lpFrontBuffer->Flip(NULL,DDFLIP_WAIT); //Flip buffers
}
delete lpmsgFrom;
delete lpmsgTo;
delete pMessage;
}
Here, we draw at the
new positions

HTML version of Basic Foils prepared July 5 98

Foil 159 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
// Callback function for enumerating service providers
static BOOL FAR PASCAL DirectPlayEnumerateCallback(
LPGUID lpSPGuid,
LPTSTR lpszSPName,
DWORD dwMajorVersion,
DWORD dwMinorVersion,
LPVOID lpContext
)
{
//Look for the TCP/IP service provider for DirectPlay
if (strstr( lpszSPName, "TCP") != NULL)
{
// Make space for the service provider's GUID.
lpServiceProviderGuid = new GUID;
if (lpServiceProviderGuid == NULL) //If memory could not be allocated
::MessageBox(NULL,"Could not allocate memory for service provider's GUID",
"HelloWorld", MB_OK);
else
*lpServiceProviderGuid = *lpSPGuid; // Store the GUID of the service provider
return(FALSE); //Returning false stops further enumeration
//Since we found our service provider, we return false
}
return(TRUE); //Continue enumeration
}
DirectPlayEnumerateCallback():
DirectPlay calls this function for each
service provider it detects on the machine

HTML version of Basic Foils prepared July 5 98

Foil 160 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
// Helper function - Creates the DirectPlay object
static HRESULT CreateDirectPlayInterface()
{
HRESULT hr;
// Retrieve a DirectPlay 1.0 interface.
hr = DirectPlayCreate(lpServiceProviderGuid, &lpDirectPlay1, NULL);
if FAILED(hr)
{
if (lpDirectPlay1)
lpDirectPlay1->Release();
::MessageBox(NULL,"DirectPlayCreate Failed", "HelloWorld", MB_OK);
}
delete lpServiceProviderGuid;
return (hr);
}
CreateDirectPlayInterface():
Actually creates the DirectPlay object
Once we create the DirectPlay
object, we no longer need the
service providers GUID

HTML version of Basic Foils prepared July 5 98

Foil 161 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
//Look for a Hello World Session which might be already running
static HRESULT FindSession()
{
HRESULT hr;
DPSESSIONDESC sessionDesc;
ZeroMemory(&sessionDesc, sizeof(DPSESSIONDESC));
sessionDesc.dwSize = sizeof(DPSESSIONDESC);
sessionDesc.guidSession = sessionGUID;
hr = lpDirectPlay1->EnumSessions(&sessionDesc, 1000, EnumSessionsCallback,
hwndApp, DPENUMSESSIONS_AVAILABLE);
if FAILED(hr)
::MessageBox(NULL,"Could not find any HelloWorld sessions", "HelloWorld", MB_OK);
return(hr);
}
// Callback function for enumerating sessions
static BOOL FAR PASCAL EnumSessionsCallback(
LPDPSESSIONDESC lpSessionDesc,
LPVOID lpContext,
LPDWORD lpdwTimeOut,
DWORD dwFlags
)
{
if (dwFlags & DPESC_TIMEDOUT)
::MessageBox(NULL,"Could not find a HelloWorld session!....Timed Out", "HelloWorld", MB_OK);
else
::MessageBox(NULL,"Found a HelloWorld session!", "HelloWorld", MB_OK);
return(FALSE);
}
FindSession():
Enumerates other DirectPlay
sessions with same GUID
EnumSessionsCallback()
is called by DirectPlay for each session it finds.

HTML version of Basic Foils prepared July 5 98

Foil 162 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
// Helper function - Creates/Joins a session
static HRESULT OpenSession()
{
HRESULT hr;
DPSESSIONDESC sessionDesc;
ZeroMemory(&sessionDesc, sizeof(DPSESSIONDESC));
if(joinSession) //To join a session
sessionDesc.dwFlags = DPOPEN_OPENSESSION;
else
{
// To host a new session.
sessionDesc.dwFlags = DPOPEN_CREATESESSION;
strcpy(sessionDesc.szSessionName, sessionName);
sessionDesc.dwMaxPlayers = 10;
}
sessionDesc.dwSize = sizeof(DPSESSIONDESC);
sessionDesc.guidSession = sessionGUID;
sessionDesc.dwSession = 2;
hr = lpDirectPlay1->Open(&sessionDesc);
if(FAILED(hr))
::MessageBox(NULL,"Open Failed", "HelloWorld", MB_OK);
return(hr);
}
OpenSession():
Creates or joins a session

HTML version of Basic Foils prepared July 5 98

Foil 163 PPT Slide

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
// Helper function - Creates a player
static HRESULT MakePlayer()
{
HRESULT hr;
// Create a player
hr = lpDirectPlay1->CreatePlayer(&playerID, "Billy", "Bill Clinton", NULL);
if(FAILED(hr))
::MessageBox(NULL,"CreatePlayer Failed", "HelloWorld", MB_OK);
return(hr);
}
// Clean up before exiting
static void CleanUp()
{
//Done with DirectDraw
if( lpFrontBuffer )
{
lpFrontBuffer->Release();
lpFrontBuffer = NULL;
}
lpdd->RestoreDisplayMode();
lpdd->Release();
//Done with DirectPlay
if (lpDirectPlay1)
{
lpDirectPlay1->DestroyPlayer(playerID);
lpDirectPlay1->Close();
lpDirectPlay1->Release();
}
PostQuitMessage( 0 );
}
MakePlayer():Creates a new player
CleanUp(): Releases DirectX objects & buffers

HTML version of Basic Foils prepared July 5 98

Foil 164 THE EXTENSIBLE MARK-UP LANGUAGE (XML)

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Topics for Discussion :
What XML is all about
Drawbacks Associated with HTML
Use of XML
Origin of XML
A Sample XML Document
Applications of XML
The Extensible Style-up Language (XSL)

HTML version of Basic Foils prepared July 5 98

Foil 165 What is XML

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
XML is a mark-up language written to augment text in HTML, thus capturing as many as information from SGML, the parent mark-up language.
XML allows you to define your own tags, and manipulate with them.
XML files need a DTD to define the tags that you want to use, in release 1.0

HTML version of Basic Foils prepared July 5 98

Foil 166 Continued

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
The tags can be defined in the same file, through use of Schema.
The XML as well as the DTD files are then parsed in the XML Parser.
An XSL File is also needed to define the characteristics of the text to be used in the XML file to be displayed on the Web.

HTML version of Basic Foils prepared July 5 98

Foil 167 Continued

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
The XML File as well as the XSL File are then parsed in the XSL Parser to generate a HTML file that is then displayed on the Web.
XML developed Web-Pages can be viewed only in Internet Explorer 4.04.

HTML version of Basic Foils prepared July 5 98

Foil 168 Drawbacks Associated with HTML

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
HTML gives no information regarding the meta-data that make up the data to be displayed on the web.
HTML does not represent the data as the way as it needs to be manipulated online on the web. It merely provides a rich way of documents ont he web.

HTML version of Basic Foils prepared July 5 98

Foil 169 Drawbacks Continued

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
HTML is a flat-tag language that has it's own set of tags defined, giving the user very little choice of manipulating one's own tags for simplification.
Data when downloaded from the web sometimes contain SGML like mark-up codes that are totally unusable.

HTML version of Basic Foils prepared July 5 98

Foil 170 Use of XML

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
XML provides the ability to augment HTML text with XML tags to make smarter Web pages and Intranets.
XML is all about metadata and is aimed at the information of the data itself that can be decode, manipulated, and displayed on the web.
XML is all about sets and subsets.

HTML version of Basic Foils prepared July 5 98

Foil 171 Use of XML Continued

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
XML shall be straightforwardly usable over the Internet.
XML has been designed for ease of implementation and operability with SGML and HTML.
XML Documents shall be easy to create and will be able to support a large variety of applications.

HTML version of Basic Foils prepared July 5 98

Foil 172 ORIGIN OF XML

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Developed by the XML Working group under the auspices of the WORLD WIDE WEB CONSORTIUM (W3C) in 1996.
List of Parsers available for Parsing :-
Microsoft's MSXML Parser, release 1.8
NXP, An XML Parser written in Java by Robert Mukila

HTML version of Basic Foils prepared July 5 98

Foil 173 Continued

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
DATACHANNEL'S Channel Manager written for parsing XML Documents in Java
LARK, A non-validating XML Processor written in Java by Tim Bray, version-0.91
Tcl/XML, an XML Parser written in Tcl.
Alfred, A non-validating XML Parser in Java from Microstar, version=1.2
Larval, XML Parser in Java from Steve Ball

HTML version of Basic Foils prepared July 5 98

Foil 174 A Sample XML Document

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
XML Documents can be created by two ways
An external file, namely a DTD (Document Type Definition) is created for initializing the tags to be used inside the XML Document.
The tags to be used in the XML file can be declared inside the XML Document itself at the beginning by use of a <s:/schema> tag.

HTML version of Basic Foils prepared July 5 98

Foil 175 An XML Document

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
<?XML VERSION="1.0"?>
<DOCTYPE library SYSTEM "video.dtd>
<library>
<name>Block-Buster Video</name>
<films>
<film censored="yes" year=1998">
Titanic</film>

HTML version of Basic Foils prepared July 5 98

Foil 176 Continued

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
<film censored="no" year="1974">
Titanic</film>
</films>
</library>

HTML version of Basic Foils prepared July 5 98

Foil 177 The DTD File for the XML Document

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
<!ELEMENT library (name,films,film)
<!ELEMENT name (#PCDATA)>
<!ELEMENT films (#PCDATA)>
<!ELEMENT film (#PCDATA)>
where (#PCDATA) denotes that the tags that are to be used are Characters tags only.

HTML version of Basic Foils prepared July 5 98

Foil 178 The use of the Schema for the XML Document

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
<?XML VERSION="1.0"?>
<s:schema id="Video Schema">
<element Type id="name">
<string/>
</element>
<element type id="film">
<string/> </element>

HTML version of Basic Foils prepared July 5 98

Foil 179 Continued

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
<element Type id="films">
<element Type ="#film" occurs="ONEORMORE">
</element>
<element Type id="library">
<element Type = "#name">
<element Type = "#films">
</s:schema><!-- start of the use of tags>

HTML version of Basic Foils prepared July 5 98

Foil 180 Applications of XML

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Chemical Mark-up Language
http://www.venus.co.uk/omf/cml/intro.html
Channel Definition Format
http://www.w3c.org/TR/NOTE-CDFsubmit.html
Resource Description Format
http:www.w3c.org/RDF/

HTML version of Basic Foils prepared July 5 98

Foil 181 Continued

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
Web-Broker, a distributed object processing system which makes use of XML for scripting purposes.
http://www.w3.org/Submission/1998/07/
The Open Software Description Format
http://www.w3c.org/TR/NOTE-OSD.html
MathML, A mathematics modelling language written with use of XML

HTML version of Basic Foils prepared July 5 98

Foil 182 The Extensible Style-up Language

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. *
Full HTML Index
XSL - The Extensible Style-up Language is needed to convert the XML file to a HTML file.
More Information about XSL can be found at
http://www.microsoft.com/xml/xsl/tutorial/tutorial.asp

© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998