SlideShare a Scribd company logo
1 of 123
Download to read offline
Vaadin 7
  Joonas Lehtinen
  Founder / Vaadin
  @joonaslehtinen
Intro to
 Vaadin

           new Label( “Hello world”)
New in

  7
Getting
started



          QA
User interface
framework for rich
  web applications
java   html
Why on earth?
expectations
reality
consumer      business
 “million” users   “500” users
        10 views   50 views
         1€/user   500€/user

100,000€ / view >> 5,000€ / view
Challenge
 How to build consumer
grade UX with business
        system budget
How?
123
Key Ideas
1
Rich
Components
User Inteface
Data Source
   Theme
User Inteface
Data Source
   Theme
User Inteface
Data Source
   Theme
InMemory, Bean, Method,
Collection, JDBC, JPA, Hibernate,
TextFile, FileSystem, Properties,
EclipseLink, Lucene, Mockups,
GAE, ...
2
Server + Client
Web application layers
             Backend      Web                   Java to
                                     RPC                    JavaScript
              server     server                JavaScript
GWT Vaadin




              required   required   optional     optional     optional




              required   required   required     required     optional
JS




              required   required   required                  required
How does it work,
really?
•   Initial HTML
•   CSS (theme)
•   Images
•   JavaScript

1.2M total
        compress


307k
        reduced
        widgetset

135k
• name=”Joonas”
• button clicked

261 bytes
• name=”Joonas”
• button clicked

261 bytes




• Add notification

267 bytes
Hello World!
Source
https://github.com/vaadin/documentmanager

          HOWTO Screencast
         https://vaadin.com/learn
3
Embracing
Java
Any language
      on JVM
Internet Explorer
         Chrome
          Firefox
           Safari
           Opera
             iOS
         Android
No
  browser
   plugins

Nothing to
    install
Servlet
      Portlet
(most) clouds
Eclipse
IntelliJ IDEA
   Netbeans
       Maven
           Ant
            ∙∙∙
7
Vaadin
    today
v0.1
2001

        v3
       2002


         Open
        Source
v4
 2006


Ajax

         v5
        2007
7
 v6        Feb
2009
934 tickets closed during 16 months of
development

Oldest ticket created 3/2008
Newest ticket 2/2013

3939 commits made by 23 authors
93 % by 6 persons

> 1 000 000 lines of code touched
Renewed
             JS
      Sass
                         from Inside
         HTML5
                  +=    UI
                  GWT

                        RPC
Complete                State   Field

stack
vaadin.com/7
7
Favorite picks
Vaadin += GWT
GWT
Compatible
Server
                    Pr
                     Op
          -
             od
                        t
                                               r
                 im
                                             fo
    uc
                                           d
       ti     ize
                                     ize
 vit        df
y      or
                                  tim
                               e rol
                                Op
                                  t-



                            s d ont
                             i C
                               ien
                             Cl
Architecture
New Windowing API
public class Vaadin6App extends Application {

	   public void init() {
	   	 setMainWindow(createWindow());
	   }

	   public Window getWindow(String name) {
	   	 Window window = super.getWindow(name);
	   	 if (window == null) {
	   	 	 window = createWindow();
	   	 	 window.setName(name);
	   	 	 addWindow(window);
	   	 }
	   	 return window;
	   }

	   private Window createWindow() {
	   	 Window window = new Window("Vaadin 6 Application");
	   	 window.addComponent(new TextField("What is your name"));
	   	 window.addComponent(new Button("Do not push me"));
	   	 return window;
	   }

}
@Title("Vaadin 7 Application")
public class HellowUI extends UI {

	   protected void init(VaadinRequest request) {
	   	 setContent(new VerticalLayout(
	   	 	 	 new TextField("What is your name"),
	   	 	 	 new Button("Do not push me")));
	   }

}
@PreserveOnRefresh
@Title("Vaadin 7 Application")
public class HellowUI extends UI {

	   protected void init(VaadinRequest request) {
	   	 setContent(new VerticalLayout(
	   	 	 	 new TextField("What is your name"),
	   	 	 	 new Button("Do not push me")));
	   }

}
Demo




Built-in high level
View management
Demo




Sass
Redesigned
Forms
public class Employee {
	 String firstName;
	 String lastName;
	 double salary;
                                        6
	 Date birthDate;
      // Getters, setters, …
}

Form form = new Form();
form.setItemDataSource(
   new BeanItem<Employee>(employee));
