SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler offline
Moving to Vaadin 7
               Henri Sara
        Sr. Vaadin Expert
Migrating from
Vaadin 6 to
Vaadin 7
Vaadin 7 in brief for migration

      First new major version since 2009,
      1.5 years in development

      In addition to new features, reworking
      (and breaking) some old APIs


      Most APIs backwards compatible -
      some since 2002
Major features in Vaadin 7 for
migration
      New windowing API



      New FieldGroups and Converters
      for easier and more flexible forms


      New packaging (including GWT)
... and some more

     SASS based themes



     Simplified extending and widget
     development


     Much, much more - see
     https://vaadin.com/vaadin7
Migration Guide
              https://vaadin.com/wiki/-
/wiki/Main/Migrating+from+Vaadin+6+t
                            o+Vaadin+
Packaging
Maven or Ivy to the rescue
UI Instead of Application and
Window
import com.vaadin.Application;
import com.vaadin.ui.*;

public class V6Application extends Application
{
    @Override
    public void init() {
         Window mainWindow = new Window("V6");
         Label label = new Label("Hello!");
         mainWindow.addComponent(label);
         setMainWindow(mainWindow);
         setTheme(“mytheme”);
    }                               import com.vaadin.server.*;
}                                   import com.vaadin.ui.*;

                                   @Theme("mytheme")
                                   @PreserveOnRefresh
                                   public class V7UI extends UI {

                                       @Override
                                       protected void init(VaadinRequest request) {
                                           VerticalLayout view = new VerticalLayout();
                                           view.addComponent(new Label("Hello!"));
                                           setContent(view);
                                       }
                                   }
First steps

      Update dependencies
                                          public class
                                            V6Application
                                            extends
      UI replacing Application and        Application
      Window                              public class V7UI
                                            extends UI


                         @Theme("mytheme")
      Update theme
                         styles.scss:
                         import "../reindeer/legacy-styles.css"
Converting an Eclipse project
Converting a Maven project
  <dependencies>
       <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-server</artifactId>
            <version>${vaadin.version}</version>
       </dependency>
       <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-client-compiled</artifactId>
            <version>${vaadin.version}</version>
       </dependency>                                             Dependencies
       <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-client</artifactId>
            <version>${vaadin.version}</version>
            <scope>provided</scope>
       </dependency>
       <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-themes</artifactId>
            <version>${vaadin.version}</version>
       </dependency>
  </dependencies>

  <build>
        <plugins>
             <plugin>
                                                                 Plug-in
                  <groupId>com.vaadin</groupId>
                  <artifactId>vaadin-maven-plugin</artifactId>
                  <version>${vaadin.plugin.version}</version>
FieldGroup and Converters -
separate presentation
Navigation and built-in multi-
tab support
@PreserveOnRefresh
public class NavigationtestUI extends UI {

    @Override
    public void init(VaadinRequest request) {

        // Create Navigator, use the UI content layout to display the views
        Navigator navigator = new Navigator( this, this);

        // Add some Views
        // Could also use a ViewProvider
        navigator.addView(MainView.NAME, new MainView()); // no fragment

        // #count will be a new instance each time we navigate to it, counts:
        navigator.addView(CountView.NAME, CountView. class);

        // The Navigator attached to the UI will automatically navigate to the
        // initial fragment once the UI has been initialized.
    }

}


        http://server/test#!count/params
Theming with SASS

     SCSS compiled to CSS



     Variables, nesting, mix-ins, ...



     Composite themes, multiple themes on a
     page, theme by component etc.
SASS example
@import "..                 // reindeer theme contents within
/reindeer/reindeer.scss";   // .mytheme selector
                            .mytheme .reindeerrules { ... }
// Variables
$margin: 16px;              // Nesting
                            .mytheme .a .b {
// Mixins                      c: 16px;
@mixin mytheme {            }
  // Including a mixin
  @include reindeer;

    // Nesting
    .a {
       .b {

       }
          c: $margin;
                                   SASS
}
    }
                                   Compiler
.mytheme {
   @include mytheme;
}
Client side widgets

      Easier to develop



      Layouting and client-server communication
      rewritten - RPC, shared state, ...


      GWT included in Vaadin
