Loosely Coupled Sakai Ray Davis University of California, Berkeley.

Slides:



Advertisements
Similar presentations
Platinum Sponsor LARGE SCALE REFACTORING Volodymyr Fedak.
Advertisements

Chapter 13 Review Questions
Copyright © 2006 Korson-Consulting 1/219 Unit 4 Test First Development.
ECHO: NASA’s E os C learing HO use Integrating Access to Data Services Michael Burnett Blueprint Technologies, 7799 Leesburg.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB JavaForum.
1 SOFTWARE LIFE-CYCLES Beyond the Waterfall. 2 Requirements System Design Detailed Design Implementation Installation & Testing Maintenance The WATERFALL.
Module: Definition ● A logical collection of related program entities ● Not necessarily a physical concept, e.g., file, function, class, package ● Often.
Open Knowledge Initiative Scott Thorne Jeff Kahn
Pragmatic Application Building: Step by Step Jay Sissom Principal Systems Analyst Indiana University
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
Chapter 26 Applying Gang of Four Design Patterns 1CS6359 Fall 2012 John Cole.
Unit Testing Tips and Tricks: Database Interaction Louis Thomas.
Who am I? ● Catalin Comanici ● QA for 10 years, doing test automation for about 6 years ● fun guy and rock star wannabe.
Chapter 9 – Software Evolution and Maintenance
UNIT-V The MVC architecture and Struts Framework.
TDD,BDD and Unit Testing in Ruby
B USINESS LAYER SAMANVITHA RAMAYANAM 4 th MARCH 2010 CPE 691.
JUnit The framework. Goal of the presentation showing the design and construction of JUnit, a piece of software with proven value.
Chapter 7 Software Engineering Objectives Understand the software life cycle. Describe the development process models.. Understand the concept of modularity.
Presenter - Donn Felker.  Senior Consultant for Microsoft Gold Certified Partner- Statêra.  8 years of experience in developing and architecting enterprise.
Chapter 3 – Agile Software Development 1Chapter 3 Agile software development.
ASP.NET and Model View Control Jesper Tørresø ITNET2 F08.
Copyright © 2012 Accenture All Rights Reserved.Copyright © 2012 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are.
1 Chapter 5 Practice: A Generic View Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Persistence Store Project Proposal.
Office 365 Platform Flexible Tools Understand different provisioning options and their advantages and disadvantages…
RECALL THE MAIN COMPONENTS OF KIM Functional User Interfaces We just looked at these Reference Implementation We will talk about these later Service Interface.
Principles of Information Systems, Sixth Edition Systems Design, Implementation, Maintenance, and Review Chapter 13.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 8 Slide 1 Software Prototyping l Rapid software development to validate requirements.
Extreme Programming (XP). Agile Software Development Paradigm Values individuals and interactions over processes and tools. Values working software over.
23-Oct-15 Abstract Data Types. 2 Data types A data type is characterized by: a set of values a data representation, which is common to all these values,
Sakai Course Management Service Ray Davis (most slides by Josh Holtzman & Duffy Gillman) University of California, Berkeley.
Principles of Information Systems, Sixth Edition Systems Design, Implementation, Maintenance, and Review Chapter 13.
Cohesion and Coupling CS 4311
Chapter 7 Software Engineering Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Design Analysis builds a logical model that delivers the functionality. Design fully specifies how this functionality will be delivered. Design looks from.
Refactoring for Testability (or how I learned to stop worrying and love failing tests) Presented by Aaron Evans.
Chapter 10 Software Engineering. Understand the software life cycle. Describe the development process models. Understand the concept of modularity in.
Distributed Information Systems. Motivation ● To understand the problems that Web services try to solve it is helpful to understand how distributed information.
8th Sakai Conference4-7 December 2007 Newport Beach Integration: Users and Groups Mark J. Norton Nolaria Consulting.
1 Using Sakai in Stellar at MIT Mark J. Norton, Nolaria Consulting Craig Counterman, MIT Mark Brown, MIT.
Java EE Patterns Dan Bugariu.  What is Java EE ?  What is a Pattern ?
Principles of Information Systems, Sixth Edition 1 Systems Design, Implementation, Maintenance, and Review Chapter 13.
PROG Developing Robust Modular Software.. Objectives What do we want? Programmatic Elements in a Business System. Logic Layer. Persistence (Data)
Software testing techniques Software testing techniques Software Testability Presentation on the seminar Kaunas University of Technology.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Testing Spring Applications Unit Testing.
Test-Driving ASP.NET Development Tampa Code Camp – July 15 th, 2006 Cory Foy
Software Engineering Principles Practical Advice and Steps for Managing Your Project.
25 April Unified Cryptologic Architecture: A Framework for a Service Based Architecture Unified Cryptologic Architecture: A Framework for a Service.
WHAT IS PHP FRAMEWORK? Set of Classes and Functions(Methods) Design for the development of web applications Provide basic structure Rapid application development(RAD)
Inside Gradebook - June 9, 2005 Inside Gradebook Or: How I Learned to (almost) Stop Worrying & (almost) Love JSF 1.1 Ray Davis – UC Berkeley.
Test Driven Development Introduction Issued date: 8/29/2007 Author: Nguyen Phuc Hai.
The Chain of Responsibility Pattern (Behavioral) ©SoftMoore ConsultingSlide 1.
1 Acquisition Automation – Challenges and Pitfalls Breakout Session # E11 Name: Jim Hargrove and Allen Edgar Date: Tuesday, July 31, 2012 Time: 2:30 pm-3:45.
Rekayasa Perangkat Lunak Part-6
Self-Contained Systems
Sakai ID & Access Management
GoF Patterns (GoF) popo.
MPCS – Advanced java Programming
Coupling and Cohesion 1.
THE RAPID-START ENTERPRISE SERVICE DESK
Software Engineering and Best Practices
Sakai WebApp Structure
Model-View-Controller Patterns and Frameworks
Architecture Competency Group
RESTful Web Services.
Project Lifecycle and IT Product Life Cycle
Extending Interface Based Design
Testing Slides adopted from John Jannotti, Brown University
GoF Patterns Ch. 26.
Presentation transcript:

