Saturday, 29 June 13
Who am I?
Drools co-founder
JBoss (2005)
Red Hat (2006)
Polymita Acquisition 2012
Red Hat Platform Architect
UF UberFire
Saturday, 29 June 13
BRMS and BPMS Platforms
• Authoring
• Build
• Deploy
Saturday, 29 June 13
BRMS and BPMS Platforms
• Authoring
• Build
• Deploy
• Monitor and Manage
• Work
Saturday, 29 June 13
BRMS Components
Saturday, 29 June 13
Saturday, 29 June 13
Saturday, 29 June 13
Saturday, 29 June 13
Saturday, 29 June 13
Saturday, 29 June 13
Saturday, 29 June 13
Saturday, 29 June 13
Saturday, 29 June 13
Saturday, 29 June 13
•Merging
Saturday, 29 June 13
•Merging
•Grouping
Saturday, 29 June 13
Saturday, 29 June 13
Saturday, 29 June 13
Saturday, 29 June 13
Saturday, 29 June 13
Saturday, 29 June 13
Saturday, 29 June 13
Saturday, 29 June 13
Saturday, 29 June 13
GWT
Saturday, 29 June 13
GWT
public class Hello implements EntryPoint {
public void onModuleLoad() {
Button b = new Button("Click me",
new ClickListener() {
public void onClick(Widget sender) {
Window.alert("Hello, Ajax");
RootPanel.get().add(b);
}
});
}
}
Saturday, 29 June 13
GWT
• Java
• Type safety
• Refactoring
• Compile errors
• Encourages client side state
• Abstracts browser API hell
• Unified bubble system
• Browser specific compilations
• Small size
• Fast Execution
Saturday, 29 June 13
GWT
• Boiler plate code
• API for programmatic UIs
• Slow compilation
• GWT team left Google
• Not open source
• No transparency
Saturday, 29 June 13
GWT
• Errai
• UiBinder and ErraiUi
• SuperDev Mode
• Source Maps
• Ray Cromwell + team
• Fully Open Source
• Steering Committee
• Roadmaps
Saturday, 29 June 13
UiBinder
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'>
  <div>
    Hello, <span ui:field='nameSpan'/>.
  </div>
</ui:UiBinder>
Saturday, 29 June 13
UiBinder
<g:HTMLPanel>
    <g:Image resource='{res.logo}'/>
    <div class='{res.style.mainBlock}'>
      <div class='{res.style.userPictureSprite}'/>
      <div>
        Well hello there
        <span class='{res.style.nameSpan}'
ui:field='nameSpan'/>
      </div>
    </div>
  </g:HTMLPanel>
Saturday, 29 June 13
UiBinder
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
    xmlns:g='urn:import:com.google.gwt.user.client.ui'
    xmlns:my='urn:import:com.my.app.widgets' >
  <g:HTMLPanel>
    <my:WeatherReport ui:field='weather'/>
    <my:Stocks ui:field='stocks'/>
    <my:CricketScores ui:field='scores' />
  </g:HTMLPanel>
