Gregg Sporar [email protected] Agenda

Total Page:16

File Type:pdf, Size:1020Kb

Gregg Sporar Gregg.Sporar@Sun.Com Agenda Introduction to Java Web Programming Gregg Sporar [email protected] Agenda ●What is Java? ●Web/Application Servers ●Servlets ●JSPs ●Java Web Frameworks ●JavaServer Faces ●Beyond the Java Language 2 What is Java? ● Runs Everywhere ● FREE and Open Source 3 Java Flavors Java Micro Edition (Java ME) Optional Packages Optional Packages Personal Personal Java Java Basis Profile Profile Enterprise Standard Edition Edition Foundation Profile MIDP (Java EE) (Java SE) Java CDC CLDC Card APIs JVM KVM CardVM 4 “Hello World” in Java 5 A Specification... 6 Web/Application Servers Firewall Java EE Application Client Server Enterprise Enterprise Information Client JavaBeans™ Systems (EIS): Client Relational Database, Web Enterprise Legacy Client Server JavaBeans Applications, JSP, Servlets ERP Systems Client HTML/XML Other Services: JNDI, JMS, Enterprise Client Middle JavaMail™ Information Tier Tier Tier 7 Web/Application Servers ●Open Source ● Tomcat ● JBoss ● Geronimo ● GlassFish ●Proprietary ● WebSphere ● WebLogic ● OC4J 8 What is a Servlet? A servlet is a Java programming language class used to extend the capabilities of servers that host applications accessed via a request- response programming model. 9 Servlet Processing 10 “Hello World” Java Servlet 11 Servlet Deployment 12 “Hello World” Revisited... Not Very Robust.... 13 What is a JSP? JavaServer Page: A JSP page is a text-based document that contains two types of text: static template data, which can be expressed in any text-based format, such as HTML, SVG, WML, and XML; ...and... JSP elements, which construct dynamic content. 14 “Hello World” with a JSP 15 You Might Be Wondering... Why does the code do so much grunt work? 16 Java Web Frameworks ●Struts ●Tapestry ●Wicket ●Stripes ●Spring MVC ●Google Web Toolkit ●JavaServer Faces (JSF) ●etc... 17 What is JavaServer Faces? JavaServer Faces technology includes: * A set of APIs for representing UI components and managing their state, handling events and input validation, defining page navigation, and supporting internationalization and accessibility. * A JavaServer Pages (JSP) custom tag library for expressing a JavaServer Faces interface within a JSP page. 18 “Hello World” with JSF 19 “Hello World” with JSF (cont'd) 20 “Hello World” with JSF (cont'd) 21 “Hello World” with JSF (cont'd) 22 JSF Life cycle Source: JSF for nonbelievers, by Rick Hightower 23 Beyond the Java Language JavaFX Script and more... Development The Virtual Machine Devices 24 Beyond the Java Language (cont'd) on 25 Resources ●Java: java.sun.com ●JavaPassion: javapassion.com ●Java EE: java.sun.com/javaee ●Servlets: java.sun.com/products/servlet/articles/tutorial/ ●JSP: java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPIntro.html ●JSF: www.ibm.com/developerworks/library/j-jsf1/ ●Ruby, JRuby, Rails: www.netbeans.org/kb/trails/ruby.html ●NetBeans: netbeans.org 26.
Recommended publications
  • Pragmatic Guide to Javascript
    www.allitebooks.com What Readers Are Saying About Pragmatic Guide to J a v a S c r i p t I wish I had o w n e d this book when I first started out doing JavaScript! Prag- matic Guide to J a v a S c r i p t will take you a big step ahead in programming real-world JavaScript by showing you what is going on behind the scenes in popular JavaScript libraries and giving you no-nonsense advice and back- ground information on how to do the right thing. W i t h the condensed years of e x p e r i e n c e of one of the best JavaScript developers around, it’s a must- read with great reference to e v e r y d a y JavaScript tasks. Thomas Fuchs Creator of the script.aculo.us framework An impressive collection of v e r y practical tips and tricks for getting the most out of JavaScript in today’s browsers, with topics ranging from fundamen- tals such as form v a l i d a t i o n and JSON handling to application e x a m p l e s such as mashups and geolocation. I highly recommend this book for anyone wanting to be more productive with JavaScript in their web applications. Dylan Schiemann CEO at SitePen, cofounder of the Dojo T o o l k i t There are a number of JavaScript books on the market today, b u t most of them tend to focus on the new or inexperienced JavaScript programmer.
    [Show full text]
  • Jquery: Novice to Ninja
    SECOND Pantone: EDITION CMYK: JQUERYGrey scale PANTONE Orange 021 C PANTONE 2955 C NOVICE TO NCMYK IO, 53, N100, 0 JCMYKA 100, 45, 0, 37 NEW KICKS ANDBlack 50% TRICKSBlack 100% BY EARLE CASTLEDINE & CRAIG SHARKIE SIMPLE, FAST, POWERFUL — JAVASCRIPT THE WAY IT SHOULD BE Summary of Contents Preface . xvii 1. Falling in Love with jQuery . 1 2. Selecting, Decorating, and Enhancing . 19 3. Animating, Scrolling, and Resizing . 53 4. Images and Slideshows . 93 5. Menus, Tabs, Tooltips, and Panels . 139 6. Construction, Ajax, and Interactivity . 187 7. Forms, Controls, and Dialogs . 239 8. Lists, Trees, and Tables . 305 9. Plugins, Themes, and Advanced Topics . 347 A. Reference Material . 409 B. JavaScript Tidbits . 419 C. Plugin Helpers . 425 Index . 431 JQUERY: NOVICE TO NINJA BY EARLE CASTLEDINE & CRAIG SHARKIE wnload from Wow! eBook <www.wowebook.com> o D iv jQuery: Novice to Ninja by Earle Castledine and Craig Sharkie Copyright © 2012 SitePoint Pty. Ltd. Product Manager: Simon Mackie Assistant Technical Editor: Diana MacDonald Technical Editor: Tom Museth Indexer: Michele Combes Expert Reviewer: Jörn Zaefferer Cover Designer: Alex Walker Editor: Kelly Steele Printing History: Latest Update: February 2012 First Edition: February 2010 Second Edition: February 2012 Notice of Rights All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means without the prior written permission of the publisher, except in the case of brief quotations included in critical articles or reviews. Notice of Liability The authors and publisher have made every effort to ensure the accuracy of the information herein.
    [Show full text]
  • A Bad Case of Stripes
    A Bad Case of Stripes A Bad Case of Stripes Author: David Shannon Publisher: Scholastic Paperbacks (2004) Binding: Paperback, 32 pages Item Call Number: E SHANN Camilla Cream loves lima beans, but she never eats them. Why? Because the other kids in her school don't like them. And Camilla is very, very worried about what other people think of her. In fact, she’s so worried that she's about to break out in a bad case of stripes! Questions to talk about with your child: Why did Camilla break out in stripes (and other patterns?) What did you notice about the patterns that break out on Camilla? Do they have anything to do with what’s happening around her? Look at each of the pictures. Was there anything about Camilla that stayed the same each time she changed? What made Camilla finally turn back into herself? Did Camilla learn anything from having a bad case of stripes? Look at the last page. Was there anything different about the way Camilla looks? Fun things to do together: David Shannon always hides a picture of his white terrier Fergus somewhere in each of his books. Look for the picture of Fergus in this book. Camilla loves lima beans. Have lima beans for lunch or dinner one day. Draw a picture of yourself with stripes, polka dots or some other pattern. Check out a book about patterns, for example, Pattern Bugs by Trudi Harris or Patterns at the Museum by Tracey Steffora. Recognizing and completing simple patterns is an important kindergarten readiness skill.
    [Show full text]
  • 2Nd USENIX Conference on Web Application Development (Webapps ’11)
    conference proceedings Proceedings of the 2nd USENIX Conference Application on Web Development 2nd USENIX Conference on Web Application Development (WebApps ’11) Portland, OR, USA Portland, OR, USA June 15–16, 2011 Sponsored by June 15–16, 2011 © 2011 by The USENIX Association All Rights Reserved This volume is published as a collective work. Rights to individual papers remain with the author or the author’s employer. Permission is granted for the noncommercial reproduction of the complete work for educational or research purposes. Permission is granted to print, primarily for one person’s exclusive use, a single copy of these Proceedings. USENIX acknowledges all trademarks herein. ISBN 978-931971-86-7 USENIX Association Proceedings of the 2nd USENIX Conference on Web Application Development June 15–16, 2011 Portland, OR, USA Conference Organizers Program Chair Armando Fox, University of California, Berkeley Program Committee Adam Barth, Google Inc. Abdur Chowdhury, Twitter Jon Howell, Microsoft Research Collin Jackson, Carnegie Mellon University Bobby Johnson, Facebook Emre Kıcıman, Microsoft Research Michael E. Maximilien, IBM Research Owen O’Malley, Yahoo! Research John Ousterhout, Stanford University Swami Sivasubramanian, Amazon Web Services Geoffrey M. Voelker, University of California, San Diego Nickolai Zeldovich, Massachusetts Institute of Technology The USENIX Association Staff WebApps ’11: 2nd USENIX Conference on Web Application Development June 15–16, 2011 Portland, OR, USA Message from the Program Chair . v Wednesday, June 15 10:30–Noon GuardRails: A Data-Centric Web Application Security Framework . 1 Jonathan Burket, Patrick Mutchler, Michael Weaver, Muzzammil Zaveri, and David Evans, University of Virginia PHP Aspis: Using Partial Taint Tracking to Protect Against Injection Attacks .
    [Show full text]
  • Oralcard: Web Information System for Oral Health
    Universidade de Aveiro Departamento de Electrónica, Telecomunicações e 2011 Informática José Manuel OralCard: Sistema de Informação Web para a Saúde Santos Melo Oral OralCard: Web Information System for Oral Health Universidade de Aveiro Departamento de Electrónica, Telecomunicações e 2011 Informática José Manuel OralCard: Web Information System for Oral Health Santos Melo OralCard: Sistema de Informação Web para a Saúde Oral Dissertação apresentada à Universidade de Aveiro para cumprimento dos requisitos necessários à obtenção do grau de Mestre em Engenharia de Computadores e Telemática (M.I.E.C.T.), realizada sob a orientação científica do Professor Doutor José Luís Guimarães Oliveira, Professor Associado do Departamento de Electrónica, Telecomunicações e Informática da Universidade de Aveiro. Dedico este trabalho à minha família. o júri presidente Professor Doutor Armando José Formoso de Pinho Professor Associado com Agregação do Departamento de Electrónica, Telecomunicações e Informática da Universidade de Aveiro vogais Professor Doutor António Manuel de Jesus Pereira Professor Coordenador do Departamento de Engenharia Informática da Escola Superior de Tecnologia e Gestão do Instituto Politécnico de Leiria Professor Doutor José Luís Guimarães Oliveira Professor Associado do Departamento de Electrónica, Telecomunicações e Informática da Universidade de Aveiro agradecimentos Um obrigado especial ao Professor José Luís Oliveira pela minha integração no grupo de trabalho de Bioinformática, no Instituto de Engenharia Electrónica e Telemática de Aveiro (IEETA). Um obrigado especial ao Pedro Lopes e ao Joel P. Arrais, que me ajudaram com grande dedicação no desenvolvimento deste trabalho. Um obrigado ao Nuno Rosa pela ajuda na parte biológica e científica do trabalho. Este projecto não estaria concluído sem reconhecer a ajuda prestada pelos meus pais e irmãs, não só na dissertação como em todo o percurso académico na Universidade de Aveiro.
    [Show full text]
  • Evaluating Presentation Layer Development Frameworks for EJB Applications in J2EE Architecture
    International Conference on Computer Science and Information Technology (ICCSIT'2011) Pattaya Dec. 2011 Evaluating Presentation Layer Development Frameworks for EJB Applications in J2EE Architecture Ohm Samkoses, Dipl. -Inform. Matthias Vianden, Prof. Dr. rer. nat. Horst Lichter gathering and analysis, multiple rounds of frameworks Abstract—For medium to large organizations, information selection with different criteria, prototype implementations, systems play an important role for information storage and retrieval. and results evaluation. The chosen frameworks for prototype They are used to support business processes such as decision-making. development should fulfill most of the requirement and the In information systems, huge amountof data needs to be manipulated prototypes implementation should reflect the solution for each and visualized. One way to handle this complexity is to use Enterprise JavaBeans (EJB) [1] in a J2EE architecture. Since EJB has requirement clearly, and must be able to work with the not been designed to work in the Presentation Layer, suitable existing system's environment: the back-end is managed by Presentation Layer Development frameworks are introduced to EJB 3.0, and IBM Websphere Application Server 7.0. enhanced thepresentation layer of the information systems. The MeDIC (Metric Definition Integration Calculation) system and XAM II. TASKS / STEPS (eXam Assignment and Management) system [2] are typical representatives of such information system. A. First frameworks selection Nowadays, many frameworks, such as Java Server Faces (JSF), First step was to narrow-down the scope of the focused Wicket, and Tapestry, exist to cover the Presentation Layer. They framework based mainly on framework popularity. Other provide a variety of features and architecture enhancements.
    [Show full text]
  • Automated Classification of RNA 3D Motifs and the RNA 3D Motif Atlas
    Downloaded from rnajournal.cshlp.org on October 8, 2021 - Published by Cold Spring Harbor Laboratory Press BIOINFORMATICS Automated classification of RNA 3D motifs and the RNA 3D Motif Atlas ANTON I. PETROV,1 CRAIG L. ZIRBEL,2 and NEOCLES B. LEONTIS1,3 1Department of Chemistry, 2Department of Mathematics and Statistics, Bowling Green State University, Bowling Green, Ohio 43403, USA ABSTRACT The analysis of atomic-resolution RNA three-dimensional (3D) structures reveals that many internal and hairpin loops are modular, recurrent, and structured by conserved non-Watson–Crick base pairs. Structurally similar loops define RNA 3D motifs that are conserved in homologous RNA molecules, but can also occur at nonhomologous sites in diverse RNAs, and which often vary in sequence. To further our understanding of RNA motif structure and sequence variability and to provide a useful resource for structure modeling and prediction, we present a new method for automated classification of internal and hairpin loop RNA 3D motifs and a new online database called the RNA 3D Motif Atlas. To classify the motif instances, a representative set of internal and hairpin loops is automatically extracted from a nonredundant list of RNA-containing PDB files. Their structures are compared geometrically, all-against-all, using the FR3D program suite. The loops are clustered into motif groups, taking into account geometric similarity and structural annotations and making allowance for a variable number of bulged bases. The automated procedure that we have implemented identifies all hairpin and internal loop motifs previously described in the literature. All motif instances and motif groups are assigned unique and stable identifiers and are made available in the RNA 3D Motif Atlas (http://rna.bgsu.edu/motifs), which is automatically updated every four weeks.
    [Show full text]
  • A Presentation Service for Rapidly Building Interactive Collaborative Web Applications
    A Presentation Service for Rapidly Building Interactive Collaborative Web Applications SCIENTIA MANU E T MENTE A thesis submitted to the School of Computer Science University College University of New South Wales Australian Defence Force Academy for the degree of Doctor of Philosophy By Michael Joseph Sweeney 31 March 2008 c Copyright 2008 by Michael Joseph Sweeney i Certi¯cate of Originality I hereby declare that this submission is my own work and that, to the best of my knowledge and belief, it contains no material previously published or written by another person, nor material which to a substantial extent has been accepted for the award of any other degree or diploma at UNSW or any other educational institution, except where due acknowledgement is made in the thesis. Any contribution made to the research by colleagues, with whom I have worked at UNSW or elsewhere, during my candidature, is fully acknowledged. I also declare that the intellectual content of this thesis is the product of my own work, except to the extent that assistance from others in the project's design and conception or in style, presentation and linguistic expression is acknowledged. Michael Joseph Sweeney ii Abstract Web applications have become a large segment of the software development domain but their rapid rise in popularity has far exceeded the support in software engineer- ing. There are many tools and techniques for web application development, but the developer must still learn and use many complex protocols and languages. Products still closely bind data operations, business logic, and the user interface, limiting integration and interoperability.
    [Show full text]
  • Chemaxon Presentation
    Making development of chemistry based applications easier new (and old) languages and frameworks on the Java Virtual Machine Tim Dudgeon <[email protected]> May 2010 Acknowledgements • Gustavo Santucho • Gabriel Moreno • Mario Burdman • Chris Palmer Aim • Develop chemistry based web applications using modern frameworks – let the framework do the heavy lifting – obtain real code re-use – insulate ourselves from the implementation details • Current approaches don't come close to this • Can we improve on this? Example 1: Structure query <td> <select name="type" onchange="searchTypeChanged()"> <% if (tableType != DatabaseProperties.TABLE_TYPE_QUERY_STRUCTURES) { %> <option value="Substructure">Substructure</option> <% } %> <% if (tableType != DatabaseProperties.TABLE_TYPE_MARKUSH_LIBRARIES) { %> <option value="Superstructure">Superstructure</option> <% } %> <option value="Full">Full</option> <option value="Full fragment">Full fragment</option> <% if (descriptor_names.length>0) { %> <option value="Similarity">Similarity</option> <% } %> <option value="Duplicate">Duplicate</option> </select> <script language="JavaScript1.1"> </td> <!-- msketch_name="msketch"; ... msketch_begin("../../marvin", 460, 460); msketch_param("molbg", "#F0F0F0"); msketch_param("implicitH", "off"); msketch_param("undo", "50"); msketch_param("mol","<%=HTMLTools.convertForJavaScript(molFile)%>"); //msketch.param("debug", 2); msketch_end(); //--> </script> Example 2: JChem/JDBC DAO Lots of code to write Lots of traps Very implementation specific public void updateStructure(Structure
    [Show full text]
  • Frederic Daoud — «Stripes... and Java Web Development Is Fun Again
    What readers are saying about Stripes. and Java Web Development Is Fun Again This book is a must for anyone using Stripes, novice or pro. The author has done a great job of explaining the basics as well as the details of Stripes’ amazing features while showing how to build a real- life application. A novice developer can get up to speed fast, keeping with Stripes’ pragmatic approach to development: “It doesn’t have to be hard.” As the chapters progress, you will gain thorough knowledge of all the Stripes features. What really impressed me was the author’s dedication to giving you full examples of all the possible variations; you’re not left thinking, “If I just knew how to use that feature.” If you want to know how to use a Stripes feature, look it up in this book—it’s definitely covered. Stripes...and Java Web Development Is Fun Again will be on my work desk from now on. Jeppe Cramon Chief Architect, TigerTeam This book is really engaging. Since I’m familiar with Stripes, I enjoyed learning about many lesser-known nuances that Stripes provides— and those tasty little nuggets kept me reading. This book delivers a comprehensive understanding of the intellectual and technical aspects of Stripes. It has served to cement my appreciation for Stripes. Brandon Goodin Coauthor, iBATIS in Action At first I thought this book would be merely a welcome dead-tree ref- erence for our team of self-proclaimed veteran Stripes developers. But somewhere along the way Frederic Daoud managed to greatly impress and humble me with his experience and in-depth knowledge of Stripes.
    [Show full text]
  • Technical Expertise
    www.ultantechnologies.com Technical Expertise Subject: Ultan Technologies Technical Expertise Author: Cathal Brady Date Published: 01/03/2016 Version Number: Version 1 www.ultantechnologies.com Contents 1 INTRODUCTION ..................................................................................................................... 1 2 .NET ....................................................................................................................................... 1 3 DATABASES ........................................................................................................................... 2 4 BIG DATA ............................................................................................................................... 2 5 JAVA ...................................................................................................................................... 3 6 PHP, RUBY, PYTHON .............................................................................................................. 3 7 FRONT END............................................................................................................................ 4 8 3RD PARTY INTEGRATION, APIs, PLUGINS ............................................................................. 4 9 CONTINUOUS INTEGRATION / BUILD AUTOMATION / VERSION CONTROL .......................... 4 10 MOBILE DEVELOPMENT ........................................................................................................ 5 11 CRM CUSTOMISATION .........................................................................................................
    [Show full text]
  • Grails in Action, Second Edition by Glen Smith Peter Ledbrook
    S AMPLE CHAPTER SECOND EDITION Glen Smith Peter Ledbrook FOREWORD BY Dierk König MANNING Grails in Action, Second Edition by Glen Smith Peter Ledbrook Chapter 1 Copyright 2014 Manning Publications brief contents PART 1INTRODUCING GRAILS...................................................1 1 ■ Grails in a hurry . 3 2 ■ The Groovy essentials 33 PART 2CORE GRAILS..............................................................61 3 ■ Modeling the domain 63 4 ■ Creating the initial UI 91 5 ■ Retrieving the data you need 110 6 ■ Controlling application flow 136 7 ■ Services and data binding 155 8 ■ Developing tasty forms, views, and layouts 189 PART 3EVERYDAY GRAILS .....................................................227 9 ■ Building reliable applications 229 10 ■ Using plugins: just add water 261 11 ■ Protecting your application 297 12 ■ Exposing your app to other programs 328 vii viii BRIEF CONTENTS 13 ■ Single-page web applications (and other UI stuff) 357 14 ■ Understanding Spring and transactions 380 PART 4ADVANCED GRAILS ....................................................399 15 ■ Understanding events, messaging, and scheduling 401 16 ■ NoSQL and Grails 432 17 ■ Beyond compile, test, run 467 18 ■ Grails in the cloud 496 Grails in a hurry . This chapter covers ■ What is Grails? ■ Core Grails philosophy ■ Grails installation ■ Key components of a Grails application ■ Your first Grails application—developing and deploying it “Help, I’ve lost my Mojo!” That statement is a concise summary of what developers feel when working with any of the plethora of Java web frameworks. Each change requires time spent editing configuration files, customizing web.xml files, writing injection definitions, tweaking build scripts, modifying page layouts, and restarting apps. Aaaahhhh! “Where has all the fun gone? Why is everything so tedious? I wanted to whip up a quick app to track our customer signups! There must be a bet- ter way .
    [Show full text]