Loosely Coupled Sakai Ray Davis University of California, Berkeley

Goal: Deliver usable useful applications in a timely fashion.

Method: Empirical Is it useful? Are you sure that it’s useful?

Evidence-Based Programming User(-representative) driven Incremental Cyclical Opportunistic refactoring Loose coupling to framework & services

Loose Coupling ≠ Less Integrated Naïve efficiency: Change vendor code directly. –Can’t upgrade. –Need to maintain unfamiliar code. Loosely coupled: 1.Centralize dependencies. 2.Local implementation.

Why Loose Coupling? Project management = Risk management Cross-project dependency = Risk

Loose coupling = standard design principles at a project level Separation of concerns Centralization of concerns Avoid redundancy Avoid disruption Improve maintainability Improve testability

Results of tight coupling Unrealistic goals Inaccurate estimates Slow refactoring “Living fossils” Unpredictable disruptions “Vendor lock-in” De facto forking

Integration Week

What to don’t? Don’t make trouble for yourself. –Facades to external services Don’t make trouble for other people. –Service APIs

Multiple Moving Targets **SCREEEEEEE…**

Multiple Moving Targets Facades

Application-tailored interfaces to complex or unstable services Minimize maintenance costs Maximize pluggability Reduce costs of unit & application testing Self-document integration requirements Provide fallbacks

No Sure Things Unit tests can be overdone. Generalization for re-use is usually premature. Loose coupling is a leading cause of tight coupling.

When are facades useful? Is the framework changing? Will standalone implementations help development & testing? Will implementations be much work?

The framework changes

When are facades useful? Is the framework changing? Will standalone implementations help development & testing? Will implementations be much work?

Facades Gradebook GB Facades Sakai 2.0 APIs Sakai 2.1+ APIs Tests Standalone

Gradebook Facades Authentication Context Authorization User Directory

Authentication – Who Is This? public interface Authn { /** an ID uniquely identifying the currently * authenticated user in a site, or null if the user * has not been authenticated. */ public String getUserUid();

Context – Where Am I? public interface ContextManagement { /** request *the javax.servlet.http.HttpServletRequest or *javax.portlet.PortletRequest from which to determine the * current gradebook. Since they don't share an interface, *a generic object is passed. * *the UID of the currently selected gradebook, or null if the * context manager cannot determine a selected gradebook */ public String getGradebookUid(Object request);

Authorization – Think pragmatically public interface Authz { public boolean isUserAbleToGrade(String gradebookUid); public boolean isUserAbleToGradeAll(String gradebookUid); public boolean isUserAbleToGradeSection(String sectionUid); public boolean isUserAbleToEditAssessments(String gradebookUid); public boolean isUserAbleToViewOwnGrades(String gradebookUid); …

public class AuthzSakai2Impl extends AuthzSectionsImpl implements Authz { public static final String PERMISSION_GRADE_ALL = "gradebook.gradeAll", PERMISSION_GRADE_SECTION = "gradebook.gradeSection", PERMISSION_EDIT_ASSIGNMENTS = "gradebook.editAssignments", PERMISSION_VIEW_OWN_GRADES = "gradebook.viewOwnGrades"; /** * Perform authorization-specific framework initializations for the Gradebook. */ public void init() { FunctionManager.registerFunction(PERMISSION_GRADE_ALL); FunctionManager.registerFunction(PERMISSION_GRADE_SECTION); FunctionManager.registerFunction(PERMISSION_EDIT_ASSIGNMENTS); FunctionManager.registerFunction(PERMISSION_VIEW_OWN_GRADES); } public boolean isUserAbleToGrade(String gradebookUid) { return (hasPermission(gradebookUid, PERMISSION_GRADE_ALL) || hasPermission(gradebookUid, PERMISSION_GRADE_SECTION)); } public boolean isUserAbleToGradeSection(String sectionUid) { return getSectionAwareness().isSectionMemberInRole(sectionUid, getAuthn().getUserUid(), Role.TA); } …

Loose Coupling As consumer of services –Spring-injected facades As producer of services?

Application = Tool + Component? App Presentation External Apps App Business Logic

Application ≠ Service Customers –End user ≠ Programmer Goals –Browser-based workflow ≠ Efficient integration Contracts –Functional specification ≠ API Project lifecycles –Rapid change ≠ Negotiated stability

Project = Application + Service External Apps Application Shared Logic Service

Application ≠ Service Erich Gamma (Eclipse; Gang of Four): “You can go and expose everything, and people can change anything. The problems start when the next version comes along. If you have exposed everything, you cannot change anything or you break all your clients. APIs don't just happen; they are a big investment.... I really like flexibility that's requirement driven. That's also what we do in Eclipse. When it comes to exposing more API, we do that on demand. We expose API gradually.... So I really think about it in smaller steps, we do not want to commit to an API before its time.”

Service requirements

Service change: Request

Service change: Notify

Service change: API

Service change: Test

Service change: Implementation (left as an exercise for the reader)

Project = Application + Service External Apps Application Shared Logic Service

Gradebook 2.2 Source

Application logic ≠ Service Logic From Seth Theriault's Sakai Developer Statistics: 766 lines - GradebookManagerHibernateImpl.java 728 lines - GradebookServiceHibernateImpl.java 252 lines - BaseHibernateManager.java

Think Globally: Program Locally Shared Logic ApplicationService Facades to external services