tickling the shoulders of giants an internal client for financial services based on eclipse rcp
DESCRIPTION
Building industry solutions. Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP 04.11.2011. Holger Grosse-Plankermann [email protected]. About me. Holger Grosse-Plankermann Developer @ iks since 2006 - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/1.jpg)
![Page 2: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/2.jpg)
Tickling the shoulders of giants
An internal client for financial services based on Eclipse RCP
04.11.2011
Holger [email protected]
Building industry solutions
![Page 3: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/3.jpg)
About meHolger Grosse-PlankermannDeveloper @ iks since 2006
Has been implementing Eclipse RCP applications for 4 years
Has published articles about Eclipse RCP
Likes loud guitar tunes and kitchen tools
@holgergp
![Page 4: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/4.jpg)
Challenge AreasEclipse RCP Component Challenge Degree
Eclipse Runtime
SWT
JFace
Workbench
Other prerequisites for the Workbench
Test/Build
![Page 5: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/5.jpg)
Roadmap
Project
Challenges
Review
![Page 6: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/6.jpg)
ProjectForm-based Business
application 5.000.000 data records5 Java Developers
starting with basic RCP knowledge
Project has been going for 2 1/2 years
Complex problem domain~ 400 CRs
![Page 7: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/7.jpg)
The RCP ClientEclipse RCP 3.5Menu View
List applications
Editor AreaEditors similar
Search View
![Page 8: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/8.jpg)
Parameters~ 80 screens
~ equally complex
~ 30 UI Elements perscreen
~ 20 UI Behaviour Rules per Screen
~ 40 Validation Rules per screen~ 150 different Validation Rule Types
![Page 9: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/9.jpg)
Classic context
![Page 10: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/10.jpg)
Our context
![Page 11: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/11.jpg)
Core ChallengesStructuring code of complex screens
Concise definition of numerous UI rules
Considering specifics of distributed Validation
Quality assurance in a complex project
![Page 12: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/12.jpg)
Core ChallengesStructuring code of complex screens
Concise Definition of numerous UI rules
Consider specifics of distributed Validation
Quality assurance in a complex project
![Page 13: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/13.jpg)
1. UI Code StructureHow to structure the user Interface codeStandard approach:
Define Behaviour
Define Look ?
![Page 14: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/14.jpg)
1. UI Code StructureSeparation of concerns: MVP Pattern
![Page 15: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/15.jpg)
1. UI Code StructureSplit up EditorPart
![Page 16: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/16.jpg)
1. UI Code StructureWhich part should extend from the
framework :
![Page 17: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/17.jpg)
1. UI Code StructureStraightforward approach: View extends
from the framework.
Delegate logic to presenter
Easy to implement/refactor
Keeps integration with WindowBuilder
However, too much delegation needed, complex indirection followed.
![Page 18: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/18.jpg)
1. UI Code StructurePresenter extends from the framework.
=> framework supplies lifecycle hooks.
View is a standalone component.
Presenter simply delegates to the createForm method of the view
Workarounds needed to feed view to Window Builder
Special case: Dialogues
![Page 19: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/19.jpg)
Core ChallengesStructuring code of complex screens
Concise Definition of numerous UI rules
Consider specifics of distributed Validation
Quality assurance in a complex project
![Page 20: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/20.jpg)
2. UI Rules and JFace DatabindingBehaviour Rules:Behaviour that is triggered when a user keys
in a specific value.
Mostly specific to only one Use CaseCommands/Actions too cumbersome in that
context
![Page 21: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/21.jpg)
2. UI Rules and JFace DatabindingJFace Databinding for UI State definition
Model „single source of truth“
Concise and central definition of bindings public void initDataBindings() {
binder.bindBeanToText("model.name", view.getTxtName());
}
UI Behaviour Rules should be defined similarly!No out-of-the-box solution available!
![Page 22: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/22.jpg)
We implemented a BindableAction
2. UI Rules and JFace Databinding
![Page 23: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/23.jpg)
Complete UI state/behaviour definition in one place in a „declarative“ and clean way
Generation based on model easily possible
2. UI Rules and JFace Databinding
public void initDataBindings() { binder = new BindingUtil(new DataBindingContext(), this);
binder.bindBeanToText("presenter.gp.name1", view.getTxtName1()); binder.bindBeanToCombo("presenter.gp.anredeFachId", view.getCvAnrede()); binder.bindAction(„presenter.gp.lieferantenstatusAktiv", new BindableAction() { public void run() { clearTable(); } );}
![Page 24: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/24.jpg)
Core ChallengesStructuring code of complex screens
Concise Definition of numerous UI rules
Consider specifics of distributed Validation
Quality assurance in a complex project
![Page 25: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/25.jpg)
3. Validation
Client BackendTime of validation On Input On Save
Amount of validation Specific input step Complete Model
Focus of validation Speed Complete Validation
![Page 26: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/26.jpg)
3. Validation
Complex and deep Validation Rules
![Page 27: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/27.jpg)
Validation Rules should be reused on client and backend side. Large intersection between rule types
Validation Rules too complex for JFace Validation alonee.g. Validations across domain model
=> Tie Validation Rules to the model.
3. Validation
![Page 28: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/28.jpg)
3. ValidationUsing custom Validator
![Page 29: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/29.jpg)
3. Validation
public interface IPerson {
@ValidationRules( {
@ValidationRule(classOfRule = NameRule.class, errorCode = "name.invalid", affectedAttributes = "name")
})
void setName(String name);
}
Validations attached to the model via annotations
Further steps:JSR-303 (Beans-Validation)
![Page 30: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/30.jpg)
Core ChallengesStructuring code of complex screens
Concise Definition of numerous UI rules
Consider specifics of distributed Validation
Quality assurance in a complex project
![Page 31: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/31.jpg)
4. Headless Build and Test
The complexity of our project required proper quality assurance measures
Executing SWTBot Testand exporting fromworkbench grew too tedious
![Page 32: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/32.jpg)
4. Headless Build and TestHeadless build and tests to the rescue!
PDEBuild completed quite quick Days/Weeks
Headless SWTBot more complicated~ 4 monthsJUnit3/4 related issues
![Page 33: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/33.jpg)
4. Headless Build and Test
UI Tests tend to be long runningSetup UI/ProductWait for UI components to showComplete run (~ 400 tests) takes 30 – 45 mins
UI Tests sometimes behave irregularlyOccasional false negativesUI Timing differs between machinesFocus related problems
![Page 34: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/34.jpg)
4. Headless Build and TestSplit test suites
Speed up Build Machines
Continuous Regular NightlyDuration ~ 5 mins ~ 30 mins ~ 45 mins# Tests ~ 50 ~ 300 ~ 400
Continuous with SSD Continuous w/o SSDDuration ~ 5 mins ~ 9 mins
![Page 35: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/35.jpg)
4. Headless Build and TestNo satisfying solution for irregular behaviour!UI timing issues require extra care
bot.sleep(2000) mostly helps
Further steps:Minimize UI related TestsApply Controller/Presenter Tests
=> Eclipse Riena
![Page 36: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/36.jpg)
Core ChallengesStructuring code of complex screens
Concise Definition of numerous UI rules
Consider specifics of distributed Validation
Quality assurance in a complex project
![Page 37: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/37.jpg)
Safe on the shoulders of giants?
Expectations Experiences
Learning
Out-of-the-box
Requirements
Eclipse RCP +Customizing
![Page 38: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/38.jpg)
www.iks-gmbh.com
![Page 39: Tickling the shoulders of giants An internal client for financial services based on Eclipse RCP](https://reader036.vdocuments.us/reader036/viewer/2022062323/568164a6550346895dd69662/html5/thumbnails/39.jpg)
Image Sources Roadmap: http://www.flickr.com/photos/scoobay/3788514070/
Mixing desk: http://www.flickr.com/photos/go_freyer/4486482108/
Check: http://commons.wikimedia.org/wiki/File:Green_check.svg
X-Mark: http://commons.wikimedia.org/wiki/File:X_mark.svg
Feather: http://www.flickr.com/photos/n0rthw1nd/4418311590/
Plain face: http://commons.wikimedia.org/wiki/File:Face-plain.svg
Sad face: http://commons.wikimedia.org/wiki/File:Face-sad.svg
Happy face: http://commons.wikimedia.org/wiki/File:Face-smile.svg
Light Bulb and Warning Icons via Creative Commons Attribution 3.0 Unported by
http://shlyapnikova.deviantart.com