Add-ons and Widgetsets

     Inherit com.vaadin.DefaultWidgetSet



     Most/all add-ons need to be updated for
     Vaadin 7


     Currently 135 Vaadin 7 compatible add-ons:
     http://vaadin.com/directory#:vaadin=7
Extending servlets

      Both applications and add-ons can customize
      start-up page without servlet subclass

      @JavaScript on components to inject
      JavaScript


      UIProvider, VaadinServletSession,
      VaadinSession, VaadinService etc. reduce
      the need to subclass servlets
For more information

      What's new
      https://vaadin.com/vaadin7

      Vaadin 7 tutorials
      https://vaadin.com/wiki/-/wiki/Main/Vaadin+7


      Migration guide
      https://vaadin.com/wiki/-
      /wiki/Main/Migrating+from+Vaadin+6+to+Va
      adin+7
Questions?

Mais conteúdo relacionado

Mais procurados

Basics of Vue.js 2019
Basics of Vue.js 2019Basics of Vue.js 2019
Basics of Vue.js 2019Paul Bele
 
Bootstrap Jump Start
Bootstrap Jump StartBootstrap Jump Start
Bootstrap Jump StartHaim Michael
 
Vue js and Vue Material
Vue js and Vue MaterialVue js and Vue Material
Vue js and Vue MaterialEueung Mulyana
 
Vue routing tutorial getting started with vue router
Vue routing tutorial getting started with vue routerVue routing tutorial getting started with vue router
Vue routing tutorial getting started with vue routerKaty Slemon
 
Deploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineDeploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineAlexander Zamkovyi
 
Vuejs for Angular developers
Vuejs for Angular developersVuejs for Angular developers
Vuejs for Angular developersMikhail Kuznetcov
 
VueJS Introduction
VueJS IntroductionVueJS Introduction
VueJS IntroductionDavid Ličen
 
Micronaut For Single Page Apps
Micronaut For Single Page AppsMicronaut For Single Page Apps
Micronaut For Single Page AppsZachary Klein
 
Maven 3… so what?
Maven 3… so what?Maven 3… so what?
Maven 3… so what?Abel Muíño
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to MavenSperasoft
 
Javascript MVVM with Vue.JS
Javascript MVVM with Vue.JSJavascript MVVM with Vue.JS
Javascript MVVM with Vue.JSEueung Mulyana
 
Vue js 大型專案架構
Vue js 大型專案架構Vue js 大型專案架構
Vue js 大型專案架構Hina Chen
 
How to create a skeleton of a Java console application
How to create a skeleton of a Java console applicationHow to create a skeleton of a Java console application
How to create a skeleton of a Java console applicationDmitri Pisarenko
 
Introduction to modern front-end with Vue.js
Introduction to modern front-end with Vue.jsIntroduction to modern front-end with Vue.js
Introduction to modern front-end with Vue.jsmonterail
 
Grails 4: Upgrade your Game!
Grails 4: Upgrade your Game!Grails 4: Upgrade your Game!
Grails 4: Upgrade your Game!Zachary Klein
 

Mais procurados (20)

Basics of Vue.js 2019
Basics of Vue.js 2019Basics of Vue.js 2019
Basics of Vue.js 2019
 
Bootstrap Jump Start
Bootstrap Jump StartBootstrap Jump Start
Bootstrap Jump Start
 
Love at first Vue
Love at first VueLove at first Vue
Love at first Vue
 
Vue js and Vue Material
Vue js and Vue MaterialVue js and Vue Material
Vue js and Vue Material
 
Vue routing tutorial getting started with vue router
Vue routing tutorial getting started with vue routerVue routing tutorial getting started with vue router
Vue routing tutorial getting started with vue router
 
Google app engine by example
Google app engine by exampleGoogle app engine by example
Google app engine by example
 
Deploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineDeploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App Engine
 
Beoynd Vaadin 7
Beoynd Vaadin 7Beoynd Vaadin 7
Beoynd Vaadin 7
 
Vuejs for Angular developers
Vuejs for Angular developersVuejs for Angular developers
Vuejs for Angular developers
 