form.setFormFieldFactory(new FormFieldFactory() {

	 	 	 public Field createField(Item item, Object propertyId,
	 	 	 	 	 Component uiContext) {

	   	   	   	   if ("birthDate".equals(propertyId)) {
                                                                 6
	   	   	   	   	 DateField df = new DateField();
	   	   	   	   	 df.setResolution(DateField.RESOLUTION_DAY);
	   	   	   	   	 return df;
	   	   	   	   }

                // ..

	   	   	 	 return DefaultFieldFactory.createFieldByPropertyType(item
	   	   	 	 	 	 .getItemProperty(propertyId).getType());
	   	   	 }
	   	   });
7
	 	 GridLayout form = new GridLayout(2,2) {

	   	   	    TextField   firstName = new TextField("First name");
	   	   	    TextField   lastName = new TextField("Last name");
	   	   	    TextField   salary = new TextField("Salary");
	   	   	    DateField   birthDate = new DateField("Birth date");

	   	   	    {
	   	   	    	   birthDate.setResolution(Resolution.DAY);
	   	   	    	   setSpacing(true);
	   	   	    	   addComponent(firstName);
	   	   	    	   addComponent(lastName);
	   	   	    	   addComponent(birthDate);
	   	   	    	   addComponent(salary);
	   	   	    }
	   	   };

	 	 BeanFieldGroup<Employee> fieldGroup = new BeanFieldGroup<Employee>(Employee.class);
	 	 fieldGroup.bindMemberFields(form);
	 	 fieldGroup.setItemDataSource(new BeanItem<Employee>(employee));
public class Person {

    @Size(min = 5, max = 50)
    private String name;

    @Min(0)
    @Max(100)
    private int age;

    // + constructor + setters + getters
}
Demo
                “Joonas Lehtinen”



presentation
                    Component
model




                firstName = “Joonas”
               lastName = “Lehtinen”
RPC
State
6                     Widget



                     Paintable
          Variable
client   Changes


server
                                 UIDL


                 Component
7         Widget
                             Demo




         Connector

client
                     State
server
         RPC


         Component
public interface ButtonRpc extends ServerRpc {                    Demo
                             public void click(MouseEventDetails details);
                         }




                                                               private ButtonRpc rpc = new ButtonRpc() {
                                                                  public void click(
private ButtonRpc rpc =
                                                                    MouseEventDetails details) {
RpcProxy.create(ButtonRpc.class, this);
                                                                        // do stuff
                                                                  }
public void onClick(ClickEvent event) {
                                                               };
  rpc.click(
     new MouseEventDetails(event));
                                                               public Button() {
}
                                                                 registerRpc(rpc);
                                                               }




                                    client              server
JavaScript
Add-ons
Publish API from Java

getPage().getJavaScript().addFunction("myCallback",
	 new JavaScriptCallback() {
	 	 public void call(JSONArray arguments) throws JSONException {
	 	 	 // Do something with the arguments
	 	 }
	 });
	 	

Use from JavaScript

window.myCallback('foo', 100);
Server-side Java API for Widget

public class MyWidget extends AbstractJavaScriptComponent {
	 public MyWidget() {
	 	 addFunction("plotClick", new JavaScriptFunction() {
	 	 	 public void call(JSONArray arguments) throws JSONException {
	 	 	 	 // Do something with the event
	 	 	 }
	 	 });
	 }

	   public static class MyWidgetState extends JavaScriptComponentState {
	   	 public List<List<List<Double>>> plotSeriesData =
	   	 	 	 new ArrayList<List<List<Double>>>();
	   }
    public MyWidgetState getState() { return (MyWidgetState) super.getState(); }


}
Widget implementation in JavaScript

window.com_example_MyWidget = function() {
	 var element = $(this.getWidgetElement());
	
    // Draw a plot for any server-side (plot data) state change
	 this.onStateChange = function() {
	 	 $.plot(element, this.getState().series, {grid: {clickable: true}});
	 }

      // Communicate local events back to server-side component
	    element.bind('plotclick', function(event, point, item) {
	    	 if (item) {
        	 var onPlotClick = this.getCallback("plotClick");
	    	 	 onPlotClick(item.seriesIndex, item.dataIndex);
	    	 }
	    });
}
Roadmap
Vaadin Framework 7.1                         April
 • Server push
   • Based on Atmosphere Framework
   • Web sockets, long polling and polling
 • Calendar (now under Apache 2.0 license)
 • Limited IE 10 support without touch
 • CSS string inject
 • Renewed debug console features
    ◦ Redesigned UI/UX for debug window
    ◦ Optimize widgetset
 • Arithmetics for SASS
 • Packaging SCSS / CSS for add-ons
Vaadin Charts 1.1                                              May
 • New charts:
   • Funnel
   • Box plot
   • Waterfall
   • Bubble
   • Error bars
 • Different coloring of a graph above and below a threshold
 • Pinch zooming and panning for touch devices
