290 likes | 416 Views
A Seamless Model and Language. Stephen W. Liddle Brigham Young University. Outline. Status of implementation Historical perspective Model-equivalent language. In the Beginning. Vannevar Bush, As We May Think , proposed the “memex” in 1945 Then we had hypertext systems
E N D
A Seamless Model and Language Stephen W. Liddle Brigham Young University
Outline • Status of implementation • Historical perspective • Model-equivalent language IWWOST’01, Valencia, Spain – Steve Liddle
In the Beginning • Vannevar Bush, As We May Think, proposed the “memex” in 1945 • Then we had hypertext systems • HyperCard on the Macintosh was popular IWWOST’01, Valencia, Spain – Steve Liddle
Then Came the Web • The World Wide Web was enabled by two very simple protocols • HTTP (get, post, …) • HTML (head, body, title, strong, …) • Sites started as fairly simple repositories of pages • Structure was basic: sections, paragraphs, lists, tables, anchors, links, images • Key simplification: no annotation IWWOST’01, Valencia, Spain – Steve Liddle
Then Came Version 2.0 • And beyond… • Applets, cookies, Cascaded Style Sheets, XML, JavaScript, server-side includes, server-side scripting, … • Trend to more power, complexity • How to we manage complexity? • Abstraction (modeling) IWWOST’01, Valencia, Spain – Steve Liddle
The History of Semantic Data Models • NIAM and ER in the mid 1970’s • For more than a decade, extensions proliferated • People learned that too much notation got in the way, and data models tended to simpler concepts IWWOST’01, Valencia, Spain – Steve Liddle
The History of OO Models • Built on semantic data models and software engineering methods • By the early 90’s were proliferating just like the semantic data models had • “Method Wars” • The negotiated peace settlement: UML • Clearly is a compromise • Too much notation (my opinion) IWWOST’01, Valencia, Spain – Steve Liddle
Progress from sustaining technologies Progress from disruptive technologies Disruptive innovation Sustaining vs. Disruptive Technology Trajectories Performance demanded by market High end Product Performance Low end Time IWWOST’01, Valencia, Spain – Steve Liddle
Our Experience with OSM • Work began in the late 80’s • Book on Object-Oriented Systems Analysis (OSA) in the early 90’s • Since then our research has generally used this model as its core IWWOST’01, Valencia, Spain – Steve Liddle
Guiding Philosophy • Take an “ontological” perspective • See Yair Wand’s work, for example • Take a “model-driven” approach • Agnostic toward the methodology • Instead emphasize clarity and purity of the modeling concepts • Provide clear formal definitions IWWOST’01, Valencia, Spain – Steve Liddle
OSM Layers • OSA (analysis) • OSS (specification) • OSD (design) • OSI (implementation) • OSE (evolution) • All together we call this Object-oriented Systems Modeling, or OSM IWWOST’01, Valencia, Spain – Steve Liddle
My Task: Implementation • OSA was a nice start • Did not provide a clean path to an implemented system, just to a naturally described system • Did cleanly separate analysis from design features • OSS, OSD, and OSI needed few changes to the basic model in OSA • We called our central model OSM and viewed OSA/OSS/OSD/OSI as shifts in perspective IWWOST’01, Valencia, Spain – Steve Liddle
The State of Software Development Then… • Difficult and lossy transformations between models, languages, tools • Inhibited communications (differing assumptions, definitions) • Barriers to seamless tool development • Multiple paradigms leading to complexity and lack of comprehensibility IWWOST’01, Valencia, Spain – Steve Liddle
Has Anything Changed? • Only slightly • We do emphasize “standards” now IWWOST’01, Valencia, Spain – Steve Liddle
Inherent Complexity • Software development is innately complex because of: • Sheer size of application • Number of users • Variety/complexity of I/O mechanisms • Originality of innovations created for a particular system • Sophistication of algorithms required to address system tasks IWWOST’01, Valencia, Spain – Steve Liddle
Artificial Complexity • Software development is artificially (and needlessly) complex because: • We do not have sufficient abstractions in • Operating systems • Languages • Models • Other tools • Ad-hoc mixture of abstractions in our models, languages, tools is poorly integrated, poorly defined, redundant, and inconsistent • We still have lossy transformations • The Web has only made it worse IWWOST’01, Valencia, Spain – Steve Liddle
Web (HTTP) server Web browser database server rendering engine server-side script handler client-side script handler Architectural Elements of a Typical Web Application. Typical Web Application IWWOST’01, Valencia, Spain – Steve Liddle
When executed on the server, if the user ID and password are found in the database, loads main_menu.php instead of continuing to execute this page. JavaScript trim function is invoked in the browser when the UserID text box loses the focus. (Removes leading/trailing blanks.) PHP script writes the current value of $UserID into the text box. PHP script writes the current date and time to the output page. <?php @$conn = mysql_pconnect("localhost", "userid", "passwd"); @mysql_select_db("my_database", $conn); if (!empty($UserID) && !empty($Password)) { $sql = "SELECT * FROM Person WHERE UserID='$UserID' AND " . "Password=PASSWORD('$Password')"; $result = mysql_query($sql, $conn); if ($result) { include("main_menu.php"); exit; } } ?> <HTML> <HEAD> <TITLE>Sample Login Page</TITLE> <STYLE TYPE="text/css"> BODY, P, TD, TH { font-family: arial, geneva, helvetica, sans-serif; font-size: 10pt; } TH { text-align: left; } H1 { text-align: center; font-size: 18pt; } H2 { text-align: center; font-size: 14pt; } </STYLE> <SCRIPT LANGUAGE="JavaScript"> <!-- function trim(fld) { temp = fld.value; if (temp != "") { re = /(^\s*)(.*[^\s])(\s*$)/; result = re.exec(temp); fld.value = result[2]; } } //--> </SCRIPT> </HEAD> Typical Web Page PHP Script Style Sheet JavaScript <BODY> <H1 ALIGN="CENTER">Please Log In</H1> <FORM NAME="frmLogin" METHOD="POST" ACTION="login.php"> <TABLE BORDER=0 ALIGN="CENTER"> <TR><TH>User ID:</TH> <TD><INPUT TYPE="TEXT" NAME="UserID" VALUE="<?= $UserID ?>" SIZE=15 ONBLUR="trim(this)"></TD> </TR> <TR><TH>Password:</TH> <TD><INPUT TYPE="PASSWORD" NAME="Password" SIZE=15></TD> </TR> <TR><TD COLSPAN=2 ALIGN="CENTER"><INPUT TYPE="SUBMIT" VALUE="Log In"></TD> </TR> </TABLE> </FORM> <HR> Page generated <?= date("d M Y H:i") ?> </BODY> </HTML> HTML Form
OSM Is Seamless Object Set • Single modeling and development environment • Resolves impedance mismatches: • Structural/behavioral • Imperative/declarative • Visual/textual • Reifies abstract objects • Accessible, formal metamodel • First-class high-level elements Person P1 P2 P3 IWWOST’01, Valencia, Spain – Steve Liddle
Model Equivalent Language • The semantics of the model and language are one-to-one • Programming is merely a shift in perspective to focus on efficient algorithms and structures • A “program” is simply an alternative view of a “model” • “Iteration” is quite simple IWWOST’01, Valencia, Spain – Steve Liddle
Why OSM Is Suitable Foundation • Highly expressive • Computationally complete • Formally defined (with so-called tunable formalism that allows varying levels of formality and completion) • Provides many different kinds of views IWWOST’01, Valencia, Spain – Steve Liddle
Organization of OSM • Object-Relationship Model • ORM describes structure (summary) • Object-Behavior Model • State nets describe object behavior (summary) • Object-Interaction Model • Interaction diagrams show how objects interact (synchronize and communicate) (summary) • Emphasis on fully reified high-level constructs (views) IWWOST’01, Valencia, Spain – Steve Liddle
Harmony, the OSM Language • Fully textual version of graphical OSM • Both have same underlying formal foundation • Adds convenient syntactic features • In the same way graphical models add convenient notations • Examples: • Figures A, B, C IWWOST’01, Valencia, Spain – Steve Liddle
Our Model/Language Features • Multiple paradigms • Declarative, imperative • Nested transactions • “Variable” has set semantics, not scalar • Type-complete persistence • No impedance mismatches IWWOST’01, Valencia, Spain – Steve Liddle
BUT… • No commercial-quality implementation IWWOST’01, Valencia, Spain – Steve Liddle
Proposal for Web Application Modeling • Begin with a core conceptual model that is formal, executable • Ideally, it would have a model-equivalent language behind it • Need to add navigation and presentation (interface) layers • Use “frameworks” and “architectures” in the sense of design patterns and subsystems IWWOST’01, Valencia, Spain – Steve Liddle
Adhere to Guiding Principles • Ontological perspective • Model-driven, not method-driven • Clear, formal definitions IWWOST’01, Valencia, Spain – Steve Liddle
Open Problems • Identification of sufficient, concise set of Web application modeling constructs • Complete, formal, ontological semantics for our chosen Web application model • What is navigation, really? • Comprehensive tools to tackle all aspects without introducing lossy transformations • Tools that are good enough to take care of performance tuning issues • No more database administrators? IWWOST’01, Valencia, Spain – Steve Liddle
References • Embley’s OSA and OODB Design books • CRC Press Handbook of Object Technology • Papers linked to the IWWOST Web site • http://osm.cs.byu.edu IWWOST’01, Valencia, Spain – Steve Liddle