Troubleshooting D2W Rules
Upcoming SlideShare
Loading in...5
×
 

Troubleshooting D2W Rules

on

  • 887 views

 

Statistics

Views

Total Views
887
Views on SlideShare
887
Embed Views
0

Actions

Likes
0
Downloads
9
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Troubleshooting D2W Rules Troubleshooting D2W Rules Presentation Transcript

  • Troubleshooting D2W Rules David LeBerAlign Software Inc.
  • Why, why, Oh why?
  • “With great power comes great opacity.” View slide
  • Knowledge is light...• Understand the rules• Understand their sources• Understand the tools View slide
  • Getting to know the Rules
  • The Rule Files• user.d2wmodel and d2w.d2wmodel• In your Application• In its Frameworks• Identifying all of the rules at play is critical
  • Example: ERModernMoviesDemo• ERModernMoviesDemo - user.d2wmodel/d2w.d2wmodel• ERModernLook - d2w.d2wmodel• ERModernDefaultSkin - d2w.d2wmodel• ERModernDirectToWeb - d2w.d2wmodel• ERDirectToWeb - d2w.d2wmodel• JavaDirectToWeb - d2w.d2wmodel
  • ALL of those rules affect your apps behaviour.
  • RuleModeler to the rescue
  • Demo
  • Anatomy of a Rule100 : entity.name = ‘MovieRole’ => displayNameForEntity = “Movie Role” [Assignment] Left Hand Side (LHS) Right Hand Side (RHS)
  • Your Job ( should you accept it... ) this hard drive will self destruct in...• Determine what LHS condition will identify the point in your app that you want the behaviour to change.• Identify what RHS key controls that behaviour• Identify what value the RHS key needs to be need to be set to.
  • Why a priority of a million may not be a good idea• Establish priority guidelines• Stray from those guidelines at your peril• Arbitrarily high priorities, probably mean you are doing it wrong
  • Common Rule Problems• Typos• Conflicting LHS qualifier with rules higher up the hierarchy• Incorrect or non-existent keys
  • Rule Keys and Values• Components• The d2wContext• Assignment objects• Other rules
  • Components/*** From ERMODListPage.java** @d2wKey printerButtonComponentName* @d2wKey emptyListComponentName* @d2wKey headerComponentName* @d2wKey entity* @d2wKey allowsFiltering* @d2wKey repetitionComponentName* @d2wKey batchNavigationBarComponentName* @d2wKey displayNameForEntity* @d2wKey pageWrapperName* @d2wKey returnButtonLabel*/
  • Components100 : entity.name = ‘MovieRole’ => displayNameForEntity = “Movie Role” [Assignment]
  • d2wContext• task• entity• propertyKey• attribute• relationship
  • Assignment Objects100 : entity.name = ‘MovieRole’ => displayNameForEntity = “Movie Role” [Assignment]100 : entity.name = ‘MovieRole’ => isEntityEditable = “true” [BooleanAssignment]100 : pageConfiguration like ‘*Article*’ => entity = “Article” [EntityAssignment]
  • Assignment Objects0 : *true* => actions = “defaultActions” [ERDKeyValueAssignment]0 : task = ‘list’ => defaultActions = “<ERDDefaultActionAssignment>” [ERDDefaultActionAssignemnt]// From ERDDefaultActionAssignmentpublic NSDictionary defaultActions(D2WContext c) { NSDictionary actions = new NSDictionary(new Object[] { defaultLeftActions(c), defaultRightActions(c) }, new Object [] {"left", "right"} ); log.debug(actions); return actions;}
  • Other Rules50 : pageConfiguration like EditList* => subTask = “list” [Assignment]1 : subTask = list => repetitionComponentName = “ERDListPageRepetition” [Assignemnt]
  • Did you turn it off and back on again?
  • Did you turn it off and back on again?
  • Did you turn it off and back on again?
  • Did you turn it off and back on again?
  • Demo
  • Page Configurations• A shortcut to identify a task and entity combination• Naming convetion: TaskModifierEntity• Are easier to read and remember• Are more flexible• Can reduce the number of rules required
  • Wildcard Gotchas50 : pageConfiguration like ‘*Movie*’ => someKey = “someValue” [Assignment]50 : pageConfiguration like ‘Inspect*Movie*’ => someKey = “someDifferentValue” [Assignment]60 : pageConfiguration like ‘Inspect*Movie*’ => someKey = “someDifferentValue” [Assignment]
  • Demo
  • Use the tools Luke
  • Demo
  • Q&A