18
Models in design Sriram K. Rajamani Rigorous Software Engineering Microsoft Research, India

Models in design

  • Upload
    artan

  • View
    39

  • Download
    0

Embed Size (px)

DESCRIPTION

Models in design. Sriram K. Rajamani Rigorous Software Engineering Microsoft Research, India. Context. Certain kinds of software built w idely by people all over the world Eg. 3 tier business applications GUI front end Middle-layer: business logic Back end: database - PowerPoint PPT Presentation

Citation preview

Page 1: Models in design

Models in design

Sriram K. Rajamani

Rigorous Software EngineeringMicrosoft Research, India

Page 2: Models in design

Context

• Certain kinds of software built widely by people all over the world– Eg. 3 tier business applications

• GUI front end• Middle-layer: business logic• Back end: database

• Several instances share commonality• Similar design decisions repeated• Similar tradeoffs repeated• Similar implementation repeated

Page 3: Models in design

Wisdom

• The sum of learning through the ages; knowledge: “In those homely sayings was couched the collective wisdom of generations” (Maya Angelou)

• Wise teachings of the ancient sages

Page 4: Models in design

Manifestations of Wisdom

• Patterns

• Frameworks

Page 5: Models in design

Patterns

• Design artifacts from accumulated design experience

• Named, classified and cataloged• “Each Pattern describes a problem which occurs

over and over again in our environment, and then describes the core of the solution to that problem in such a way that you can use this solution a million times over, without ever doing it the same way twice”

• Informality part of the “culture”– To “formalize patterns” is tantamount to restricting

them, and hence restricting their creativity

Page 6: Models in design

Frameworks (1)

• One person’s view on how to factor the commonality in “widely repeated” software construction

• Fancy term for this is: MDD (Model Driven Development)• Features

– Diagrammatic specification at a high level of abstraction as “models”

– Automatic code generation– Employs certain commonly used patterns, but they are pre-

chosen and pre-wired according to the tastes of the framework author

• Semantics is given in terms of the generated code:– Only the framework-author knows how to use the framework

best

Page 7: Models in design

Frameworks (2)

• Advantages– Improved productivity

• Disadvantages– Have to “buy in” to the framework-author’s

opinions– Stepping “outside” the framework is hard

• Requires modifying generated code (consistency between code and model is now broken)

• Requires modifying the framework itself!

Page 8: Models in design

Frameworks everywhere

• Inside Microsoft – Presentation Foundation (Avalon)

• XAML based declarative data-driven UI– Workflow Foundation

• XOML based declarative workflow specifications– Connection Foundation (Indigo)

• Will become more declarative– Microsoft Business Solutions

• Several products (CRM, ERP, Axapta) are based on models– “Whitehorse” and Software Factories projects in Visual Studio

• In India– Indian SIs have been doing model driven development for some

time• Mastercraft from TCS

Page 9: Models in design

Mastercraft from TCS

• TCS = Tata Consultancy Services, a “big” consulting company based in India

• Model driven development framework for Enterprise Business Applications

• Built from consulting experience building such applications repeatedly over several years

Page 10: Models in design
Page 11: Models in design
Page 12: Models in design
Page 13: Models in design
Page 14: Models in design

Securities Trading

The Global Straight-Through Processing Association (GSTPA) was formed in August 1998, with the objective of promoting efficient and accelerated flow of cross-border trade information, improving the accuracy and completeness of the information and enabling standardized inter-connectivity among participants. Its membership represents over 95 of the leading Investment Managers, Broker-Dealers and Global Custodians’ community in more than 19 countries.

The TFM SolutionThe Transaction Flow Manager (TFM) was developed by Tata Consultancy Services, using their MasterCraft rapid application development environment. MasterCraft played a significant role by providing an end-to-end integrated framework for the TFM solution. The use of MasterCraft provided a handle on the solution’s complexity, dramatically improved productivity, and guaranteed a high-performance application that could be delivered within the daunting schedule of 18 months.

