Vaadin 7 Cookbook

Vaadin 7 Cookbook

Language: English

Pages: 404

ISBN: 1849518807

Format: PDF / Kindle (mobi) / ePub


Take the shortcut to developing rich internet applications in pure Java. Vaadin makes it easy and this cookbook makes it easier still with its practical recipes and straightforward approach.

Overview

  • Covers exciting features such as using drag and n anddrop, creating charts, custom components, lazy loading, server-push functionality, and more
  • Tips for facilitating the development and testing of Vaadin applications.
  • Enhance your applications with Spring, Grails, or Roo integration.

In Detail

It is really expensive and demanding to develop Rich Internet Applications from scratch. Vaadin is an amazing framework that contains many ready-made components for the creation of user interfaces. Applications created in Vaadin are compatible with all the latest versions of web browsers. Although the screenshots in this book are from Chrome, examples can also run on other browsers like Firefox Mozilla, Internet Explorer, and Opera.

"Vaadin 7 Cookbook" contains many practical recipes that we have gathered during the development of Vaadin applications. This book will help you to take your learning experience to the next level by giving you many solutions to the common problems faced along with explanations. There is even more than that. Vaadin 7 Cookbook goes beyond the basics and shows you how to build Vaadin application for real-world scenarios.

"Vaadin 7 Cookbook" starts with the creation of a project in various tools and languages then moves to components, layouting, events, data binding, and custom widgets. Vaadin, together with Grails, is a powerful tool for the rapid development of RIA applications and this is described in a chapter on how to work with GORM, Service, compiling a widgetset. The quality and stability of the application, testing the Vaadin code, and data management of Vaadin is also explained in detail.

"Vaadin 7 Cookbook" is focused on learning and understanding how to work with Vaadin as well as trying out Vaadin with other technologies such as Grails .

What you will learn from this book

  • Develop a Rich Internet Application in pure Java language.
  • Create a Vaadin project in different IDEs and platforms.
  • Explore the new Vaadin 7 features such as Extensions, URI fragments, Converter mechanism, and more.
  • Understand and use different types of layouts.
  • Use build-in atomic components such as button, table, text field, and more.
  • Bind model to components and fetch data from the database lazily.
  • Work with listeners and events and improve your web application by adding server-push add-ons.
  • Integrate Vaadin into the Grails framework.

Approach

This is a cookbook with easy-to-follow recipes containing practical and detailed examples which are all fully backed up with code, illustrations, and tips.

Who this book is written for

"Vaadin 7 Cookbook" is for developers who want to create Rich Internet Applications with Vaadin.

Both newcomers to Vaadin and those who have some experience with it will find recipes to expand their working knowledge of Vaadin..

Web Development with Go: Building Scalable Web Apps and RESTful Services

Smashing CSS: Professional Techniques for Modern Layout

HTML5 Geolocation

Google BigQuery Analytics

The Designer's Web Handbook: What You Need to Know to Create for the Web

AngularJS Testing Cookbook

 

 

 

 

 

 

 

 

 

 

How to do it..., How it works... custom context menucreating / Creating a custom context menu, Getting ready, How to do it..., See also custom layoutabout / Creating a custom layout creating / How to do it... working / How it works... CustomTextArea class / How to do it... custom validationcreating / Creating a custom validation, How to do it..., How it works... about / Creating a custom validation, How to do it..., How it works... custom widgetbenefit / Introduction

component in the main class Demo.public class Demo extends UI { @Override protected void init(VaadinRequest request) { setContent(new ChromaHashPasswordField()); } } That is all. We can run the server and open the application Demo in a web browser. How it works... In this recipe, we extended the common password text field. We added chroma-hash stripes that a user can use to check the entered password. The stripes are generated according to the entered text and they are updated

the styles.scss file:@import "../reindeer/reindeer.scss"; @include reindeer; .v-app .v-Notification-system { background-color: #b43432; color: black; } .v-app .v-Notification-system h1 { color: #E3F708; } Now we need to create a new servlet, where we apply the system message provider we have created in the first step. Create a new class called com.app.MyVaadinServlet.public class MyVaadinServlet extends VaadinServlet { class MySessionInitListener implements SessionInitListener { public void

we have created. We just start the Jetty server and then run the test, for example, from our IDE. How it works... TestBench is running JUnit tests and all the testing is done in the browser. That means we can create these tests just in the code without clicking in the browser if we want to. When we decide to use the generated tests, note that it is recommended to refactor the generated tests, so they are more readable and well prepared for any upcoming changes. There's more...

area.private Component createContentPanel(){ VerticalSplitPanel contentPanel = new VerticalSplitPanel(); contentPanel.setFirstComponent(createEditorPanel()); contentPanel.setSecondComponent(createTable()); contentPanel.setSplitPosition(80, Unit.PERCENTAGE); return contentPanel; } For the editor panel, we again use HorizontalSplitPanel. On the left side we insert a rich text area and on the right side we insert a label. Editor takes 80 percent of the panel. When we work with raw HTML code in

Download sample

Download