Java e HTML5 combinação explosiva para aplicativos corporativos. Loiane Groner @loiane http://loiane.com



Similar documents
WebSocket Server. To understand the Wakanda Server side WebSocket support, it is important to identify the different parts and how they interact:

General principles and architecture of Adlib and Adlib API. Petra Otten Manager Customer Support

Mobile development with Apache OFBiz. Ean Schuessler, Brainfood

Research of Web Real-Time Communication Based on Web Socket

HTTPS hg clone plugin library SSH hg clone plugin library

Getting Started Guide for Developing tibbr Apps

Visa Checkout September 2015

Syllabus INFO-UB Design and Development of Web and Mobile Applications (Especially for Start Ups)

Matrix Responsive Template. User Manual. This manual contains an overview of Matrix Responsive Joomla Template and its use

A Model of the Operation of The Model-View- Controller Pattern in a Rails-Based Web Server

Republic Polytechnic School of Infocomm C308 Web Framework. Module Curriculum

SYST35300 Hybrid Mobile Application Development

This course provides students with the knowledge and skills to develop ASP.NET MVC 4 web applications.

XML & Databases. Tutorial. 2. Parsing XML. Universität Konstanz. Database & Information Systems Group Prof. Marc H. Scholl

Cross-Platform Tools

IBM Watson Ecosystem. Getting Started Guide

How To Develop A Mobile App With Phonegap

Programming Autodesk PLM 360 Using REST. Doug Redmond Software Engineer, Autodesk

Development Techniques for Native/Hybrid Tizen Apps. Presented by Kirill Kruchinkin

Unlocking the Java EE Platform with HTML 5

Client-Side Web Programming (Part 2) Robert M. Dondero, Ph.D. Princeton University

Homework 3: Component & Interface Design

Handshake & endpoints

Develop a Native App (ios and Android) for a Drupal Website without Learning Objective-C or Java. Drupaldelphia 2014 By Joe Roberts

NetBeans e lo sviluppo di applicazioni Java/JavaFX per Facebook. Corrado De Bari corrado.debari@sun.com Sun Microsystems Italia

HYBRID APPLICATION DEVELOPMENT IN PHONEGAP USING UI TOOLKITS

Developing Cross-platform Mobile and Web Apps

CASE STUDY. Enhancing the Patient Experience Harris Mobile Patient Engagement Platform

Cloud Elements! Marketing Hub Provisioning and Usage Guide!

APM for Java. AppDynamics Pro Documentation. Version 4.0.x. Page 1

Designing for the Mobile Web Lesson 3: HTML5 Web Apps

Implementing Mobile Thin client Architecture For Enterprise Application

Distribution and Integration Technologies

Types of Cloud Computing

AJAX and JSON Lessons Learned. Jim Riecken, Senior Software Engineer, Blackboard Inc.

Certified Selenium Professional VS-1083

Building native mobile apps for Digital Factory

AdFalcon Mobile Web API Integration Developer's Guide. AdFalcon Mobile Ad Network Product of Noqoush Mobile Media Group

Getting Started with the icontact API

Adding HTML5 to your Android applications. Martin Gunnarsson & Pär Sikö

Kurento Room Documentation

CROSS-PLATFORM MOBILE MALWARE - WRITE ONCE INFECT EVERYWHERE. William Lee & Xinran Wu {william.lee, xinran.wu}@sophos.com.

Create Your Free Mobile Site App in Baidu Webmaster Tools

Using Safari to Deliver and Debug a Responsive Web Design

QML and JavaScript for Native App Development

Installing and Sending with DocuSign for NetSuite v2.2

Selenium Automation set up with TestNG and Eclipse- A Beginners Guide

Dashboard Skin Tutorial. For ETS2 HTML5 Mobile Dashboard v3.0.2

Integration the Web 2.0 way. Florian Daniel April 28, 2009

Operational Decision Manager Worklight Integration

Mobile Performance: for excellent User Experience

J j enterpririse. Oracle Application Express 3. Develop Native Oracle database-centric web applications quickly and easily with Oracle APEX

Learning HTML5 Game Programming

Syllabus INFO-GB Design and Development of Web and Mobile Applications (Especially for Start Ups)

A Case Study of an Android* Client App Using Cloud-Based Alert Service

Home Automation Based on an Android and a Web Application Using Raspberry Pi

Performance Testing for Ajax Applications

WebLogic & Coherence. Best backend for Mobile Apps. July 2014 INSERT PRESENTER TITLE AND DATE

Web-based Mobile Applications

SETTING UP YOUR JAVA DEVELOPER ENVIRONMENT

1. To start Installation: To install the reporting tool, copy the entire contents of the zip file to a directory of your choice. Run the exe.

Systems Integration in the Cloud Era with Apache Camel. Kai Wähner, Principal Consultant

PA165 - Lab session - Web Presentation Layer

Porting Existing PhoneGap Apps to Tizen OS - Development Story

Intellicus Single Sign-on

Cloud Powered Mobile Apps with Microsoft Azure

Traitware Authentication Service Integration Document

XML Processing and Web Services. Chapter 17

Customising Your Mobile Payment Pages

Release Notes. DocuSign Spring 15 Release Notes. Contents

02267: Software Development of Web Services

Customize Mobile Apps with MicroStrategy SDK: Custom Security, Plugins, and Extensions

Java 2 Platform, Enterprise Edition (J2EE): Enabling Technologies for EAI

IP Phone Services Configuration

Mobile Solutions for Data Collection. Sarah Croft and Laura Pierik

Bridging the Gap: from a Web App to a Mobile Device App

Experimental Comparison of Hybrid and Native Applications for Mobile Systems

It is highly recommended that you are familiar with HTML and JavaScript before attempting this tutorial.

Developing a Web Server Platform with SAPI Support for AJAX RPC using JSON

Google Sites: Creating, editing, and sharing a site

GUI and Web Programming

HTML Form Widgets. Review: HTML Forms. Review: CGI Programs

Web Testing. Main Concepts of Web Testing. Software Quality Assurance Telerik Software Academy

MASTERTAG DEVELOPER GUIDE

DreamFactory & Modus Create Case Study

RIT Message Center Compose and Send Messages

Outline. CS 112 Introduction to Programming. Recap: HTML/CSS/Javascript. Admin. Outline

Step into the Future: HTML5 and its Impact on SSL VPNs

Developing Web Views for VMware vcenter Orchestrator

latest Release 0.2.6

Amazon Glacier. Developer Guide API Version

Web Browser Session Restore Forensics A valuable record of a user s internet activity for computer forensic examinations

Transcription:

Java e HTML5 combinação explosiva para aplicativos corporativos Loiane Groner @loiane http://loiane.com

Loiane Groner 9+ XP TI Java, Sencha, Phonegap (mobile híbrido) http://loiane.com Livros:

Evolução Java e HTML/JS

<% %> <% %> String usuario = request.getparameter("usuario"); if ( usuario!= null && usuario.length() > 0 ) { <%@include file="response.jsp" %> }

<c:foreach var="contato" items="${dao.lista}"> ${contato.nome}, ${contato.email}, ${contato.endereco}, ${contato.datanascimento} </c:foreach>

http://d25ds5di20s2np.cloudfront.net/wp-content/uploads/2013/11/struts-hibernate-velocity-multi-customer.png

Header - MENU index.jsp Redireciona para: listarcliente.jsp editarcliente.jsp excluircliente.jsp criarcliente.jsp Footer

Browser DOM HTML View App Server Controller Model

Header - MENU index.jsp + templates Mostra/Esconde: <div>listarcliente.jsp</div> <div>editarcliente.jsp</div> <div>excluircliente.jsp</div> <div>criarcliente.jsp</div> Footer

http://plugins.netbeans.org/data/images/1397832199_nbpfcrudgen-edit-dialog-full.png

Desacoplamento: o início

http://webdevbros.net.www144.your-server.de/wp-content/uploads/2009/10/siamexplorer.png

http://aprendizweb.com.br/wp-content/uploads/2015/03/frontend-e-back-end.jpg

http://diy-visualpedia.s3.amazonaws.com/request-reponse-comic-03.png

http://www-scf.usc.edu/~chenemil/itp104/images/html5features.jpg

Aplicação tradicional Browser DOM HTML View App Server Controller Model

Aplicação moderna DOM Browser View Controller Model JSON App Server APIs REST

http://www.the4cast.com/wp-content/uploads/2014/06/web-starterkit.jpg

JSON JSON APIs REST Banco de Dados

