life cycle application generation peter bell chief technology officer systemsforge...

41
Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge [email protected]

Upload: sandra-tucker

Post on 12-Jan-2016

219 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Life cycle Application Generation

Life cycle Application Generation

Peter BellChief Technology Officer

SystemsForge

[email protected]

Peter BellChief Technology Officer

SystemsForge

[email protected]

Page 2: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Overview

• Introducing SystemsForge

• Lifecycle Solutions

• Core Concepts

• Anatomy of a Generator

• Outstanding Problems

Page 3: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Where We Fit

• Five types of features

• Rocket Science

• Lab experiment (non-functional)

• New to me

• With a twist - sweet spot == 80%

• Here we go again . . .

Page 4: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

What we do

• Generate custom web apps

• CMS, E-comm, Newsletter, etc.

• Unique: Insurance portal, SPLs, etc.

• “With a twist”

• Retail: $5,000 - $50,000

• Wholesale providers (usually under $5,000)

Page 5: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Resellers

• Marketing/design

• Selling to SMB’s

• Them: Project management, data entry, support

• Us: Code, tools, deployment

Page 6: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

State of Play

• 80 clients

• 4 active resellers

• Profitable

• Soft launch this summer

• “Finishing up”

Page 7: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

What We’re Not

• Vendor

• Experts

• Usual

Page 8: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Business Drivers

• Build Anything

• Change Everything

• Rapid Process

• 80/20

• Non technical roles

Page 9: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Lifecycle Solution

• Quote

• Specify

• Generate

• Manage

• Deploy

• Must optimize ALL

Page 10: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Quote

• Priced features

• Configure for free

• Discovery fee if complex (if possible!)

• Customization heuristics (per object)

• Named variability (includes only x)

Page 11: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Specify

• Features and configurators

• Requirements output => DSL input

• Agile Fixed Price

• Reduce (our) cost of most iterations

Page 12: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Generate

• Layered SPL - iterative approach

• Choose (feature model)

• Configure (decision support)

• Customize (DSLs)

• Extend (just add code)

Page 13: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Choose - Feature Model

• N-Features

• Parent

• Essential, optional, requires one

Page 14: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

What IS A Feature?

• 1..n statements

• Essential/optional

• Config questions/mappings

• Question specific guidance

Page 15: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Configure

• Select optional

• Decision Support

• Answer: 0..n questions, 0..n statements

Page 16: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Customize (DSLs)

• Overload or add statements

• Issue: capturing customizations

• Intent Driven Design

Page 17: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Intent Driven Design

• Business intent

• Roles (and objectives)

• Essential tasks

• Interfaces and actions

• Infer object model

• Non non-functional specs

Page 18: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Extend (Just Add Code)

• Passive generation

• Protected areas

• Mixins/Partial Classes

• Subclass

• Events

• AOP

Page 19: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Generate

• Layered SPL - iterative approach

• Choose (feature model)

• Configure (decision support)

• Customize (DSLs)

• Extend (just add code)

Page 20: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Domain Specific Languages

• Three types of languages

• Abstract grammar vs. concrete syntax

• In language vs. external DSL

Page 21: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Three Types of Language

• Declaritive: What to do (requirements)

• Templating: Where to put (layout)

• Scripting: How to do (imperative)

Page 22: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Declaritive

User@FullName: Name: Optional@Email: Email: Required@Password: Password: Required

SELECT FullNameFROM tbl_UserWhere UserID = 7

Page 23: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Templating

<cfoutput query="ProductList">#Title#<br />$#Price#<br /><br />

</cfoutput>

Page 24: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Scripting

For (Count = 1; Count lte listlen(ObjectDependencyList); Count=Count+1){

// Get current object nameLoopObjectName = ListGetAt(ObjectDependencyList, Count);If (LoopObjectName NEQ "LightWire")

{ // Prepend it with ObjectName LoopObjectName=ListAppend(arguments.ObjectName,LoopObjectName,"|"); // Add it to the new object dependency list

TempObjectDependencyList=ListAppend(TempObjectDependencyList,LoopObjectName) };};

