A reminder of what we talked about during Lecture 02. 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 1

Similar documents
1 Building, Deploying and Testing DPES application

T320 E-business technologies: foundations and practice

Hudson configuration manual

Installing the Android SDK

Android Environment SDK

Lab 0 (Setting up your Development Environment) Week 1

Android Environment SDK

With a single download, the ADT Bundle includes everything you need to begin developing apps:

NetBeans IDE Field Guide

How To Run A Hello World On Android (Jdk) On A Microsoft Ds.Io (Windows) Or Android Or Android On A Pc Or Android 4 (

Witango Application Server 6. Installation Guide for Windows

The "Eclipse Classic" version is recommended. Otherwise, a Java or RCP version of Eclipse is recommended.

Click Start > Control Panel > System icon to open System Properties dialog box. Click Advanced > Environment Variables.

POOSL IDE Installation Manual

IBM TRIRIGA Anywhere Version 10 Release 4. Installing a development environment

Module 11 Setting up Customization Environment

Google App Engine f r o r J av a a v a (G ( AE A / E J / )

Lab 5 Using Remote Worklight Server

Using Microsoft Visual Studio API Reference

Cloud Tools Reference Guide. Version: GA

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Programmazione di sistemi mobili e tablet

How to Create an Android Application using Eclipse on Windows 7

CORISECIO. Quick Installation Guide Open XML Gateway

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

Getting Started with Amazon EC2 Management in Eclipse

Android Programming: Installation, Setup, and Getting Started

Rational Application Developer Performance Tips Introduction

Getting Started: Creating a Simple App

Developing In Eclipse, with ADT

Ipswitch Client Installation Guide

Testing and Deploying IBM Rational HATS 8.5 Applications on Apache Geronimo Server 3.1

Android Development. 吳 俊 興 國 立 高 雄 大 學 資 訊 工 程 學 系

TUTORIAL ECLIPSE CLASSIC VERSION: ON SETTING UP OPENERP 6.1 SOURCE CODE UNDER WINDOWS PLATFORM. by Pir Khurram Rashdi

A Tutorial on installing and using Eclipse

Android Development. Marc Mc Loughlin

Android Setup Phase 2

WA2102 Web Application Programming with Java EE 6 - WebSphere RAD 8.5. Classroom Setup Guide. Web Age Solutions Inc. Web Age Solutions Inc.

Code::Blocks Student Manual

L01: Using the WebSphere Application Server Liberty Profile for lightweight, rapid development. Lab Exercise

Getting Started with Android Development

Tutorial: setting up a web application

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)

POOSL IDE User Manual

Epidefender Studio Installation notice

Android Programming. Høgskolen i Telemark Telemark University College. Cuong Nguyen,

Android: Setup Hello, World: Android Edition. due by noon ET on Wed 2/22. Ingredients.

Building OWASP ZAP Using Eclipse IDE

Crystal Reports for Eclipse

MSWL Development & Tool. Eclipse IDE

Rev 7 06-OCT Site Manager Installation Guide

For Introduction to Java Programming, 5E By Y. Daniel Liang

Web Class Configuration and Test Guide

IBM WebSphere Application Server V8.5 lab Basic Liberty profile administration using the job manager

Setting Up Your Android Development Environment. For Mac OS X (10.6.8) v1.0. By GoNorthWest. 3 April 2012

Witango Application Server 6. Installation Guide for OS X

Software Development Kit

Eclipse installation, configuration and operation

Web-JISIS Reference Manual

2011 Marty Hall An Overview of Servlet & JSP Technology Customized Java EE Training:

Software Development Environment. Installation Guide

IUCLID 5 Guidance and Support

Windows Firewall Configuration with Group Policy for SyAM System Client Installation

Login with Amazon Getting Started Guide for Android. Version 2.0

Advantages. manage port forwarding, set breakpoints, and view thread and process information directly

Java with Eclipse: Setup & Getting Started

Installing Java. Table of contents

Developing Web Services with Eclipse and Open Source. Claire Rogers Developer Resources and Partner Enablement, HP February, 2004

Creating Web Services Applications with IntelliJ IDEA

ADT Plugin for Eclipse

Beginning with SubclipseSVN

SDK Code Examples Version 2.4.2

l What is Android? l Getting Started l The Emulator l Hello World l ADB l Text to Speech l Other APIs (camera, bitmap, etc)

Install guide for Websphere 7.0

1) SETUP ANDROID STUDIO

Tutorial 5: Developing Java applications

EVALUATION ONLY. WA2088 WebSphere Application Server 8.5 Administration on Windows. Student Labs. Web Age Solutions Inc.

Introduction to Android Programming (CS5248 Fall 2015)

To begin, visit this URL:

Smooks Dev Tools Reference Guide. Version: GA

Configuring the LCDS Load Test Tool

