ArchStudio 4 An Introductory Tutorial

Slides:



Advertisements
Similar presentations
Software Architecture Lecture 3
Advertisements

Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
Architecture Representation
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Basic Concepts Software Architecture Lecture 3.
Software Architecture Lecture 2
G O B E Y O N D C O N V E N T I O N WORF: Developing DB2 UDB based Web Services on a Websphere Application Server Kris Van Thillo, ABIS Training & Consulting.
Internet Technologies 1 Master of Information System Management Java Server Faces Model/View/Controller Design Pattern for Web Development Slides.
INF 123: Software Architectures, Distributed Systems, and Interoperability Discussion Session Week 3 - Spring 2008 Instructor: Prof. Richard N. Taylor.
UML CASE Tool. ABSTRACT Domain analysis enables identifying families of applications and capturing their terminology in order to assist and guide system.
1 of 6 Parts of Your Notebook Below is a graphic overview of the different parts of a OneNote 2007 notebook. Microsoft ® OneNote ® 2007 notebooks are digital.
INF 123: Software Architectures, Distributed Systems, and Interoperability Discussion Session Week 4 - Spring 2008 Instructor: Prof. Richard N. Taylor.
INF 123: Software Architectures, Distributed Systems, and Interoperability Discussion Session Week 5 - Spring 2008 Instructor: Prof. Richard N. Taylor.
Peoplesoft: Building and Consuming Web Services
INF 123: Software Architectures, Distributed Systems, and Interoperability Discussion Session Week 1 - Spring 2008 Instructor: Prof. Richard N. Taylor.
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
C++ fundamentals.
UNIT-V The MVC architecture and Struts Framework.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Architecture-Based Runtime Software Evolution Peyman Oreizy, Nenad Medvidovic & Richard N. Taylor.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
Basic Concepts Software Architecture. What is Software Architecture? Definition: – A software architecture is the set of principal design decisions about.
INF 123: Software Architectures, Distributed Systems, and Interoperability Discussion Session Week 1 - Spring 2008 Instructor: Prof. Richard N. Taylor.
Selected Topics in Software Engineering - Distributed Software Development.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
Internet Technologies Review Week 1 How does Jigsaw differ from EchoServer.java? What abstractions are made available to the servlet writer (under.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture.
User Profiling using Semantic Web Group members: Ashwin Somaiah Asha Stephen Charlie Sudharshan Reddy.
Kemal Baykal Rasim Ismayilov
Basic Concepts and Definitions
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
SOAP, Web Service, WSDL Week 14 Web site:
Basic Concepts of Software Architecture. What is Software Architecture? Definition: – A software system’s architecture is the set of principal design.
Introduction  Model contains different kinds of elements (such as hosts, databases, web servers, applications, etc)  Relations between these elements.
Intro to JavaServer Faces Mimi Opkins CECS 493 Fall 2016.
Labs: Create, deploy and test a simple web service
Software Architecture Lecture 3
Software Architecture
Based on Eric Dashofy’s slides for
Chapter 2 Database System Concepts and Architecture
Google Web Toolkit Tutorial
Web Services-JAX-RPC JAX-RPC enables a Web Service endpoint to be developed using either a Java Servlet or Enterprise JavaBeans (EJB) component model.
Systems Analysis and Design With UML 2
Project 1 Introduction to HTML.
Activities and Intents
Software Design and Architecture
Advance Software Engineering
Flexible Extensible Digital Object Repository Architecture
Flexible Extensible Digital Object Repository Architecture
CHAPTER 2 CREATING AN ARCHITECTURAL DESIGN.
Software Architecture Lecture 3
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Knowledge Byte In this section, you will learn about:
Software Architecture Lecture 2
(Includes setup) FAQ ON DOCUMENTS (Includes setup)
Software Architecture Lecture 3
Chapter 5 Designing the Architecture Shari L. Pfleeger Joanne M. Atlee
Using JDeveloper.
Implementing Architectures
Software Architecture Lecture 3
An Introduction to Software Architecture
SAMANVITHA RAMAYANAM 18TH FEBRUARY 2010 CPE 691
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Chapter 9 Architectural Design.
Software Architecture Lecture 3
Student: Popa Andrei-Sebastian
WEB SERVICES From Chapter 19, Distributed Systems
Software Architecture Lecture 3
Message Passing Systems Version 2
Message Passing Systems
Presentation transcript:

ArchStudio 4 An Introductory Tutorial Slides adapted from Hazel Asuncion

Roadmap What is ArchStudio 4 Concepts Toolset integrated with Eclipse xADL 2.0 Data Bindings Myx Architectural Style Toolset integrated with Eclipse Eclipse plug-in AIM Launcher ArchEdit Archipelago ArchLight Selector Type Wrangler Using ArchStudio Hello World Demo

What is ArchStudio 4? Architecture-centric IDE Open-source Eclipse plug-in Integrated tools for software architecture Modeling Visualization Analysis Implementation Developed by mainly Eric Dashofy. Scott Hendrickson Ref: http://www.isr.uci.edu/projects/archstudio/

Just Another IDE? No, it complements existing IDEs like Eclipse Minimize architectural drift “Architectural drift: is the introduction of principal design decisions into a system’s descriptive architecture that are not included in, encompassed by, or implied by the prescriptive architecture, but which do not violate any of the prescriptive architecture’s design decisions… If not properly addressed, architectural drift will eventually result in architectural erosion.” [Taylor et al, 2009] Built on its own architecture style

Concepts xADL 2.0 Data Bindings Myx Architectural Style

xADL 2.0 Architectural Description Language in XML developed by ISR at UCI This ADL is defined in a set of XML Schemas Modeling language behind ArchStudio Modular and highly extensible Core models Components (computation) Connectors (communication) Interfaces (the exposed entry and exit points for components and connectors) Configurations (topology) One of the reasons why chose XML – plenty of third party tools that can manipulate an XML doc Modular – not monolithic architecture. Easy to extend Ref: http://www.isr.uci.edu/projects/archstudio/xadl2.html http://www.ics.uci.edu/~edashofy/papers/icse2002-presentation.ppt http://www.isr.uci.edu/projects/xarchuci/

xADL 2.0 Tools can access the architecture description in xADL 2.0 via a common interface, the component xArchADT. Base: xArch Instances Core Extensions Architecture structures and types Product Families – versions, options, variants Implementation mappings – architecture types to implementations Component, connector instances Component Type, connector types Ref: http://www.ics.uci.edu/~edashofy/papers/icse2002-presentation.ppt

xADL 2.0: CM/Product Family Arch Ref: http://www.ics.uci.edu/~edashofy/papers/icse2002-presentation.ppt

xADL 2.0: Implementation Mapping ArchStudio 4 currently supports mapping to Java files Ref: http://www.ics.uci.edu/~edashofy/papers/icse2002-presentation.ppt

XML eXtensible Markup Language Means of representing structured data Looks like HTML but the tags are user-defined Schema Describe data in the XML doc The “rules” for the XML doc Schema – run validator tools Ref: http://www.w3schools.com/xml/default.asp

xADL 2.0 Core Model Server HTTP Client <archStructure id="archStructure90164" type="types:ArchStructure"> <description>main</description> <component id="componentffa805157" type="types:Component"> <description>Server</description> <interface id="interfaceffa80123" type="types:Interface"> <description>getResource</description> <direction>in</direction> </interface> </component> <component id="componentffa12852" type="types:Component"> <description>Client</description> <interface id="interfaceffa57518" type="types:Interface"> <direction>out</direction> <connector id="connectorffa12435" type="types:Connector"> <description>HTTP</description> <interface id="interfaceffa54685" type="types:Interface"> <interface id="interfaceffa54686" type="types:Interface"> </connector> </archStructure> Server HTTP Client

xADL 2.0 Components Server HTTP Client <component id="componentffa805157" type="types:Component"> <description>Server</description> <interface id="interfaceffa80123" type="types:Interface"> <description>getResource</description> <direction>in</direction> </interface> </component> <component id="componentffa12852" type="types:Component"> <description>Client</description> <interface id="interfaceffa57518" type="types:Interface"> <direction>out</direction> HTTP Client

xADL 2.0 Connector Server HTTP Client <connector id="connectorffa12435" type="types:Connector"> <description>HTTP</description> <interface id="interfaceffa54685" type="types:Interface"> <description>getResource</description> <direction>in</direction> </interface> <interface id="interfaceffa54686" type="types:Interface"> <direction>out</direction> </connector> HTTP Client

xADL 2.0 Interfaces Server HTTP Client <component id="componentffa805157" type="types:Component"> <description>Server</description> <interface id="interfaceffa80123" type="types:Interface"> <description>getResource</description> <direction>in</direction> </interface> </component> <component id="componentffa12852" type="types:Component"> <description>Client</description> <interface id="interfaceffa57518" type="types:Interface"> <direction>out</direction> <connector id="connectorffa12435" type="types:Connector"> <description>HTTP</description> <interface id="interfaceffa54685" type="types:Interface"> <interface id="interfaceffa54686" type="types:Interface"> </connector> Server HTTP Note the direction of the interfaces specified by the direction tag Client

Data Bindings A set of Java classes that can be used to create and manipulate architecture descriptions Generated by “Apigen” tool, based on XML schemas Reduces the complexity of editing architecture descriptions by hiding the XML and providing constructs more familiar to architects Parses from and serializes to XML Data Binding API Components Connectors Interfaces Links Configurations etc. XML API (DOM, SAX) Elements Attributes Documents Namespaces vs. Ref: http://www.ics.uci.edu/~edashofy/papers/icse2002-presentation.ppt

Data Binding Library xArchADT – most used component in ArchStudio – event based interface. Data store for arch descriptions Ref: Dashofy, E., Asuncion, H., et al. ArchStudio 4: An Architecture-Based Meta-modeling Environment. ICSE 2007 Demo Paper.

Myx Architecture Style Purpose Support building flexible, high performance tool-integrating environments Serve as a foundation for building environments in Eclipse Heritage Borrows most of key properties from C2 style System implementation currently supported in ArchStudio 4 Purpose An architectural style is a named collection of architectural design decisions that (1) are applicable in a given development context, (2) constrain architectural design decisions that are specific to a particular system within that context, and (3) elicit beneficial qualities in each resulting system. [Taylor et al, 2009] In this case we are geared toward supporting the building of applications like ArchStudio Ref: http://www.isr.uci.edu/projects/archstudio/myx.html

Myx Architectural Style Rules Components are the loci of computation Connectors are the loci of communication Components communicate only through well-defined provided and required interfaces Components and connectors have two ‘faces’: ‘top’ and ‘bottom’ Components interact through three distinct patterns Synchronous bottom-to-top procedure call Asynchronous top-to-bottom (notification) messaging Asynchronous bottom-to-top (request) messaging Components may only make assumptions about the services provided above them, and may make no assumptions about the services provided below them. Applications have at least one main thread of control. Additional threads may be created by components as necessary. Asynchronous connectors also have their own threads. Shared Memory Additionally, architects must decide whether or not to allow components to share memory and pass pointers. This significantly increases coupling and limits the ability of Myx architectures to be distributed across hosts. For these reasons, shared memory assumptions should not be made unless absolutely necessary—all parameters passed over a call or asynchronous invocation should be serializable. For some applications, it may be more useful to establish ‘regions of shared memory’ in which groups of components are allowed to pass pointers to one another, but not allowed to pass pointers across the regional boundary. This can be achieved from a modeling/implementation perspective using subarchitectures. Ref: http://www.isr.uci.edu/projects/archstudio/resources/myx-whitepaper.pdf

Myx Architectural Style Benefits Easy to reuse - components are relatively independent of each other Easy to reconfigure – communication only via explicit interfaces Enables runtime modification – through dynamic proxies and event pumps Dynamic proxies and event pumps can be used to connect and disconnect components at run-time.

Myx.fw Framework Difficult to adhere to the constraints of a style using an existing programming language Bridge the gap between Myx and Java: myx.fw Component and Connectors implement IMyxBrick interface Ref: http://www.ics.uci.edu/~edashofy/classes/211/myx-assignment.ppt

Implementing a myx.fw component Components have main classes that implement IMyxBrick They may have as many auxiliary classes as you want The main class may just be a wrapper for services provided internally AbstractMyxSimpleBrick IMyxBrick implements extends LunarLanderComponents Ref: http://www.ics.uci.edu/~edashofy/classes/211/myx-assignment.ppt

Implementing a myx.fw component Components have three main jobs Store data from the framework (IMyxBrickItems) Implement lifecycle methods (init, begin, end, destroy) Provide true objects for all provided interfaces Ref: http://www.ics.uci.edu/~edashofy/classes/211/myx-assignment.ppt

Component Jobs Store IMyxBrickItems from the framework The framework needs to store some data about the component along with the component Abstract base classes take care of this for you Implement lifecycle methods Called by the framework when the architecture is in particular states init(): Brick is created begin(): Brick is wired into the architecture and ready to start end(): Brick is about to be unwired and shut down destroy(): Brick is about to be dismissed Ref: http://www.ics.uci.edu/~edashofy/classes/211/myx-assignment.ppt

Component Jobs Provide true objects for each provided interface Each provided/required interface has a name The framework will occasionally ask a component “give me the object that corresponds to this provided interface” Likewise, a component may request, from the framework, the true object corresponding to one of its required interfaces Later Ref: http://www.ics.uci.edu/~edashofy/classes/211/myx-assignment.ppt

Toolset Integrated with Eclipse Eclipse plug-in ArchStudio Perspective AIM Launcher – launch the system in development within ArchStudio ArchEdit Visualization Tree-view – schema driven Indicate implementation mappings Archipelago Visualization and modeling Boxes and arrows ArchLight - analysis Selector – product Families Type Wrangler – consistency checks between types and instances

ArchStudio 4.0 Built on its own tools and technologies Architecture specified in xADL 2.0 Upon invocation Bootstrapper parses the ArchStudio xADL file using the Data Binding Library Bootstrapper steps through xADL file and instantiates the various components Reference to the demo paper

ArchStudio Tools xArchADT – Data Store Live integration between tools Reference Ref:

Using ArchStudio Hello World Demo

Hello World Demo 1. Create Architecture 2. Add component 1.1 Create Structure 1.2 Create Types Set and Component Type 2. Add component 2.1 Edit description 2.2 Assign type to component 3. Map Architecture to Implementation 4. Write HelloWorld Java class 5. Move xml file to Java Project 6. Run Hello World

1. Create Architecture In Eclipse, go to ArchStudio Perspective Create a new project. File->New->Project. General->Project. Next. Project Name: HelloWorldProject. Finish

1. Create Architecture Right-click on the Project and select New->Other…ArchStudio 4 -> ArchStudio architecture Description File Name: Architecture.xml. Finish. Open the xml file with Archipelago.

1.1 Create Structure On the Outline View, expand the root element. Right click on Structures. Select New Structure. Expand Structures. Right click on the new Structure and select Edit Description. New Description: HelloWorld

1.2 Create Type Set and Component Type On the Outline View, select the root element. Right click on it. Select Create Type Set. Expand Types. Right click on Component Types and select New Component Type. Select the new Type. Right click on it and select Edit Description. New Description: HelloWorldType

2. Add Component In the Outline View, double click on the HelloWorld structure Right click on the Archipelago View and Select New Component

2.1 Edit description Right click on the new component. Select Edit Description… New Description: HelloWorld

2.2 Assign type to component Select HelloWorldType in the Outline View. Drag it and drop it on the HelloWorld component.

3. Map Architecture to Implementation In the Navigator View, right click on the xml file. Open With->ArchEdit In the Outline View, Expand Xarch, Arch Types, Component Type [HelloWorldType]. Right click on it. Select Promote to VariantComponentTypeImpl

3. Map Architecture to Implementation Similarly, right click on Component Type [HelloWorld Type]. Select Add Implementation. Right click on Implementation and select Promote to JavaImplementation Right click on Implementation and select Add Main Class

3. Map Architecture to Implementation Right click on Main Class and select Add JavaClassName Expand MainClass and double click on Java ClassName and enter “HelloWorld” as a value

4. Write Java Class Create Java Project. File->New->Java Project. Project Name: HelloWorld. Next. Click on Projects, Add.. Check edu.uci.isr.myx.fw. OK and Finish.

4. Write Java Class Right click on HelloWorld project and select New-> Class Class Name: Hello World. Finish.

4. Write Java Class Copy the following content in HelloWorld.java and Save the file import edu.uci.isr.myx.fw.AbstractMyxSimpleBrick; import edu.uci.isr.myx.fw.IMyxName; import edu.uci.isr.myx.fw.MyxUtils; public class HelloWorld extends AbstractMyxSimpleBrick{ // category: constructor public HelloWorld( ){} // category: startup and cleanup public void init(){} public void begin() { System.out.println("Hello world!"); } public void end(){} public void destroy(){} // override a required method public Object getServiceObject(IMyxName name){ //Since we are not implementing an interface in this class //we will return null. //if(name.equals(INTERFACE_NAME_IN_NAME)){ // return this; //} return null;

5. Move XML file to Java Project Create “arch” folder in HelloWorld/src Move (drag and drop)Architecture.xml from HelloWorldProject to HelloWorld/src/arch

6. Run Hello World In the Navigator View, right click on Architecture.xml, select Open With AIM Launcher In the Outline View, double click on HelloWorld Click on Instantiate

6. Run Hello World You should see the following output in the Console