cornerstone framework - apache software …7 problems and solutions classes and objects oop (nuts...

37
1 Cornerstone Framework A Open Source Platform for Software Mass Customization

Upload: others

Post on 19-Apr-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

1

Cornerstone FrameworkA Open Source Platform for

Software Mass Customization

Page 2: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

222

Agenda

Demo

Problems and Solutions

The Cornerstone Solution

Source Code Walk-through

Status

Conclusion

Page 3: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

333

Demo

PortalDrag-n-Drop Layout Manager

Delayed Rendering

Portal Admin ToolJMX

DHTML Interface

Page 4: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

444

Philosophy

Solve 80% of the Total Problem with 20% of

Total Effort

Page 5: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

555

The 3 rd Wave: Alvin Toffler

The 1st Wave Society: AgriculturalLow Volume ManufacturingMom and Pop Shops

The 2nd Wave: IndustrialHigh Volume ManufacturingMass Production

The 3rd Wave: InformationalHigh Volume ManufacturingMass Customization

Page 6: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

666

The Software Manufacturing Problem

Easy for Mass ProductionSame copies

Difficult for Mass CustomizationSlightly different copies

No BTO But Rebuilt-to-Order

No JIT But Just-in-a-Long-Time

Page 7: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

777

Problems and Solutions

Classes and Objects OOP (Nutsand Bolts)

Singleton, Factory, Proxy, MVC, etc. DesignPatterns

IoC, ORM, AOP, SOAArchitectural

Patterns(Power Tools)

PortalPlatform(Kitchen)

Botto

m u

p

Top

down

SFAApplication(Complete

House)

Customization,upgrade/change,

outsourcing

SW MFG(mass c13n)

…...

…...

…...

BusinessProblems

Prob

lem

Spa

ce P

atte

rns

Sol

utio

n S

pace

Pat

tern

s

Page 8: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

888

The Cornerstone Solution

Classes and Objects OOP (Nutsand Bolts)

Singleton, Factory, Proxy, MVC, etc. DesignPatterns

IoC, ORM, AOP, SOAArchitectural

Patterns(Power Tools)

Portal Platform(Kitchen)

Botto

m u

p

Top

down

SFAApplication(Complete

House)

Customization,upgrade/change,

outsourcing

…...

…...

…...

BusinessProblems

Prob

lem

Spa

ce P

atte

rns

Sol

utio

n S

pace

Pat

tern

s

CornerstoneFramework

SW MFG(mass c13n)

Page 9: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

999

Fractal Properties

Self Similarity“It seems that the compromise between stability and diversity is served by there the same amount of structure at all scales.” Tim Berners-Lee

Page 10: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

101010

Design Goals

Configurability/Flexibility/PluggabilitySoftware Mass Customization

UsabilityDeveloper

Do-Nothing CachingDo-Nothing JMX Integration

End UserDHTML

Page 11: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

111111

Mass Customization

Ability to Meet New Business Requirements with Minimal Impact on Existing Code Base

Customizations in All DimensionsComponent Level (1D)

Relationship Level (2D)

Control Flow Level (3D)

Preservation of Customizations (Time)

Page 12: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

121212

Component Level Customization

Component cfg

Page 13: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

131313

Relationship Level Customization

Component cfg

Component cfg

Interface(logical)

Implementation(physical)

Page 14: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

141414

Control Flow Customization

Component cfg

Component cfg Component cfg

Original Flow

inserted

Page 15: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

151515

Preservation of Customization

Component cfg Component cfg Component cfg

VendorOut of Box

CustomerCustomized

Upgraded with Preservation

Page 16: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

161616

Major Contributions (Jetspeed)

NowDrag-n-Drop Layout Managers

Delayed Rendering of Portlets

StraightDbPsmlManager

FutureDHTML Interface (Individual Refreshes)

Inter-Portlet Communications

Page 17: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

171717

Major Contributions (Framework)

Service Framework

Out-of-Box JMX Integration

MVC (Actions + DHTML)

Asynchronous Logger

ORM, Pub-Sub, Job-Queue-Worker, …

Page 18: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

181818

Major Contributions (Service Framework)

Service Registry

Service Validation

Logical Service

System Management (JMX)Logging (parameters)

Service Caching

Service Flow Control

Page 19: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

191919

Solution Space Patterns: Configurability

Individual Classes

Relationships between ClassesInversion of Control

Control FlowsCornerstone Unique

Page 20: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

202020

Solution Space Patterns: Configurability

Individual ClassesExample: Logical Services

LS1: Data source “esalesdb” ▬► “DS1”

LS2: Data source “esalesdb” ▬► “DS2”

Page 21: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

212121

Solution Space Patterns: Configurability

Relationships between ClassesNo Class Names Anywhere

Inversion of Control

Example: JMX IntegrationIServiceMetric IService.getMetric();

BaseService:metric.className=BaseServiceMetric

MyService:metric.className=SpecialServiceMetric

Page 22: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

222222

Solution Space Patterns: Configurability

Control FlowsSequentialController

AsynchronousController

SwitchController

As Opposed to Interceptors

Service1 Service1 Service2

SequentialController

Page 23: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

232323

Solution Space Patterns: Indirection

Indirection: Logical to Physical MappingCalled Extension Points in Eclipse

Example: All services in registry are Logical Services

Registry can easily move between database and properties files

Page 24: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

242424

Solution Space Patterns: Overwrite

Example: Logical Service based on another Logical Service

Supports instances that only differ in configuration

child parentparent

a b ca' b cx

Page 25: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

252525

Solution Space Patterns: Overwrite

Configuration (static) and parameters (dynamic) handled the same way

Different scopes handled the same way

RequestContext

SessionContext

parent

ComponentContext

ApplicationContext

parent

parent

Component invoke(IContext ctx)invokeDirect(String a, Object b, …)

Page 26: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

262626

Solution Space Patterns: Non-Intrusion

IAIB getB()

IB

MyA MyB1 MyB2

IAFactoryIA create()

MyAFactoryIA create()

creates

Framework-Dependent

Business DomainFramework-Independent

Page 27: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

272727

Framework Comparison

Where Cornerstone Stands outVision, Depth, Breadth

As opposed to a Point Tool with BYOM

AOP the Cornerstone Way

inovkeStart/Middle/End, Service Controllers

Can integrate best 3rd-party easily

0 10.5 0.90.8

Cornerstone Aspectwerkz JBoss

Generic/Overhead

Page 28: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

282828

Source Code: Drag-n-Drop

portal/cppext/template/jsp/controllers/html/x-multicolumn-customize.jsp

org.apache.jetspeed.modules.actions.controllers.XMultiColumnControllerAction.java

Dependencies

JspTemplate.java

Util.java

Page 29: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

292929

Source Code: Delayed Rendering

com.cisco.salesit.framework.portal.portlets.BasePortlet.java

template/jsp/porlets/html/delayedContent.jsp

Page 30: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

303030

Source Code: Service

Page 31: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

313131

Source Code: Service

DateService.java

dateService.reg.properties

timeService.reg.properties

dateAndTimeService.reg.properties

BaseService.javainvokeStart/Middle/End

Page 32: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

323232

Source Code: Service Logging

InMemoryLog

JobQueue

WorkerManager

addJob

add

Worker1 Workern

get get

Page 33: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

333333

Source Code: JMX Integration

BaseService.properties

BaseServiceMetric.properties

BaseServiceMetric.java

AutoPublication.java

MBeanManager.java

Page 34: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

343434

Source Code: JMX Integration

texttexttext

IServiceMetric(publisher)

Topic:“jmxManaged”

MBeanManager(subscriber)

Service World Pubsub World Sysman World

JMX World

Cor

ners

tone

Non

-Cor

ners

tone

Page 35: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

353535

Status

Cornerstone Framework source code already open-sourced and checked into Apache Jetspeed CVS

Development continuing for new features and enhancement

ContactJun Yang: [email protected]

Page 36: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

363636

Conclusion

Cornerstone is an exciting new approach to software mass customization that modern design patterns and techniques failed to address

We solve the business problem top-down by mapping it to solution space patterns of the Cornerstone Framework

Page 37: Cornerstone Framework - Apache Software …7 Problems and Solutions Classes and Objects OOP (Nuts and Bolts) Singleton, Factory, Proxy, MVC, etc. Design Patterns IoC, ORM, AOP, SOA

37

Spread the Word and Catch the Fire!

Cornerstone Framework