IOIO for Android Beginners Guide Introduction

How to use the VMware Workstation / Player to create an ISaGRAF (Ver. 3.55) development environment?

Getting Started using the SQuirreL SQL Client

Enterprise Service Bus

Building Web Services with Apache Axis2

Overview. About Interstitial Ads: About Banner Ads: About Offer-Wall Ads: ADAttract Account & ID

Tutorial on Basic Android Setup

Configuring Apache HTTP Server as a Reverse Proxy Server for SAS 9.2 Web Applications Deployed on BEA WebLogic Server 9.2

Vaadin Application Tutorial. Building a Simple Address Book

OpenCV on Android Platforms

Personal Token Software Installation Guide

Autograph 3.3 Network Installation

3. Installation and Configuration. 3.1 Java Development Kit (JDK)

Android Development Setup [Revision Date: 02/16/11]

To install Multifront you need to have familiarity with Internet Information Services (IIS), Microsoft.NET Framework and SQL Server 2008.

Tutorial on OpenCV for Android Setup

How to develop your own app

RES IT Store Integration Guide: MS System Center

Eclipse with Mac OSX Getting Started Selecting Your Workspace. Creating a Project.

Transcription:

A reminder of what we talked about during Lecture 02 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 1

Desktop applications What are they? Web applications What are they? How they differ from desktop apps? What is the common architecture of web apps? What technology can be used? Development What should be taken into consideration? What are agile methods and lean? 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 2

Web application development with Vaadin Lecture 03

System requirements Eclipse setup Hello, world Understanding the code Debugging Adding interaction Deploying the project Summary 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 4

What do we need 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 5

FIXED Java SDK Java EE 1.6+ Development Java servlet container Deployment Compatible web browser Testing Using FLEXIBLE Operating system Windows Linux MacOS X Servlet container Any will do Web browser Any with Java Script will do SUGGESTED Java EE IDE Debug tool for web pages Source code repository 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 6

Vaadin Plugin Official support Build system support IvyDE Required by Vaadin Plugin Code formatting Official Vaadin rules 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 7

Downloading, installing and configuring 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 8

Eclipse for Java EE Developers 200+ MB Not Eclipse for Java Developers ~150 MB Check OS version before downloading Unzip somewhere easily accessible Run Specify workspace location 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 9

Help Install new software Add Name (e.g.): Apache IvyDE update site Location: http://www.apache.org/dist/ant/ivyde/updatesite OK 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 10

Select Apache Ivy library Apache Ivy Apache Ivy Ant Tasks Apache IvyDE Apache IvyDE Next, Next I accept Finish, OK, Yes 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 11

Help Install new software.. Add Name (e.g.): Vaadin Experimental Plugin site Location: http://vaadin.com/eclipse/experimental OK Select Vaadin Vaadin plug-in for Eclipse Next, Next, I accept, Finish, Yes 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 12

Required in this course And when you contribute code to Vaadin community File encoding and delimiters Window Preferences General Workspace Text file encoding Other UTF-8 New text file line delimiter Other Unix Formatting and cleanup Visit http://dev.vaadin.com/svn/versions/6.8/eclipse/ Save both xml files somewhere Window Preferences Java Code style Clean up Import VaadinCleanup.xml Formatter Import VaadinJavaConventions.xml Java compiler Window Preferences Java Compiler Errors/Warnings Potential programming problems Serializable class without Ignore 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 13

Window Preferences Java Editor Save actions Perform selected actions Format source code Organise imports Additional actions Configure Code organising Select Remove trailing whitespace for all lines, deselect else Code style Select Use blocks in always, deselect else Missing code Select everything except Implementations of interface methods Unnecessary code Select Remove unused imports, Remove unneccesary casts, deselect else 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 14

Window Preferences General Web browser Use external web browser Override the default one if you want 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 15

Help Install new software Work with Eclipse WTP repository Select the latest version of WTP SDK Next, Next, I accept, Finish, Yes Window Preferences Server Runtime Environments Add Apache Apache Tomcat v7.0 Next Download and Install I accept, Finish Select installaction directory OK 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 16

Code repository tools Subversive for SVN Egit for git Eclipse Trac Plugin to connect with Trac Syntax highlighting White background? Line numbers Window Preferences General Text editors Show line numbers 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 17

Or rather: Click Me! 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 18

File New Other Vaadin Vaadin 7 Project Type in project name Target runtime Apache v7.0 Configuration Vaadin 7, Java 6, Servlet 2.4 Vaadin version: latest Dev team promised.rc1 If not, use 7.0.0.beta11 Next, Next, Next 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 19

2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 20

2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 21

1. package org.vaadin.miki.course.helloworld; 2. 3. import com.vaadin.server.vaadinrequest; 4. import com.vaadin.ui.button; 5. import com.vaadin.ui.button.clickevent; 6. import com.vaadin.ui.label; 7. import com.vaadin.ui.ui; 8. import com.vaadin.ui.verticallayout; 9. 10. @SuppressWarnings("serial") 11. public class HelloUI extends UI { 12. 13. @Override 14. protected void init(vaadinrequest request) { 15. final VerticalLayout layout = new VerticalLayout(); 16. layout.setmargin(true); 17. setcontent(layout); 18. Button button = new Button("Click Me"); 19. button.addclicklistener(new Button.ClickListener() { 20. public void buttonclick(clickevent event) { 21. layout.addcomponent(new Label("Thank you for clicking")); 22. } 23. }); 24. layout.addcomponent(button); 25. } 26. } 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 22

Right-click project name in project explorer Run Run on server Select Tomcat v7.0 Select Always use this server Next, Finish Click the button Terminate server Click the button again Observe the error Close browser window 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 23

Line by line (almost) 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 24

1. package org.vaadin.miki.course.helloworld; 2. 3. import com.vaadin.server.vaadinrequest; 4. import com.vaadin.ui.button; 5. import com.vaadin.ui.button.clickevent; 6. import com.vaadin.ui.label; 7. import com.vaadin.ui.ui; 8. import com.vaadin.ui.verticallayout; 9. 10. @SuppressWarnings("serial") 11. public class HelloUI extends UI { 12. 13. @Override 14. protected void init(vaadinrequest request) { 15. final VerticalLayout layout = new VerticalLayout(); 16. layout.setmargin(true); 17. setcontent(layout); 18. Button button = new Button("Click Me"); 19. button.addclicklistener(new Button.ClickListener() { 20. public void buttonclick(clickevent event) { 21. layout.addcomponent(new Label("Thank you for clicking")); 22. } 23. }); 24. layout.addcomponent(button); 25. } 26. } 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 25

public class HelloUI extends UI { UI is a base class for any application protected void init(vaadinrequest request) { This is where the execution starts final VerticalLayout layout = new VerticalLayout(); Layouts arrange components Lecture 04 is about components Lecture 06 is about layouts setcontent(layout); Sets the contents of the application main view Button button = new Button("Click Me"); Components are created like regular Java objects button.addclicklistener(new Button.ClickListener() { Components usually broadcast events that can be captured layout.addcomponent(button); Adding components to layouts is trivial 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 26

(Almost) like a desktop Java app Events Listeners Layouts Nothing webapp-specific So far 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 27

Briefly about how to trace the execution 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 28

Navigate to a line in the source code Be it creating the label when button is clicked Toggle breakpoint Ctrl+Shift+B Pro-tip: buy a keyboard with assignable macro keys Or right-click margin and toggle 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 29

Right-click project name Debug as Debug on server Server-side code debugging Click the button Controlling the execution Step into = F5 Step over = F6 Step return = F7 Continue = F8 Close browser and terminate server 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 30

Magically send the data entered by the user 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 31

final TextField field = new TextField( "Enter your name"); layout.addcomponent(field); 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 32

layout.addcomponent( new Label( "Thank you for clicking, " + field.getvalue() )); 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 33

Save changes Right-click project name Run as Run on server Enter anything in the text field Click the button Clear the text field Click the button 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 34

String name = field.getvalue(); if(name.isempty()) name = "anonymous user"; layout.addcomponent( new Label( "Thank you for clicking, " + name)); 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 35

Save changes Wait for Eclipse to reload Tomcat Reload web page Click the button 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 36

15. public class HelloUI extends UI { 16. 17. @Override 18. protected void init(vaadinrequest request) { 19. final VerticalLayout layout = new VerticalLayout(); 20. layout.setmargin(true); 21. setcontent(layout); 22. 23. final TextField field = new TextField("Enter your name"); 24. layout.addcomponent(field); 25. 26. Button button = new Button("Click Me"); 27. button.addclicklistener(new Button.ClickListener() { 28. public void buttonclick(clickevent event) { 29. String name = field.getvalue(); 30. if(name.isempty()) name = "anonymous user"; 31. layout.addcomponent(new Label("Thank you for clicking, "+name)); 32. } 33. }); 34. layout.addcomponent(button); 35. } 36. 37. } //class 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 37

Moving project to an external servlet container 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 38

Right-click project name Export WAR File Specify location Deploy the WAR to a container 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 39

What did we do today? 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 40

Dependencies What is required to develop Vaadin apps? What is optional? Setting up Eclipse How to install Vaadin plugin? Writing Vaadin applications What is the main class? How to capture events with listeners? How to debug server-side code? How to deploy the application? 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 41

Overview of components Basic principles of UI/UX design Layouts, themes and styles 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 42

miki@vaadin.com t: @mikiolsz 2013-01-15 @mikiolsz }> http://www.vaadin.com/miki 43