Life cycle Application Generation Peter Bell Chief Technology Officer SystemsForge Peter Bell Chief Technology Officer SystemsForge
Overview Introducing SystemsForge Lifecycle Solutions Core Concepts Anatomy of a Generator Outstanding Problems
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...
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)
Resellers Marketing/design Selling to SMB’s Them: Project management, data entry, support Us: Code, tools, deployment
State of Play 80 clients 4 active resellers Profitable Soft launch this summer “Finishing up”
What We’re Not Vendor Experts Usual
Business Drivers Build Anything Change Everything Rapid Process 80/20 Non technical roles
Lifecycle Solution Quote Specify Generate Manage Deploy Must optimize ALL
Quote Priced features Configure for free Discovery fee if complex (if possible!) Customization heuristics (per object) Named variability (includes only x)
Specify Features and configurators Requirements output => DSL input Agile Fixed Price Reduce (our) cost of most iterations
Generate Layered SPL - iterative approach Choose (feature model) Configure (decision support) Customize (DSLs) Extend (just add code)
Choose - Feature Model N-Features Parent Essential, optional, requires one
What IS A Feature? 1..n statements Essential/optional Config questions/mappings Question specific guidance
Configure Select optional Decision Support Answer: 0..n questions, 0..n statements
Customize (DSLs) Overload or add statements Issue: capturing customizations Intent Driven Design
Business intent Roles (and objectives) Essential tasks Interfaces and actions Infer object model Non non-functional specs
Extend (Just Add Code) Passive generation Protected areas Mixins/Partial Classes Subclass Events AOP
Generate Layered SPL - iterative approach Choose (feature model) Configure (decision support) Customize (DSLs) Extend (just add code)
Domain Specific Languages Three types of languages Abstract grammar vs. concrete syntax In language vs. external DSL
Three Types of Language Declaritive: What to do (requirements) Templating: Where to put (layout) Scripting: How to do (imperative)
Declaritive Name: Password: Required SELECT FullName FROM tbl_User Where UserID = 7
Templating #Title# $#Price#
Scripting For (Count = 1; Count lte listlen(ObjectDependencyList); Count=Count+1) { // Get current object name LoopObjectName = 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) };
Three Types of Language Declaritive: Statement level reuse Templating: Simplify for designers Scripting: Use to implement
Abstract vs. Concrete grammar vs. Syntax WHAT say vs. HOW say Objects.User.Title = “User”; Objects.User.Attribute.Name = “FirstName”; FirstName Boxes and Arrows
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
Anatomy of a Generator Grammar Metadata Templates Iterator Orchestrator Extensions
Grammar Context free Concepts 0..n Attributes (optional or required) 0..n Relationships (0/1..1/n) BNF, API, DTD/Schema Example...
Grammar Object 0..n Property 1..1 Relationship Title:string DataType Name:string:required SQLDataType:enum:required
Metadata Scripting XML Custom Syntax Databased
Templates Generating n-Getters: Template: > > Velocity - XSLT - CF Template Generate a File
Templates
Iterator One DAO per business object One template per screen In general: one file per instance of concept Need filter support Generate n-Files
Orchestrator Metadata (get(“ObjectList”)) Template (ObjectDAO.cft) Iterator (Object: All) File name (#ObjectName#DAO.cfc) Generate m-Collections of n-Files
Anatomy of a Generator Grammar Metadata Templates Iterator Orchestrator Extensions
Framework vs. Code Gen Not either/or Language features Intellectual property Performance Can refactor...
Problems Outstanding Handling “dark matter” Evolving DSLs (versioning, refactoring) Pretty pictures(!) Peter Bell SystemsForge
Object Model Objects: Attributes: Relationships Objects and Attributes: Optional: Datetime: Optional: Datetime: Required: Status: approved Page: extends Required: Title Article: extends Optional: HTML Relationships: Page: Article: optional: multiple Article: Page: required: single
Object Model (2) Custom Data Types AsDate StatusList WYIWYG
Interface Model Screens: Actions: Steps = = = 10,25,50,all ArticleAdminList Title