Spring Fling Phillip Warner. Spring Framework ● Dependency Injection (DI) Framework – “Inversion of Control” ● Facilitates Good Programming Practices.

Slides:



Advertisements
Similar presentations
15 May 2007 Phillip Warner : NOAO : IVOA Interop1 NOAO VOEvent Services and Clients Phillip Warner, Rob Seaman, Chris Smith NOAO T HE US N ATIONAL V IRTUAL.
Advertisements

Spring Auto wiring Auto wiring Resolves the beans that need to be injected by inspecting the elements in ApplicationContext.
Introduction to Spring Continued Matt Wheeler. Notes This is a training NOT a presentation Please ask questions Prerequisites – Introduction to Java Stack.
ISE 390 Dynamic Web Development Java EE Web Applications.
Introduction to Spring Matt Wheeler. Notes This is a training NOT a presentation Please ask questions Prerequisites – Introduction to Java Stack – Basic.
Enterprise Application Development Sadegh Aliakbary An Introduction to Spring Framework www. JavaCup.ir.
An architecture for webb applications, J2EE
Integrating SOA and the Application Development Framework Shaun O’Brien Principal Product Manager – Oracle JDeveloper / ADF.
Current Topics in Programming Languages Lecture 15_1 George Koutsogiannakis SUMMER
Introduction to EJB INFORMATICS ENGINEERING – UNIVERSITY OF BRAWIJAYA Eriq Muhammad Adams J
Chapter 13 Web Application Infrastructure. Objectives Explain the components and purpose of a web application platform Describe several common webapp.
1 November 21st 2009 Shaun Abram An Introduction to Spring.
The Spring Framework: A brief introduction to Inversion of Control James Brundege
Introduction to Spring Matt Wheeler. Notes This is a training NOT a presentation Please ask questions Prerequisites – Introduction to Java Stack – Basic.
Spring Framework. Spring Overview Spring is an open source layered Java/JavaEE application framework Created by Rod Johnson Based on book “Expert one-on-one.
Spring Roo CS476 Aleksey Bukin Peter Lew. What is Roo? Productivity tool Allows for easy creation of Enterprise Java applications Runs alongside existing.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
SPRING Framework Marcin Sztec.
Java Frameworks Indy Java Users Group January 29, 2003.
Intermediate Spring Matt Wheeler. Notes This is a training NOT a presentation Please ask questions Prerequisites – Introduction to Java Stack – Basic.
Spring Framework. Spring Overview Spring is an open source layered Java/J2EE application framework Created by Rod Johnson Based on book “Expert one-on-one.
Spring Overview, Application demo -Midhila Paineni 09/23/2011 Spring Overview, Application demo9/8/20151.
1 The JNDI ENC and Injection Every EJB container that is deployed in an application server has its own personal internal registry called the Enterprise.
95-843: Service Oriented Architecture 1 Master of Information System Management Service Oriented Architecture Lecture 10: Service Component Architecture.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Understanding the Bean Lifecycle An.
Enterprise JavaBeans. What is EJB? l An EJB is a specialized, non-visual JavaBean that runs on a server. l EJB technology supports application development.
EJB Framework.  As we know, EJB is the center of the J2EE architecture that provides a sturdy framework for building enterprise applications. The major.
TDDD05 EJB Lab (Part of slides reused from Mikhail’s) Lu Li
Spring core v3.x Prepared by: Nhan Le. History v3.0 Spring Expression Language Java based bean metadata v3.1 Cache Abstraction Bean Definition Profile.
|Tecnologie Web L-A Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat
CHEF II / Sakai Architecture. CHEF II Changes uPortal replaces Jetspeed –jsr 168 portlet, servlet compliant Spring replaces Turbine component framework.
Introduction to Spring Matt Wheeler. Notes This is a training NOT a presentation Please ask questions Prerequisites – Introduction to Java Stack – Basic.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Montreal CRIM Workshop Introduction to Spring Framework,
Web Services Management Framework by Umut Bultan & Gül Hünerkar.
Introduction to Web Dimitar Nenchev Ivan Nakov
Ch 2 – Application Assembly and Deployment COSC 617 Jeff Schmitt September 14, 2006.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Introduction to Spring Remoting Simplifying.
Alternative Architectures: Inversion of Control Mike Hadlow mikehadlow.blogspot.com.
INTEGRATION OF BACKBONE.JS WITH SPRING 3.1. Agenda New Features and Enhancements in Spring 3.1 What is Backbone.js and why I should use it Spring 3.1.
Spring Cleaning How to do more with less XML Craig Walls Gateway Software Symposium (St. Louis) September 29, 2007
Spring and DWR Frameworks for Rich Web Enterprise Application Thomas Wiradikusuma Presentation to the 20 th.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
1 Spring Framework April, 2012 Lam Ho Lam To. © 2010 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2 1.Spring Overview 2.Framework.
JAVA EE 6 Best Practices for Migrating Spring to WTF ?!?
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Introduction to Data Access with Spring.
2/25/ Services-based Systems Architecture, Design and Implementation B.Ramamurthy.
EJB Enterprise Java Beans JAVA Enterprise Edition
Understanding Dependency Injection… and those pesky containers Miguel A. Castro Architect -
Introduction to Inversion Of Control (IOC). IOC Definition (based on Wikipedia)  Consider the way in which an object obtains references to its dependencies.
J AVA T RAINING IN A HMEDABAD By TOPS Technologies 1 TOPS Technologies Java Course.
Spring Training Attune University Attune University.
Enterprise Java Beans. Contents  Understanding EJBs  Practice Section.
CS520 Web Programming Spring – Inversion of Control Chengyu Sun California State University, Los Angeles.
Callbacks and Interceptors. Contents  Session Beans Life Cycle  Interceptors.
Chapter 13 Web Application Infrastructure
J2EE Platform Overview (Application Architecture)
J2EE Lecture 6: Spring – IoC and Dependency Injection
Structure of a web application
EJB (Enterprise Java Beans)
CS520 Web Programming Spring – Inversion of Control
Enterprise Java Bean. Overview of EJB View of EJB Conversation Roles in EJB, Types of Enterprise Beans Lifecycle of Beans Developing Applications using.
Inversion of Control and ColdFusion: Using ColdSpring
Mike Dickson Tidal Software
ISE 390 Dynamic Web Development
Distributed System Using Java 2 Enterprise Edition (J2EE)
Understanding and Designing with EJB
Services-based Systems Architecture, Design and Implementation
Could Jiro™ Extend the Jini™ Pattern Lanuguage?
J2EE Lecture 13: JMS and WebSocket
Dependency Injection Mechanism
Presentation transcript:

Spring Fling Phillip Warner

Spring Framework ● Dependency Injection (DI) Framework – “Inversion of Control” ● Facilitates Good Programming Practices ● Facilitates Testing ● Unobtrusive ● Simplifies J2EE/Java EE

Goals ● Let's see some code – Code examples ● Deployment through Spring configuration – XML – Spring configuration examples ● Interesting potential? – What might you do with Spring?

Example 1 – StdoutPrinter ● StdoutPrinter.java – prints to STDOUT ● spring-config.xml – Spring configuration (by setter) ● SpringLoader.java – Spring container Loader ● spring-config-constructor.xml – Spring configuration example (by constructor)

Example 2 – SimpleCalculator ● Operator.java – interface for defining operations ● Add.java, Subtract.java implementations of Operator interface ● Calculator.java – Calculator interface ● SimpleCalculator.java – Calculator implementation. ● SpringLoader.java and AutoSpringLoader.java – Two ways to run the code

Example – VOEvent ● What is VOEvent? – IVOA standard for building and sending XML-based event notices (e.g., SNe, g-ray Bursts, Moving objects) – VOEvent is a broker developed by NOAO ● Provides event publishing, persistence, classification ● Provides event subscription mechanism

Example – VOEvent ● Basic configuration for: – Server/broker ● Publishing, persistence, classification, relay (sending events), and subscription service – Client (author) ● Author events for publication – Client (subscriber) ● Subscription to TCP-based event streams

VOEvent – Classification ● Rules-based ● Spring-configured – For initial implementation—before a database backend and supporting services are provided

VOEvent – Classification (2)

VOEvent – Classification (3)

VOEvent – Classification (4)

Example – Dynamic Workflows

Example – Dynamic Workflows (2)

Spring – Other Features ● Autowiring – Automatic dependency injection ● byType, byName, constructor, autodetect ● Bean scopes – singleton (default), prototype – request, session, global-session (web) – custom

Spring – Other Features ● Annotation-based – Used with auto-wiring, e.g., – tell Spring where the dependency should be injected – (JSR-250) resource injection a la Java EE 5 and (JSR-250) – could be used in legacy or code-based resource allocation – See for more details

Spring – Schema-based Configuration ● – Provides for static definition of: ● Configuration (properties, etc.) ● Collections ● constants – simplifies defining static information – alternative? ● define a bean for each set of information

Spring – Schema-based Configuration ● – Provides for configuration of some Java Enterprise features ● JNDI lookup ● EJB lookup ● – Provides for JMS support ● – Support for Spring's declarative TX management

Spring – Schema-based Configuration ● – Support for AOP (Spring-based) ● – Further support for context configuration ● Spring context, e.g., ApplicationContext ● – Provides support for dynamic languages ● Currently JRuby, Groovy, BSH – Provides support for inlining code

Spring Projects

And so on... For more details, see: