Presentation is loading. Please wait.

Presentation is loading. Please wait.

Oct 2010 - 1 Interchangability in Software Design Notation - Timothy C. Lethbridge Interchangability in software design notation: programs models visual.

Similar presentations


Presentation on theme: "Oct 2010 - 1 Interchangability in Software Design Notation - Timothy C. Lethbridge Interchangability in software design notation: programs models visual."— Presentation transcript:

1 Oct 2010 - 1 Interchangability in Software Design Notation - Timothy C. Lethbridge Interchangability in software design notation: programs models visual textual Oct 2010 Timothy C. Lethbridge Andrew Forward, Omar Badreddin University of Ottawa

2 Oct 2010 - 2 Interchangability in Software Design Notation - Timothy C. Lethbridge A fundamental shift is coming Modeling will merge with programming –We will look at two approaches Alf, the latest OMG draft standard Umple, my research group’s work Programming is textual –But in future model diagrams will co-exist with textual descriptions of the model –Both can be edited Edits to diagram instantly reflected in text Edits to text instantly reflected in diagram

3 Oct 2010 - 3 Interchangability in Software Design Notation - Timothy C. Lethbridge Alf A complete new language –Loosely follows C-family syntax –Implements fUML (a UML subset) –Incorporates ideas from OCL too Class and activity diagrams No state diagram concepts yet http://www.omg.org/spec/ALF/

4 Oct 2010 - 4 Interchangability in Software Design Notation - Timothy C. Lethbridge Classes in Alf abstract class Selection { // Abstract class public abstract getSelectionValue(): Money; // Abstract operation definition } class ProductSelection // Concrete subclass specializes Selection { private quantity: Count; // Attribute definition private unitPriceOfSelection: Money; public select // Operation stub declaration (in cart: Cart, in product: Product, in quantity: Count); public getQuantity(): Count { // Concrete operation definition return self.quantity; }

5 Oct 2010 - 5 Interchangability in Software Design Notation - Timothy C. Lethbridge Associations in Alf assoc IsSupervisedBy { public supervisor: Professor[0..2]; public supervisee: Student [*]; { Ternary associations possible

6 Oct 2010 - 6 Interchangability in Software Design Notation - Timothy C. Lethbridge Activities in Alf activity Order_Behavior() { accept (checkout: Checkout); this.establishCustomer(checkout); do { accept (chargeSubmission: SubmitCharge); this.processCharge(chargeSubmission); accept (PaymentDeclined) { declined = true; this.declineCharge(); } or accept (PaymentApproved) { declined = false; } } while (declined); this.packAndShip(); accept (OrderDelivery); this.notifyOfDelivery(); }

7 Oct 2010 - 7 Interchangability in Software Design Notation - Timothy C. Lethbridge Other tidbits about Alf Lots of alternative ways to do things –let interest : CurrencyAmount = this.principal * this.rate * period; Or –CurrencyAmount interest = this.principal * this.rate * period; Reclassification –classify monitor from InActiveMonitor to ActiveMonitor Directives in comments –//@parallel Active classes run as independent threads –Can accept signals

8 Oct 2010 - 8 Interchangability in Software Design Notation - Timothy C. Lethbridge Umple UML Programming Language / Ample Model-oriented programming Adds UML abstractions to any OO language –Class and state diagrams Removes boilerplate code Allows simultaneous textual and diagrammatic modeling Eliminates round-tripping –Don’t edit generated code, just embed your custom code

9 Oct 2010 - 9 Interchangability in Software Design Notation - Timothy C. Lethbridge Umplification Converting to Umple / Amplification Incremental reverse engineering Performed on many systems including Umple itself Results in simpler and more robust systems –90% reduction in CRUD code Any Java, PHP, Ruby program can currently be umplified –Other languages coming … http://cruise.site.uottawa.ca/umpleonline/


Download ppt "Oct 2010 - 1 Interchangability in Software Design Notation - Timothy C. Lethbridge Interchangability in software design notation: programs models visual."

Similar presentations


Ads by Google