VueJS Introduction
VueJS IntroductionVueJS Introduction
VueJS Introduction
 
Micronaut For Single Page Apps
Micronaut For Single Page AppsMicronaut For Single Page Apps
Micronaut For Single Page Apps
 
Maven 3… so what?
Maven 3… so what?Maven 3… so what?
Maven 3… so what?
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
 
Javascript MVVM with Vue.JS
Javascript MVVM with Vue.JSJavascript MVVM with Vue.JS
Javascript MVVM with Vue.JS
 
Vue js 大型專案架構
Vue js 大型專案架構Vue js 大型專案架構
Vue js 大型專案架構
 
How to create a skeleton of a Java console application
How to create a skeleton of a Java console applicationHow to create a skeleton of a Java console application
How to create a skeleton of a Java console application
 
Micronaut Launchpad
Micronaut LaunchpadMicronaut Launchpad
Micronaut Launchpad
 
Introduction to modern front-end with Vue.js
Introduction to modern front-end with Vue.jsIntroduction to modern front-end with Vue.js
Introduction to modern front-end with Vue.js
 
Liferay maven sdk
Liferay maven sdkLiferay maven sdk
Liferay maven sdk
 
Grails 4: Upgrade your Game!
Grails 4: Upgrade your Game!Grails 4: Upgrade your Game!
Grails 4: Upgrade your Game!
 

Semelhante a Migration from vaadin 6 to vaadin 7 devoxx france 2013

Workshop: Building Vaadin add-ons
Workshop: Building Vaadin add-onsWorkshop: Building Vaadin add-ons
Workshop: Building Vaadin add-onsSami Ekblad
 
Vaadin 7 CN
Vaadin 7 CNVaadin 7 CN
Vaadin 7 CNjojule
 
Building impressive layout systems with vaadin
Building impressive layout systems with vaadinBuilding impressive layout systems with vaadin
Building impressive layout systems with vaadinPeter Lehto
 
Integrating Wicket with Java EE 6
Integrating Wicket with Java EE 6Integrating Wicket with Java EE 6
Integrating Wicket with Java EE 6Michael Plöd
 
Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0Steven Smith
 
JavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオンJavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオンharuki ueno
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!David Gibbons
 
vCloud SDK for PHP - Introduction
vCloud SDK for PHP - IntroductionvCloud SDK for PHP - Introduction
vCloud SDK for PHP - IntroductionPablo Roesch
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSGunnar Hillert
 
Webpack Encore Symfony Live 2017 San Francisco
Webpack Encore Symfony Live 2017 San FranciscoWebpack Encore Symfony Live 2017 San Francisco
Webpack Encore Symfony Live 2017 San FranciscoRyan Weaver
 
Refactoring Large Web Applications with Backbone.js
Refactoring Large Web Applications with Backbone.jsRefactoring Large Web Applications with Backbone.js
Refactoring Large Web Applications with Backbone.jsStacy London
 
Refactor Large applications with Backbone
Refactor Large applications with BackboneRefactor Large applications with Backbone
Refactor Large applications with BackboneColdFusionConference
 
Refactor Large apps with Backbone
Refactor Large apps with BackboneRefactor Large apps with Backbone
Refactor Large apps with BackbonedevObjective
 
Vaadin DevDay 2017 - DI your UI
Vaadin DevDay 2017 - DI your UIVaadin DevDay 2017 - DI your UI
Vaadin DevDay 2017 - DI your UIPeter Lehto
 
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4Rob Tweed
 

Semelhante a Migration from vaadin 6 to vaadin 7 devoxx france 2013 (20)

JavaCro'14 - Building interactive web applications with Vaadin – Peter Lehto
JavaCro'14 - Building interactive web applications with Vaadin – Peter LehtoJavaCro'14 - Building interactive web applications with Vaadin – Peter Lehto
JavaCro'14 - Building interactive web applications with Vaadin – Peter Lehto
 
Workshop: Building Vaadin add-ons
Workshop: Building Vaadin add-onsWorkshop: Building Vaadin add-ons
Workshop: Building Vaadin add-ons
 
