XQuery Web Apps. for Java Developers



Similar documents
Java EE Web Development Course Program

JAVA/J2EE DEVELOPER RESUME

XTM Web 2.0 Enterprise Architecture Hardware Implementation Guidelines. A.Zydroń 18 April Page 1 of 12

CrownPeak Java Web Hosting. Version 0.20

Complete Java Web Development

Japan Communication India Skill Development Center

OXAGILE RESUMES SUMMARY OF QUALIFICATIONS TECHNICAL SKILLS SENIOR JAVA SOFTWARE ENGINEER

SSC - Web development Model-View-Controller for Java web application development

Rapid Application Development. and Application Generation Tools. Walter Knesel

Ruby on Rails. a high-productivity web application framework. blog.curthibbs.us/ Curt Hibbs <curt@hibbs.com>

Web Development in Java

The end. Carl Nettelblad

Customer Bank Account Management System Technical Specification Document

Glassfish, JAVA EE, Servlets, JSP, EJB

Portals, Portlets & Liferay Platform

Japan Communication India Skill Development Center

Mastering Tomcat Development

Beginning POJOs. From Novice to Professional. Brian Sam-Bodden

How To Understand The Architecture Of Java 2Ee, J2Ee, And J2E (Java) In A Wordpress Blog Post

JAVA ENTERPRISE IN A NUTSHELL. Jim Farley and William Crawford. O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo.

Course Number: IAC-SOFT-WDAD Web Design and Application Development

Direct quotes about me from recent performance review(s)

Ruby on Rails is a web application framework written in Ruby, a dynamically typed programming language The amazing productivity claims of Rails is

UBS Training Course Catalog

Project Manager 1 Post == Experience years in Project Management in reputed company, Salary Rs.1,20,000/-

OUR COURSES 19 November All prices are per person in Swedish Krona. Solid Beans AB Kungsgatan Göteborg Sweden

Kony MobileFabric. Sync Windows Installation Manual - WebSphere. On-Premises. Release 6.5. Document Relevance and Accuracy

Various Load Testing Tools

Server side PDF generation based on L A TEX templates

ITG Software Engineering

Install guide for Websphere 7.0

Research Article. ISSN (Print) *Corresponding author Lili Wang

Japan Communication India Skill Development Center

Building Web Applications, Servlets, JSP and JDBC

MarkLogic Server. Understanding and Using Security Guide. MarkLogic 8 February, Copyright 2015 MarkLogic Corporation. All rights reserved.

Moving from CS 61A Scheme to CS 61B Java

Android Application Development Course Program

BEST WEB PROGRAMMING LANGUAGES TO LEARN ON YOUR OWN TIME

Developing modular Java applications

Services. Custom Tag Libraries. Today. Web Development. Role-Based. Development. Code Reuse. Tag Libraries Custom Tags. Tag Lifecycle.

Web Curator Tool Software Architecture Document

3 Techniques for Database Scalability with Hibernate. Geert Bevin - SpringOne 2009

Applets, RMI, JDBC Exam Review

Performance Optimization For Operational Risk Management Application On Azure Platform

Server-Side Web Development JSP. Today. Web Servers. Static HTML Directives. Actions Comments Tag Libraries Implicit Objects. Apache.

Building Web Services with Apache Axis2

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

Specialized Programme on Web Application Development using Open Source Tools

Software Development Interactief Centrum voor gerichte Training en Studie Edisonweg 14c, 1821 BN Alkmaar T:

Weaving Stored Procedures into Java at Zalando

Open For Business in a Nutshell

How To Use Query Console

Apache Sling A REST-based Web Application Framework Carsten Ziegeler cziegeler@apache.org ApacheCon NA 2014

Blu Age Overview. It is not about changing the platform it is about business agility! HP Non Stop. Modernization Evolution Automation

Data XML and XQuery A language that can combine and transform data

2. Follow the installation directions and install the server on ccc


Japan Communication India Skill Development Center

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

GRAD Analytics Advanced price and promotional analysis interface. Reactive UI providing dimensional visibility to marketing analysis.

Pronestor Room & Catering

Nicholas S. Williams. wrox. A Wiley Brand

Web Frameworks. web development done right. Course of Web Technologies A.A. 2010/2011 Valerio Maggio, PhD Student Prof.

Client-Server Architecture & J2EE Platform Technologies Overview Ahmed K. Ezzat

Windows 2000 / NT 4.0 / 95 / 98, MS-DOS, Suse Operating Systems

Hadoop Streaming coreservlets.com and Dima May coreservlets.com and Dima May

Map Reduce Workflows

CURRICULUM VITAE / RESUME

High-Availability. Configurations for Liferay Portal. James Min. Senior Consultant / Sales Engineer, Liferay, Inc.

MarkLogic Server. Reference Application Architecture Guide. MarkLogic 8 February, Copyright 2015 MarkLogic Corporation. All rights reserved.

User Pass-Through Authentication in IBM Cognos 8 (SSO to data sources)

DTS Web Developers Guide

Kony MobileFabric. Sync Server Tomcat Installation Manual. On-Premises

WEB APPLICATION DEVELOPMENT. UNIT I J2EE Platform 9

Hello World Portlet Rendered with JSP for WebSphere Portal Version 4.1

How To Extend Content Broker Storage On Libs Libs (Libs) With Libs 4.5) And Libs 5.5

Official Android Coding Style Conventions

<Insert Picture Here> Betting Big on JavaServer Faces: Components, Tools, and Tricks

Mobilize Your ERP with ADF Mobile

... Introduction... 17

OpenShift is FanPaaStic For Java EE. By Shekhar Gulati Promo Code JUDCON.IN

Apache OFBiz Advanced Framework Training Video Transcription

How WebSphere Caches Dynamic Content for High-Volume Web Sites

The Google Web Toolkit (GWT): The Model-View-Presenter (MVP) Architecture Official MVP Framework

V7 Reporting. Highlights

Using Database Metadata and its Semantics to Generate Automatic and Dynamic Web Entry Forms

How To Develop A Web Dialog For An Org Database With A Database On A Computer (Oracle)

No no-argument constructor. No default constructor found

Requirements Design Implementation. Software Architectures. Components Software Component Architecture. DSSA: Domain-Specific Software Architectures

High Level Design Distributed Network Traffic Controller

Computer Information Systems (CIS)

Transcription:

XQuery Web Apps for Java Developers

Common Java Setup Install database (SQLServer, PostgreSQL) Install app container (Tomcat, Websphere) Configure ORB (Hibernate) Configure MVC framework (Spring) Configure Authentication (Acegi) Configure presentation (JSF, JSP, Tapestry) Configure search index and engine (Lucene)

Java Characteristics Object-oriented, uses imperative statements to change state

Java Code Example mylist.add(myobject); fos.write(mybytes); out.close(); panel.paint(); mythread.start();

Java Characteristics Object-oriented, uses imperative statements to change state

Java Characteristics Object-oriented, uses imperative statements to change state Uses getters and setters to access data

Java Code Example user.setname( Bob ); vector.getelementat(i); thing.setpath( /a/b/c ); request.getparameter ( search );

Java Characteristics Object-oriented, uses imperative statements to change state Uses getters and setters to access data Connects to a DB and sends a SQL string to be interpreted

Java Code Example connection = DriverManager.getConnection( jdbc... );... r = statement.executequery( SELECT * FROM BOOKS WHERE... );

Java Characteristics Object-oriented, uses imperative statements to change state Uses getters and setters to access data Connects to a DB and sends a SQL string to be interpreted Starts and commits transactions against a DB

Java Code Example mytransaction.start(); //do a bunch of stuff mytransaction.commit();

Java Characteristics Object-oriented, uses imperative statements to change state Uses getters and setters to access data Connects to a DB and sends a SQL string to be interpreted Starts and commits transactions against a DB Uses threads and synchronize(d) for concurrent processing