WEB DOM Browser View Controller Model JSON App Server APIs REST

MOBILE View Dispositivo Móvel Controller Model WebView Nativa JSON App Server APIs REST

Nativo Responsivo Web App App Híbrida

DESKTOP View App Desktop Controller Model Wrapper JSON App Server APIs REST

Demo

Troca de Dados

http://2.bp.blogspot.com/-jeswfrksxmy/tbmvunkrhsi/aaaaaaaaaio/lubqb38_kto/s1600/xml-vs-json.jpg

<nome>cliente 01</nome> <endereco>rua Inventada 41</endereco> <cidade>são Paulo</cidade> <cnpj>66.260.339/0001-35</cnpj>

DocumentBuilderFactory docfactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docbuilder = docfactory.newdocumentbuilder(); Document doc = docbuilder.newdocument(); Element rootelement = doc.createelement("cliente"); doc.appendchild(rootelement); Element name = doc.createelement("nome"); name.appendchild(doc.createtextnode("cliente 01")); rootelement.appendchild(name);

var xml = "<rss version='2.0'><channel><title>rss Title</title></channel></rss>", xmldoc = $.parsexml( xml ), $xml = $( xmldoc ), $title = $xml.find( "title" ); https://github.com/johngeorgewright/angular-xml

{ } "nome":"cliente 01", "endereco":"rua Inventada 41", "cidade":"são Paulo", "cnpj":"66.260.339/0001-35"

JSONObject obj=new JSONObject(); obj.put("name","foo"); obj.put("num",new Integer(100)); obj.put("balance",new Double(1000.21)); obj.put("is_vip",new Boolean(true)); obj.put("nickname",null);

@RequestMapping(value="/contact/create.action") public @ResponseBody Map<String,? extends Object> create(@requestbody ContactWrapper data) throws Exception { try{ List<Contact> contacts = contactservice.create(data.getdata()); return ExtJSReturn.mapOK(contacts); } catch (Exception e) { } } return ExtJSReturn.mapError("Error trying to create contact."); http://wiki.fasterxml.com/jacksonhome

@POST @Produces("application/json") @Consumes({"application/xml", "application/json"}) public ExtJSContactReturn create(string json) throws IOException, JSONException { ContactWrapper wrapper = new ContactWrapper(json); Contact entity = wrapper.getcontact(); super.create(entity); List<Contact> contacts = new ArrayList<Contact>(); contacts.add(entity); ExtJSContactReturn extreturn = new ExtJSContactReturn(String.valueOf(contacts.size()), contacts, true); return extreturn; }

JsonBuilderFactory factory = Json.createBuilderFactory(config); JsonObject value = factory.createobjectbuilder().add("firstname", "John").add("lastName", "Smith").add("age", 25).add("address", factory.createobjectbuilder().add("streetaddress", "21 2nd Street").add("city", "New York").add("state", "NY").add("postalCode", "10021")).add("phoneNumber", factory.createarraybuilder().add(factory.createobjectbuilder().add("type", "home").add("number", "212 555-1234")).add(factory.createObjectBuilder().add("type", "fax").add("number", "646 555-4567"))).build();

JSON JavaScript Object Notation

@ServerEndpoint("/chat") public class ChatBean { Set<Session> peers = Collections.synchronizedSet(...); @OnOpen public void onopen(session peer) { peers.add(peer); } @OnClose public void onclose(session peer) { peers.remove(peer); } } @OnMessage public void message(string message, Session client) { for (Session peer : peers) { peer.getremote().sendobject(message); } }

http://async-io.org/

import org.atmosphere.config.service.managedservice; import org.atmosphere.cpr.atmosphereresponse; import org.atmosphere.handler.onmessage; @ManagedService(path = "/echo") public class Echo { @Message public void onmessage(atmosphereresponse res, String m) { res.write("echo: " + m); } } $(function () { var request = { url: document.location.tostring() + 'echo', transport : "websocket", fallbacktransport: 'long-polling'}; } request.onmessage = function (response) { console.log(response.responsebody) }; $.atmosphere.subscribe(request).push("hello");

Demo

https://www.owasp.org

desabilitar código HTML desabilitar editar código fonte

http://jhipster.github.io/

http://loiane.com fb.com/loianegroner @loiane https://github.com/loiane youtube.com/user/loianeg

Obrigada!