GSTP is built around multilateral interconnectivity for participants involved in post trade and pre settlement securities processing. Its core component is the TFM, which tracks, numbers and timestamps inputs and performs matches on allocations, net proceeds and settlement locations. The TFM, which is a Virtual Matching Utility (VMU) features real-time status monitoring and reporting - ensuring that trade details can be agreed by all parties and locked in early in the post-trade cycle. This results in: a standardized approach to the handling of securities transactions in all markets; improved settlement rates; reduced operational risks and costs, and an objective foundation for performance benchmarking. Connection to the TFM is via an access module and SWIFTNet

Quick Facts on the TFM Solution Using MasterCraft• 4.9 Million C++ Lines of Code (LOC) on IBM S/390, CICS and    DB2 platform• 1.7 Million C++ LOC on SUN Solaris / Windows NT and DB2 UDB    platform• Size of specification: 180 KLOC• Code productivity of 250 tested LOC of C++ per person-day• Elapsed time for analysis and design: 8 months• Elapsed time for construction: 3 months• Elapsed time for system + acceptance testing: 3 months• Multi-technology, multi-platform solution• IBM S/390, Sun Solaris, Win NT with C++, Java, CICS, DB2,    DB2 UDB, MQ Series, WebSphere, Corba

Page 15: Models in design

Distributor Management

Tower DMS Solution

The Tower Group of Companies is a leading provider of investment, insurance and trustee services in the South Pacific region. The Tower Group was developing a number of applications within the Tower group of companies and also buying several other products to meet their business needs during the business model changes. Frequent acquisitions added to the complexity of the internal IT environment.

Tata Consultancy Services developed the Distributor Management System using MasterCraft rapid application development framework. The DMS system enhances services provided by an insurance company to its distributors and supports the distribution of products from across group companies through various intermediaries. The GUI modeler in MasterCraft was used to develop the User Interface for the DMS Application. The commission rules are externalized using the Rule Base Engine of MasterCraft. The DMS Commissions module interfaces with Rule Base Engine to perform commission calculations. The DMS system integrates with various product systems, General Ledger System, Money In and Money Out system, Policy Administration System and Peoplesoft using Oracle Application Interconnect (OAI). Actuate e-Reporting Suite is used for reporting.

Quick Facts on the DMS Solution using MasterCraft

• 2.67 Million Java/JSP Lines of Code (LOC) on HP Weblogic and Oracle platform• No of Screens - 213 • Size of specification: 380 KLOC• Code productivity of 533 tested LOC of Java per person-day• Elapsed time for analysis and design: 3 months• Elapsed time for construction: 2.5 months• Elapsed time for system + acceptance testing: 3 months• HP with Java, Servlets, JSP on Weblogic , Oracle, OAI for Messaging, Actuate for reporting• No of Reports - 104

Page 16: Models in design

Impressions about frameworks

• Can be used best by people who have built them• Semantics are in terms of “generated code”• Understanding the semantics of the application is not

easy• Mastercraft people agree that this is a problem. A quote

from one of their papers:– “Model-driven development has resulted in improved

productivity, better quality and platform independence [Mastercraft]. However, it has not been very successful in supporting reuse and system evolution due to inadequate modeling support for clear separation of concerns and their composition”

Page 17: Models in design

State-of-the-art

• Semantics is in terms of “generated code”

• Understanding the semantics of the application is not easy

• Consequence: Tools need a lot of support and “hand holding”

Page 18: Models in design

Research Opportunities

• Can modeling become a “true” programming abstraction?– What kind of programming tools are needed here?

• How useful are these high-level programming abstractions?– Opportunity to work with Indian SIs (Infosys, TCS, etc)– Understand usability and give feedback

• How far can modeling go?– Can device drivers be generated from higher level models?– Can some of the newer API efforts (eg. adapters) benefit from

declarative modeling?• How does one design a correct “model compiler”?

– Recall: it took several decades to understand traditional compiler correctness