Java Code Example public synchronized void increment() { } counter++;

Java Characteristics Object-oriented, uses imperative statements to change state Uses getters and setters to access data Connects to a DB and sends a SQL string to be interpreted Starts and commits transactions against a DB Uses threads and synchronize(d) for concurrent processing Uses MVC for separation of concerns Almost everything is an object

XQuery App Strategies Framework Let MarkLogic fill the framework space Write mostly XML to HTML translations Put reusable and common code in library modules Run the app as a restricted user Let MarkLogic handle transactions Don t get too fancy

XQuery Code Example <book> <isbn>123456789</isbn> <title>inferno</title> <author>dante</author> </book> <select name="book"> <option value="123456789">inferno by Dante</option> <option value="987654321">republic by Plato</option> <option value="123432187">gallic Wars by Caesar</option> </select>

XQuery Code Example xquery version '1.0-ml'; let $books := fn:collection()/book let $books-dropdown := ( let $select-options := ( for $book in $books let $isbn := $book/isbn let $title := $book/title let $author := $book/author return <option value="{$isbn/text()}">{$title/text()} by {$author/text()}</option> ) return <select name="book"> {$select-options} </select> ) return $books-dropdown

XQuery Code Example xquery version '1.0-ml'; declare function local:build-option($book) { let $isbn := $book/isbn let $title := $book/title let $author := $book/author return <option value="{$isbn/text()}">{$title/text()} by {$author/text()}</option> }; let $books := fn:collection()/book let $books-dropdown := ( let $select-options := ( for $book in $books return local:build-option($book) ) return <select name="book"> {$select-options} </select> ) return $books-dropdown

XQuery Code Example xquery version '1.0-ml'; declare function local:build-option($book) { let $isbn := $book/isbn let $title := $book/title let $author := $book/author return <option value="{$isbn/text()}">{$title/text()} by {$author/text()}</option> }; let $books := fn:collection()/book let $books-dropdown := ( <select name="book"> {$books/local:build-option(.)} </select> ) return $books-dropdown

XQuery Code Example xquery version '1.0-ml'; <select name="book"> {fn:collection()/book/<option value="{./isbn/text()}">{./title/text ()} by {./author/text()}</option>} </select> => <select name="book"> <option value="123456789">inferno by Dante</option> <option value="987654321">republic by Plato</option> <option value="123432187">gallic Wars by Caesar</option> </select>

XQuery Code Example xquery version '1.0-ml'; <select name="book"> {fn:collection()/book/<option value="{./isbn/text()}">{./title/text ()} by {./author/text()/fn:upper-case(.)}</option>} </select> => <select name="book"> <option value="123456789">inferno by DANTE</option> <option value="987654321">republic by PLATO</option> <option value="123432187">gallic Wars by CAESAR</option> </select>

XQuery App Strategies Code Write elegant expressions Use composed expressions (use few types) Embrace the step Write utility or helper functions instead of business logic Use recursion (consider xslt)

Code Examples Person[] persons = {alice, bob, greg}; StringBuffer sb = new StringBuffer( Hello ); for (int i=0; i<persons.length; i++) { sb.append(,, persons[i].getname()) } => Hello, Alice, Bob, Greg xquery version '1.0-ml'; declare function local:add-name($greeting, $persons) { let $person := $persons[1] let $new-greeting := fn:concat($greeting, ", ", $person/name/text ()) return if ($persons[2]) then (local:add-name($new-greeting, $persons[2 to fn:last()])) else ($new-greeting) }; local:add-name("hello", fn:collection()/person)

Code Examples xquery version '1.0-ml'; fn:concat("hello, ", fn:string-join(fn:collection()/person/name/text (), ", ")) => Hello, Alice, Bob, Greg

XQuery App Strategies Strive for elegance If you are writing a lot of code, you are probably thinking about it in the wrong way

Questions