Vaadin TouchKit 3.0    April
  • Vaadin 7 support

  • New components:
    • URLField
    • Datefield
    • Combobox
Vaadin TestBench 3.1      May
   • Headless mode with
     Phantom JS
Vaadin CDI
  • Registering UI with @CDIUI annotation (web.xml no more)
  • Registering Views (to CDIViewManager)
  • Decoupling UI:s by injecting UI components (handy for MVP)
  • Injecting all the normal Java EE stuff (ejbs, events, ...)
  • UI Scope to complement the session scope
  • Supports JAAS (set @RolesAllowed for a View, ...)

  • 1.0 alpha to be released any day now (in staging repo today)
  • Apache 2.0 License
Vaadin JPAContainer
  • License changed to Apache 2.0
  • Vaadin 7 compatible version released in March
getting
started
Eclipse
mvn archetype:generate
      -DarchetypeGroupId=com.vaadin
Maven -DarchetypeArtifactId=
         vaadin-archetype-application
      -DarchetypeVersion=7.0.3
Migration Guide:
Vaadin 6 to 7
https://vaadin.com/wiki/-/wiki/Main/Migrating
+from+Vaadin+6+to+Vaadin+7
Download for Free
      vaadin.com/book




-93-
    1970
        -1




701




      728 pages
      PDF, ePub, HTML
?
joonas@vaadin.com
  vaadin.com/joonas
    @joonaslehtinen

More Related Content

What's hot

Huahin Framework for Hadoop, Hadoop Conference Japan 2013 Winter
Huahin Framework for Hadoop, Hadoop Conference Japan 2013 WinterHuahin Framework for Hadoop, Hadoop Conference Japan 2013 Winter
Huahin Framework for Hadoop, Hadoop Conference Japan 2013 WinterRyu Kobayashi
 
안드로이드 데이터 바인딩
안드로이드 데이터 바인딩안드로이드 데이터 바인딩
안드로이드 데이터 바인딩GDG Korea
 
JCConf 2015 - 輕鬆學google的雲端開發 - Google App Engine入門(上)
JCConf 2015  - 輕鬆學google的雲端開發 - Google App Engine入門(上)JCConf 2015  - 輕鬆學google的雲端開發 - Google App Engine入門(上)
JCConf 2015 - 輕鬆學google的雲端開發 - Google App Engine入門(上)Simon Su
 
Create a Customized GMF DnD Framework
Create a Customized GMF DnD FrameworkCreate a Customized GMF DnD Framework
Create a Customized GMF DnD FrameworkKaniska Mandal
 
Kotlin is charming; The reasons Java engineers should start Kotlin.
Kotlin is charming; The reasons Java engineers should start Kotlin.Kotlin is charming; The reasons Java engineers should start Kotlin.
Kotlin is charming; The reasons Java engineers should start Kotlin.JustSystems Corporation
 
Groovy And Grails JUG Sardegna
Groovy And Grails JUG SardegnaGroovy And Grails JUG Sardegna
Groovy And Grails JUG SardegnaJohn Leach
 
Data binding в массы!
Data binding в массы!Data binding в массы!
Data binding в массы!Artjoker
 
Refactor to Reactive With Spring 5 and Project Reactor
Refactor to Reactive With Spring 5 and Project ReactorRefactor to Reactive With Spring 5 and Project Reactor
Refactor to Reactive With Spring 5 and Project ReactorEatDog
 
Imagine a world without mocks
Imagine a world without mocksImagine a world without mocks
Imagine a world without mockskenbot
 
Groovy And Grails JUG Trento
Groovy And Grails JUG TrentoGroovy And Grails JUG Trento
Groovy And Grails JUG TrentoJohn Leach
 
03 - Qt UI Development
03 - Qt UI Development03 - Qt UI Development
03 - Qt UI DevelopmentAndreas Jakl
 
What's new and noteworthy in Java EE 8?
What's new and noteworthy in Java EE 8?What's new and noteworthy in Java EE 8?
What's new and noteworthy in Java EE 8?gedoplan
 
CDI e as ideias pro futuro do VRaptor
CDI e as ideias pro futuro do VRaptorCDI e as ideias pro futuro do VRaptor
CDI e as ideias pro futuro do VRaptorCaelum
 
Performance #1: Memory
Performance #1: MemoryPerformance #1: Memory
Performance #1: MemoryYonatan Levin
 
Sustaining Test-Driven Development
Sustaining Test-Driven DevelopmentSustaining Test-Driven Development
Sustaining Test-Driven DevelopmentAgileOnTheBeach
 
