12
© 2008 by Heiko Seeberger; made available under the EPL v1.0 | March 20th, 2008 | www.metafinanz.de Agile RCP Presenter First using Spring Dynamic Modules Heiko Seeberger, metafinanz

EclipseCon 08 - Agile RCP

Embed Size (px)

Citation preview

Page 1: EclipseCon 08 - Agile RCP

© 2008 by Heiko Seeberger; made available under the EPL v1.0 | March 20th, 2008 | www.metafinanz.de

Agile RCP

Presenter First using Spring Dynamic Modules

Heiko Seeberger, metafinanz

Page 2: EclipseCon 08 - Agile RCP

Agile RCP - Presenter First using Spring Dynamic Modules | © 2008 by Heiko Seeberger; made available under the EPL v1.0

Agile development of user interfaces

• Which process leading from requirements to UI code?

• How can UIs be unit-tested?

Requirements

UI code Unit tests

Page 3: EclipseCon 08 - Agile RCP

Agile RCP - Presenter First using Spring Dynamic Modules | © 2008 by Heiko Seeberger; made available under the EPL v1.0

Presenter First architecture

• MVP variant: Passive view.

• Model and view abstracted as interfaces.

• Unit-testing presenters by mocking model and view.

ReferenceEvent

PresenterTest

MockView MockModel

IView

Presenter

IModel

Page 4: EclipseCon 08 - Agile RCP

Agile RCP - Presenter First using Spring Dynamic Modules | © 2008 by Heiko Seeberger; made available under the EPL v1.0

Presenter First process

• Requirements drive the design.

IView

Presenter

IModel

The user can query for

books by entering the title

in the query form …

User Story +onQuery()…

+getName()…

+getBooks()…

Page 5: EclipseCon 08 - Agile RCP

Agile RCP - Presenter First using Spring Dynamic Modules | © 2008 by Heiko Seeberger; made available under the EPL v1.0

OSGi bundle

Spring application context

Presenter First on Eclipse RCP

• MVP triads managed by a Spring application context.

• Spring Dynamic Modulesintegrates Spring into OSGi.

View

Presenter

Model

Page 6: EclipseCon 08 - Agile RCP

Agile RCP - Presenter First using Spring Dynamic Modules | © 2008 by Heiko Seeberger; made available under the EPL v1.0

Presenter First on Eclipse RCP

• Plug into the workbench via factories for views and editors.

Spring application context

View

Presenter

Model

Workbench

ViewPartFactory

views xPt

Page 7: EclipseCon 08 - Agile RCP

Agile RCP - Presenter First using Spring Dynamic Modules | © 2008 by Heiko Seeberger; made available under the EPL v1.0

Demo – User story, view and model

By clicking “Next“ the user can request a new random number which is shown in a text field. By clicking “Clear“ this text field is cleared.

User Story

Page 8: EclipseCon 08 - Agile RCP

Agile RCP - Presenter First using Spring Dynamic Modules | © 2008 by Heiko Seeberger; made available under the EPL v1.0

Demo – Presenter

Page 9: EclipseCon 08 - Agile RCP

Agile RCP - Presenter First using Spring Dynamic Modules | © 2008 by Heiko Seeberger; made available under the EPL v1.0

Demo – Test Coverage

• Presenter 100% covered!

Page 10: EclipseCon 08 - Agile RCP

Agile RCP - Presenter First using Spring Dynamic Modules | © 2008 by Heiko Seeberger; made available under the EPL v1.0

Demo – Spring configuration

Page 11: EclipseCon 08 - Agile RCP

Agile RCP - Presenter First using Spring Dynamic Modules | © 2008 by Heiko Seeberger; made available under the EPL v1.0

Agile RCP

• Framework for agile development of UIs with RCP:

� Based on standards like OSGi, Spring DM and MVP.

� Already contains library for Presenter First on RCP.

� Tooling and test support planned.

• Plans:

� 0.9 release in April (Eclipse Forum Europe).

� Make Agile RCP open source.

Page 12: EclipseCon 08 - Agile RCP

Agile RCP - Presenter First using Spring Dynamic Modules | © 2008 by Heiko Seeberger; made available under the EPL v1.0

Thank you!

• For further information:

� Visit our Agile RCP website at agilercp.metafinanz.de,

� Join my session at Eclipse Forum Europe or

� Contact me at [email protected].