Page 25: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Three Types of Language

• Declaritive: Statement level reuse

• Templating: Simplify for designers

• Scripting: Use to implement

Page 26: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Abstract vs. Concretegrammar vs. Syntax

WHAT say vs. HOW say

Objects.User.Title = “User”;Objects.User.Attribute.Name = “FirstName”;

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

User@FirstName

Boxes and Arrows

Page 27: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

In-Language vs. External DSL

In Language:•API, Language extension•Easy to create•No validation•Can use core language

External:•XML/custom file•Store in database•Harder to create•Validation•Can limit language

Page 28: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Anatomy of a Generator

• Grammar

• Metadata

• Templates

• Iterator

• Orchestrator

• Extensions

Page 29: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Grammar

• Context free

• Concepts

• 0..n Attributes (optional or required)

• 0..n Relationships (0/1..1/n)

• BNF, API, DTD/Schema

• Example . . .

Page 30: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

GrammarObject Name:string:required @Parent:Object 0..1@Property 1..n@Relationship 0..n

Property Name:string:required @DataType 1..1

Relationship Title:string

DataType Name:string:required SQLDataType:enum:required

Page 31: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Metadata

•Scripting•XML•Custom Syntax•Databased

Page 32: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Templates

Generating n-Getters:<cffunction name="get#PropertyName#" returntype="string">

   <cfreturn this.#PropertyName#></cffunction>

Template:<<cfset PropertyNameList = “FirstName,LastName,Email”>><<cfloop list="#PropertyNameList#" index="PropertyName">><cffunction name="get##PropertyName##" returntype="string">

   <cfreturn this.##PropertyName##></cffunction>

<</cfloop>>

Velocity - XSLT - CF Template

Generate a File

Page 33: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Templates<cffunction name="getFirstName" returntype="string">

   <cfreturn this.FirstName></cffunction>

<cffunction name="getLastName" returntype="string">   <cfreturn this.LastName>

</cffunction>

<cffunction name="getEmail" returntype="string">   <cfreturn this.Email>

</cffunction>

Page 34: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Iterator

• One DAO per business object

• One template per screen

• In general: one file per instance of concept

• Need filter support

Generate n-Files

Page 35: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Orchestrator

• Metadata (get(“ObjectList”))

• Template (ObjectDAO.cft)

• Iterator (Object: All)

• File name (#ObjectName#DAO.cfc)

Generate m-Collections of n-Files

Page 36: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Anatomy of a Generator

• Grammar

• Metadata

• Templates

• Iterator

• Orchestrator

• Extensions

Page 37: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Framework vs. Code Gen

• Not either/or

• Language features

• Intellectual property

• Performance

• Can refactor . . .

Page 38: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Problems Outstanding• Handling “dark matter”

• Evolving DSLs (versioning, refactoring)

• Pretty pictures(!)

Peter Bellhttp://www.pbell.com

Email: [email protected]

SystemsForgehttp://www.systemsforge.com

Page 39: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Object ModelObjects: Attributes: Relationships

Objects and Attributes:

Content@LiveDate: Optional: Datetime: 1/1/2000@KillDate: Optional: Datetime: 1/1/3000@Status: Required: Status: approved

Page: extends Content@Title: Required: Title

Article: extends Content@Content: Optional: HTML

Relationships:

Page: Article: optional: multipleArticle: Page: required: single

Page 40: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Object Model (2)Custom Data Types

Custom Data Types

LiveDate@Transform: Date@Validate: IsDate@Field: DatePicker@Display: AsDate

Status@Validate: IsDate@Field: Dropdown@List: StatusList

Content@Transform: SafeHTML@Field: WYIWYG

Page 41: Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge pbell@systemsforge.com Peter Bell Chief Technology Officer SystemsForge

Interface Model

Screens: Actions: Steps

Screens

BaseList@Type=List@Paging = Yes@DefaultRecordsPerPage = 50@RecordsPerPageList = 10,25,50,all

ArticleAdminList extends BaseList@Type=List@AttributeList: Title,Status@OrderByAttributes: Title,Status@DefaultOrderBy: Title