1 / 21

Product Line Engineering and Feature Models

Product Line Engineering and Feature Models. CPSC 410. Reading for Monday. REST Topics http://www.infoq.com/articles/rest-introduction 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. Product Lines.

marvin
Télécharger la présentation

Product Line Engineering and Feature Models

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Product Line Engineering andFeature Models CPSC 410

  2. Reading for Monday • REST Topics • http://www.infoq.com/articles/rest-introduction • 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 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 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

More Related