Data binding в массы! (1.2)
Data binding в массы! (1.2)Data binding в массы! (1.2)
Data binding в массы! (1.2)Yurii Kotov
 
Spring vs. Java EE QConSP 2012
Spring vs. Java EE QConSP 2012Spring vs. Java EE QConSP 2012
Spring vs. Java EE QConSP 2012Guilherme Moreira
 
Anton Minashkin Dagger 2 light
Anton Minashkin Dagger 2 lightAnton Minashkin Dagger 2 light
Anton Minashkin Dagger 2 lightMichael Pustovit
 

What's hot (20)

Huahin Framework for Hadoop, Hadoop Conference Japan 2013 Winter
Huahin Framework for Hadoop, Hadoop Conference Japan 2013 WinterHuahin Framework for Hadoop, Hadoop Conference Japan 2013 Winter
Huahin Framework for Hadoop, Hadoop Conference Japan 2013 Winter
 
Mattbrenner
MattbrennerMattbrenner
Mattbrenner
 
안드로이드 데이터 바인딩
안드로이드 데이터 바인딩안드로이드 데이터 바인딩
안드로이드 데이터 바인딩
 
JCConf 2015 - 輕鬆學google的雲端開發 - Google App Engine入門(上)
JCConf 2015  - 輕鬆學google的雲端開發 - Google App Engine入門(上)JCConf 2015  - 輕鬆學google的雲端開發 - Google App Engine入門(上)
JCConf 2015 - 輕鬆學google的雲端開發 - Google App Engine入門(上)
 
Java
JavaJava
Java
 
Create a Customized GMF DnD Framework
Create a Customized GMF DnD FrameworkCreate a Customized GMF DnD Framework
Create a Customized GMF DnD Framework
 
Kotlin is charming; The reasons Java engineers should start Kotlin.
Kotlin is charming; The reasons Java engineers should start Kotlin.Kotlin is charming; The reasons Java engineers should start Kotlin.
Kotlin is charming; The reasons Java engineers should start Kotlin.
 
Groovy And Grails JUG Sardegna
Groovy And Grails JUG SardegnaGroovy And Grails JUG Sardegna
Groovy And Grails JUG Sardegna
 
Data binding в массы!
Data binding в массы!Data binding в массы!
Data binding в массы!
 
Refactor to Reactive With Spring 5 and Project Reactor
Refactor to Reactive With Spring 5 and Project ReactorRefactor to Reactive With Spring 5 and Project Reactor
Refactor to Reactive With Spring 5 and Project Reactor
 
Imagine a world without mocks
Imagine a world without mocksImagine a world without mocks
Imagine a world without mocks
 
Groovy And Grails JUG Trento
Groovy And Grails JUG TrentoGroovy And Grails JUG Trento
Groovy And Grails JUG Trento
 
03 - Qt UI Development
03 - Qt UI Development03 - Qt UI Development
03 - Qt UI Development
 
What's new and noteworthy in Java EE 8?
What's new and noteworthy in Java EE 8?What's new and noteworthy in Java EE 8?
What's new and noteworthy in Java EE 8?
 
CDI e as ideias pro futuro do VRaptor
CDI e as ideias pro futuro do VRaptorCDI e as ideias pro futuro do VRaptor
CDI e as ideias pro futuro do VRaptor
 
Performance #1: Memory
Performance #1: MemoryPerformance #1: Memory
Performance #1: Memory
 
Sustaining Test-Driven Development
Sustaining Test-Driven DevelopmentSustaining Test-Driven Development
Sustaining Test-Driven Development
 
Data binding в массы! (1.2)
Data binding в массы! (1.2)Data binding в массы! (1.2)
Data binding в массы! (1.2)
 
Spring vs. Java EE QConSP 2012
Spring vs. Java EE QConSP 2012Spring vs. Java EE QConSP 2012
Spring vs. Java EE QConSP 2012
 
Anton Minashkin Dagger 2 light
Anton Minashkin Dagger 2 lightAnton Minashkin Dagger 2 light
Anton Minashkin Dagger 2 light
 

Viewers also liked

Vaadin Introduction, 7.3 edition
Vaadin Introduction, 7.3 editionVaadin Introduction, 7.3 edition
Vaadin Introduction, 7.3 editionJoonas Lehtinen
 
Migration from vaadin 6 to vaadin 7 devoxx france 2013
Migration from vaadin 6 to vaadin 7   devoxx france 2013Migration from vaadin 6 to vaadin 7   devoxx france 2013
Migration from vaadin 6 to vaadin 7 devoxx france 2013Joonas Lehtinen
 
