Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

From Stairway to Heaven onto the Highway to Hell with Xtext

580 views

Published on

This talk was given at EclipseCon Europe 2016. It is an experience report about difficulties we experience in our projects when working with Xtext.

Published in: Engineering
  • Would you rather read the text transcript of how a burnt-out, 40 year old mother lost 84lb doing NO exercise, using a simple set of Flavor-Pairing Rituals? Read The Text Version Here To Find Out.. ♣♣♣ https://bit.ly/2YcYRME
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Slim Down in Just 1 Minute? What if I told you, you've been lied to for nearly all of your life? CLICK HERE TO SEE THE TRUTH ◆◆◆ http://ishbv.com/1minweight/pdf
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

From Stairway to Heaven onto the Highway to Hell with Xtext

  1. 1. KarstenThoms
  2. 2. EASY TO LEARN FLEXIBLE GOOD DOCS HIDES COMPLEXITY USES XTEND GOOD SUPPORTFAST PROTOTYPING GOOD DEFAULTS MATURE SOURCE QUALITY
  3. 3. FLEXIBILITY Who says you can’t play golf with apples? https://pixabay.com/de/apple-natur-green-garten-947674/
  4. 4. DESIGN SMELLS
  5. 5. GRAMMAR • Assign ‚name=ID‘ attribute for non-referable elements • Tweaking grammar to optimize non syntax related stuff • generated meta model structure • content assist (e.g. whitespace in combined keywords) • scoping DESIGN SMELLS
  6. 6. GRAMMAR • Too few / too much keywords • Trying to solve too much with terminal rules • Unordered groups for multivalued assignments • Using Xcore for small metamodels • Enable backtracking to „solve“ a grammar ambiguity issues DESIGN SMELLS
  7. 7. GRAMMAR • Too few / too much keywords • Trying to solve too much with terminal rules • Unordered groups for multivalued assignments • Using Xcore for small metamodels • Enable backtracking to „solve“ a grammar ambiguity issues DESIGN SMELLS
  8. 8. GRAMMAR • Too few / too much keywords • Trying to solve too much with terminal rules • Unordered groups for multivalued assignments • Using Xcore for small metamodels • Enable backtracking to „solve“ grammar ambiguity issues DESIGN SMELLS
  9. 9. AMBIGUITY
  10. 10. SCOPING • Use declarative scope provider • Navigate cross-references while computing scope • Compute stuff in scope provider which could be put into IEObjectDescription’s user data • „Optimize“ scope to tweak content assist • Check for proxies, resolve proxies • Instantiate unnecessary objects • Access node model and assume that it is complete DESIGN SMELLS
  11. 11. VALIDATION • Don’t use semantic validation at all • Use @Check without CheckType 
 => Default is CheckType.FAST • Provide check methods for child-elements which traverse sibling elements (e.g. uniqueness check) • Many fine grained check methods • Loading the world again DESIGN SMELLS
  12. 12. COMPLEXITY
  13. 13. IDENTIFYINGTHE RIGHT PLACETO FIX AN ISSUE https://pixabay.com/de/nadel-im-heuhaufen-nadel-heuhaufen-1752846/
  14. 14. https://pixabay.com/de/yoda-dunkel-die-dunkle-seite-des-1726764/ Use the Source, Luke!
  15. 15. Dependency Injection
  16. 16. CUSTOMIZING http://de.freeimages.com/photo/chef-s-swiss-knife-1239195 UNEXPECTED
  17. 17. OVER ENGINEERING
  18. 18. DSL OVERLOAD Entity DSL Config DSL Frontend DSL Rule DSL Style DSL Behavior DSL Requirements DSL Cool DSL Yet Another DSL Personal Favorite DSL MyDSL Database DSL Sample DSL The Only Right DSL
  19. 19. EXPRESSIONS
  20. 20. DSL != NATURAL LANGUAGE
  21. 21. NON-TECHIE USERS
  22. 22. SCALABILITY http://de.freeimages.com/photo/constructing-tower-1207408
  23. 23. CODE WASTE
  24. 24. PROTOTYPES
  25. 25. TESTING
  26. 26. STICK WITH OLD RELEASES
  27. 27. ADVICE RESISTANCE
  28. 28. WRONG TOOL
  29. 29. PROBLEM SOLUTION
  30. 30. • Evaluate if Xtext is the right tool to solve a problem [ it often is :-) ] • Get experts on board when starting ambitious projects • Learn underlying technologies (EMF, ANTLR, …) • Continuously develop DSL projects • Write extensive tests • Invest into user experience AVOIDING TROUBLE
  31. 31. KEEP INFORMED itemis.com / Blogs / Xtext @kthoms @holgerschill @itemis @chrdietrich @franzbecker_io

×