Comparing Spring & Guice

Size: px
Start display at page:

Download "Comparing Spring & Guice"

Transcription

1 Comparing Spring & Guice Bill Dudney Dudney.net Bill Dudney Comparing Spring & Guice Slide 1

2 Dependency Injection WarpSimulator capacitor : FluxCapacitor simulate() : void <<interface>> FluxCapacitor capacitate() : void Mark1Capcitor capacitate() : void Mark2Capcitor capacitate() : void Bill Dudney Comparing Spring & Guice Slide 2

3 Dependency Creation Bill Dudney Comparing Spring & Guice Slide 3

4 Dependency Passing Bill Dudney Comparing Spring & Guice Slide 4

5 Doesn t help... Bill Dudney Comparing Spring & Guice Slide 5

6 Abstract Factory Service capacitate() : void fluxify() : void AbstractFactory createservice() AbstractFactory : Service createmanager() : Manager createservice() : Service createmanager() : Manager Manager MockService MockFactory RealService capacitate() createservice() : void : Service capacitate() : void fluxify() : createmanager() void : Manager fluxify() : void capacitate() RealFactory : void fluxify() : void createservice() : Service createmanager() : Manager RealManager capacitate() : void fluxify() : void MockManager capacitate() : void fluxify() : void Bill Dudney Comparing Spring & Guice Slide 6

7 Service Locator ServiceLocator findservice1() : Service1 uses JndiContext lookup(name : String) : Object Service1 capacitate() : void fluxify() : void uses ServiceFactory getservice1() : Service1 lookup or create Service1Impl capacitate() : void fluxify() : void Bill Dudney Comparing Spring & Guice Slide 7

8 Another Way Dependency Injector connect(interface : Object, destination : Object, method Method) : void WarpSimulator capacitor : FluxCapacitor simulate() : void <<interface>> FluxCapacitor capacitate() : void Mark1Capcitor capacitate() : void Mark2Capcitor capacitate() : void Bill Dudney Comparing Spring & Guice Slide 8

9 Demo Design Bill Dudney Comparing Spring & Guice Slide 9

10 Demo Design Model Account number : String user : User User name : String password : String Bill Dudney Comparing Spring & Guice Slide 10

11 Demo Design Service AccountService createnewaccount(name : String, passwd : String) : Account Bill Dudney Comparing Spring & Guice Slide 11

12 Demo Design DAO AccountDAO getaccount(number : String) : Account createaccount(user:user) : Account UserDAO getuser(username : String) : User createuser(name : String, passwd : String) : User Bill Dudney Comparing Spring & Guice Slide 12

13 Spring Mission Statement Java EE Should be Easier It s best to program to interfaces JavaBeans offer a great way to config apps OO Design is more important than a tech Checked Exceptions are over used Testability is essential Bill Dudney Comparing Spring & Guice Slide 13

14 Spring Kickstart Bill Dudney Comparing Spring & Guice Slide 14

15 Spring Mission Statement Java EE Should be Easier It s best to program to interfaces JavaBeans offer a great way to config apps OO Design is more important than a tech Checked Exceptions are over used Testability is essential Bill Dudney Comparing Spring & Guice Slide 15

16 Spring Context public static void main( String[] args ) { ApplicationContext context = new ClassPathXmlApplicationContext("appCtx.xml"); AccountService service = (AccountService)context. getbean("accountservice"); Account act = service.createnewaccount("bill", "1234"); System.err.println("account = " + act); } Bill Dudney Comparing Spring & Guice Slide 16

17 Spring Context public static void main( String[] args ) { ApplicationContext context = new ClassPathXmlApplicationContext("appCtx.xml"); AccountService service = (AccountService)context. getbean("accountservice"); Account act = service.createnewaccount("bill", "1234"); System.err.println("account = " + act); } Bill Dudney Comparing Spring & Guice Slide 17

18 Spring Context public static void main( String[] args ) { ApplicationContext context = new ClassPathXmlApplicationContext("appCtx.xml"); AccountService service = (AccountService)context. getbean("accountservice"); Account act = service.createnewaccount("bill", "1234"); System.err.println("account = " + act); } Bill Dudney Comparing Spring & Guice Slide 18

19 Spring Context public static void main( String[] args ) { ApplicationContext context = new ClassPathXmlApplicationContext("appCtx.xml"); AccountService service = (AccountService)context. getbean("accountservice"); Account act = service.createnewaccount("bill", "1234"); System.err.println("account = " + act); } Bill Dudney Comparing Spring & Guice Slide 19

20 Account Service public interface AccountService { public Account createnewaccount(string username, String password); } Bill Dudney Comparing Spring & Guice Slide 20

21 Account Service Impl public class AccountServiceImpl implements AccountService { private final AccountDAO accountdao; private final UserDAO userdao; public AccountServiceImpl(AccountDAO accountdao, UserDAO userdao) { super(); this.accountdao = accountdao; this.userdao = userdao; } Bill Dudney Comparing Spring & Guice Slide 21

22 Account Service Impl public Account createnewaccount(string username, String password) { User user = userdao.getuser(username); if(null == user) { user = userdao.createuser(username, password); } Account account = accountdao.createaccount(user); return account; } Bill Dudney Comparing Spring & Guice Slide 22

23 Spring XML <beans> <bean id="userdao" class="com.css.dudney.examples.userdaoimpl" /> <bean id="accountdao" class="com.css.dudney.examples.accountdaoimpl" /> <bean id="accountservice" class="com.css.dudney.examples.accountserviceimpl"> <constructor-arg ref="accountdao"></constructor-arg> <constructor-arg ref="userdao"></constructor-arg> </bean> </beans> Bill Dudney Comparing Spring & Guice Slide 23

24 Guice Uses Annotations for Configuration Bill Dudney Comparing Spring & Guice Slide 24

25 Guice Kickstart Bill Dudney Comparing Spring & Guice Slide 25

26 Guice Bill Dudney Comparing Spring & Guice Slide 26

27 Guice Module public static void main( String[] args ) { GuiceModule module = new GuiceModule(); Injector injector = Guice.createInjector(module); AccountService service = injector. getinstance(accountservice.class); Account act = service.createnewaccount("bill", "1234"); System.err.println("account = " + act); } Bill Dudney Comparing Spring & Guice Slide 27

28 Guice Module public static void main( String[] args ) { GuiceModule module = new GuiceModule(); Injector injector = Guice.createInjector(module); AccountService service = injector. getinstance(accountservice.class); Account act = service.createnewaccount("bill", "1234"); System.err.println("account = " + act); } Bill Dudney Comparing Spring & Guice Slide 28

29 Guice Module public static void main( String[] args ) { GuiceModule module = new GuiceModule(); Injector injector = Guice.createInjector(module); AccountService service = injector. getinstance(accountservice.class); Account act = service.createnewaccount("bill", "1234"); System.err.println("account = " + act); } Bill Dudney Comparing Spring & Guice Slide 29

30 Guice Module public static void main( String[] args ) { GuiceModule module = new GuiceModule(); Injector injector = Guice.createInjector(module); AccountService service = injector. getinstance(accountservice.class); Account act = service.createnewaccount("bill", "1234"); System.err.println("account = " + act); } Bill Dudney Comparing Spring & Guice Slide 30

31 Guice Module public static void main( String[] args ) { GuiceModule module = new GuiceModule(); Injector injector = Guice.createInjector(module); AccountService service = injector. getinstance(accountservice.class); Account act = service.createnewaccount("bill", "1234"); System.err.println("account = " + act); } Bill Dudney Comparing Spring & Guice Slide 31

32 Account public interface AccountService { public Account createnewaccount(string username, String password); } Bill Dudney Comparing Spring & Guice Slide 32

33 Account Service Impl public class AccountServiceImpl implements AccountService { private final AccountDAO accountdao; private final UserDAO public AccountServiceImpl(AccountDAO accountdao, UserDAO userdao) { super(); this.accountdao = accountdao; this.userdao = userdao; } Bill Dudney Comparing Spring & Guice Slide 33

34 Guice Module public class GuiceModule implements Module { public void configure(binder binder) { binder.bind(accountdao.class).to(accountdaoimpl.class). in(scopes.singleton); binder.bind(userdao.class).to(userdaoimpl.class). in(scopes.singleton); binder.bind(accountservice.class).to (AccountServiceImpl.class). in(scopes.singleton); } } Bill Dudney Comparing Spring & Guice Slide 34

35 Multiple Implementations Bill Dudney Comparing Spring & Guice Slide 35

36 Parameter public AccountDAO accountdao, UserDAO userdao) { super(); this.accountdao = accountdao; this.userdao = userdao; } Bill Dudney Comparing Spring & Guice Slide 36

37 Field private AccountDAO accountdao; Bill Dudney Comparing Spring & Guice Slide 37

38 Parameter public AccountDAO accountdao, UserDAO userdao) { super(); this.accountdao = accountdao; this.userdao = userdao; } Bill Dudney Comparing Spring & Guice Slide 38

39 Guice Module public class GuiceModule implements Module { public void configure(binder binder) { binder.bind(accountdao.class).to(accountdaoimpl.class). in(scopes.singleton); binder.bind(userdao.class).to(userdaoimpl.class). in(scopes.singleton); binder.bind(accountservice.class).to (AccountServiceImpl.class). in(scopes.singleton); binder.bind(accountdao.class).annotatedwith (Other.class) to(accountdaoimpl.class).in(scopes.singleton); } } Bill Dudney Comparing Spring & Guice Slide 39

40 Other { } Bill Dudney Comparing Spring & Guice Slide 40

41 Testing Spring Different XML Guice Different Module Bill Dudney Comparing Spring & Guice Slide 41

42 Comparing Guice and Spring are very different Guice is DI Spring is DI and a bunch more Bill Dudney Comparing Spring & Guice Slide 42

43 Spring Pro s Mature Very Widely Deployed Lots of Resource and People Bill Dudney Comparing Spring & Guice Slide 43

44 Spring Con s Editing XML gets old No type saftey Spelunking can be difficult Bill Dudney Comparing Spring & Guice Slide 44

45 Guice Pro s Type Safety for bindings Faster to bind Spelunking is simpler Bill Dudney Comparing Spring & Guice Slide 45

46 Guice Con s Not widely deployed Not many resources Not many people that know it Not as widely integrated Bill Dudney Comparing Spring & Guice Slide 46

47 Conclusion Bill Dudney Comparing Spring & Guice Slide 47

Spring Framework. Christoph Pickl

Spring Framework. Christoph Pickl Spring Framework Christoph Pickl agenda 1. short introduction 2. basic declaration 3. medieval times 4. advanced features 5. demo short introduction common tool stack Log4j Maven Spring Code Checkstyle

More information

Big Modular Java with Guice

Big Modular Java with Guice Big Modular Java with Guice Jesse Wilson Dhanji Prasanna May 28, 2009 Post your questions for this talk on Google Moderator: code.google.com/events/io/questions Click on the Tech Talks Q&A link. 2 How

More information

Design Patterns. Dependency Injection. Oliver Haase

Design Patterns. Dependency Injection. Oliver Haase Design Patterns Dependency Injection Oliver Haase 1 Motivation A simple, motivating example (by Martin Fowler): public interface MovieFinder { /** * returns all movies of this finder s source * @return

More information

Dan Hayes. October 27, 2005

Dan Hayes. October 27, 2005 Spring Introduction and Dependency Injection Dan Hayes October 27, 2005 Agenda Introduction to Spring The BeanFactory The Application Context Inversion of Control Bean Lifecyle and Callbacks Introduction

More information

Copyright Descriptor Systems, Course materials may not be reproduced in whole or in part without prior written consent of Joel Barnum

Copyright Descriptor Systems, Course materials may not be reproduced in whole or in part without prior written consent of Joel Barnum Copyright Descriptor Systems, 2001-2010. Course materials may not be reproduced in whole or in part without prior written consent of Joel Barnum Copyright Descriptor Systems, 2001-2010. Course materials

More information

Dependency Injection with Guice

Dependency Injection with Guice Author: Assaf Israel - Technion 2013 Dependency Injection with Guice Technion Institute of Technology 236700 1 Complex Dependency Injection Deep dependencies (with no default) A depends on B, which depends

More information

Java EE Application Assembly & Deployment Packaging Applications, Java EE modules. Model View Controller (MVC)2 Architecture & Packaging EJB Module

Java EE Application Assembly & Deployment Packaging Applications, Java EE modules. Model View Controller (MVC)2 Architecture & Packaging EJB Module Java Platform, Enterprise Edition 5 (Java EE 5) Core Java EE Java EE 5 Platform Overview Java EE Platform Distributed Multi tiered Applications Java EE Web & Business Components Java EE Containers services

More information

Guice. Java DI Framework

Guice. Java DI Framework Guice Java DI Framework Agenda Intro to dependency injection Cross-cutting concerns and aspectoriented programming More Guice What is DI? Dependency injection is a design pattern that's like a "super factory".

More information

injection, objects and aspects

injection, objects and aspects Improving code with dependency injection, objects and aspects Chris Richardson Chris Richardson Consulting, Inc http://www.chrisrichardson.net h h 9/21/2007 Copyright (c) 2007 Chris Richardson. All rights

More information

Spring Soup with OC4J and MBeans

Spring Soup with OC4J and MBeans Spring Soup with OC4J and MBeans Steve Button 4/27/2007 The Spring Framework includes support for dynamically exposing Spring Beans as managed resources (MBeans) in a JMX environment. Exposing Spring Beans

More information

CONFIGURING A SPRING DEVELOPMENT ENVIRONMENT

CONFIGURING A SPRING DEVELOPMENT ENVIRONMENT Module 5 CONFIGURING A SPRING DEVELOPMENT ENVIRONMENT The Spring Framework > The Spring framework (spring.io) is a comprehensive Java SE/Java EE application framework > Spring addresses many aspects of

More information

Spring Framework 2.5: New and Notable. Ben Alex, Principal Software Engineer, SpringSource

Spring Framework 2.5: New and Notable. Ben Alex, Principal Software Engineer, SpringSource Spring Framework 2.5: New and Notable Ben Alex, Principal Software Engineer, SpringSource GOAL> Learn what s new in Spring 2.5 and why it matters to you springsource.com 2 Agenda Goals of Spring 2.5 Support

More information

Chapter 13. Hibernate with Spring

Chapter 13. Hibernate with Spring Chapter 13. Hibernate with Spring What Is Spring? Writing a Data Access Object (DAO) Creating an Application Context Putting It All Together 1 / 24 What is Spring? The Spring Framework is an Inversion

More information

Кирилл Розов Android Developer

Кирилл Розов Android Developer Кирилл Розов Android Developer Dependency Injection Inversion of Control (IoC) is a design principle in which custom-written portions of a computer program receive the flow of control from a generic framework

More information

Specialized - Mastering Spring 4.2

Specialized - Mastering Spring 4.2 Specialized - Mastering Spring 4.2 Code: Lengt h: URL: TT3330-S4 5 days View Online The Spring framework is an application framework that provides a lightweight container that supports the creation of

More information

Croquet. William R. Speirs, Ph.D. Founder & CEO of Metrink

Croquet. William R. Speirs, Ph.D. Founder & CEO of Metrink Croquet William R. Speirs, Ph.D. (wspeirs@metrink.com) Founder & CEO of Metrink About Me BS in CS from Rensselaer; PhD from Purdue Founder and CEO of Metrink (www.metrink.com) Simple yet powerful query

More information

Concepts: business logic and middleware

Concepts: business logic and middleware Concepts: business logic and middleware Business logic (Dalykinis funkcionalumas) models real life business objects is part of functional requirements, creates essential added value that customer is willing

More information

JAVA COURSES. Empowering Innovation. DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP

JAVA COURSES. Empowering Innovation. DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP 2013 Empowering Innovation DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP contact@dninfotech.com www.dninfotech.com 1 JAVA 500: Core JAVA Java Programming Overview Applications Compiler Class Libraries

More information

Dependency Injection and Aspect- Oi Oriented Programming

Dependency Injection and Aspect- Oi Oriented Programming Improving Your Code with Dependency Injection and Aspect- Oi Oriented Programming Chris Richardson Author of POJOs in Action Chris Richardson Consulting, Inc http://www.chrisrichardson.net Slide 1 Overall

More information

MyBatis-Spring Reference Documentation

MyBatis-Spring Reference Documentation MyBatis-Spring 1.0.2 - Reference Documentation The MyBatis Community (MyBatis.org) Copyright 2010 Copies of this document may be made for your own use and for distribution to others, provided that you

More information

Seam 3. Pete Muir JBoss, a Division of Red Hat

Seam 3. Pete Muir JBoss, a Division of Red Hat Seam 3 Pete Muir JBoss, a Division of Red Hat Road Map Introduction Java EE 6 Java Contexts and Dependency Injection Seam 3 Mission Statement To provide a fully integrated development platform for building

More information

PATTERNS & BEST PRACTICES FOR CDI

PATTERNS & BEST PRACTICES FOR CDI PATTERNS & BEST PRACTICES FOR CDI SESSION 20181 Ryan Cuprak e-formulation Analyst, Author, Connecticut Java Users Group President Reza Rahman Resin Developer, Java EE/EJB/JMS JCP expert, Author EJB 3 in

More information

Dependency Inversion, Dependency Injection and Inversion of Control. Dependency Inversion Principle by Robert Martin of Agile Fame

Dependency Inversion, Dependency Injection and Inversion of Control. Dependency Inversion Principle by Robert Martin of Agile Fame Dependency Inversion, Dependency Injection and Inversion of Control Dependency Inversion Principle by Robert Martin of Agile Fame Dependency Inversion Principle History Postulated by Robert C. Martin Described

More information

JBoss World 2009 Marius Bogoevici

JBoss World 2009 Marius Bogoevici 1 Spring on JBoss Marius Bogoevici Senior Software Engineer, Red Hat September 2 nd, 2009 2 About the presenter: Marius Bogoevici - mariusb@redhat.com Senior Software Engineer at Red Hat Lead for Snowdrop,

More information

For this week, I recommend studying Chapter 2 of "Beginning Java EE 7".

For this week, I recommend studying Chapter 2 of Beginning Java EE 7. For this week, I recommend studying Chapter 2 of "Beginning Java EE 7". http://find.lib.uts.edu.au/?r=opac_b2874770 261 We have been using a few container services and annotations but they have not been

More information

Web Application Development Using Spring, Hibernate and JPA

Web Application Development Using Spring, Hibernate and JPA Web Application Development Using Spring, Hibernate and JPA Duration: 5 Days Price: 1,995 + VAT Course Description: This course provides a comprehensive introduction to JPA (the Java Persistence API),

More information

Desarrollo de Aplicaciones Web Empresariales con Spring 4

Desarrollo de Aplicaciones Web Empresariales con Spring 4 Desarrollo de Aplicaciones Web Empresariales con Spring 4 Referencia JJD 296 Duración (horas) 30 Última actualización 8 marzo 2018 Modalidades Presencial, OpenClass, a medida Introducción Over the years,

More information

Seasar2.3. Yasuo Higa Seasar Foundation/Chief Committer Translated by:h.ozawa

Seasar2.3. Yasuo Higa Seasar Foundation/Chief Committer   Translated by:h.ozawa Seasar2.3 Yasuo Higa Seasar Foundation/Chief Committer http://www.seasar.org/en 1 I want to ask this question to every developer in the world, DO YOU REALLY WANT TO WRITE CONFIGURATION FILES? Seasar2 saves

More information

Shale and the Java Persistence Architecture. Craig McClanahan Gary Van Matre. ApacheCon US 2006 Austin, TX

Shale and the Java Persistence Architecture. Craig McClanahan Gary Van Matre. ApacheCon US 2006 Austin, TX Shale and the Java Persistence Architecture Craig McClanahan Gary Van Matre ApacheCon US 2006 Austin, TX 1 Agenda The Apache Shale Framework Java Persistence Architecture Design Patterns for Combining

More information

Dependency Injection. Kenneth M. Anderson University of Colorado, Boulder Lecture 30 CSCI 4448/ /08/11

Dependency Injection. Kenneth M. Anderson University of Colorado, Boulder Lecture 30 CSCI 4448/ /08/11 Dependency Injection Kenneth M. Anderson University of Colorado, Boulder Lecture 30 CSCI 4448/5448 12/08/11 1 Goals of the Lecture Introduce the topic of dependency injection See examples using the Spring

More information

Spring Dependency Injection & Java 5

Spring Dependency Injection & Java 5 Spring Dependency Injection & Java 5 Alef Arendsen Introductions Alef Arendsen Spring committer since 2003 Now Principal at SpringSource (NL) 2 3 Imagine A big pile of car parts Workers running around

More information

JVA-117A. Spring-MVC Web Applications

JVA-117A. Spring-MVC Web Applications JVA-117A. Spring-MVC Web Applications Version 4.2 This course enables the experienced Java developer to use the Spring application framework to manage objects in a lightweight, inversion-of-control container,

More information

Enterprise AOP With the Spring Framework

Enterprise AOP With the Spring Framework Enterprise AOP With the Spring Framework Jürgen Höller VP & Distinguished Engineer, Interface21 Agenda Spring Core Container Spring AOP Framework AOP in Spring 2.0 Example: Transaction Advice What's Coming

More information

Migrating traditional Java EE applications to mobile

Migrating traditional Java EE applications to mobile Migrating traditional Java EE applications to mobile Serge Pagop Sr. Channel MW Solution Architect, Red Hat spagop@redhat.com Burr Sutter Product Management Director, Red Hat bsutter@redhat.com 2014-04-16

More information

CS410J: Advanced Java Programming

CS410J: Advanced Java Programming CS410J: Advanced Java Programming The Dependency Injection design pattern decouples dependent objects so that they may be configured and tested independently. Google Guice manages dependencies among objects

More information

Dependency Injection and Spring. INF5750/ Lecture 2 (Part II)

Dependency Injection and Spring. INF5750/ Lecture 2 (Part II) Dependency Injection and Spring INF5750/9750 - Lecture 2 (Part II) Problem area Large software contains huge number of classes that work together How to wire classes together? With a kind of loose coupling,

More information

Integrated Architecture for Web Application Development Based on Spring Framework and Activiti Engine

Integrated Architecture for Web Application Development Based on Spring Framework and Activiti Engine Integrated Architecture for Web Application Development Based on Spring Framework and Activiti Engine Xiujin Shi,Kuikui Liu,Yue Li School of Computer Science and Technology Donghua University Shanghai,

More information

Introduction to Spring Framework: Hibernate, Spring MVC & REST

Introduction to Spring Framework: Hibernate, Spring MVC & REST Introduction to Spring Framework: Hibernate, Spring MVC & REST Training domain: Software Engineering Number of modules: 1 Duration of the training: 36 hours Sofia, 2017 Copyright 2003-2017 IPT Intellectual

More information

Embrace Factories Factories. By Rob Gonda

Embrace Factories Factories. By Rob Gonda Embrace Factories Factories By Rob Gonda Brief History of OOP for CF Once upon a time Procedural Code Spaghetti Code Organized a) Includes b) Modules OOP / CFC (mx+) Objects as containers The Big Object

More information

purequery Deep Dive Part 2: Data Access Development Dan Galvin Galvin Consulting, Inc.

purequery Deep Dive Part 2: Data Access Development Dan Galvin Galvin Consulting, Inc. purequery Deep Dive Part 2: Data Access Development Dan Galvin Galvin Consulting, Inc. Agenda The Problem Data Access in Java What is purequery? How Could purequery Help within My Data Access Architecture?

More information

1. Spring 整合 Jdbc 进行持久层开发

1. Spring 整合 Jdbc 进行持久层开发 本章学习目标 小风 Java 实战系列教程 Spring 整合 Jdbc 进行持久层开发 Spring 事务管理的 XML 方式 Spring 事务管理的注解方式 Spring 事务管理的零配置方式 1. Spring 整合 Jdbc 进行持久层开发 1.1. JdbcTemplate 的基本使用 JdbcTemplate 类是 Spring 框架提供用于整合 Jdcb 技术的工具类 这个工具类提

More information

Web Application Development Using Spring, Hibernate and JPA

Web Application Development Using Spring, Hibernate and JPA Web Application Development Using Spring, Hibernate and JPA Duration: 5 Days US Price: $2795 UK Price: 1,995 *Prices are subject to VAT CA Price: CDN$3,275 *Prices are subject to GST/HST Delivery Options:

More information

Available as a PDF Electronic Book or Print On Demand. Google. Guice. Agile Lightweight Dependency Injection Framework.

Available as a PDF Electronic Book or Print On Demand. Google. Guice. Agile Lightweight Dependency Injection Framework. Available as a PDF Electronic Book or Print On Demand Google Guice Agile Lightweight Dependency Injection Framework Robbie Vanbrabant 180 pages About firstpress Apress's firstpress series is your source

More information

Business Logic and Spring Framework

Business Logic and Spring Framework Business Logic and Spring Framework Petr Křemen petr.kremen@fel.cvut.cz Winter Term 2017 Petr Křemen (petr.kremen@fel.cvut.cz) Business Logic and Spring Framework Winter Term 2017 1 / 32 Contents 1 Business

More information

Introducing the Spring framework

Introducing the Spring framework Chair of Software Engineering Languages in Depth Series: Java Programming Prof. Dr. Bertrand Meyer Introducing the Spring framework Marco Piccioni Yet another framework? It addresses areas that other frameworks

More information

JVA-117E. Developing RESTful Services with Spring

JVA-117E. Developing RESTful Services with Spring JVA-117E. Developing RESTful Services with Spring Version 4.1 This course enables the experienced Java developer to use the Spring MVC framework to create RESTful web services. We begin by developing fluency

More information

Fast Track to Spring 3 and Spring MVC / Web Flow

Fast Track to Spring 3 and Spring MVC / Web Flow Duration: 5 days Fast Track to Spring 3 and Spring MVC / Web Flow Description Spring is a lightweight Java framework for building enterprise applications. Its Core module allows you to manage the lifecycle

More information

Improve and Expand JavaServer Faces Technology with JBoss Seam

Improve and Expand JavaServer Faces Technology with JBoss Seam Improve and Expand JavaServer Faces Technology with JBoss Seam Michael Yuan Kito D. Mann Product Manager, Red Hat Author, JSF in Action http://www.michaelyuan.com/seam/ Principal Consultant Virtua, Inc.

More information

Struts: Struts 1.x. Introduction. Enterprise Application

Struts: Struts 1.x. Introduction. Enterprise Application Struts: Introduction Enterprise Application System logical layers a) Presentation layer b) Business processing layer c) Data Storage and access layer System Architecture a) 1-tier Architecture b) 2-tier

More information

Information systems modeling. Tomasz Kubik

Information systems modeling. Tomasz Kubik Information systems modeling Tomasz Kubik Data Access Objects Pattern https://www.tutorialspoint.com/design_pattern/data_access_object_pattern.htm Spring framework https://projects.spring.io/spring-framework/

More information

Spring & Hibernate. Knowledge of database. And basic Knowledge of web application development. Module 1: Spring Basics

Spring & Hibernate. Knowledge of database. And basic Knowledge of web application development. Module 1: Spring Basics Spring & Hibernate Overview: The spring framework is an application framework that provides a lightweight container that supports the creation of simple-to-complex components in a non-invasive fashion.

More information

Web Application Development Using Spring, Hibernate and JPA

Web Application Development Using Spring, Hibernate and JPA Web Application Development Using Spring, Hibernate and JPA Duration: 5 Days Price: CDN$3275 *Prices are subject to GST/HST Course Description: This course provides a comprehensive introduction to JPA

More information

Sitesbay.com. A Perfect Place for All Tutorials Resources. Java Projects C C++ DS Interview Questions JavaScript

Sitesbay.com.  A Perfect Place for All Tutorials Resources. Java Projects C C++ DS Interview Questions JavaScript Sitesbay.com A Perfect Place for All Tutorials Resources Java Projects C C++ DS Interview Questions JavaScript Core Java Servlet JSP JDBC Struts Hibernate Spring Java Projects C C++ DS Interview Questions

More information

Core Capabilities Part 3

Core Capabilities Part 3 2008 coreservlets.com The Spring Framework: Core Capabilities Part 3 Originals of Slides and Source Code for Examples: http://courses.coreservlets.com/course-materials/spring.html Customized Java EE Training:

More information

Java Technologies. Lecture III. Valdas Rapševičius. Vilnius University Faculty of Mathematics and Informatics

Java Technologies. Lecture III. Valdas Rapševičius. Vilnius University Faculty of Mathematics and Informatics Preparation of the material was supported by the project Increasing Internationality in Study Programs of the Department of Computer Science II, project number VP1 2.2 ŠMM-07-K-02-070, funded by The European

More information

Patterns and Best Practices for dynamic OSGi Applications

Patterns and Best Practices for dynamic OSGi Applications Patterns and Best Practices for dynamic OSGi Applications Kai Tödter, Siemens Corporate Technology Gerd Wütherich, Freelancer Martin Lippert, akquinet it-agile GmbH Agenda» Dynamic OSGi applications» Basics»

More information

Introduction to Spring 5, Spring MVC and Spring REST

Introduction to Spring 5, Spring MVC and Spring REST Introduction to Spring 5, Spring MVC and Spring REST Duration: 5 Days US Price: $2795 UK Price: 1,995 *Prices are subject to VAT CA Price: CDN$3,275 *Prices are subject to GST/HST Delivery Options: Attend

More information

Designing for Modularity with Java 9

Designing for Modularity with Java 9 Designing for Modularity with Java 9 Paul Bakker @pbakker Sander Mak @Sander_Mak Today's journey Module primer Services & DI Modular design Layers & loading Designing for Modularity with Java 9 What if

More information

Enterprise Java TM Web Apps with Google Open Source Technology

Enterprise Java TM Web Apps with Google Open Source Technology Enterprise Java TM Web Apps with Google Open Source Technology Dhanji R. Prasanna Google, Inc. Dhanji R. Prasanna Software Engineer at Google > Co-author JAX-RS: Java API for RESTful Web Services JSR-303:

More information

Pieter van den Hombergh Stefan Sobek. April 18, 2018

Pieter van den Hombergh Stefan Sobek. April 18, 2018 Pieter van den Hombergh Stefan Sobek Fontys Hogeschool voor Techniek en Logistiek April 18, 2018 /FHTenL April 18, 2018 1/13 To mock or not to mock In many cases, a class (system under test or SUT) does

More information

Spring BlazeDS Integration. Jeremy Grelle SpringSource, a Division of VMware

Spring BlazeDS Integration. Jeremy Grelle SpringSource, a Division of VMware Spring BlazeDS Integration Jeremy Grelle SpringSource, a Division of VMware Agenda Spring Intro Spring + Flex BlazeDS and LiveCycle Data Services Overview Remoting Review Spring BlazeDS Integration Future

More information

Advanced Web Systems 5- Designing Complex Applications. -The IOC Pattern -Light Weight Container. A. Venturini

Advanced Web Systems 5- Designing Complex Applications. -The IOC Pattern -Light Weight Container. A. Venturini Advanced Web Systems 5- Designing Complex Applications -The IOC Pattern -Light Weight Container A. Venturini Introduction Design and maintainability issues The Inversion of Control Pattern How IoC solves

More information

Snowdrop 1.0 User Guide

Snowdrop 1.0 User Guide Snowdrop 1.0 User Guide by Marius Bogoevici and Aleš Justin What This Guide Covers... v 1. Introduction... 1 1.1. Structure of the package... 1 2. Component usage... 3 2.1. The VFS-supporting application

More information

Metadata driven component development. using Beanlet

Metadata driven component development. using Beanlet Metadata driven component development using Beanlet What is metadata driven component development? It s all about POJOs and IoC Use Plain Old Java Objects to focus on business logic, and business logic

More information

Modular Java Applications with Spring, dm Server and OSGi

Modular Java Applications with Spring, dm Server and OSGi Modular Java Applications with Spring, dm Server and OSGi Copyright 2005-2008 SpringSource. Copying, publishing or distributing without express written permission is prohibit Topics in this session Introduction

More information

GAVIN KING RED HAT CEYLON SWARM

GAVIN KING RED HAT CEYLON SWARM GAVIN KING RED HAT CEYLON SWARM CEYLON PROJECT A relatively new programming language which features: a powerful and extremely elegant static type system built-in modularity support for multiple virtual

More information

GlassFish V3. Jerome Dochez. Sun Microsystems, Inc. hk2.dev.java.net, glassfish.dev.java.net. Session ID YOUR LOGO HERE

GlassFish V3. Jerome Dochez. Sun Microsystems, Inc. hk2.dev.java.net, glassfish.dev.java.net. Session ID YOUR LOGO HERE YOUR LOGO HERE GlassFish V3 Jerome Dochez Sun Microsystems, Inc. hk2.dev.java.net, glassfish.dev.java.net Session ID 1 Goal of Your Talk What Your Audience Will Gain Learn how the GlassFish V3 groundbreaking

More information

Page 1

Page 1 Java 1. Core java a. Core Java Programming Introduction of Java Introduction to Java; features of Java Comparison with C and C++ Download and install JDK/JRE (Environment variables set up) The JDK Directory

More information

Design patterns using Spring and Guice

Design patterns using Spring and Guice Design patterns using Spring and Guice Dhanji R. Prasanna MANNING contents 1 Dependency 2 Time preface xv acknowledgments xvii about this book xix about the cover illustration xxii injection: what s all

More information

What is it? CMSC 433 Programming Language Technologies and Paradigms Spring Approach 1. Disadvantage of Approach 1

What is it? CMSC 433 Programming Language Technologies and Paradigms Spring Approach 1. Disadvantage of Approach 1 CMSC 433 Programming Language Technologies and Paradigms Spring 2007 Singleton Pattern Mar. 13, 2007 What is it? If you need to make sure that there can be one and only one instance of a class. For example,

More information

Manning Publications Co. Please post comments or corrections to the Author Online forum:

Manning Publications Co. Please post comments or corrections to the Author Online forum: 2 Manning Publications Co. MEAP Edition Manning Early Access Program Copyright 2010 Manning Publications For more information on this and other Manning titles go to www.manning.com Table of Contents Spring

More information

POJOs to the rescue. Easier and faster development with POJOs and lightweight frameworks

POJOs to the rescue. Easier and faster development with POJOs and lightweight frameworks POJOs to the rescue Easier and faster development with POJOs and lightweight frameworks by Chris Richardson cer@acm.org http://chris-richardson.blog-city.com 1 Who am I? Twenty years of software development

More information

Pieter van den Hombergh Thijs Dorssers Richard van den Ham. May 17, 2018

Pieter van den Hombergh Thijs Dorssers Richard van den Ham. May 17, 2018 And And Pieter van den Hombergh Thijs Dorssers Richard van den Ham Fontys Hogeschool voor Techniek en Logistiek May 17, 2018 /FHTenL And May 17, 2018 1/14 And in /FHTenL And May 17, 2018 2/14 What is reflection

More information

Introduction to Spring

Introduction to Spring Introduction to Spring Version 4.1 Instructor s Guide Copyright 2006-2015 Capstone Courseware, LLC. All rights reserved. Overview This course provides an overview of Spring, wandering onto the territory

More information

Java EE 7: Back-End Server Application Development

Java EE 7: Back-End Server Application Development Oracle University Contact Us: Local: 0845 777 7 711 Intl: +44 845 777 7 711 Java EE 7: Back-End Server Application Development Duration: 5 Days What you will learn The Java EE 7: Back-End Server Application

More information

Sun Java Studio Creator. Ken Paulsen Staff Engineer Sun Microsystems, Incorporated (Slides by: Craig R. McClanahan)

Sun Java Studio Creator. Ken Paulsen Staff Engineer Sun Microsystems, Incorporated (Slides by: Craig R. McClanahan) Sun Java Studio Creator Ken Paulsen Staff Engineer Sun Microsystems, Incorporated (Slides by: Craig R. McClanahan) Agenda Background Developer characteristics Corporate developers Sun Java Studio Creator

More information

Annotation Hammer Venkat Subramaniam (Also published at

Annotation Hammer Venkat Subramaniam (Also published at Annotation Hammer Venkat Subramaniam venkats@agiledeveloper.com (Also published at http://www.infoq.com) Abstract Annotations in Java 5 provide a very powerful metadata mechanism. Yet, like anything else,

More information

Java EE 5 Development for WebSphere Application Server V7

Java EE 5 Development for WebSphere Application Server V7 Java EE 5 Development for WebSphere Application Server V7 Durée: 4 Jours Réf de cours: WD370G Résumé: This 4-day instructor-led course teaches students the new features of Java Platform, Enterprise Edition

More information

Unit 1 3 Dependency Injection & Inversion of Control

Unit 1 3 Dependency Injection & Inversion of Control Unit 1 3 Dependency Injection & Inversion of Control This is a free chapter from our CBOX202: WireBox Dependency Injection course (www.coldbox.org/courses/cbox202) and is freely donated to the ColdFusion

More information

Agenda. SOA defined Introduction to XFire A JSR 181 Service Other stuff Questions

Agenda. SOA defined Introduction to XFire A JSR 181 Service Other stuff Questions SOA Today with Agenda SOA defined Introduction to XFire A JSR 181 Service Other stuff Questions Service Oriented 1. to orient around services 2. buzzword 3.... Service oriented is NOT (but can be) NEW

More information

Improving Application Design

Improving Application Design Improving Application Design with a Rich Domain Model Chris Richardson Author of POJOs in Action Chris Richardson Consulting, Inc http://www.chrisrichardson.net p// 3/31/2008 Slide 1 Overall presentation

More information

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX Duration: 5 Days US Price: $2795 UK Price: 1,995 *Prices are subject to VAT CA Price: CDN$3,275 *Prices are subject

More information

CSE 530A. DAOs and MVC. Washington University Fall 2012

CSE 530A. DAOs and MVC. Washington University Fall 2012 CSE 530A DAOs and MVC Washington University Fall 2012 Model Object Example public class User { private Long id; private String username; private String password; public Long getid() { return id; public

More information

Introduction to Spring Framework: Hibernate, Web MVC & REST

Introduction to Spring Framework: Hibernate, Web MVC & REST Introduction to Spring Framework: Hibernate, Web MVC & REST Course domain: Software Engineering Number of modules: 1 Duration of the course: 50 hours Sofia, 2017 Copyright 2003-2017 IPT Intellectual Products

More information

Dependency Injection & Design Principles Recap Reid Holmes

Dependency Injection & Design Principles Recap Reid Holmes Material and some slide content from: - Krzysztof Czarnecki - Ian Sommerville - Head First Design Patterns Dependency Injection & Design Principles Recap Reid Holmes REID HOLMES - SE2: SOFTWARE DESIGN

More information

Red Hat JBoss Fuse Service Works Integration Recipes, Best Practices & Cheat Codes

Red Hat JBoss Fuse Service Works Integration Recipes, Best Practices & Cheat Codes Red Hat JBoss Fuse Service Works Integration Recipes, Best Practices & Cheat Codes Keith Babo SwitchYard Project Lead, Red Hat There is Still Time To Leave We will be talking integration and SOA If your

More information

Comparing Application Frameworks. Sean A Corfield An Architect's View

Comparing Application Frameworks. Sean A Corfield An Architect's View Comparing Application Frameworks Sean A Corfield An Architect's View http://corfield.org/ sean@corfield.org Goals Introduce you to three frameworks Use a sample application to show how frameworks help

More information

Splitting the pattern into the model (this stores and manipulates the data and executes all business rules).

Splitting the pattern into the model (this stores and manipulates the data and executes all business rules). Tutorial 3 Answers Comp319 Software Engineering Object patterns Model View Controller Splitting the pattern into the model (this stores and manipulates the data and executes all business rules). View Controller

More information

Fast Track to Spring 3 and Spring Web Flow 2.1

Fast Track to Spring 3 and Spring Web Flow 2.1 Fast Track to Spring 3 and Spring Web Flow 2.1 on Tomcat/Eclipse LearningPatterns, Inc. Courseware Student Guide This material is copyrighted by LearningPatterns Inc. This content and shall not be reproduced,

More information

Single Page Applications using AngularJS

Single Page Applications using AngularJS Single Page Applications using AngularJS About Your Instructor Session Objectives History of AngularJS Introduction & Features of AngularJS Why AngularJS Single Page Application and its challenges Data

More information

Spring JavaConfig. Reference Documentation. version 1.0-m Rod Johnson, Costin Leau. Copyright (c) Interface21

Spring JavaConfig. Reference Documentation. version 1.0-m Rod Johnson, Costin Leau. Copyright (c) Interface21 Spring JavaConfig Reference Documentation version 1.0-m2 2007.05.08 Rod Johnson, Costin Leau Copyright (c) 2005-2007 Interface21 Copies of this document may be made for your own use and for distribution

More information

TheServerSide.com. Dependency Injection in Java EE 6: Conversations (Part 4) Dependency Injection in Java EE 6 (Part 4) by Reza Rahman

TheServerSide.com. Dependency Injection in Java EE 6: Conversations (Part 4) Dependency Injection in Java EE 6 (Part 4) by Reza Rahman TheServerSide.com Dependency Injection in Java EE 6: Conversations (Part 4) Dependency Injection in Java EE 6 (Part 4) by Reza Rahman This series of articles introduces Contexts and Dependency Injection

More information

Web Application Development Using JEE, Enterprise JavaBeans and JPA

Web Application Development Using JEE, Enterprise JavaBeans and JPA Web Application Development Using JEE, Enterprise Java and JPA Duration: 35 hours Price: $750 Delivery Option: Attend training via an on-demand, self-paced platform paired with personal instructor facilitation.

More information

Apache OpenWebBeans and DeltaSpike Deep Dive Mark Struberg Gerhard Petracek

Apache OpenWebBeans and DeltaSpike Deep Dive Mark Struberg Gerhard Petracek CDI @ Apache OpenWebBeans and DeltaSpike Deep Dive Mark Struberg Gerhard Petracek Agenda CDI and its terms Why OpenWebBeans? Portable CDI Extensions CDI by example with DeltaSpike CDI is a... JCP specification

More information

TheServerSide.com. Part 3 of dependency injection in Java EE 6

TheServerSide.com. Part 3 of dependency injection in Java EE 6 TheServerSide.com Part 3 of dependency injection in Java EE 6 This series of articles introduces Contexts and Dependency Injection for Java EE (CDI), a key part of the Java EE 6 platform. Standardized

More information

RobertaLab: Configuration, Architecture, Frameworks, Design

RobertaLab: Configuration, Architecture, Frameworks, Design Roberta Seite 1 RobertaLab: Configuration, Architecture, Frameworks, Design reinhard.budde at iais.fraunhofer.de version 0.3 002014 12:57 Overview The system consists out of three distributed components,

More information

OSGi & Spring combined

OSGi & Spring combined OSGi & Spring combined Using Spring together with Eclipse Equinox Bernd Kolb b.kolb@kolbware.de http://www.kolbware.de Gerd Wütherich gerd@wuetherich.de http://www.wuetherich.de Martin Lippert lippert@acm.org

More information

JVA-163. Enterprise JavaBeans

JVA-163. Enterprise JavaBeans JVA-163. Enterprise JavaBeans Version 3.0.2 This course gives the experienced Java developer a thorough grounding in Enterprise JavaBeans -- the Java EE standard for scalable, secure, and transactional

More information

Spring and Coherence Recipes

Spring and Coherence Recipes Spring and Coherence Recipes David Whitmarsh, Phil Wheeler December 4, 2013 Outline 1 IoC Frameworks 2 Problems with Spring and Coherence 3 ApplicationContexts 4 LifeCycle 5 Bean Definition and Injection

More information

The 1st Java professional open source Convention Israel 2006

The 1st Java professional open source Convention Israel 2006 The 1st Java professional open source Convention Israel 2006 The Next Generation of EJB Development Frederic Simon AlphaCSP Agenda Standards, Open Source & EJB 3.0 Tiger (Java 5) & JEE What is EJB 3.0

More information