Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Construir Aplicaciones Web Modernas con Java

Construir Aplicaciones Web Modernas con Java

Construir Aplicaciones Web Modernas con Java

More Decks by Geovanny Mendoza Gonzalez

Other Decks in Programming

Transcript

  1. Acerca de mí Jug Leander 12+ de experiencia Ing. Sistemas

    Especialista en Ing. Software Desarrollador BackEnd en S4N Certificado en Vaadin 14 Professional Certificado en Vaadin 14 Developer Blog: http://geovanny0401.blogspot.com/
  2. 12

  3. 26/04/19 14 public class MainView extends VerticalLayout { public MainView()

    { add(new H1("Hola Mundo" ); } } hello-world.component.ts hello-world.component.html
  4. 16 public class Persona { @Pattern(regexp= "Tadeo", message="Hola Mundo") private

    String nombre; @Email(message= "Email no valido" ) private String email; // getters & setters } Persona.java @Component public class Servicio { private String getPersona(){ return new Persona(); } private String Insertar(Persona persona){ // Guardar en BD } } Servicio.java Persona.ts backend.servicio.ts
  5. 17 public class FormView extends VerticalLayout { TextField nombre =

    new TextField("Nombre"); EmailField email = new EmailField("Email"); public FormView(Service service) { Person model = service.getPerson(); Binder<Person> binder = new BeanValidationBinder<>(Person.class); // Binds view fields to the model based on name binder.bindInstanceFields(this); binder.readBean(model); Button saveButton = new Button("Guardar", e -> { if (binder.writeBeanIfValid(model)) { service.savePerson(model); } }); add(firstName, email, saveButton); } } FormView.java form.component.ts
  6. 18 nombre-equals.directive.ts form.component.html public class FormView extends VerticalLayout { TextField

    nombre = new TextField("Nombre"); EmailField email = new EmailField("Email"); public FormView(Service service) { Person model = service.getPerson(); Binder<Person> binder = new BeanValidationBinder<>(Person.class); // Binds view fields to the model based on name binder.bindInstanceFields(this); binder.readBean(model); Button saveButton = new Button("Save", e -> { if (binder.writeBeanIfValid(model)) { service.savePerson(model); } }); add(firstName, email, saveButton); } } FormView.java Fuente: https://vaadin.com/comparison
  7. @Route("saludar") public class HolaMundo extends VerticalLayout { public HolaMundo() {

    TextField textField = new TextField("Nombre"); Button button = new Button("Saludar"); button.add ClickListener(event -> add(new Span("Hola, " + textField.getValue()))); add(textField, button); } } 21
  8. Web Server (Payara, WildFly, Tomcat, Jetty, Glassfish, Weblogic…) app.war @Route("saludar")

    public class HolaMundo extends VerticalLayout { public HolaMundo() { TextField textField = new TextField("Nombre"); Button button = new Button("Saludar"); button.add ClickListener(event -> add(new Span("Hola, " + textField.getValue()))); add(textField, button); } } 22
  9. @Route("saludar") public class HolaMundo extends VerticalLayout { public HolaMundo() {

    TextField textField = new TextField("Nombre"); Button button = new Button("Saludar"); button.add ClickListener(event -> add(new Span("Hola, " + textField.getValue()))); add(textField, button); } } 23
  10. @Route("saludar") public class HolaMundo extends VerticalLayout { public HolaMundo() {

    TextField textField = new TextField("Nombre"); Button button = new Button("Saludar"); button.add ClickListener(event -> add(new Span("Hola, " + textField.getValue()))); add(textField, button); } } 24
  11. @Route("saludar") public class HolaMundo extends VerticalLayout { public HolaMundo() {

    TextField textField = new TextField("Nombre"); Button button = new Button("Saludar"); button.add ClickListener(event -> add(new Span("Hola, " + textField.getValue()))); add(textField, button); } } 25
  12. @Route("saludar") public class HolaMundo extends VerticalLayout { public HolaMundo() {

    TextField textField = new TextField("Nombre"); Button button = new Button("Saludar"); button.add ClickListener(event -> add(new Span("Hola, " + textField.getValue()))); add(textField, button); } } 26
  13. @Route("saludar") public class HolaMundo extends VerticalLayout { public HolaMundo() {

    TextField textField = new TextField("Nombre"); Button button = new Button("Verde"); button.add ClickListener(event -> add(new Span("Hola, " + textField.getValue()))); add(textField, button); } } 27
  14. @Route("saludar") public class HolaMundo extends VerticalLayout { public HolaMundo() {

    TextField textField = new TextField("Nombre"); Button button = new Button("Verde"); button.add ClickListener(event -> add(new Span("Hola, " + textField.getValue()))); add(textField, button); } } 28
  15. @Route("saludar") public class HolaMundo extends VerticalLayout { public HolaMundo() {

    TextField textField = new TextField("Nombre"); Button button = new Button("Verde"); button.add ClickListener(event -> add(new Span("Hola, " + textField.getValue()))); add(textField, button); } } 29
  16. @Route("saludar") public class HolaMundo extends VerticalLayout { public HolaMundo() {

    TextField textField = new TextField("Nombre"); Button button = new Button("Verde"); button.add ClickListener(event -> add(new Span("Hola, " + textField.getValue()))); add(textField, button); } } 30
  17. Lumo permite personalizar los estilos de todo los componentes a

    través de las propiedades CSS Lumo Theme
  18. Soporta todos los navegadores modernos con polyfills Compatibilidad con navegadores

    móviles para iOS y Android Aplicaciones de escritorio que utilizan navegadores integrados 1. Compatibilidad con todos los navegadores 34
  19. 2. Diseño Responsivo Adaptación automática a diferentes tamaños de pantalla

    Utilice CSS o Java para cambiar el comportamiento 35
  20. 3. Progressive web applications (PWA) Instalar aplicaciones web en su

    escritorio o dispositivo Experiencia de usuario de tipo nativo 36