Copyright 2006, Codeguild, Inc Spring Framework Fundamentals March, 2006 Larry Hamel Codeguild, Inc.

Slides:



Advertisements
Similar presentations
Introduction to the Spring Framework
Advertisements

Spring, Hibernate and Web Services 13 th September 2014.
Introduction to the Spring Framework University of Kansas January 2009 This presentation and example application are available at
Introduction to Spring Matt Wheeler. Notes This is a training NOT a presentation Please ask questions Prerequisites – Introduction to Java Stack – Basic.
Aspect-Oriented Programming In Eclipse ® Aspect-Oriented Programming in Eclipse with AspectJ Dr Helen Hawkins and Sian January.
Review Amit Shabtay. March 3rd, 2004 Object Oriented Design Course 2 Review What have we done during the course? Where to learn more? What is for the.
ASPECT ORIENTED SOFTWARE DEVELOPMENT Prepared By: Ebru Doğan.
Review David Rabinowitz. March 3rd, 2004 Object Oriented Design Course 2 Review What have we done during the course? Which topics we have not discussed?
An Introduction To the Spring M.V.C. Framework Reference From Website By Tom Kochanowicz.
Best Practices in Java Development JA-SIG Summer Conference Denver, CO June 24 – 27, 2007.
The Spring Framework: A brief introduction to Inversion of Control James Brundege
Last Update: 5/15/061 Spring J2EE Framework Ram A. Rao May 15 th ‘05.
Using Third-Party Frameworks in Building Blocks™ David Ashman Principal Architect, Product Development.
An Introduction to Hibernate Matt Secoske
The Spring Framework A quick overview. The Spring Framework 1. Spring principles: IoC 2. Spring principles: AOP 3. A handful of services 4. A MVC framework.
Spring Framework Adam Waldal Senior Consultant. About me..  OPI is a leader in J2EE consulting with Relationships with BEA, IBM, Tibco, and many other.
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
Dependency Injection and Model-View-Controller. Overview Inversion of Control Model-View-Controller.
Java Server Faces St. Louis JavaSIG June 8, 2006 Jay Meyer, Harpoon Technologies.
Outline Introduction Problem Statement Object-Oriented Design Aspect-Oriented Design Conclusion Demo.
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.
Introduction to the Spring Framework By: Nigusse A. Duguma Kansas State university Department of Computer Science Nov 20, 2007.
Spring Overview, Application demo -Midhila Paineni 09/23/2011 Spring Overview, Application demo9/8/20151.
Spring. Spring Overview Spring Container Concepts Spring and AOP Spring and Data Access Managing Transactions and Resources Remoting and Accessing Enterprise.
The Spring Framework Training Get to know Spring Framework Rohit Prabhakar
Introduction to the Spring Framework Rajesh. Spring Mission Statement J2EE should be easier to use OO design is more important than any implementation.
Traditional Web Based Application Structure Frameworks define how the application is designed, organised and deployed across various tiers.
Introduction to Aspect Oriented Programming Presented By: Kotaiah Choudary. Ravipati M.Tech IInd Year. School of Info. Tech.
Todd Snyder Development Team Lead Infragistics Experience Design Group.
Copyright (C) 2009 by Abdelmonaim Remani. All rights reserved. By Abdelmonaim Remani Polymathic-coder.com Silicon Valley Code.
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.
Text 16 de mayo de 2009 Spring Framework Part I. Dependency Injection Buenos Aires, May 2009.
Anti Orgla, Nortal AS Spring Framework
Opus College - overview. OpusCollege - background First project: ICT Capacity Building Mozambican Higher Education Institutions Partners: RUG Groningen,
Copyright © 2005 Finetix LLC All Rights Reserved 0 SpringFramework.Net Developer Session Chris Donnan The Peer Frameworks Series -.Net and Java.
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.
Introduction to Spring Matt Wheeler. Notes This is a training NOT a presentation Please ask questions Prerequisites – Introduction to Java Stack – Basic.
Aspect Oriented Programming Gülşah KARADUMAN.
MVC Design Pattern Web Developer at Crimshield, Inc Application Developer at IBM Present - Delta Developer at Tides.
A Presentation By V AIBHAV S AHARAN Web-enHanced Information Management COMS E6125.
AOP-1 Aspect Oriented Programming. AOP-2 Aspects of AOP and Related Tools Limitation of OO Separation of Concerns Aspect Oriented programming AspectJ.
1 An Aspect-Oriented Implementation Method Sérgio Soares CIn – UFPE Orientador: Paulo Borba.
Text 16 de mayo de 2009 Spring Framework Part III. Portable Service Abstractions Buenos Aires, June 2009.
Topic : Hibernate 1 Kaster Nurmukan. An ORM tool The problem fixed by ORM Advantage Hibernate Hibernate Basic –Hibernate sessionFactory –Hibernate Session.
Spring and DWR Frameworks for Rich Web Enterprise Application Thomas Wiradikusuma Presentation to the 20 th.
UPortal 3 RC2 PreviewJA-SIG Conference, Summer 2007 uPortal RC2 Preview Moving on Up Reviewing current work and future plans Standardizing the framework.
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.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Introduction to Data Access with Spring.
Aspect Oriented Programming Adlux Consultancy Services Pvt Ltd
Kansas City Java User’s Group Jason W. Bedell July 12, 2006
问题 Code scattering Blocks of duplicated code Blocks of complementary code, and different modules implementing complementary parts of the concern Code.
Proxy Pattern defined The Proxy Pattern provides a surrogate or placeholder for another object to control access to it by creating a representative object.
Text 16 de mayo de 2009 Spring Framework Part III. Portable Service Abstractions Buenos Aires, June 2009.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Overview of the Spring Framework Introducing.
Topic : Hibernate 1 Kaster Nurmukan. An ORM tool Used in data layer of applications Implements JPA.
Singleton Academy, Pune. Course syllabus Singleton Academy Pune – Course Syllabus1.
L’origine dei mali: le dipendenze tra componenti Stefano Leli 14° Workshop DotNetMarche Venerdì 16 aprile
Text 16 de mayo de 2009 Spring Framework Part III. Portable Service Abstractions and Spring MVC Buenos Aires, June 2009.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Montreal CRIM Workshop Introduction to Spring Framework.
 Is a programming paradigm  Extends OOP  Enables modularization of cross cutting concerns.
