Presentation is loading. Please wait.

Presentation is loading. Please wait.

Product Line Engineering and Feature Models

Similar presentations


Presentation on theme: "Product Line Engineering and Feature Models"— Presentation transcript:

1 Product Line Engineering and Feature Models
CPSC 410

2 Reading for Monday REST Topics
Arch book p. 414–422 Roy Fielding’s thesis perhaps most cited CS thesis, worth a scan if you want to see what one looks like.

3 Product Lines Want to make several related products
Products share many common features But features vary between products Want a formal description of all possible product instances in a product line Use Feature Models! Model formalizes feature requirements Does not address implementation

4 Software Product Line Example
Windows 7 Product Line Starter Home Premium Professional Ultimate

5 Informal Feature Matrix

6 Formal Feature Models

7 Cross-Tree Constraints
X X X Conflict Requires

8 Realistic Feature Model
For illustration purposes only Uses extra syntax we don’t learn in this course

9 Mandatory Feature Product Line also referred to as Product Concept (denoted as C)

10 Optional Feature

11 eXclusive-Or (Alternative)

12 Inclusive-Or (Or)

13 Conflicting Features Two features that cannot
exist in the same product Used when features are not siblings {C}, {C, f1}, {C, f1, f2} {C, f2}, {C, f1, f3} X

14 Dependent Features When one feature requires another
Used when features are not parent/child {C}, {C, f1}, {C, f1, f2} {C, f2}, {C, f1, f2, f3}

15 Feature Implementation
Often, a feature is not a class Hence, feature models are not class diagrams A feature can be implemented many ways Class Set of classes A scattered set of methods A scattered set of statements etc… The Feature Modeler does not concern themselves with such details

16 Example: Logging Feature
class Account { private double total; public void deposit(double amount) { System.out.println(“User is depositing: “ + amount); … } public void withdraw(double amount) { System.out.println(“User is withdrawing: “ + amount); public double balance() { System.out.println(“User is checking balance”); Where is the logging feature?

17 Example: Logging Feature
class Account { private double total; public void deposit(double amount) { System.out.println (“User is depositing: “ + amount); … } public void withdraw(double amount) { System.out.println(“User is withdrawing: “ + amount); public double balance() { System.out.println(“User is checking balance”); Where is the logging feature?

18 Where is Logging in Apache Tomcat?
Picture from: Waterhouse and Kersten, kerstens.org/mik/publications/aspectj-tutorial-oopsla2004.ppt

19 Consider Your Project At the end of the term …
If I asked you where each User Story was in your code … Most likely each User Story could not be isolated to a single Class Method Statement A good bonus mark candidate would be to describe your product using a feature model as described here.

20 Variability Implementation
How do we create variation in product lines? Subclassing Conditionals and IFDEF statements Decorators/Connectors Separate code bases Likely to be different branches of a repository

21 Linux variability Linux has ~ 5400 features

22 Exercise Make a Feature Model for your favorite Automobile Product Line Use the “Build a Car” Wizard on their website to reverse-engineer the Feature Model You can use Chevrolet Don’t worry about being complete BUT … Try to find one example of each model element: Mandatory, Optional, Alternative, Or, Conflict, Requires Use paper/pencil(pen) and submit on Wed.


Download ppt "Product Line Engineering and Feature Models"

Similar presentations


Ads by Google