Practice 1. Reverse Engineering an Existing Database

Total Page:16

File Type:pdf, Size:1020Kb

Practice 1. Reverse Engineering an Existing Database Practice 1. Reverse engineering an existing database In this practice you will learn how to reverse engineer an existing database using Spring Roo. Roughly, the idea is use Spring Roo to generate the persistence layer (i.e., entity classes, configuration files, etc.) enabling a transparent access to the database. Additionally, we will use Spring Roo to generate the code of a minimal web application providing operations for listing, updating, creating and removing entries in the database. Some concepts and figures used in this practice are based on material presented in the book “Spring Roo in action” by Ken Rimple and Srini Penchikala, Ed. Manning. Software tools • JDK 1.7 • Spring Tools Suite • PostgreSQL Setting up the database First of all, we will create a local copy of the working database. To that end, you will load the database from a dump file. Using your local PostgreSQL instance and the provided file, you will create the database schema and populate the tables with data. 1. Download the dump file from https://courses.cs.ut.ee/2013/esi/uploads/Main/world.zip. The following class diagram depicts the logical design of the database. Note that City and Country are not related in the beginning, we will address that problem later on. country code: character name: text continent: text city region: text surfacearea: real countrylanguage id: integer indepyear: smallint 1…* 1…* name: text population: integer language: text district: text lifeexpectancy: real isofficial: boolean population: integer gnp: numeric percentage: real gnpold: numeric localname: text govermentform: text headofstate: text capital: integer code2: character Figure 1. Logical design of Database 2. Start your PostgreSQL server and open a SQL shell (psql). The following figures give you a hint on how to start psql. Figure 2. psql shell in Mac OS X and Windows XP 3. Follow the steps below for creating the database and loading the data from the dump file (Note: the commands shall be executed in psql shell). a. Create the database: create database databaseName; b. Select your working database \c databaseName; c. Load the sample database from the dump file \i FileDirectory/world.sql; Reverse engineering Reverse engineering is a common practice and there are several motivations for its use. For instance, for system maintenance, system reengineering, system integration, system migration, etc. In our case, Spring Roo will automatically generate the persistence layer of our application, using the JPA 2.0 framework. 1. Start Spring Tool Suite (STS). 2. Create and set up a Spring Roo Project. i. From the menu bar “File” or by right clicking on the “Project explorer” tab, select “New > Other > Spring > Spring Roo Project” ii. Fill in the text fields for Project name and Top level package name in the dialog box. Click the button “Next” and the “Finish” in the following dialog boxes. 3. Open the “Roo shell” tab. Usually, it is located at the bottom of STS. If Spring Roo shell is not shown in your application, then go to the menu “Window > Show view > Other” and select “Roo shell” under the folder “Spring”. Figure 3. Show view > Roo shell Hereinafter, all the commands presented shall be executed in Roo shell. 4. Configure the database connection for your application jpa setup --database POSTGRES --provider HIBERNATE -- databaseName databaseName --hostName hostname --userName username --password pass where --database Specifies the database vendor to configure. Spring Roo supports a large number of vendors, including DB2, DERBY, ORACLE and MYSQL. 2 --provider Specifies the JPA provider (persistence middleware vendor), e.g. HIBERNATE, ECLIPSELINK and OPENJPA. --hostname Parameters required for establishing the connection to the --userName database server. --password 5. Test your database connection. a. To this end, we will execute the command database introspect to query the database schema. database introspect --schema DatabaseSchema b. If something goes wrong with the previous command, it is very likely that you need to install a jdbc driver for PostgreSQL. If this is your case, execute the following command: addon search postgresql A list of add-ons will be displayed in the shell: 01 Y Y 9.1.0.901-1_0001 Postgres #jdbcdriver driverclass:org.postgresql.Driver. This bundle wraps the standard Maven artifact:... 02 Y Y 9.1.0.901_0001 Postgres #jdbcdriver driverclass:org.postgresql.Driver. This bundle wraps the standard Maven artifact:... 03 ….. Locate the line containing the driver jdbcdriver driverclass:org.postgresql.Driver, then execute the command: addon install id XY where XY corresponds to the numbers in the first column in the list of add-ons. To double check if the driver has been installed, execute the command database introspect once more database introspect --schema DatabaseSchema When things go wrong: Sometimes there are some issues with the command addon search and it does not display any result, instead it shows a message “No add-ons known. Are you online? Try the 'download status' command”. If this is the case, then execute the following commands for the installation of the jdbc driver: - osgi obr url add --url http://spring-roo-repository.springsource.org/repository.xml - osgi obr deploy --bundleSymbolicName org.springframework.roo.wrapping.postgresql-jdbc3 6. To reverse engineer the database use the following command database reverse engineer --schema DatabaseSchema --package 3 ~.domain where --schema Specifies the name of the database schema you will reverse engineer --package Specifies the java package that will contain the set of java classes implementing the persistence layer, and that will be generated by Spring Roo --includeTables Specifies the subset of tables to be reverse engineered. If this "table1 table2 …" parameter is omitted Spring Roo will reverse engineer all the tables. --excludeTables This is a symmetric operation to the previous one. "table1 table2 …" In this lab session, we are going to include all the tables. Therefore, we can omit both --includeTables and --excludeTables. Up to now we have considered only the steps regarding to the persistence layer and, in fact, we have already completed the basic configurations. In the following steps we will generate the controllers and simple views (user interfaces) for our application. 7. Configure the application with a web presentation layer web mvc setup 8. Generate the controllers for all the entities created web mvc all --package ~.web The previous command implements the controllers and view artifacts for all the data access operations (i.e., create, show, list, update and delete), and for all the entities in the persistence layer. However, you can also add controllers and view artifacts for one entity at a time using the following command web mvc scaffold --class ~.web.ClassController --backingType ~.domain.Class --disallowedOperations operation1, operation2 where --backingType Defines the name of the backing type for which the controllers will be generated --class Specifies the name of the new controller for the entity given in 4 --backingType. --disallowedOperations Specifies the set of operations that will not be supported by the controller code. You can disable the operations delete, update and create. 9. Run your web application. a. Drag and drop your project into the VMware vFabric tc Server in the tab Servers and start the server. b. Open an external browser (e.g., Google Chrome, Safari or any other) and go to the following URL: htt://localhost:8080/nameOfYourProject c. Look at the generated views and test the different functionalities. 10. In the browser, open the form for creating a new Country. Some of the fields are set as not null, for instance, code, name and continent. Therefore, if one of such fields is left empty when filling in the form, then a warning message appears notifying that it is an invalid input. Nevertheless, the field continent is a regular string and one can put any string value different from Asia, Europe, North America, Africa, Oceania, Antarctica or South America. Therefore, we will add a validator to this text field, such that only the listed words are allowed. a. Focus on the class Country (in Roo shell, execute the command focus --class ~.domain.Country) and add a validation to the String field continent executing the following command: field string --fieldName continent --notNull --regexp ^(Asia|Europe|North\sAmerica|Africa|Oceania|Antarctica|South\sAmerica)$ If you are not familiarized with regular expressions, the following link can be useful: http://net.tutsplus.com/tutorials/other/8-regular-expressions-you-should-know/. The command field has different options besides string and, depending on the type, there are different restrictions that you can set. For instance, you can specify the minimum and maximum possible values for an integer, etc. Deploy your application once more and try to introduce invalid values for the field continent when inserting new Country (if the definition of the validator was correct then you will see a warning message). A first look at JPA inter-object references In your browser, select “Create new Country” from the side menu bar. Note that when you add a new country to the database, you will need to enter the id of the capital city. In the application as-is the user might enter wrong values. If you look at the logical design of the database depicted in Figure 1, we could actually relate the table City and Country (as shown in the logical design in Figure 3). In order to avoid this kind of mistakes, JPA provides inter- object references. In the following, you will learn how to setup JPA references. country code: character name: text continent: text region: text city surfacearea: real countrylanguage indepyear: smallint id: integer 1 1 1…* 1…* population: integer language: text name: text lifeexpectancy: real isofficial: boolean district: text gnp: numeric percentage: real population: integer gnpold: numeric localname: text govermentform: text headofstate: text capital: integer code2: character Figure 4.
Recommended publications
  • Spring Roo - Reference Documentation
    Spring Roo - Reference Documentation DISID CORPORATION S.L. Table of Contents Getting started . 1 1. Overview . 2 2. What’s new in Spring Roo 2.0 . 3 Improved extensibility . 3 No backward compatibility . 3 Usability improvements . 3 Centered in Spring technologies . 3 Application architecture . 4 Domain model . 4 View layer . 4 3. Requirements . 6 4. Install Spring Roo . 7 Using Spring Roo . 9 5. The Roo shell . 10 6. Impatient beginners . 12 7. Create your Spring Boot application . 13 8. Configure the project settings . 14 9. Setup the persistence engine . 15 10. The domain model . 16 JPA entities . 16 DTOs . 20 11. The data access layer . 21 Spring Data repositories . 21 Default queries . 21 12. The service layer . 22 Service API and Impl . 22 13. The view layer . 23 Thymeleaf view engine . 23 Spring MVC Controllers . 23 Spring Webflow . 25 14. The integration layer . 26 REST API . 26 WS API . 26 Email . ..
    [Show full text]
  • What's New in GWT?
    What’s New in GWT? David Chandler Google Web Toolkit Team Atlanta, GA USA [email protected] 1 Agenda Why rich Web apps with GWT? GWT Quickstart Developer tools GWT performance for your users Building with GWT 2.12 2 GWT in 10 sec Asynchronous JavaScript And XML++ 3 GWT in 60 sec Open source Java to JavaScript compiler Lets you write rich Web apps in Java Cross-browser just works (FireFox, Chrome, Safari, IE 6+) Produces small, fast JavaScript Easy (and efficient) RPC Great for large projects / teams 4 Browser-Proof Your JS Code IE Firefox Safari Chrome Opera 5 5 No plugins required Silverlight VML Flash 6 6 Can you find the bug? Hint: JavaScript is a dynamic language 7 7 Catch errors at compile time Java is a static language 8 8 Completion, refactoring... 9 9 Eating our own dogfood += AdSense, Maps, Docs, Groups... 10 10 Demos Booked In Typing race 11 Rich ecosystem www.gwtmarketplace.com 12 More ecosystem Util: GIN, gwt-dnd, gwt-fx, gwt-comet, ... Widgets: EXT-GWT, Smart-GWT, ... Frameworks: Vaadin! 13 4+ years in review May 2006 GWT 1.0 Launch at JavaOne … … Aug 2008 GWT 1.5 Java 5 language support Apr 2009 GWT 1.7 Dedicated IE8 support Fall 2009 GWT 2.0 UIBinder (XML template), runAsync() Oct 2010 GWT 2.1 MVP, RequestFactory, Spring Roo 14 14 GWT delivers... Productivity for developers - Language, IDEs, tools, libraries - People, ecosystem Performance for users - 'Perfect' caching - Whole program optimization 15 15 Developing with GWT Develop - Google Plugin for Eclipse, GWT Designer, STS / Roo Debug - In Eclipse with dev mode
    [Show full text]
  • Great Lakes Software Symposium Westin Chicago Northwest November 11 - 13, 2011
    Great Lakes Software Symposium Westin Chicago Northwest November 11 - 13, 2011 Fri, Nov. 11, 2011 Ballroom 3-4 Ballroom 1-2 Gallery Chambers Stanford Trafalgar 12:00 - 1:00 PM REGISTRATION 1:00 - 1:15 PM WELCOME 1:15 - 2:45 PM What's new in Spring Resource-Oriented Programming HTML5 Concurrency without Busy Java Introduction to Lean-Agile Craig Walls Architectures : REST I Tim Berglund pain in pure Java Developer's Software Development Brian Sletten Venkat Subramaniam Guide to Java 7 Paul Rayner Ted Neward 2:45 - 3:15 PM BREAK 3:15 - 4:45 PM NoXML: Spring Resource-Oriented NoSQL Smackdown! Collections for Concurrency Busy Java Measure for Measure for XML-Haters Architectures : REST II Tim Berglund Venkat Subramaniam Developer's Guide – Lean Principles Craig Walls Brian Sletten to Multi-Paradigm Design for Effective Metrics Ted Neward and Motivation Paul Rayner 4:45 - 5:00 PM BREAK 5:00 - 6:30 PM Introducing Spring Strategic Design Cassandra: Radical Towards a Humane Busy Java Resource-Oriented Roo: From Zero Using DDD NoSQL Scalability Interface—Aesthetics Developer's Architectures : to Working Spring Paul Rayner Tim Berglund and Usability Guide to Guava RDF/SPARQL Application in Record Time Venkat Subramaniam Ted Neward Brian Sletten Craig Walls 6:30 - 7:15 PM DINNER 7:15 - 8:00 PM Keynote: by Venkat Subramaniam Great Lakes Software Symposium Westin Chicago Northwest November 11 - 13, 2011 Sat, Nov. 12, 2011 Ballroom 3-4 Ballroom 1-2 Gallery Chambers Stanford Trafalgar 8:00 - 9:00 AM BREAKFAST 9:00 - 10:30
    [Show full text]
  • Characters and Numbers A
    Index ■Characters and Numbers by HTTP request type, 313–314 #{ SpEL statement } declaration, SpEL, 333 by method, 311–312 #{bean_name.order+1)} declaration, SpEL, overview, 310 327 @Required annotation, checking ${exception} variable, 330 properties with, 35 ${flowExecutionUrl} variable, 257 @Resource annotation, auto-wiring beans with ${newsfeed} placeholder, 381 all beans of compatible type, 45–46 ${resource(dir:'images',file:'grails_logo.pn g')} statement, 493 by name, 48–49 ${today} variable, 465 overview, 42 %s placeholder, 789 single bean of compatible type, 43–45 * notation, 373 by type with qualifiers, 46–48 * wildcard, Unix, 795 @Value annotation, assigning values in controller with, 331–333 ;%GRAILS_HOME%\bin value, PATH environment variable, 460 { } notation, 373 ? placeholder, 624 ~.domain.Customer package, 516 @Autowired annotation, auto-wiring 23505 error code, 629–631 beans with all beans of compatible type, 45–46 ■A by name, 48–49 a4j:outputPanel component, 294 overview, 42 AboutController class, 332 single bean of compatible type, 43–45 abstract attribute, 49, 51 by type with qualifiers, 46–48 AbstractAnnotationAwareTransactionalTe @PostConstruct annotation, 80–82 sts class, 566 @PreDestroy annotation, 80–82 AbstractAtomFeedView class, 385–386 @RequestMapping annotation, mapping AbstractController class, 298 requests with AbstractDependencyInjectionSpringConte by class, 312–313 xtTests class, 551–552, 555 985 ■ INDEX AbstractDom4jPayloadEndpoint class, AbstractTransactionalTestNGSpringConte 745, 747 xtTests class, 555,
    [Show full text]
  • Generation of an Architecture View for Web Applications Using a Bayesian Network Classifier Juan-Carlos Castrejon-Castillo, Rafael Lozano, Genoveva Vargas-Solar
    Generation of an Architecture View for Web Applications using a Bayesian Network Classifier Juan-Carlos Castrejon-Castillo, Rafael Lozano, Genoveva Vargas-Solar To cite this version: Juan-Carlos Castrejon-Castillo, Rafael Lozano, Genoveva Vargas-Solar. Generation of an Architecture View for Web Applications using a Bayesian Network Classifier. CONIELECOMP 2012 - International Conference on Electrical Communications and Computers, Feb 2012, Cholula, Puebla, Mexico. pp.368- 373, 10.1109/CONIELECOMP.2012.6189940. hal-00922891 HAL Id: hal-00922891 https://hal.archives-ouvertes.fr/hal-00922891 Submitted on 2 Jan 2014 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Generation of an Architecture View for Web Applications using a Bayesian Network Classifier Juan Castrejon,´ Rafael Lozano Genoveva Vargas-Solar Campus Ciudad de Mexico´ LIG-LAFMIA Labs Instituto Tecnologico´ y de Estudios Superiores de Monterrey Centre National de la Recherche Scientifique fA00970883, [email protected] [email protected] Abstract—A recurring problem in software engineering is the apply changes to individual components, by maintaining clear correct definition and enforcement of an architecture that can responsibilities and dependencies by means of three logical guide the development and maintenance processes of software grouping layers, that is, Model, View and Controller layer.
    [Show full text]
  • Getting Started with Roo
    Getting Started with Roo Getting Started with Roo Josh Long and Steve Mayzak Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo Getting Started with Roo by Josh Long and Steve Mayzak Copyright © 2011 Josh Long and Steve Mayzak. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or [email protected]. Editor: Mike Loukides Cover Designer: Karen Montgomery Production Editor: Jasmine Perez Interior Designer: David Futato Proofreader: O’Reilly Production Services Illustrator: Robert Romano Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Getting Started with Roo, the image of the common tree kangaroo, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information con- tained herein. ISBN: 978-1-449-30790-5 [LSI] 1312551620 Table of Contents Preface ..................................................................... vii 1. Your First Intrepid Hops … err, Steps .....................................
    [Show full text]
  • Spring Roo in Action by Ken Rimple, Srini Penchikala
    MANNING Ken Rimple Srini Penchikala FOREWORD BY BEN ALEX Spring Roo in Action by Ken Rimple, Srini Penchikala Chapter 10 Copyright 2012 Manning Publications brief contents PART 1STARTING SPRING APPS RAPIDLY WITH ROO...................1 1 ■ What is Spring Roo? 3 2 ■ Getting started with Roo 25 PART 2DATABASES AND ENTITIES ........................................... 55 3 ■ Database persistence with entities 57 4 ■ Relationships, JPA, and advanced persistence 93 PART 3WEB DEVELOPMENT...................................................125 5 ■ Rapid web applications with Roo 127 6 ■ Advanced web applications 156 7 ■ RIA and other web frameworks 173 8 ■ Configuring security 189 PART 4INTEGRATION ...........................................................209 9 ■ Testing your application 211 10 ■ Enterprise services—email and messaging 243 11 ■ Roo add-ons 266 12 ■ Advanced add-ons and deployment 296 vii viii BRIEF CONTENTS PART 5 ROO IN THE CLOUD...................................................321 13 ■ Cloud computing 323 14 ■ Workflow applications using Spring Integration 337 Enterprise services— email and messaging This chapter covers Roo support for enterprise services Asynchronous messaging using a JMS topic Email service Asynchronous messaging using a JMS queue Monitoring messaging activity In the previous two chapters, you secured your Roo application by adding the Spring Security API to the application architecture mix, and you learned how to enrich the web tier of the Roo application so it’s functional from a business stand­ point. In addition to robust security features and a rich user interface, a real-world application also requires services such as customer email notification and offline data processing that occurs outside of your main business operations, where your customers receive notifications about results at a later time. In this chapter, we discuss the integration that the Roo framework provides for email and asynchronous messaging using the Java Message Service (JMS) API.
    [Show full text]
  • Vysoké Uˇcení Technické V Brnˇe Srovnání Nástroj˚U Seam Forge a Spring
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Digital library of Brno University of Technology VYSOKÉ UCEN͡ TECHNICKÉ V BRNEˇ BRNO UNIVERSITY OF TECHNOLOGY FAKULTA INFORMACNÍCHˇ TECHNOLOGIÍ ÚSTAV INTELIGENTNÍCH SYSTÉMU˚ FACULTY OF INFORMATION TECHNOLOGY DEPARTMENT OF INTELLIGENT SYSTEMS SROVNÁNÍ NÁSTROJU˚ SEAM FORGE A SPRING ROO THE COMPARISON OF SEAM FORGE AND SPRING ROO TOOLS BAKALÁRSKÁˇ PRÁCE BACHELOR’S THESIS AUTOR PRÁCE ONDREJˇ NAVLÁCILˇ AUTHOR VEDOUCÍPRÁCE ING.RADEKKOCÍ,ˇ PH.D. SUPERVISOR BRNO 2013 Abstrakt Cílem této bakalárskéˇ práce je porovnat nástroje pro rapidní vývoj Spring Roo a JBoss Forge na tvorbeˇ vzorových aplikací, které budou poté nasazeny na aplikacníˇ server JBoss AS. Práce v první cástiˇ popisuje vývoj platformy Java EE, nástroj˚ua framework˚upro rapidní vývoj internetových aplikací obecne,ˇ d˚uvod potrebyˇ techtoˇ nástroj˚upro platformu Java EE. Ve druhé cástiˇ je popsána tvorba jednoduchých aplikací se stejnou funkcionalitou s nástroji Spring Roo a JBoss Forge a porovnání jejich možností, jako podpora tvorby test˚u,použití na již vytvorenéˇ aplikaci, ciˇ podpora ve vývojových prostredích.ˇ Abstract The goal of this bachelor’s thesis is to compare the rapid application development tools Spring Roo and JBoss Forge and to deploy created applications on the JBoss AS application server. The first part this thesis describes an evolution of Java EE platform, evolution of tools and frameworks for rapid application development and also reasons for a need of these tools in Java EE platform. The second part describes creation of simple applications with the same functionality using Spring Roo and JBoss Forge.
    [Show full text]
  • Überconf Westin Westminster July 12 - 15, 2011
    ÜberConf Westin Westminster July 12 - 15, 2011 Tue, Jul. 12, 2011 Westminster I Westminster II Standley I Standley II Cotton Creek I Cotton Creek II Meadowbrook I Meadowbrook II Windsor Waverly 8:00 - 9:00 AM EARLY REGISTRATION: iOS & ANDROID WORKSHOPS ATTENDEES ONLY - WESTMINSTER BALLROOM FOYER 9:00 - 6:00 PM Fundamentals Android of iOS Apps Training - Development Full Day (day long) Ted Neward Venkat Subramaniam 5:00 - 6:30 PM MAIN UBERCONF REGISTRATION - WESTMINSTER BALLROOM FOYER 6:30 - 8:30 PM DINNER/KEYNOTE - WESTMINSTER BALLROOM 3/4 7:30 - 8:30 PM Keynote: by Terry Ryan 8:30 - 10:30 PM OPENING NIGHT OUTDOOR RECEPTION - SOUTH COURTYARD ÜberConf Westin Westminster July 12 - 15, 2011 Wed, Jul. 13, 2011 Westminster I Westminster II Standley I Standley II Cotton Creek I Cotton Creek II Meadowbrook I Meadowbrook II Windsor Waverly 7:00 - 8:00 AM 5K FUN RUN & POWER WALK - MEET IN LOBBY 7:30 - 8:30 AM BREAKFAST & LATE REGISTRATION - WESTMINSTER BALLROOM 3/4 8:30 - 10:00 AM Programming Economic Programming Continuous Agile.next Architectural Effective What's Strategic Building Concurrency Games in HTML5 Delivery Neal Ford Choices around Groovy new in Spring Design Workflow (Full Day) Software Tim Berglund Part I: Value Open Source Hamlet D`Arcy Craig Walls Using DDD Applications Venkat Projects proposition, the Solutions Paul Rayner with StonePath Subramaniam Matthew deployment Alex Antonov David Bock McCullough pipeline, automated tests, CI Jez Humble 10:00 - 10:30 AM MORNING BREAK 10:30 - 12:00 PM Programming Sonar: Code NoSQL Continuous
    [Show full text]
  • Spring 3.1 and Beyond – Themes and Trends
    Spring 3.1 and Beyond – Themes and Trends Jürgen Höller, Principal Engineer, SpringSource CONFIDENTIAL © 2010 SpringSource, A division of VMware. All rights reserved Deployment Platforms: Becoming More Diverse Application Application Application Spring Spring Spring + Libs + Libs + Libs WebSphere Tomcat Cloud Platform CONFIDENTIAL 2 Deployment Platforms in 2011: Latest Releases . Java EE moving on to Java EE 6 • GlassFish 3 • JBoss 6 • Other servers still on Java EE 5 (at best) . Tomcat moving on to Tomcat 7 • Servlet 3.0 based (Java EE 6 level) . Cloud platforms becoming a serious option for regular Java web application deployment • Google App Engine: Jetty++ • Amazon Elastic Beanstalk: Tomcat++ CONFIDENTIAL 3 Wide Variety of Data and Datastores . Not all data resides in relational databases • cloud environments often suggest alternatives for scalability reasons • BigTable, Redis, Mongo, etc . Distributed caches add challenges as well • not least of it all in terms of application-level access patterns • GemFire, Coherence, etc . Hardly any standardization available • just an abandoned caching JSR that never achieved a final release • caching – but only caching – possibly getting picked up in Java EE 7 • alternative datastore space is too diverse CONFIDENTIAL 4 Wide Variety of Web Clients . More and more client-side web technologies • HTML 5 as a next-generation browser standard • Adobe Flex as a rich client technology on the basis of Flash . Server-side state to be minimized or even removed completely • in particular: no server-side user interface state • strictly controlled user session state . JSF's state-centric approach not too desirable anymore • except for special kinds of applications (which it remains very useful for) • general web applications and web services based on JAX-RS / MVC style • nevertheless: JSF keeps evolving – JSF 2.2 coming up in Q4 2011 CONFIDENTIAL 5 Java SE 7: Concurrent Programming .
    [Show full text]
  • Client-Server Web Apps with Javascript and Java
    Client-Server Web Apps with JavaScript and Java Casimir Saternos Client-Server Web Apps with JavaScript and Java by Casimir Saternos Copyright © 2014 EzGraphs, LLC. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/ institutional sales department: 800-998-9938 or [email protected]. Editors: Simon St. Laurent and Allyson MacDonald Indexer: Judith McConville Production Editor: Kristen Brown Cover Designer: Karen Montgomery Copyeditor: Gillian McGarvey Interior Designer: David Futato Proofreader: Amanda Kersey Illustrator: Rebecca Demarest April 2014: First Edition Revision History for the First Edition: 2014-03-27: First release See http://oreilly.com/catalog/errata.csp?isbn=9781449369330 for release details. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Client-Server Web Apps with JavaScript and Java, the image of a large Indian civet, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.
    [Show full text]
  • Springsource Tool Suite 2.2.0.Release - New and Noteworthy
    SPRINGSOURCE TOOL SUITE 2.2.0.RELEASE - NEW AND NOTEWORTHY SpringSource Tool Suite 2.2.0 - New and Noteworthy - Christian Dupuis 2.2.0 October 4, 2009 Updated for 2.2.0.RELEASE www.springsource.com SPRINGSOURCE TOOL SUITE 2.2.0.RELEASE - NEW AND NOTEWORTHY NEW FEATURES – 2.2.0.RELEASE Spring Development Tools Only IDE to fully support latest Spring 3.0 STS has been updated to support latest versions of Spring 3.0 (including RC1 and RC2). Editing, Validating and Visualization of Autowire-based Configurations Spring configurations based on @Autowired, @Resource and custom annotations can now be visualized and validated within STS. This feature can be mixed and matched with traditional XML-based configurations and understands qualifier annotations and XML definitions. To enable the visualization of autowired bean dependencies, open the STS preferences and navigate to Spring -> Beans Support and check the “Display extended content” option. In order to turn on validation warnings and errors displayed in the Java Editor, enable the “Annotation-based Autowiring Rule” of the “Beans Validator” (Preferences -> Spring -> Project Validators). www.springsource.com SPRINGSOURCE TOOL SUITE 2.2.0.RELEASE - NEW AND NOTEWORTHY Visualization and Testing of REST and MVC Applications Usages of @RequestMapping annotations can now be visualized in a separate view called “@RequestMappings”. To open the view select the configuration file of configuration set in the Spring Explorer and select “Show Request Mappings” in the context menu. The view allows accessing the URL in an embedded web browser. The user is queried for required values defined in the REST-style URL.
    [Show full text]