Leveraging ColdSpring to build a robust Flex applications Chris Scott, Cynergy Systems.
Training What’s Spring? The leading full-stack Java/JEE application framework.
J2EE Lecture 6: Spring – IoC and Dependency Injection
Chengyu Sun California State University, Los Angeles
Aspect-Oriented Programming with the Eclipse AspectJ plug-in
By Ru Shen Department of Computer Science UAlbany, 2008
Chengyu Sun California State University, Los Angeles
CS520 Web Programming Spring – Aspect Oriented Programming
Aspect Oriented Programming
Presentation transcript:

Copyright 2006, Codeguild, Inc Spring Framework Fundamentals March, 2006 Larry Hamel Codeguild, Inc.

Copyright 2006, Codeguild, Inc 2 Framework Defined A framework provides tools, designs, templates, and practices to somehow make development easier Java frameworks tend to divide into front-end (display), middle (control logic), and/or back-end (persistance) functions

Copyright 2006, Codeguild, Inc 3 Java Frameworks (parial list) Struts (2001) Avalon (1999) Cocoon (1999) Expresso (2000) Webwork JavaServer Faces (2004)/Shale Seam (2005) Spring (2002) Tapestry Struts Action Framework (from Webwork) 2005 Hibernate

Copyright 2006, Codeguild, Inc 4 Outline Two criteria for judging a framework –Loose coupling/Inversion of Control (IoC)/Dependency injection –Aspect-oriented programming (AOP) Choosing a framework

Copyright 2006, Codeguild, Inc 5 Why is IoC important? Integrate with other frameworks, other services –plug in a persistence layer, a display layer, etc. Extensive unit-test coverage of framework code –the less dependence between classes, the easier to test

Copyright 2006, Codeguild, Inc 6 Interface vs. Concrete Interface is a specification of signatures—no implementation Concrete class has implementation of every method; can be instantiated –(Abstract class is in between— some, but not all, methods implemented)

Copyright 2006, Codeguild, Inc 7 Tight Coupling class Foo { void bar() { FastStringBuffer aBuffer = FastStringBuffer. getInstance(); //... }

Copyright 2006, Codeguild, Inc 8 Loose Coupling StringBufferFactoryInterface aBuffFac = getStringBuffer(); public StringBufferFactoryInterface getStringBuffer() { /* ??? how implement with no dependence ??? */ }

Copyright 2006, Codeguild, Inc 9 Loose Coupling (IoC) StringBufferFactoryInterface aBuffFac = getStringBuffer(); public StringBufferFactoryInterface getStringBuffer() { return stringBufferFac; } public void setStringBuffer( StringBufferFactoryInterface aBuff) { stringBufferFac = aBuff; } private StringBufferFactoryInterface stringBufferFac;

Copyright 2006, Codeguild, Inc 10 Spring configuration, injecting dependencies <bean id=“fastStringBuffer” class=“FastStringBuffer” />

Copyright 2006, Codeguild, Inc 11 Spring is an IoC Bean Factory InputStream is = new FileInputStream("src/examples/ spring/beans.xml"); BeanFactory factory = new XmlBeanFactory(is); DataProcessor dataProcessor = (DataProcessor) factory.getBean("fileDataProce ssor"); Result result = dataProcessor.processData();

Copyright 2006, Codeguild, Inc 12 Aspect-Oriented Programming (AOP) Rationale Object oriented programming (OOP) isn’t good at everything. Consider: – Security: want to test privileges every time method is invoked. –DB transactions: want to have every access to DB run through transaction

Copyright 2006, Codeguild, Inc 13 Transaction OO example DBConnection conn = DBConnectionPool.getInstance().getConnection("course clone"); try { conn.setAutoCommit(false); Course clonecourse = new Course(conn);... } catch (Exception e) { conn.rollback(); getLogger().error(e); } finally { conn.release(); }

Copyright 2006, Codeguild, Inc 14 AOP Transactions, Logging and Security are often referred to as “crosscutting” concerns, applying to all objects For every method, AOP inserts ‘advice’ before and/or after method call Spring uses dynamic AOP, creating “proxies” for all advised objects

Copyright 2006, Codeguild, Inc 15 AOP Example in Spring Using JDK1.5 public void saveCourse( Course src) { getCourseDBO().save(src); }

Copyright 2006, Codeguild, Inc 16 Choosing the Right Tool If you already know tool ++ Currently popular tool ++ Estimate lifespan of project Estimate audience (users) Estimate need to interface with external resources ( , LDAP) Impartial, comprehensive reviews are hard to find Any framework will go obsolete!

Copyright 2006, Codeguild, Inc 17 Opinion Is two-tier PHP good enough? Bigger projects: take care not to overestimate—”You’re not going to need it” Watch: –Ruby on Rails (David Hansson) –Seam (Gavin King) –Spring (Rod Johnson)

Copyright 2006, Codeguild, Inc 18