Juggling Java EE with Enterprise Apache Maven
Juggling Java EE with Enterprise Apache MavenJuggling Java EE with Enterprise Apache Maven
Juggling Java EE with Enterprise Apache Mavenelliando dias
 
Client-Server Hybrid Apps with Vaadin
Client-Server Hybrid Apps with VaadinClient-Server Hybrid Apps with Vaadin
Client-Server Hybrid Apps with VaadinJoonas Lehtinen
 
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...Joonas Lehtinen
 
Vaadin roadmap-devoxx-2013
Vaadin roadmap-devoxx-2013Vaadin roadmap-devoxx-2013
Vaadin roadmap-devoxx-2013Joonas Lehtinen
 
Desingning reusable web components
Desingning reusable web componentsDesingning reusable web components
Desingning reusable web componentsJoonas Lehtinen
 
Workshop: Building Vaadin add-ons
Workshop: Building Vaadin add-onsWorkshop: Building Vaadin add-ons
Workshop: Building Vaadin add-onsSami Ekblad
 
Vaadin Components @ Angular U
Vaadin Components @ Angular UVaadin Components @ Angular U
Vaadin Components @ Angular UJoonas Lehtinen
 
Web Components for Java Developers
Web Components for Java DevelopersWeb Components for Java Developers
Web Components for Java DevelopersJoonas Lehtinen
 

Viewers also liked (16)

Vaadin Components
Vaadin ComponentsVaadin Components
Vaadin Components
 
Vaadin & Web Components
Vaadin & Web ComponentsVaadin & Web Components
Vaadin & Web Components
 
Vaadin Introduction, 7.3 edition
Vaadin Introduction, 7.3 editionVaadin Introduction, 7.3 edition
Vaadin Introduction, 7.3 edition
 
Migration from vaadin 6 to vaadin 7 devoxx france 2013
Migration from vaadin 6 to vaadin 7   devoxx france 2013Migration from vaadin 6 to vaadin 7   devoxx france 2013
Migration from vaadin 6 to vaadin 7 devoxx france 2013
 
Juggling Java EE with Enterprise Apache Maven
Juggling Java EE with Enterprise Apache MavenJuggling Java EE with Enterprise Apache Maven
Juggling Java EE with Enterprise Apache Maven
 
Client-Server Hybrid Apps with Vaadin
Client-Server Hybrid Apps with VaadinClient-Server Hybrid Apps with Vaadin
Client-Server Hybrid Apps with Vaadin
 
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...
 
Vaadin 7
Vaadin 7Vaadin 7
Vaadin 7
 
Vaadin 7 what next
Vaadin 7   what nextVaadin 7   what next
Vaadin 7 what next
 
Beoynd Vaadin 7
Beoynd Vaadin 7Beoynd Vaadin 7
Beoynd Vaadin 7
 
Vaadin roadmap-devoxx-2013
Vaadin roadmap-devoxx-2013Vaadin roadmap-devoxx-2013
Vaadin roadmap-devoxx-2013
 
Desingning reusable web components
Desingning reusable web componentsDesingning reusable web components
Desingning reusable web components
 
Vaadin += GWT
Vaadin += GWTVaadin += GWT
Vaadin += GWT
 
Workshop: Building Vaadin add-ons
Workshop: Building Vaadin add-onsWorkshop: Building Vaadin add-ons
Workshop: Building Vaadin add-ons
 
Vaadin Components @ Angular U
Vaadin Components @ Angular UVaadin Components @ Angular U
Vaadin Components @ Angular U
 
Web Components for Java Developers
Web Components for Java DevelopersWeb Components for Java Developers
Web Components for Java Developers
 

Similar to Vaadin7

A GWT Application with MVP Pattern Deploying to CloudFoundry using Spring Roo
A GWT Application with MVP Pattern Deploying to CloudFoundry using  Spring Roo A GWT Application with MVP Pattern Deploying to CloudFoundry using  Spring Roo
A GWT Application with MVP Pattern Deploying to CloudFoundry using Spring Roo Ali Parmaksiz
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleThierry Wasylczenko
 
Vaadin 7 CN
Vaadin 7 CNVaadin 7 CN
Vaadin 7 CNjojule
 
Vaadin 7 by Joonas Lehtinen
Vaadin 7 by Joonas LehtinenVaadin 7 by Joonas Lehtinen
Vaadin 7 by Joonas LehtinenCodemotion
 
softshake 2014 - Java EE
softshake 2014 - Java EEsoftshake 2014 - Java EE
softshake 2014 - Java EEAlexis Hassler
 
Modern Android app library stack
Modern Android app library stackModern Android app library stack
Modern Android app library stackTomáš Kypta
 