</ui:UiBinder>
Saturday, 29 June 13
Errai
Saturday, 29 June 13
Errai
• Removes boiler plate code
• CDI
• Context and Dependency Injection
• Annotation driven development
• Errai UI
• Unified programming model
• Pervasive Events and Event Bus
• Client and server
• RPC
• JAX-RS
• Marshalling @Portable
Saturday, 29 June 13
ErraiUI
<form data-field="form">
<legend>Log in to your account</legend>
<label for="username">Username</label>
<input data-field="username" id="username"
type="text" placeholder="Username">
<label for="password">Password</label>
<input data-field="pass" id="password"
type="password" placeholder="Password">
<button data-field="submit">Log in</button>
<button>Cancel</button>
</form>
Saturday, 29 June 13
ErraiUI @Templated
public class LoginForm extends Composite {
@Inject @Bound @DataField
private TextBox username;
@Inject @Bound @DataField("pass")
private PasswordTextBox password;
@Inject @Model
private User user;
@EventHandler("submit")
private void onLogin(ClickEvent e) {
login(user);
}
}
Saturday, 29 June 13
Errai Injecting,Firing and
@Inject @Updated
private Event<Document> updatedDocEvent;
...
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
updatedDocEvent.fire(document);
}
});
...
public void onUpdatedDocument(@Observes @Updated Document doc) {
// received updated document
}
Saturday, 29 June 13
Errai @Portable Marshalling@Portable
public class Person {
private String name;
private int age;
public Person() {}
public Person(String name, int age) {
this.name = name;
this.age = age;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
...
}
Saturday, 29 June 13
Errai JAX-RS
@Path("customers")
public interface CustomerService {
@POST
@Consumes("application/json")
@Produces("text/plain")
public long createCustomer(Customer customer);
}
@Inject
private Caller<CustomerService> customerService;
...
customerService.call(new RemoteCallback<Long>() {
public void callback(Long response) {
Window.alert(response);
}
}).createCustomer(customer);
Saturday, 29 June 13
Errai RPC
@Service
public class HappyServiceImpl implements
HappyService {
public boolean isEveryoneHappy() {
return true; // this could be a lie!
}
}
@Remote
public interface
HappyService {...}
@Inject
private Caller<HappyService> happyService;
...
happyService.call(new RemoteCallback<Boolean>() {
public void callback(Boolean response) {
// process response
}
}).isEveryoneHappy();
shared
server
client
Saturday, 29 June 13
What we Learned
Saturday, 29 June 13
5.x Critique
UI
• GWT
• but not easily extended
• fixed layouts
• no perspectives
Saturday, 29 June 13
5.x Critique
UI
• GWT
• but not easily extended
• fixed layouts
• no perspectives
JCR
• Performance Issues
• Everything stored as blob
• No tagging, branching etc.
• Webdav
• Limited team providers
Saturday, 29 June 13
5.x Critique
UI
• GWT
• but not easily extended
• fixed layouts
• no perspectives
JCR
• Performance Issues
• Everything stored as blob
• No tagging, branching etc.
• Webdav
• Limited team providers
Deployment
• Binary blobs, on url
Saturday, 29 June 13
Requirements
• GWT + Errai
• Modular design
• Plugins
• Common Life cycles
• Compile time composition of plugins
• Composition via Maven modules
• Panel re-use in other frameworks
• Eclipse, Portal etc
• Perspectives
• Flexible layouts
• GIT Backend
• High Availabilty
• Hybrid GWT + JS support
Saturday, 29 June 13
UF UberFire
Saturday, 29 June 13
KIE - Knowledge Is Everything
Saturday, 29 June 13
KIE - Knowledge Is Everything
Saturday, 29 June 13
UberFire Architecture Overview
Saturday, 29 June 13
•Modular
•Extensible
•Dynamic and Flexible layouts
•Perspectives
Saturday, 29 June 13
Build and Deploy
Saturday, 29 June 13
Simple POM Editor
Saturday, 29 June 13
Local Maven Repository and
Manager
Saturday, 29 June 13
Create or Clone Git Repos
Saturday, 29 June 13
Demo
BRMS 6.0 Beta3
Saturday, 29 June 13
Saturday, 29 June 13
UI Improvments
Saturday, 29 June 13
UberFire new Navigation System
Saturday, 29 June 13
UberFire new Navigation System
Saturday, 29 June 13
UberFire new Navigation System
Saturday, 29 June 13
UberFire new Navigation System
Saturday, 29 June 13
BPM Integration
Saturday, 29 June 13
Work - Task Lists
Saturday, 29 June 13
Work - Task Lists
Saturday, 29 June 13
Work - Task Lists
Saturday, 29 June 13
Work - Task Lists
Saturday, 29 June 13
Work - Task Lists
Saturday, 29 June 13
Work - Task Lists
Saturday, 29 June 13
BPMN Designer (JS)
Saturday, 29 June 13
Proof Is In The Pudding
Saturday, 29 June 13
• UI Rewrite started in November
• Entire BRMS ported
• New BPMS built, all integrated
• Tasks, Calendars, BPM Designer
• Only one person on core UI framework
• All team memebers distributed
• Despite aggressive schedule
• Code remains modular
• Easy to maintan and extend
• No one is complaining yet :)
Proof Is In The Pudding
Saturday, 29 June 13
UberFire
Saturday, 29 June 13
UberFire
•Compile time composition of plugins
•modular components, each separate maven module.
•Lightweight
•Decoupled components
•Layout Manager and Perspectives
•Embeddable/Reusable (*)
•Unified API
•Security
•I/O
•VFS
•Metadata
•Menus, Toolbars, Panels, etc.
•Standard Life Cycle
Saturday, 29 June 13
UberFire Annotations
OnStart
OnSave
IsDirty
OnClose
OnFocus
OnLostFocus
OnMayClose
OnReveal
WorkbenchEditor
WorkbenchPerspective
WorkbenchPopup
WorkbenchScreen
WorkbenchPartTitle
WorkbenchPartView
WorkbenchMenu
Perspective
Components Lifecycle
Component
Rendering Info
Saturday, 29 June 13
Component Annotation
@WorkbenchPerspective(
identifier = "HomePerspective",
isDefault = true)
public class HomePerspective {
@Perspective
public PerspectiveDefinition buildPerspective() {
final PerspectiveDefinition p =
new PerspectiveDefinitionImpl();
p.setName( "Home Perspective" );
p.getRoot().addPart(
new PartDefinitionImpl(
new DefaultPlaceRequest( "RepoList" ) ) );
return p;
}
}
Saturday, 29 June 13
Component Annotation
@WorkbenchScreen(identifier = "MyFirstPanel")
public class MyFirstPanel extends SimplePanel {
public MyFirstPanel() {
setWidget( new Label("Hello World 1") );
}
@WorkbenchPartTitle
public String myTitle() {
return "My First Panel!";
}
}
Saturday, 29 June 13
@WorkbenchEditor(identifier = "TextEditor",
supportedTypes = { TextResourceType.class,
DotResourceType.class })
public class TextEditorPresenter {
@WorkbenchPartTitle
public String getTitle() {
return "Text Editor [" + path.getFileName() + "]";
}
@WorkbenchPartView
public IsWidget getWidget() {
return view; //injected
}
(...)
}
Component Annotation
Saturday, 29 June 13
@WorkbenchEditor(identifier = "TextEditor",
supportedTypes = { TextResourceType.class,
DotResourceType.class })
public class TextEditorPresenter {
(...)
@OnStart
public void onStart( final Path path ) {
this.path = path;
}
@OnSave
public void onSave() {
}
@IsDirty
public boolean isDirty() {
return view.isDirty();
}
}
Lifecycle Annotation
Saturday, 29 June 13
@OnStart
public void onStart( final Path path ) {
this.path = path;
}
Lifecycle Annotation - Options
@OnStart
public void onStart( final PlaceRequest path ) {
this.path = path;
}
@OnStart
public void onStart( ) {
}
Saturday, 29 June 13
Distribution Compositions
via
Maven
Saturday, 29 June 13
<project>
<artifactId>uberfire-webapp</artifactId>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>org.uberfire</groupId>
<artifactId>uberfire-server</
artifactId>
</dependency>
<dependency>
<groupId>org.uberfire</groupId>
<artifactId>uberfire-client-api</
artifactId>
</dependency>
<dependency>
<groupId>org.uberfire</groupId>
<artifactId>uberfire-widgets-core-
client</artifactId>
</dependency>
<dependency>
<groupId>org.uberfire</groupId>
<artifactId>uberfire-widgets-commons</
artifactId>
</dependency>
<dependency>
<groupId>org.uberfire</groupId>
<artifactId>uberfire-workbench</
artifactId>
</dependency>
(...)
</dependencies>
</project>
<module>
<inherits
name="org.jboss.errai.enterprise.CDI"/>
<inherits
name="org.uberfire.security.UberfireSecurityClien
t"/>
<inherits
name="org.uberfire.UberfireWorkbench"/>
<inherits
name="org.uberfire.UberfireWidgetsCore"/>
<inherits name="org.uberfire.UberfireBackend"/>
<source path='client'/>
<source path='shared'/>
</module>
UberfireShowcase.gwt.xmlpom.xml
Saturday, 29 June 13
Saturday, 29 June 13
Markdown Component
Saturday, 29 June 13
<module>
<inherits
name="org.uberfire.UberfireMarkdownWidget"/
>
<inherits name="org.jboss.errai.enterprise.CDI"/>
<inherits
name="org.uberfire.security.UberfireSecurityClient"/>
<inherits name="org.uberfire.UberfireWorkbench"/>
<inherits name="org.uberfire.UberfireWidgetsCore"/>
<inherits name="org.uberfire.UberfireBackend"/>
<source path='client'/>
<source path='shared'/>
</module>
<project>
<artifactId>uberfire-webapp</artifactId>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>org.uberfire</groupId>
<artifactId>uberfire-widget-
markdown</artifactId>
</dependency>
<dependency>
<groupId>org.uberfire</groupId>
<artifactId>uberfire-server</artifactId>
</dependency>
<dependency>
<groupId>org.uberfire</groupId>
<artifactId>uberfire-client-api</artifactId>
</dependency>
<dependency>
<groupId>org.uberfire</groupId>
<artifactId>uberfire-widgets-core-client</
artifactId>
</dependency>
<dependency>
<groupId>org.uberfire</groupId>
<artifactId>uberfire-widgets-commons</
artifactId>
</dependency>
<dependency>
<groupId>org.uberfire</groupId>
<artifactId>uberfire-workbench</artifactId>
</dependency>
(...)
</dependencies>
</project>
UberfireShowcase.gwt.xmlpom.xml
Saturday, 29 June 13
Saturday, 29 June 13
Show Case
Saturday, 29 June 13
UberFire Showcase
Saturday, 29 June 13
UberFire Showcase
Saturday, 29 June 13
UberFire Showcase
Saturday, 29 June 13
Demo Project
Web IDE
with Ace Editor
Saturday, 29 June 13
UberFire Demo Project
Saturday, 29 June 13
UberFire Demo Project
Saturday, 29 June 13
UberFire Demo Project
Saturday, 29 June 13
UberFire Demo Project
Saturday, 29 June 13
UberFire Demo Project
Saturday, 29 June 13
UberFire Demo Project
Saturday, 29 June 13
UberFire Demo Project
Saturday, 29 June 13
UberFire Demo Project
Saturday, 29 June 13
Demo
Saturday, 29 June 13
Saturday, 29 June 13
• http://droolsjbpm.github.io/uberfire/
• irc
• irc.freenode.net
• #guvnor
• #drools
Saturday, 29 June 13

UberFire (JudCon 2013)