Software Product Lines Peter Bell CEO/CTO, SystemsForge cf.Objective() 2008
Jan 17, 2016
Software Product LinesSoftware Product Lines
Peter BellCEO/CTO, SystemsForge
cf.Objective() 2008
Peter BellCEO/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 . . .
What is a SPL?
“framework for systematic reuse”
“ predictive versus opportunistic software reuse”
5-10 times improvements in productivity
Why NOT Use?
Not thought of it
Too busy
“We're special”
Sales model
Hourly billing
Client expectations
It’s Not Just CodeCandidates for Reuse:
Methodology
Contracts
Requirements
Architecture
Tests
Documentation
Tooling
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
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
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
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>
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 . . .
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
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
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>
Top down vs. Bottom up
Top down - Domain concepts
Bottom up - repeating patterns
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)
Adding Custom Code
Inheritance
AOP
Mixins
Extension points (observer)
Protected Blocks
Getting Started
Agile approach
Not just code
Bottom up and top down
Systematic process - schedule it in
Questions?
Blog: www.pbell.com
Email: [email protected]
Email: [email protected] - Yahoo: freshstartsw - AIM: appgeneration