Enterprise Guice 20090217 Bejug
Enterprise Guice 20090217 BejugEnterprise Guice 20090217 Bejug
Enterprise Guice 20090217 Bejugrobbiev
 
Qt & Webkit
Qt & WebkitQt & Webkit
Qt & WebkitQT-day
 
Reactive programming every day
Reactive programming every dayReactive programming every day
Reactive programming every dayVadym Khondar
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotationjavatwo2011
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best PracticesYekmer Simsek
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsJeff Durta
 
Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Murat Yener
 
droidQuery: The Android port of jQuery
droidQuery: The Android port of jQuerydroidQuery: The Android port of jQuery
droidQuery: The Android port of jQueryPhDBrown
 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web ToolkitsYiguang Hu
 
Testing in android
Testing in androidTesting in android
Testing in androidjtrindade
 

Similar to Vaadin7 (20)

Vaadin7
Vaadin7Vaadin7
Vaadin7
 
A GWT Application with MVP Pattern Deploying to CloudFoundry using Spring Roo
A GWT Application with MVP Pattern Deploying to CloudFoundry using  Spring Roo A GWT Application with MVP Pattern Deploying to CloudFoundry using  Spring Roo
A GWT Application with MVP Pattern Deploying to CloudFoundry using Spring Roo
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradle
 
Vaadin 7 CN
Vaadin 7 CNVaadin 7 CN
Vaadin 7 CN
 
Vaadin 7 by Joonas Lehtinen
Vaadin 7 by Joonas LehtinenVaadin 7 by Joonas Lehtinen
Vaadin 7 by Joonas Lehtinen
 
Griffon @ Svwjug
Griffon @ SvwjugGriffon @ Svwjug
Griffon @ Svwjug
 
softshake 2014 - Java EE
softshake 2014 - Java EEsoftshake 2014 - Java EE
softshake 2014 - Java EE
 
Modern Android app library stack
Modern Android app library stackModern Android app library stack
Modern Android app library stack
 
Android workshop
Android workshopAndroid workshop
Android workshop
 
Enterprise Guice 20090217 Bejug
Enterprise Guice 20090217 BejugEnterprise Guice 20090217 Bejug
Enterprise Guice 20090217 Bejug
 
Qt & Webkit
Qt & WebkitQt & Webkit
Qt & Webkit
 
Reactive programming every day
Reactive programming every dayReactive programming every day
Reactive programming every day
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotation
 
Android Best Practices
Android Best PracticesAndroid Best Practices
Android Best Practices
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applications
 
Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15
 
droidQuery: The Android port of jQuery
droidQuery: The Android port of jQuerydroidQuery: The Android port of jQuery
droidQuery: The Android port of jQuery
 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web Toolkits
 
Testing in android
Testing in androidTesting in android
Testing in android
 
Using the Windows 8 Runtime from C++
Using the Windows 8 Runtime from C++Using the Windows 8 Runtime from C++
Using the Windows 8 Runtime from C++
 

More from Joonas Lehtinen

Vaadin intro at GWT.create conference
Vaadin intro at GWT.create conferenceVaadin intro at GWT.create conference
Vaadin intro at GWT.create conferenceJoonas Lehtinen
 
Hackathon - Building vaadin add on components
Hackathon - Building vaadin add on componentsHackathon - Building vaadin add on components
Hackathon - Building vaadin add on componentsJoonas Lehtinen
 
Desingning reusable web components
Desingning reusable web componentsDesingning reusable web components
Desingning reusable web componentsJoonas Lehtinen
 
Building i pad apps in pure java with vaadin
Building i pad apps in pure java with vaadinBuilding i pad apps in pure java with vaadin
Building i pad apps in pure java with vaadinJoonas Lehtinen
 
Html5 with Vaadin and Scala
Html5 with Vaadin and ScalaHtml5 with Vaadin and Scala
Html5 with Vaadin and ScalaJoonas Lehtinen
 

More from Joonas Lehtinen (10)

Hybrid webinar
Hybrid webinarHybrid webinar
Hybrid webinar
 
Vaadin 7.2
Vaadin 7.2Vaadin 7.2
Vaadin 7.2
 
Vaadin intro
Vaadin introVaadin intro
Vaadin intro
 
Vaadin intro at GWT.create conference
Vaadin intro at GWT.create conferenceVaadin intro at GWT.create conference
Vaadin intro at GWT.create conference
 
Hybrid applications
Hybrid applicationsHybrid applications
Hybrid applications
 
Notes on architecture
Notes on architectureNotes on architecture
Notes on architecture
 