Vaadin 7 CN
Vaadin 7 CNVaadin 7 CN
Vaadin 7 CN
 
Building impressive layout systems with vaadin
Building impressive layout systems with vaadinBuilding impressive layout systems with vaadin
Building impressive layout systems with vaadin
 
Integrating Wicket with Java EE 6
Integrating Wicket with Java EE 6Integrating Wicket with Java EE 6
Integrating Wicket with Java EE 6
 
Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0
 
JavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオンJavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオン
 
Vue js and Dyploma
Vue js and DyplomaVue js and Dyploma
Vue js and Dyploma
 
Vue.js part1
Vue.js part1Vue.js part1
Vue.js part1
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!
 
vCloud SDK for PHP - Introduction
vCloud SDK for PHP - IntroductionvCloud SDK for PHP - Introduction
vCloud SDK for PHP - Introduction
 
Web deploy
Web deployWeb deploy
Web deploy
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
 
Webpack Encore Symfony Live 2017 San Francisco
Webpack Encore Symfony Live 2017 San FranciscoWebpack Encore Symfony Live 2017 San Francisco
Webpack Encore Symfony Live 2017 San Francisco
 
WebGUI Developers Workshop
WebGUI Developers WorkshopWebGUI Developers Workshop
WebGUI Developers Workshop
 
Refactoring Large Web Applications with Backbone.js
Refactoring Large Web Applications with Backbone.jsRefactoring Large Web Applications with Backbone.js
Refactoring Large Web Applications with Backbone.js
 
Refactor Large applications with Backbone
Refactor Large applications with BackboneRefactor Large applications with Backbone
Refactor Large applications with Backbone
 
Refactor Large apps with Backbone
Refactor Large apps with BackboneRefactor Large apps with Backbone
Refactor Large apps with Backbone
 
Vaadin DevDay 2017 - DI your UI
Vaadin DevDay 2017 - DI your UIVaadin DevDay 2017 - DI your UI
Vaadin DevDay 2017 - DI your UI
 
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
 

Mais de Joonas Lehtinen

Mais de Joonas Lehtinen (20)

Web Components for Java Developers
Web Components for Java DevelopersWeb Components for Java Developers
Web Components for Java Developers
 
Vaadin Components @ Angular U
Vaadin Components @ Angular UVaadin Components @ Angular U
Vaadin Components @ Angular U
 
Vaadin & Web Components
Vaadin & Web ComponentsVaadin & Web Components
Vaadin & Web Components
 
Vaadin Components
Vaadin ComponentsVaadin Components
Vaadin Components
 
Vaadin Introduction, 7.3 edition
Vaadin Introduction, 7.3 editionVaadin Introduction, 7.3 edition
Vaadin Introduction, 7.3 edition
 
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
 
Vaadin roadmap-devoxx-2013
Vaadin roadmap-devoxx-2013Vaadin roadmap-devoxx-2013
Vaadin roadmap-devoxx-2013
 
Vaadin 7
Vaadin 7Vaadin 7
Vaadin 7
 
Vaadin7
Vaadin7Vaadin7
Vaadin7
 
Hackathon - Building vaadin add on components
Hackathon - Building vaadin add on componentsHackathon - Building vaadin add on components
Hackathon - Building vaadin add on components
 
Vaadin7
Vaadin7Vaadin7
Vaadin7
 
Vaadin today and tomorrow
Vaadin today and tomorrowVaadin today and tomorrow
Vaadin today and tomorrow
 
Vaadin7 modern-web-apps-in-java
Vaadin7 modern-web-apps-in-javaVaadin7 modern-web-apps-in-java
Vaadin7 modern-web-apps-in-java
 
Vaadin 7 Today and Tomorrow
Vaadin 7 Today and TomorrowVaadin 7 Today and Tomorrow
Vaadin 7 Today and Tomorrow
 
Vaadin 7
Vaadin 7Vaadin 7
Vaadin 7
 

