Top Banner
Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008
18

Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

Jan 17, 2016

Download

Documents

Vincent Welch
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

Software Product LinesSoftware Product Lines

Peter BellCEO/CTO, SystemsForge

cf.Objective() 2008

Peter BellCEO/CTO, SystemsForge

cf.Objective() 2008

Page 2: Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

Who Am I?Programmer - 30-50 projects/yr.

Researcher - Published academic papers DSM forum/ooPSLA

SystemsForge - 10,000 custom apps/yr.

Writer - CFDJ, Fusion Authority Quarterly

Presenter - cf.objective(), CF United, Frameworks, Code Generation 2007, ooPSLA, Domain Specific Modeling Forum, CFCamp . . .

Page 3: Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

What is a SPL?

“framework for systematic reuse”

“ predictive versus opportunistic software reuse”

5-10 times improvements in productivity

Page 4: Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

Why NOT Use?

Not thought of it

Too busy

“We're special”

Sales model

Hourly billing

Client expectations

Page 5: Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

It’s Not Just CodeCandidates for Reuse:

Methodology

Contracts

Requirements

Architecture

Tests

Documentation

Tooling

Page 6: Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

Layers of Reuse

Feature model - major items - shopping cart

Configuration - bounded variability - shipping options

DSLs - unbounded variability - objects and screens

Custom code - one offs - custom integration

Page 7: Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

What IS a DSL?

“An executable language targeted to a specific problem domain”

Specific - can’t do everything

Executable - not just conceptual

Raising level of abstraction

Page 8: Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

Everything is a DSL

Premise: EVERYTHING is a DSL

Useful if not true!

Examples:

API

Database schema

XML file

Object (methods with parameters)

“When I use a word, it means just what I choose it to mean”

- Humpty Dumpty

Page 9: Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

Abstract vs. Concrete

Abstract Grammar vs. Concrete Syntax

What you say vs. How you say it

User@FirstName

<Object title=”User”> <Name>FirstName</Name></Object>

Page 10: Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

Internal vs. ExternalAPI:

UserService.import("test.csv", ",", "FirstName,LastName,Email", "tbl_User", "update");

Internal

Language extension:

steps_for(:accounts) do

Given("my $account_type account balance is $amount") do |account_type, amount|

create_account(account_type, amount)

end

When("I transfer $amount from $source_account to $target_account") do |amount, source_account, target_account|

get_account(source_account).transfer(amount).to(get_account(target_account))

end . . .

Page 11: Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

Internal vs. ExternalXML:

<import filename="test.csv" record-delimiter="," field-name-list="FirstName,LastName,Email" source="tbl_User" method="update" />

External

Comma Delimited:

"test.csv", ",", "FirstName,LastName,Email", "tbl_User", "update"Little Language:

Import test.csv using commas update tbl_User with FirstName,LastName,Email

Databased

Visual

Page 12: Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

Horizontal vs. VerticalHorizontal (tech focused)

SQL

RegEx

Import description language

General workflow language

Vertical (business focused)

Insurance policy language

Product configuration language

Academic requirements language

Page 13: Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

ProjectionsAPI: technical reuse

XML: semi technical, good for I/O and transforms

Visual: semi technical, gives “sense” of system

Database: reuse/cms

<?xml version="1.0" encoding="UTF-8"?><controller>

<title>Search</title><name>Search</name><defaultAction>viewCategory</

defaultAction><actions>

<detail name="viewCategory" object="ProductCategory" method="getByID" PropertyValueList="%Input.CID%" screen="product-catalog-category-detail" />

<detail name="viewProduct" object="Product" method="getByID" PropertyValueList="%Input.PID%" screen="product-catalog-product-detail" />

<display name="displaySearchResults" Data="" screen="product-catalog-search-results" />

</actions></controller>

Page 14: Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

Top down vs. Bottom up

Top down - Domain concepts

Bottom up - repeating patterns

Page 15: Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

Generation vs. SynthesisGeneration: Saving code files to disk

Synthesis: Processing DSL dynamically

Compilation vs. Interpretation

Late bound decision

Why Generate?

Language limitations

IP protection

Performance (proven issue)

Page 16: Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

Adding Custom Code

Inheritance

AOP

Mixins

Extension points (observer)

Protected Blocks

Page 17: Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

Getting Started

Agile approach

Not just code

Bottom up and top down

Systematic process - schedule it in

Page 18: Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008 Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008.

Questions?

Blog: www.pbell.com

Email: [email protected]

Email: [email protected] - Yahoo: freshstartsw - AIM: appgeneration