Hackathon - Building vaadin add on components
Hackathon - Building vaadin add on componentsHackathon - Building vaadin add on components
Hackathon - Building vaadin add on components
 
Desingning reusable web components
Desingning reusable web componentsDesingning reusable web components
Desingning reusable web components
 
Building i pad apps in pure java with vaadin
Building i pad apps in pure java with vaadinBuilding i pad apps in pure java with vaadin
Building i pad apps in pure java with vaadin
 
Html5 with Vaadin and Scala
Html5 with Vaadin and ScalaHtml5 with Vaadin and Scala
Html5 with Vaadin and Scala
 

Recently uploaded

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Recently uploaded (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

Vaadin7

  • 1. Vaadin 7 Joonas Lehtinen Founder / Vaadin @joonaslehtinen
  • 2. Intro to Vaadin new Label( “Hello world”)
  • 3. New in 7
  • 5.
  • 6. User interface framework for rich web applications
  • 7. java html
  • 9.
  • 12. consumer business “million” users “500” users 10 views 50 views 1€/user 500€/user 100,000€ / view >> 5,000€ / view
  • 13. Challenge How to build consumer grade UX with business system budget
  • 14. How?
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 29.
  • 30.
  • 31.
  • 32.
  • 34.
  • 35. InMemory, Bean, Method, Collection, JDBC, JPA, Hibernate, TextFile, FileSystem, Properties, EclipseLink, Lucene, Mockups, GAE, ...
  • 37. Web application layers Backend Web Java to RPC JavaScript server server JavaScript GWT Vaadin required required optional optional optional required required required required optional JS required required required required
  • 38. How does it work, really?
  • 39.
  • 40. Initial HTML • CSS (theme) • Images • JavaScript 1.2M total compress 307k reduced widgetset 135k
  • 41. • name=”Joonas” • button clicked 261 bytes
  • 42.
  • 43. • name=”Joonas” • button clicked 261 bytes • Add notification 267 bytes
  • 45.
  • 46. Source https://github.com/vaadin/documentmanager HOWTO Screencast https://vaadin.com/learn
  • 48. Any language on JVM
  • 49. Internet Explorer Chrome Firefox Safari Opera iOS Android
  • 50. No browser plugins Nothing to install
  • 51. Servlet Portlet (most) clouds
  • 52. Eclipse IntelliJ IDEA Netbeans Maven Ant ∙∙∙
  • 53. 7 Vaadin today
  • 54. v0.1 2001 v3 2002 Open Source
  • 55. v4 2006 Ajax v5 2007
  • 56. 7 v6 Feb 2009
  • 57. 934 tickets closed during 16 months of development Oldest ticket created 3/2008 Newest ticket 2/2013 3939 commits made by 23 authors 93 % by 6 persons > 1 000 000 lines of code touched
  • 58. Renewed JS Sass from Inside HTML5 += UI GWT RPC Complete State Field stack
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 72.
  • 73.
  • 74.
  • 76. Server Pr Op - od t r im fo uc d ti ize ize vit df y or tim e rol Op t- s d ont i C ien Cl
  • 78.
  • 80.
  • 81. public class Vaadin6App extends Application { public void init() { setMainWindow(createWindow()); } public Window getWindow(String name) { Window window = super.getWindow(name); if (window == null) { window = createWindow(); window.setName(name); addWindow(window); } return window; } private Window createWindow() { Window window = new Window("Vaadin 6 Application"); window.addComponent(new TextField("What is your name")); window.addComponent(new Button("Do not push me")); return window; } }
  • 82. @Title("Vaadin 7 Application") public class HellowUI extends UI { protected void init(VaadinRequest request) { setContent(new VerticalLayout( new TextField("What is your name"), new Button("Do not push me"))); } }
  • 83. @PreserveOnRefresh @Title("Vaadin 7 Application") public class HellowUI extends UI { protected void init(VaadinRequest request) { setContent(new VerticalLayout( new TextField("What is your name"), new Button("Do not push me"))); } }
  • 87. public class Employee { String firstName; String lastName; double salary; 6 Date birthDate; // Getters, setters, … } Form form = new Form(); form.setItemDataSource( new BeanItem<Employee>(employee));
  • 88.
  • 89.
  • 90. form.setFormFieldFactory(new FormFieldFactory() { public Field createField(Item item, Object propertyId, Component uiContext) { if ("birthDate".equals(propertyId)) { 6 DateField df = new DateField(); df.setResolution(DateField.RESOLUTION_DAY); return df; } // .. return DefaultFieldFactory.createFieldByPropertyType(item .getItemProperty(propertyId).getType()); } });
  • 91. 7 GridLayout form = new GridLayout(2,2) { TextField firstName = new TextField("First name"); TextField lastName = new TextField("Last name"); TextField salary = new TextField("Salary"); DateField birthDate = new DateField("Birth date"); { birthDate.setResolution(Resolution.DAY); setSpacing(true); addComponent(firstName); addComponent(lastName); addComponent(birthDate); addComponent(salary); } }; BeanFieldGroup<Employee> fieldGroup = new BeanFieldGroup<Employee>(Employee.class); fieldGroup.bindMemberFields(form); fieldGroup.setItemDataSource(new BeanItem<Employee>(employee));
  • 92. public class Person { @Size(min = 5, max = 50) private String name; @Min(0) @Max(100) private int age; // + constructor + setters + getters }
  • 93. Demo “Joonas Lehtinen” presentation Component model firstName = “Joonas” lastName = “Lehtinen”
  • 95. 6 Widget Paintable Variable client Changes server UIDL Component
  • 96. 7 Widget Demo Connector client State server RPC Component
  • 97. public interface ButtonRpc extends ServerRpc { Demo public void click(MouseEventDetails details); } private ButtonRpc rpc = new ButtonRpc() { public void click( private ButtonRpc rpc = MouseEventDetails details) { RpcProxy.create(ButtonRpc.class, this); // do stuff } public void onClick(ClickEvent event) { }; rpc.click( new MouseEventDetails(event)); public Button() { } registerRpc(rpc); } client server
  • 99. Publish API from Java getPage().getJavaScript().addFunction("myCallback", new JavaScriptCallback() { public void call(JSONArray arguments) throws JSONException { // Do something with the arguments } }); Use from JavaScript window.myCallback('foo', 100);
  • 100. Server-side Java API for Widget public class MyWidget extends AbstractJavaScriptComponent { public MyWidget() { addFunction("plotClick", new JavaScriptFunction() { public void call(JSONArray arguments) throws JSONException { // Do something with the event } }); } public static class MyWidgetState extends JavaScriptComponentState { public List<List<List<Double>>> plotSeriesData = new ArrayList<List<List<Double>>>(); } public MyWidgetState getState() { return (MyWidgetState) super.getState(); } }
  • 101. Widget implementation in JavaScript window.com_example_MyWidget = function() { var element = $(this.getWidgetElement()); // Draw a plot for any server-side (plot data) state change this.onStateChange = function() { $.plot(element, this.getState().series, {grid: {clickable: true}}); } // Communicate local events back to server-side component element.bind('plotclick', function(event, point, item) { if (item) { var onPlotClick = this.getCallback("plotClick"); onPlotClick(item.seriesIndex, item.dataIndex); } }); }
  • 103. Vaadin Framework 7.1 April • Server push • Based on Atmosphere Framework • Web sockets, long polling and polling • Calendar (now under Apache 2.0 license) • Limited IE 10 support without touch • CSS string inject • Renewed debug console features ◦ Redesigned UI/UX for debug window ◦ Optimize widgetset • Arithmetics for SASS • Packaging SCSS / CSS for add-ons
  • 104.
  • 105. Vaadin Charts 1.1 May • New charts: • Funnel • Box plot • Waterfall • Bubble • Error bars • Different coloring of a graph above and below a threshold • Pinch zooming and panning for touch devices
  • 106.
  • 107.
  • 108.
  • 109.
  • 110.
  • 111.
  • 112.
  • 113. Vaadin TouchKit 3.0 April • Vaadin 7 support • New components: • URLField • Datefield • Combobox
  • 114. Vaadin TestBench 3.1 May • Headless mode with Phantom JS
  • 115. Vaadin CDI • Registering UI with @CDIUI annotation (web.xml no more) • Registering Views (to CDIViewManager) • Decoupling UI:s by injecting UI components (handy for MVP) • Injecting all the normal Java EE stuff (ejbs, events, ...) • UI Scope to complement the session scope • Supports JAAS (set @RolesAllowed for a View, ...) • 1.0 alpha to be released any day now (in staging repo today) • Apache 2.0 License
  • 116. Vaadin JPAContainer • License changed to Apache 2.0 • Vaadin 7 compatible version released in March
  • 118.
  • 120. mvn archetype:generate -DarchetypeGroupId=com.vaadin Maven -DarchetypeArtifactId= vaadin-archetype-application -DarchetypeVersion=7.0.3
  • 121. Migration Guide: Vaadin 6 to 7 https://vaadin.com/wiki/-/wiki/Main/Migrating +from+Vaadin+6+to+Vaadin+7
  • 122. Download for Free vaadin.com/book -93- 1970 -1 701 728 pages PDF, ePub, HTML