Último

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Migration from vaadin 6 to vaadin 7 devoxx france 2013

  • 1. Moving to Vaadin 7 Henri Sara Sr. Vaadin Expert
  • 3. Vaadin 7 in brief for migration First new major version since 2009, 1.5 years in development In addition to new features, reworking (and breaking) some old APIs Most APIs backwards compatible - some since 2002
  • 4. Major features in Vaadin 7 for migration New windowing API New FieldGroups and Converters for easier and more flexible forms New packaging (including GWT)
  • 5. ... and some more SASS based themes Simplified extending and widget development Much, much more - see https://vaadin.com/vaadin7
  • 6. Migration Guide https://vaadin.com/wiki/- /wiki/Main/Migrating+from+Vaadin+6+t o+Vaadin+
  • 8. Maven or Ivy to the rescue
  • 9. UI Instead of Application and Window import com.vaadin.Application; import com.vaadin.ui.*; public class V6Application extends Application { @Override public void init() { Window mainWindow = new Window("V6"); Label label = new Label("Hello!"); mainWindow.addComponent(label); setMainWindow(mainWindow); setTheme(“mytheme”); } import com.vaadin.server.*; } import com.vaadin.ui.*; @Theme("mytheme") @PreserveOnRefresh public class V7UI extends UI { @Override protected void init(VaadinRequest request) { VerticalLayout view = new VerticalLayout(); view.addComponent(new Label("Hello!")); setContent(view); } }
  • 10. First steps Update dependencies public class V6Application extends UI replacing Application and Application Window public class V7UI extends UI @Theme("mytheme") Update theme styles.scss: import "../reindeer/legacy-styles.css"
  • 12. Converting a Maven project <dependencies> <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-server</artifactId> <version>${vaadin.version}</version> </dependency> <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-client-compiled</artifactId> <version>${vaadin.version}</version> </dependency> Dependencies <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-client</artifactId> <version>${vaadin.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-themes</artifactId> <version>${vaadin.version}</version> </dependency> </dependencies> <build> <plugins> <plugin> Plug-in <groupId>com.vaadin</groupId> <artifactId>vaadin-maven-plugin</artifactId> <version>${vaadin.plugin.version}</version>
  • 13. FieldGroup and Converters - separate presentation
  • 14. Navigation and built-in multi- tab support @PreserveOnRefresh public class NavigationtestUI extends UI { @Override public void init(VaadinRequest request) { // Create Navigator, use the UI content layout to display the views Navigator navigator = new Navigator( this, this); // Add some Views // Could also use a ViewProvider navigator.addView(MainView.NAME, new MainView()); // no fragment // #count will be a new instance each time we navigate to it, counts: navigator.addView(CountView.NAME, CountView. class); // The Navigator attached to the UI will automatically navigate to the // initial fragment once the UI has been initialized. } } http://server/test#!count/params
  • 15. Theming with SASS SCSS compiled to CSS Variables, nesting, mix-ins, ... Composite themes, multiple themes on a page, theme by component etc.
  • 16. SASS example @import ".. // reindeer theme contents within /reindeer/reindeer.scss"; // .mytheme selector .mytheme .reindeerrules { ... } // Variables $margin: 16px; // Nesting .mytheme .a .b { // Mixins c: 16px; @mixin mytheme { } // Including a mixin @include reindeer; // Nesting .a { .b { } c: $margin; SASS } } Compiler .mytheme { @include mytheme; }
  • 17. Client side widgets Easier to develop Layouting and client-server communication rewritten - RPC, shared state, ... GWT included in Vaadin
  • 18. Add-ons and Widgetsets Inherit com.vaadin.DefaultWidgetSet Most/all add-ons need to be updated for Vaadin 7 Currently 135 Vaadin 7 compatible add-ons: http://vaadin.com/directory#:vaadin=7
  • 19. Extending servlets Both applications and add-ons can customize start-up page without servlet subclass @JavaScript on components to inject JavaScript UIProvider, VaadinServletSession, VaadinSession, VaadinService etc. reduce the need to subclass servlets
  • 20. For more information What's new https://vaadin.com/vaadin7 Vaadin 7 tutorials https://vaadin.com/wiki/-/wiki/Main/Vaadin+7 Migration guide https://vaadin.com/wiki/- /wiki/Main/Migrating+from+Vaadin+6+to+Va adin+7