Developing with the Framework Zach A. Thomas, Texas State University

Slides:



Advertisements
Similar presentations
Spring, Hibernate and Web Services 13 th September 2014.
Advertisements

Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmers’ Café Sakai NWU Workshop, South Africa Recap of Sakai Services Antranig.
DT228/3 Web Development Introduction to Java Server Pages (JSP)
Java 2 – Enterprise Edition Kevin J. LaFata April 21, 2003 UM – St. Louis.
1 Build a Web Application on J2EE. 2 J2EE Scenario Client – Web Server – EIS Resources Client – Web Server – EIS Resources Client – Application Server.
© 2005, Cornell University. Rapid Application Development using the Kuali Architecture (Struts, Spring and OJB) A Case Study Bryan Hutchinson
Hello Vaadin! CS 3130 Summer 2015.
{ Apache - Click By, By, Anupam Mundale. Anupam Mundale. Viraj Kulkarni. Viraj Kulkarni.
Structure of a web application1 Dr Jim Briggs. MVC Structure of a web application2.
The Spring Framework: A brief introduction to Inversion of Control James Brundege
Intro to Spring CJUG - January What is Spring? “The Spring framework provides central transaction control of various objects.” This means that any.
Struts 2.0 an Overview ( )
UNIT-V The MVC architecture and Struts Framework.
JSP and Servlets Lecture notes by Theodoros Anagnostopoulos.
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.
4/1/2003Application Server Standards Application Server Standards for ITSS Bruce Vincent, ITSS Technology Strategist.
© 2005 by IBM; made available under the EPL v1.0 | March 1, 2005 Tim deBoer Gorkem Ercan Extend WTP Server Tools for your.
Ing. Ignacio Roqueta ARTech GeneXus and J2EE.
Java Servlets CS-422. Application Mapping Your servlet application will be mapped to a directory structure: –“myapp” maps to some directory C:/docs/apps/myapp.
Introduction to J2EE Architecture Portions by Kunal Mehta.
Dependency Injection in Action Jan Västernäs. CADEC2006, DI, Slide 2 Copyright 2006, Callista Enterprise AB Agenda (DI=Dependency Injection) Background.
JBoss at Work JAW Motors Application Chapter 1-3 Jeff Schmitt October 9, 2006.
© 2006 IBM Corporation IBM WebSphere Portlet Factory Architecture.
|Tecnologie Web L-A Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat
Chapter 8 Script-free pages. Problem with scripting in JSP When you use scripting (declaration, scriplet, expressions) in your JSP, you actually put Java.
Text 16 de mayo de 2009 Spring Framework Part I. Dependency Injection Buenos Aires, May 2009.
Mark Dixon 1 12 – Java Beans. Mark Dixon 2 Session Aims & Objectives Aims –To cover the use of Java Beans Objectives, by end of this week’s sessions,
Opus College - overview. OpusCollege - background First project: ICT Capacity Building Mozambican Higher Education Institutions Partners: RUG Groningen,
Struts J2EE web application framework “ Model 2 ” Model View Controller Controller Servlet Key features XML metadata Struts taglib Simplified form validation.
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.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmers’ Café Introduction to Sakai and Sakai Services Aaron Zeckoski
J2EE Overview Web Programming CSCI J2EE multi-tier architecture Servlet: Java class loaded into Web server JSP page: enhanced HTML page that is.
Introduction to Web Dimitar Nenchev Ivan Nakov
Ch 2 – Application Assembly and Deployment COSC 617 Jeff Schmitt September 14, 2006.
A Presentation By V AIBHAV S AHARAN Web-enHanced Information Management COMS E6125.
Spring Framework. About spring Spring is the most popular application development framework for enterprise Java. Millions of developers around the world.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Montreal CRIM Workshop Sakai code exercises Aaron Zeckoski.
Sakai WebApp Structure
Deploying a service. Talk titledate2 Talk titledate3 Section SOAP Deployment.
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.
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
JAVA EE 6 Best Practices for Migrating Spring to WTF ?!?
The Omondo EclipseUML plug-in David Gallardo. What is UML A graphical language Not a development method It was designed for RUP—the Rational Unified Process,
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
Lorenz: Visitor Beans: An Aspect-Oriented Pattern Aspect-oriented pattern: describes a solution to a tangling problem in a particular context.
Introduction to EJB. What is an EJB ?  An enterprise java bean is a server-side component that encapsulates the business logic of an application. By.
SwE 455 Tutorial. What is Evolve? Evolve is a tool for defining components and connecting them together to form new components. Also provides a runtime.
JSP / Servet (2) Bayu Priyambadha, S.Kom. MVC (Model View Controller)  Model (data logic)  Java Class (standard class, servlet, JavaBeans, or other.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Montreal CRIM Workshop Introduction to Spring Framework.
Apache Geronimo Open Source J2EE Application Server Getting up to speed with Apache Geronimo - Copyright 2005 Tom McQueeney 1 Getting up to speed with.
J2EE Lecture 6: Spring – IoC and Dependency Injection
Product Training Program
Structure of a web application
Google Web Toolkit Tutorial
Test Driven Development
Recitation #3 Comp Semion Piskarev.
Introduction to J2EE Architecture
Sakai WebApp Structure
By Ru Shen Department of Computer Science UAlbany, 2008
Intro to Spring CJUG - January 2013.
J2EE Application Development
Introduction to Sakai and Sakai Services
SwE 455 Tutorial.
JavaServer Faces: The Fundamentals
Enterprise Java Beans.
Presentation transcript:

Developing with the Framework Zach A. Thomas, Texas State University

Framework is… System facilities at your disposal The way those pieces interrelate so you can use them Conventions to adopt so that your modules will play nice

What facilities? AuthzGroupService SiteService ToolManager SessionManager ContentHostingService CourseManagementService … too many to mention!

Taking a Look Around project.xml = an artifact an artifact is a jar or a war

Sakai is servlets… Runs in Tomcat Familiar webapps directory WEB-INF, web.xmlweb.xml

Except when it’s not The components directory A shared registry of parts

the General Idea We want Sakai to be modular. We want to reconfigure it easily. We want to re-use code.

Parts of a module api: the service Interfaces impl: the classes that implement the api pack: a war file for deploying impl tool: an application. views, controllers, app logic.

Spring Framework A big box of tools for building J2EE apps with less overhead and pain. Includes MVC, AOP, transactions, JDBC, ORM. Underlying everything is the bean container.

Overhead and Pain Having to inherit from a framework class Having to implement tedious interfaces A proliferation of objects A tangled nest of checked exceptions Dependencies hard-coded in your class

Dependency Injection The properties of your objects are set at runtime. Your classes need not be aware of the concrete types of its properties.

robot.setBrain(new P4());robot.setEngine(new Diesel());robot.setWeapon(new Blades());

Spring beans Spring can manage your application’s objects if they follow a few non-invasive rules. Provide standard getters and setters for your object’s properties. Provide an init() method that Spring can call after all the dependent beans have been instantiated.

No more “new.” Anytime you write new Something() in Java, you are committing to a particular class. If you ever type “new,” ask yourself if it’s ok to have a dependency that you can only change by editing your source code and recompiling.

ComponentManager Wrapper for a Spring ApplicationContext Allows getting beans out either by id or by Class mgr.get(“org.sakaiproject.site.api.SiteService”);

How to get Springy add ContextLoaderListener to web.xml.web.xml create bean definitions for your objects. set any Sakai services you want to use as properties of your beans.

Springy JSPs web.context.support.WebApplicationContextUtils <% ApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(getServletContext()); SiteService ss = (SiteService) applicationContext.getBean("org.sakaiproject.site.api.SiteService"); ToolManager tm = (ToolManager) applicationContext.getBean("org.sakaiproject.tool.api.ToolManager"); %>

Demo

Questions?