Spring provides tools for building multi-client web applications, including support for mobile clients and REST APIs. It includes the Spring MVC framework for building web UIs, the RestTemplate for consuming REST services, and tools like Spring Android for building native Android apps that integrate with REST backends. Demos show consuming a Spring REST service from a web UI, Android app, and HTML5 app to demonstrate support for multiple client types from a single backend.
This talk introduces the role that Spring MVC and REST can play as a service-side endpoint model that can be connected to from mobile, rich, and desktop applications.
Today's applications don't live in a vacuum - you need to take the applications to where your users are. Let Spring's REST support along with its powerful client-side technology support, help you get there faster.
A Walking Tour of (almost) all of Springdom Joshua Long
this is the deck for my 3+ hour walking tour talk that I give as a workshop at various conferences. This talk introduces practically everything in Spring -- come into the talk unaware of the concepts or frameworks and leave with a working knowledge of all the frameworks, and of all the applications for the technologies.
The Web and Spring MVC continue to be one of the most active areas of the
Spring Framework with each new release adding plenty of features and refinements
requested by the community. Furthermore version 4 added a significant choice
for web applications to build WebSocket-style architectures.
This talk provides an overview of the areas in which the framework has evolved
along with highlights of specific noteworthy features from the most recent
releases.
This talk introduces the role that Spring MVC and REST can play as a service-side endpoint model that can be connected to from mobile, rich, and desktop applications.
Today's applications don't live in a vacuum - you need to take the applications to where your users are. Let Spring's REST support along with its powerful client-side technology support, help you get there faster.
A Walking Tour of (almost) all of Springdom Joshua Long
this is the deck for my 3+ hour walking tour talk that I give as a workshop at various conferences. This talk introduces practically everything in Spring -- come into the talk unaware of the concepts or frameworks and leave with a working knowledge of all the frameworks, and of all the applications for the technologies.
The Web and Spring MVC continue to be one of the most active areas of the
Spring Framework with each new release adding plenty of features and refinements
requested by the community. Furthermore version 4 added a significant choice
for web applications to build WebSocket-style architectures.
This talk provides an overview of the areas in which the framework has evolved
along with highlights of specific noteworthy features from the most recent
releases.
This talk introduces some of the compelling features coming in Spring 3.1, 3.2 and then gazes into the future and looks at some of the powerful new features in the upcoming Spring 4.0 release.
This was a quick (15 minutes!) tour of Cloud Foundry that I gave at JFokus 2012 introducing Cloud Foundry as the answer to the question, "I've got a working web application and Spring made it easy, but where do I host it?"
This session will provide a complete tour of using the Spring MVC framework to build Java Portlets. It will include an in-depth review of a sample portlet application developed using the latest features of Spring MVC, including Annotation-based Controllers. If you are writing Portlets and using Spring, this session is for you.
We'll begin by discussing the unique differences and challenges when developing Portlets instead of traditional Servlet webapps. Then we'll talk about the unique approach that Spring MVC takes towards Portlets that fully leverages the Portlet lifecycle, instead of masking it like many other frameworks. We'll take an extensive tour of a sample application so we can see all the unique pieces of the framework in action. Finally we'll conclude with discussion of the upcoming support for the Portlet 2.0 (JSR 286) specification that will be part of Spring 3.0.
Spring in the Cloud - using Spring with Cloud FoundryJoshua Long
This talk's about using the power of the Spring framework with Cloud Foundry, the open source PaaS (platform as-a-service) from VMware. This is a bit more deep an introduction than my other Spring and Cloud Foundry talk, and so I've kept both, while encouraging people to check this one out, first.
using Spring and MongoDB on Cloud FoundryJoshua Long
This talk introduces how to build MongoDB applications with Spring Data MongoDB on Cloud Foundry. Spring Data provides rich support for easily building applications that work on multiple data stores.
This talk introduces some of the compelling features coming in Spring 3.1, 3.2 and then gazes into the future and looks at some of the powerful new features in the upcoming Spring 4.0 release.
This was a quick (15 minutes!) tour of Cloud Foundry that I gave at JFokus 2012 introducing Cloud Foundry as the answer to the question, "I've got a working web application and Spring made it easy, but where do I host it?"
This session will provide a complete tour of using the Spring MVC framework to build Java Portlets. It will include an in-depth review of a sample portlet application developed using the latest features of Spring MVC, including Annotation-based Controllers. If you are writing Portlets and using Spring, this session is for you.
We'll begin by discussing the unique differences and challenges when developing Portlets instead of traditional Servlet webapps. Then we'll talk about the unique approach that Spring MVC takes towards Portlets that fully leverages the Portlet lifecycle, instead of masking it like many other frameworks. We'll take an extensive tour of a sample application so we can see all the unique pieces of the framework in action. Finally we'll conclude with discussion of the upcoming support for the Portlet 2.0 (JSR 286) specification that will be part of Spring 3.0.
Spring in the Cloud - using Spring with Cloud FoundryJoshua Long
This talk's about using the power of the Spring framework with Cloud Foundry, the open source PaaS (platform as-a-service) from VMware. This is a bit more deep an introduction than my other Spring and Cloud Foundry talk, and so I've kept both, while encouraging people to check this one out, first.
using Spring and MongoDB on Cloud FoundryJoshua Long
This talk introduces how to build MongoDB applications with Spring Data MongoDB on Cloud Foundry. Spring Data provides rich support for easily building applications that work on multiple data stores.
Integration and Batch Processing on Cloud FoundryJoshua Long
This talk explores the new possibilities for scale by using Spring Integration, Spring Batch and RabbitMQ on Cloud Foundry, the open source PaaS from VMWare.
Slides from my talk introducing Spring Boot. Unfortunately, this talk is 90% live-coding, so I'll post the relevant video recording here when it's available.
This talk introduces Spring's REST stack - Spring MVC, Spring HATEOAS, Spring Data REST, Spring Security OAuth and Spring Social - while refining an API to move higher up the Richardson maturity model
Spring and Cloud Foundry; a Marriage Made in HeavenJoshua Long
Spring and Cloud Foundry: a Marriage Made in Heaven. This talk introduces how to build Spring applications on top of Cloud Foundry, the open source PaaS from VMware
Apache Wicket is constantly growing in popularity throughout all kinds of projects. However Wicket doesn't come out of the box with a built-in Java EE support. Integration to CDI is missing and the same is valid for Bean Validation support for example. This session demonstrates how you can user CDI, Conversations and Bean Validation together with Apache Wicket. The first part of the talk will consist of a small slide-driven theoretical part whereas the second part will consist of a coding session that demonstrates hands-on how to hook everything together.
Vaadin is quickly popularizing Java framework for developing rich and interactive server-driven web applications. Vaadin is built around core Servlet and Google Web Toolkit (GWT) technologies and it strives to developer productivity by providing large library of components and ready made functionality that hides the hard parts of web development allowing developers to concentrate to the real business problem at hand. During this session we’ll cover the basics of building Vaadin based web applications: layouting, data binding, application deployment and Vaadin Touckit integration for mobile devices. Attending the speech does not require thorough understanding of web technologies in general, session will include demonstration and live coding.
SOAP Web Services have a well established role in the enterprise, but aside from the many benefits of the WS-* standards, SOAP and XML also carry additional baggage for developers. Consequently, REST Web Services are gaining tremendous popularity within the developer community. This session will begin by comparing and contrasting the basic concepts of both SOAP and REST Web Services. Building on that foundation, Sam Brannen will show attendees how to implement SOAP-based applications using Spring-WS 2.0. He will then demonstrate how to build a similar REST-ful application using Spring MVC 3.0. The session will conclude with an in-depth look at both server-side and client-side development as well as efficient integration testing of Web Services using the Spring Framework.
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...Dan Wahlin
This is a talk I gave at the spring 2013 AngleBrackets/DevIntersection conference in Las Vegas.
HTML5 is all the rage these days but where do you look to find robust examples of using it along with jQuery, client-side templates, Ajax calls, data access technologies, and more? In this session, Dan Wahlin will walk through an application that demonstrates how key HTML5 technologies can be integrated and used to present data to users in different ways. Topics covered include exposing data to the client using RESTful services created using the new ASP.NET Web API, using Handlebars templates to render data, JavaScript techniques for structuring code, the role of HTML5 semantic tags, as well as how technologies such as the canvas, SVG, and video can be used. If you want to learn server-side as well as client-side techniques and strategies then this session is for you.
Building microservices sample applicationAnil Allewar
The slides provide details on how to build the sample Microservices application that covers the whole distributed system paradigm.
Please refer to the introduction to Microservices before following the contents in this slide
https://www.slideshare.net/anilallewar/introduction-to-microservices-78270318
Java Spring MVC Framework with AngularJS by Google and HTML5Tuna Tore
Course Description
#springframework, #spring, #udemy, #discount, #programming, #springmvc, spring, #udemycourse, #education
NEW udemy course related to the latest Java Spring MVC Framework 4 for developing WEB applications with popular and proven technologies such as AngularJS by Google and HTML5. (Lectures are divided in three main sections so you don't have to learn AngularJS Framework until you start the last section. The last section will teach you AngularJS by Google and the integration with Java Spring MVC Framework 4)
https://www.udemy.com/java-spring-mvc-framework-with-angularjs-by-google-and-html5
Moreover, this course is designed and created with the mindset of teaching you the latest web technologies in a short period of time with low training cost and high-quality content including real production quality code examples.
Therefore after attending this course, you will be ready to design and develop any commercial Java Spring MVC applications by learning the main principals, best practices, and most important concepts.
Furthermore, this is a fast track course and covers the most important concepts in AngularJS Framework, HTML5 and the latest Java Spring MVC Framework 4x with code examples and sample applications. You will be able to download source codes/slides/diagrams by attending this course and you can use those samples/codes in your applications as well. Therefore, it will be more than enough for you to develop Java Spring MVC applications if you attend this course.
The benefits of attending this udemy course are listed like as below;
You will earn a higher salary hence you will be able to use the latest and productive technologies and this course will also improve the way of your thinking in terms of programming by teaching you dependency injection principle used in Spring MVC and AngularJS
You will be more confident about commercial WEB programming for the following years and general programming concepts as well.
We will only use FREE Open Source Software tools during the development of components in this course.
You will learn the latest Java Spring MVC Framework with hands-on examples
You will learn the usage of AngularJS by Google for developing structured rich client side applications
You will understand the usage of latest useful basic HTML5 tags with code examples
You will gain experience of using CSS(Style Sheets) in web applications
Learn how to develop, test, run and debug Java Spring MVC applications
Learn how to integrate AngularJS with Java Spring MVC framework.
https://www.udemy.com/java-spring-mvc-framework-with-angularjs-by-google-and-html5
#springframework, #spring, #udemy, #discount, #programming, #springmvc, spring, #udemycourse, #education
It's been an amazing year for Spring! 2013 saw the Spring family join Pivotal where - along with Cloud Foundry and our data driven technologies (the Pivotal HD Hadoop distribution, the GemFire data grid, and the RabbitMQ message broker) - Spring supports today's application workloads and profiles. Today's Spring embraces Java 8, Scala, Groovy, provides a best-in-class REST stack, supports the open web, mobile applications, big-data applications and batch workloads. Today's Spring is easy to get started with, easy to learn, and embraces conventions over configuration. Today's Spring is part of the Spring.IO platform. Today's Spring is...Pivotal. Join Spring developer advocate Josh Long as he re-introduces you to today's Spring, a Spring you may not have seen yet.
There is a video for this talk, as well: http://www.youtube.com/watch?v=_twyZL_AGCI - Enjoy!
Spring, now part of Pivotal, continues to innovate and support next generation workloads. In this talk, I introduce some of the exciting new Spring technologies supporting websockets, Java 8, Java EE 7, data ingestion and stream processing, NoSQL and Hadoop, and production-ready REST, _and_ I introduce tools designed to expedite ramp-up time for teams who want to deliver, quickly.
A Spring Batch bootcamp! Spring Batch is the open source batch processing framework from SpringSource, makes of the Spring framework. http://www.springsource.org/spring-batch
Heard about Cloud Foundry? Already a Spring, Grails, Ruby, Node.js, Scala, or generalist programmer looking to understand what Cloud Foundry, the open source PaaS from VMware, means to you? Are you an architect trying to understand where PaaS fits it, and what it brings to the table? If you answered "yes" to any of those questions, then join the experts in this bootcamp to Cloud Foundry.
The Spring framework packs a lot of punch, out of the box! The surface-level component model's extraordinarily flexible, and works well with in most situations, but the real power of Spring lays just underneath, in the numerous SPIs that Spring exposes, so that you can tailor the component model to your own use cases. Spring's SPI's are a great example of what Bob Martin describes as the open-closed principle, and it provides the solid underpinnings upon which the other Spring frameworks, including Spring Integration, Spring MVC and Spring Batch are built. In this talk, Josh Long, the Spring developer advocate from SpringSource, provides a walking tour of Spring's extension points.
In this talk, originally presented at JavaZone, in Oslo, Norway, I introduce the broad swath of supported inversion-of-control options in Spring's component model, and then introduce some more advanced features of the component model.
Enterprise Integration and Batch Processing on Cloud FoundryJoshua Long
Spring Integration, RabbitMQ and Spring Batch are natural vehicles for building bigger, better, more powerful applications on top of the scale that only Cloud Foundry can provide. This is the deck from my Spring IO 2012 talk.
Want to get to production quickly? RAD tools like Spring Roo, with its support for beautiful, quick UI generation through addons like the Vaadin Roo addon, and Cloud Foundry, which take care of everything under the code, are an ideal combination. In this talk Josh Long, Spring Developer Advocate for SpringSource, introduces the 1-2-3 punch of Cloud Foundry, Roo and Vaadin.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
2. About
SpringSource is the organization that develops the Spring
framework, the leading enterprise Java framework
SpringSource was acquired by VMware in 2009
VMware and SpringSource bring you to the cloud and
deliver on the mission of “build, run, manage”
• established partnerships with the major players in the business, including
Adobe, SalesForce, and Google to help deliver the best experience for
Spring users across multiple platforms
Leading contributor to projects like
Apache HTTPD and Apache Tomcat
2
3. About Josh Long
Spring Developer Advocate
twitter: @starbuxman
josh.long@springsource.com
3
4. About Josh Long
Spring Developer Advocate
twitter: @starbuxman
josh.long@springsource.com
Contributor To:
•Spring Integration
•Spring Batch
•Spring Hadoop
•Activiti Workflow Engine
•Akka Actor engine
4
6. The Spring ApplicationContext
Spring Beans are Managed by An ApplicationContext
• whether you’re in an application server, a web server, in regular Java SE application, in
the cloud, Spring is initialized through an ApplicationContext
• In a Java SE application:
ApplicationContext ctx =
new GenericAnnotationApplicationContext( “com.foo.bar.my.package”);
• In a web application, you will configure an application context in your web.xml
<servlet>
<servlet-name>Spring Dispatcher Servlet</servlet-name>
<servlet-
class>org.springframework.web.servlet.DispatcherServlet</servlet-
class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/myAppContext*.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
6
7. I want Database Access ... with Hibernate 4 Support
@Service
public class CustomerService {
public Customer createCustomer(String firstName,
String lastName,
Date signupDate) {
...
}
}
CONFIDENTIAL
7
8. I want Database Access ... with Hibernate 4 Support
@Service
public class CustomerService {
@Inject
private SessionFactory sessionFactory;
public Customer createCustomer(String firstName,
String lastName,
Date signupDate) {
Customer customer = new Customer();
customer.setFirstName(firstName);
customer.setLastName(lastName);
customer.setSignupDate(signupDate);
sessionFactory.getCurrentSession().save(customer);
return customer;
}
}
CONFIDENTIAL
8
9. I want Database Access ... with Hibernate 4 Support
@Service
public class CustomerService {
@Inject
private SessionFactory sessionFactory;
@Transactional
public Customer createCustomer(String firstName,
String lastName,
Date signupDate) {
Customer customer = new Customer();
customer.setFirstName(firstName);
customer.setLastName(lastName);
customer.setSignupDate(signupDate);
sessionFactory.getCurrentSession().save(customer);
return customer;
}
}
CONFIDENTIAL
9
10. I want Declarative Cache Management...
@Service
public class CustomerService {
@Inject
private SessionFactory sessionFactory;
@Transactional
@Cacheable(“customers”)
public Customer createCustomer(String firstName,
String lastName,
Date signupDate) {
Customer customer = new Customer();
customer.setFirstName(firstName);
customer.setLastName(lastName);
customer.setSignupDate(signupDate);
sessionFactory.getCurrentSession().save(customer);
return customer;
}
}
CONFIDENTIAL
10
11. I want a RESTful Endpoint...
package org.springsource.examples.spring31.web;
..
@Controller
public class CustomerController {
@Inject
private CustomerService customerService;
@RequestMapping(value = "/customer/{id}",
produces = MediaType.APPLICATION_JSON_VALUE)
public @ResponseBody Customer customerById(@PathVariable("id") Integer id) {
return customerService.getCustomerById(id);
}
...
}
CONFIDENTIAL
11
14. Setting up Spring on the Web is Easy
<servlet>
<servlet-name>Spring Dispatcher Servlet</servlet-name>
<servlet-
class>org.springframework.web.servlet.DispatcherServlet</servlet-
class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/myAppContext*.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
14
15. New in 3.1: XML-free web applications
In a servlet 3 container, you can also use Java configuration,
negating the need for web.xml:
public class SampleWebApplicationInitializer implements WebApplicationInitializer {
public void onStartup(ServletContext sc) throws ServletException {
AnnotationConfigWebApplicationContext ac =
new AnnotationConfigWebApplicationContext();
ac.setServletContext(sc);
ac.scan( “a.package.full.of.services”, “a.package.full.of.controllers” );
sc.addServlet("spring", new DispatcherServlet(webContext));
}
}
15
16. Thin, Thick, Web, Mobile and Rich Clients: Web Core
Spring Dispatcher Servlet
• Objects don’t have to be web-specific.
• Spring web supports lower-level web machinery: ‘
• HttpRequestHandler (supports remoting: Caucho, Resin, JAX RPC)
• DelegatingFilterProxy.
• HandlerInterceptor wraps requests to HttpRequestHandlers
• ServletWrappingController lets you force requests to a servlet through the Spring Handler chain
• OncePerRequestFilter ensures that an action only occurs once, no matter how many filters are
applied. Provides a nice way to avoid duplicate filters
• Spring provides access to the Spring application context using
WebApplicationContextUtils, which has a static method to look up the context, even in
environments where Spring isn’t managing the web components
17. Thin, Thick, Web, Mobile and Rich Clients: Web Core
Spring provides the easiest way to integrate with your web
framework of choice
• Spring Faces for JSF 1 and 2
• Struts support for Struts 1
• Tapestry, Struts 2, Stripes, Wicket, Vaadin, Play framework, etc.
• GWT, Flex
19. The Anatomy of a Spring MVC @Controller
Spring MVC configuration - config
@Controller
public class CustomerController {
}
19
20. The Anatomy of a Spring MVC @Controller
Spring MVC configuration - config
@Controller
public class CustomerController {
@RequestMapping(value=”/url/of/my/resource”)
public String processTheRequest() {
// ...
return “home”;
}
}
GET http://127.0.0.1:8080/url/of/my/resource
20
21. The Anatomy of a Spring MVC @Controller
Spring MVC configuration - config
@Controller
public class CustomerController {
@RequestMapping(value=”/url/of/my/resource”,
method = RequestMethod.GET)
public String processTheRequest() {
// ...
return “home”;
}
}
GET http://127.0.0.1:8080/url/of/my/resource
21
22. The Anatomy of a Spring MVC @Controller
Spring MVC configuration - config
@Controller
public class CustomerController {
@RequestMapping(value=”/url/of/my/resource”,
method = RequestMethod.GET)
public String processTheRequest( HttpServletRequest request) {
String contextPath = request.getContextPath();
// ...
return “home”;
}
}
GET http://127.0.0.1:8080/url/of/my/resource
22
23. The Anatomy of a Spring MVC @Controller
Spring MVC configuration - config
@Controller
public class CustomerController {
@RequestMapping(value=”/url/of/my/resource”,
method = RequestMethod.GET)
public String processTheRequest( @RequestParam(“search”) String searchQuery ) {
// ...
return “home”;
}
}
GET http://127.0.0.1:8080/url/of/my/resource?search=Spring
23
24. The Anatomy of a Spring MVC @Controller
Spring MVC configuration - config
@Controller
public class CustomerController {
@RequestMapping(value=”/url/of/my/{id}”,
method = RequestMethod.GET)
public String processTheRequest( @PathVariable(“id”) Long id) {
// ...
return “home”;
}
}
GET http://127.0.0.1:8080/url/of/my/2322
24
25. The Anatomy of a Spring MVC @Controller
Spring MVC configuration - config
@Controller
public class CustomerController {
@RequestMapping(value=”/url/of/my/{id}” )
public String processTheRequest( @PathVariable(“id”) Long customerId,
Model model ) {
model.addAttribute(“customer”, service.getCustomerById( customerId ) );
return “home”;
}
@Autowired CustomerService service;
}
GET http://127.0.0.1:8080/url/of/my/232
25
26. The Anatomy of a Spring MVC @Controller
Spring MVC configuration - config
@Controller
public class CustomerController {
@RequestMapping(value=”/url/of/my/resource”,
method = RequestMethod.GET)
public String processTheRequest( HttpServletRequest request, Model model) {
return “home”;
}
}
26
27. The Anatomy of a Spring MVC @Controller
Spring MVC configuration - config
@Controller
public class CustomerController {
@RequestMapping(value=”/url/of/my/resource”,
method = RequestMethod.GET)
public View processTheRequest( HttpServletRequest request, Model model) {
return new XsltView(...);
}
}
27
28. The Anatomy of a Spring MVC @Controller
Spring MVC configuration - config
@Controller
public class CustomerController {
@RequestMapping(value=”/url/of/my/resource”,
method = RequestMethod.GET)
public InputStream processTheRequest( HttpServletRequest request, Model model) {
return new FileInputStream( ...) ;
}
}
28
29. DEMO
Demos
• Simple Spring MVC based Application
Not confidential. Tell everyone.
36. Thin, Thick, Web, Mobile and Rich Clients: REST
Origin
• The term Representational State Transfer was introduced and defined in 2000 by Roy
Fielding in his doctoral dissertation.
His paper suggests these four design principles:
• Use HTTP methods explicitly.
• POST, GET, PUT, DELETE
• CRUD operations can be mapped to these existing methods
• Be stateless.
• State dependencies limit or restrict scalability
• Expose directory structure-like URIs.
• URI’s should be easily understood
• Transfer XML, JavaScript Object Notation (JSON), or both.
• Use XML or JSON to represent data objects or attributes
CONFIDENTIAL
36
37. REST on the Server
Spring MVC is basis for REST support
• Spring’s server side REST support is based on the standard controller model
JavaScript and HTML5 can consume JSON-data payloads
38. REST on the Client
RestTemplate
• provides dead simple, idiomatic RESTful services consumption
• can use Spring OXM, too.
• Spring Integration and Spring Social both build on the RestTemplate where possible.
Spring supports numerous converters out of the box
• JAXB
• JSON (Jackson)
39. Building clients for your RESTful services: RestTemplate
Google search example
RestTemplate restTemplate = new RestTemplate();
String url = "https://ajax.googleapis.com/ajax/services/search/web?v=1.0&q={query}";
String result = restTemplate.getForObject(url, String.class, "SpringSource");
Multiple parameters
RestTemplate restTemplate = new RestTemplate();
String url = "http://example.com/hotels/{hotel}/bookings/{booking}";
String result = restTemplate.getForObject(url, String.class, "42", “21”);
CONFIDENTIAL
39
40. Thin, Thick, Web, Mobile and Rich Clients: RestTemplate
RestTemplate class is the heart the client-side story
• Entry points for the six main HTTP methods
• DELETE - delete(...)
• GET - getForObject(...)
• HEAD - headForHeaders(...)
• OPTIONS - optionsForAllow(...)
• POST - postForLocation(...)
• PUT - put(...)
• any HTTP operation - exchange(...) and execute(...)
CONFIDENTIAL
40
41. The Anatomy of a Spring MVC @Controller
Spring MVC configuration - config
@Controller
public class CustomerController {
@RequestMapping(value=”/url/of/my/resource”,
method = RequestMethod.GET)
public @ResponseBody Customer processTheRequest( ... ) {
Customer c = service.getCustomerById( id) ;
return c;
}
@Autowired CustomerService service;
}
41
42. The Anatomy of a Spring MVC @Controller
Spring MVC configuration - config
@Controller
public class CustomerController {
@RequestMapping(value=”/url/of/my/someurl”,
method = RequestMethod.POST)
public String processTheRequest( @RequestBody Customer postedCustomerObject) {
// ...
return “home”;
}
}
POST http://127.0.0.1:8080/url/of/my/someurl
42
43. The Anatomy of a Spring MVC @Controller
Spring MVC configuration - config
@Controller
public class CustomerController {
@RequestMapping(value=”/url/of/my/{id}”,
method = RequestMethod.POST)
public String processTheRequest( @PathVariable(“id”) Long customerId,
@RequestBody Customer postedCustomerObject) {
// ...
return “home”;
}
}
POST http://127.0.0.1:8080/url/of/my/someurl
43
44. DEMO
Demos:
• Spring REST service
• Spring REST client
Not confidential. Tell everyone.
47. Thin, Thick, Web, Mobile and Rich Clients: Mobile
Best strategy? Develop Native
• Fallback to client-optimized web applications
Spring MVC 3.1 mobile client-specific content negotiation and
rendering
• for other devices
• (there are other devices besides Android??)
47
48. DEMO
Demos:
• Mobile clients using client specific rendering
Not confidential. Tell everyone.
50. Thin, Thick, Web, Mobile and Rich Clients: Mobile
Spring REST is ideal for mobile devices
Spring MVC 3.1 mobile client-specific content
negotiation and rendering
• for other devices
Spring Android
• RestTemplate
50
52. Thin, Thick, Web, Mobile and Rich Clients: Mobile
CustomerServiceClient - client
! private <T> T extractResponse( ResponseEntity<T> response) {
! ! if (response != null && response().value() == 200) {
! ! ! return response.getBody();
! ! }
! ! throw new RuntimeException("couldn't extract response.");
! }
! @Override
! public Customer updateCustomer(long id, String fn, String ln) {
! ! String urlForPath = urlForPath("customer/{customerId}");!!
! ! return extractResponse(this.restTemplate.postForEntity(
urlForPath, new Customer(id, fn, ln), Customer.class, id));
! }
52
53. Thin, Thick, Web, Mobile and Rich Clients: Mobile
Demos:
• consuming the Spring REST service from Android
54. One Other approach
HTML5 all the way!
• HTML5 on the desktop browser interface
• HTML5 + PhoneGap on the client
• RESTful services on the server side to connect it all
Hello, thank you or having me. Im pleased to have the opportunity to introduce you today to Spring and the SpringSource Tool Suite \n\nMy anem is Josh Long. I serve as the developer advocate for the Spring framework. I&#x2019;ve used it in earnest and advocated it for many years now. i&#x2019;m an author on 3 books on the technology, as well as a comitter to many of the Spring projects. Additionally, I take community activism very seriously and do my best to participate in the community. Sometimes this means answering question on Twitter, or in the forums, or helping contribute to the InfoQ.com and Artima.com communities\n
Hello, thank you or having me. Im pleased to have the opportunity to introduce you today to Spring and the SpringSource Tool Suite \n\nMy anem is Josh Long. I serve as the developer advocate for the Spring framework. I&#x2019;ve used it in earnest and advocated it for many years now. i&#x2019;m an author on 3 books on the technology, as well as a comitter to many of the Spring projects. Additionally, I take community activism very seriously and do my best to participate in the community. Sometimes this means answering question on Twitter, or in the forums, or helping contribute to the InfoQ.com and Artima.com communities\n
\n
\n
\n
\n
\n
\n
\n
talk about how convenient the messaging support is, then roll back and start looking at how u might do the same thing manually. Explain that many of the pices are already there, and then seguqe into a discussion about the core Spring APIs. Lets imagine we&#x2019;re going to build ourselves a file system poller to notify us of when something&#x2019;s happened on the file system\n\n
\n
\n
\n
talk about how convenient the messaging support is, then roll back and start looking at how u might do the same thing manually. Explain that many of the pices are already there, and then seguqe into a discussion about the core Spring APIs. Lets imagine we&#x2019;re going to build ourselves a file system poller to notify us of when something&#x2019;s happened on the file system\n\n
talk about how convenient the messaging support is, then roll back and start looking at how u might do the same thing manually. Explain that many of the pices are already there, and then seguqe into a discussion about the core Spring APIs. Lets imagine we&#x2019;re going to build ourselves a file system poller to notify us of when something&#x2019;s happened on the file system\n\n
talk about how convenient the messaging support is, then roll back and start looking at how u might do the same thing manually. Explain that many of the pices are already there, and then seguqe into a discussion about the core Spring APIs. Lets imagine we&#x2019;re going to build ourselves a file system poller to notify us of when something&#x2019;s happened on the file system\n\n
\n
\n
\n
\n
\n
\n
\n
\n
talk about how convenient the messaging support is, then roll back and start looking at how u might do the same thing manually. Explain that many of the pieces are already there, and then seguqe into a discussion about the core Spring APIs. Lets imagine we&#x2019;re going to build ourselves a file system poller to notify us of when something&#x2019;s happened on the file system\n\n
talk about how convenient the messaging support is, then roll back and start looking at how u might do the same thing manually. Explain that many of the pieces are already there, and then seguqe into a discussion about the core Spring APIs. Lets imagine we&#x2019;re going to build ourselves a file system poller to notify us of when something&#x2019;s happened on the file system\n\n
\n
\n
\n
\n
\n
talk about how convenient the messaging support is, then roll back and start looking at how u might do the same thing manually. Explain that many of the pices are already there, and then seguqe into a discussion about the core Spring APIs. Lets imagine we&#x2019;re going to build ourselves a file system poller to notify us of when something&#x2019;s happened on the file system\n\n
talk about how convenient the messaging support is, then roll back and start looking at how u might do the same thing manually. Explain that many of the pices are already there, and then seguqe into a discussion about the core Spring APIs. Lets imagine we&#x2019;re going to build ourselves a file system poller to notify us of when something&#x2019;s happened on the file system\n\n
\n
\n
talk about how convenient the messaging support is, then roll back and start looking at how u might do the same thing manually. Explain that many of the pices are already there, and then seguqe into a discussion about the core Spring APIs. Lets imagine we&#x2019;re going to build ourselves a file system poller to notify us of when something&#x2019;s happened on the file system\n\n
\n
\n
\n
\n
talk about how convenient the messaging support is, then roll back and start looking at how u might do the same thing manually. Explain that many of the pices are already there, and then seguqe into a discussion about the core Spring APIs. Lets imagine we&#x2019;re going to build ourselves a file system poller to notify us of when something&#x2019;s happened on the file system\n\n
\n
talk about how convenient the messaging support is, then roll back and start looking at how u might do the same thing manually. Explain that many of the pices are already there, and then seguqe into a discussion about the core Spring APIs. Lets imagine we&#x2019;re going to build ourselves a file system poller to notify us of when something&#x2019;s happened on the file system\n\n
\n
talk about how convenient the messaging support is, then roll back and start looking at how u might do the same thing manually. Explain that many of the pices are already there, and then seguqe into a discussion about the core Spring APIs. Lets imagine we&#x2019;re going to build ourselves a file system poller to notify us of when something&#x2019;s happened on the file system\n\n
another example of the fact that often the client side model won&#x2019;t represent the server side model \n\n