Java EE 6 & Spring

Total Page:16

File Type:pdf, Size:1020Kb

Java EE 6 & Spring Java EE 6 & Spring: A Lover’s Quarrel Derrick Kittler Mauricio “Maltron” Leal Vamsi Chemitiganti Agenda o The goal of this talk o Evolution of Spring o Evolution of Java EE 6 o Side-by-Side o Migrating o Java EE 6 and Spring Coexistence o Conclusion Fair Comparison Orange Apple Fair Comparison: NOT Java EE 6 Specification Technology Framework Fair Comparison Java EE 6 Approach to a Enterprise Solution !! If can’t beat them, join them !!!! Java EE 6 Sometimes, a join solution can be the best approach The goal of this talk is NOT… Compare both Java EE 6 technologies and declare a winner The goal of this talk is… • How to deliver a good enterprise application • Evaluate both technologies • Show some migration path (only when makes sense) Technology Choice: The big picture Developer’s Costs Skill Set Java EE 6 Vendor Monitoring Support Infrastructure Skill Set Evolution of Spring Dependecy Proble Specific Annotation driving JSR 300 “at inject” A new “C” Mobile features Injection XML wiring New Spring namespace Modern Web POJO Extensible Automatic bean Expression Configuration Data Access oriented Configuration configuration Language profiles Social development Bean Scoping New annotation First-class REST Unified property Security Declarative Groovy, JRuby driven MVC support resolution Cloud Ready AOP & and BeanShell framework Java based Java configuration transactions JSP tag library JUnit 4-based configuration features MVC Java 5 integration testing Several new Servlet 3.0 support Framework autoboxing and Spring MVC Declarative generics features caching Support for JSR Spring MVC 303 declarative enhancements validation Scheduled Jobs What is Spring ? • Explicit Configuration • Aspect oriented • Ease-of-use abstractions over lower-level, general purpose API’s like JDBC, JMS and JavaMail • More flexibility for fine grained control, but more complexity • Deployment/Runtime complexity • Uses a Java EE container underneath Spring Data Spring for Apache Hadoop Redis HBase GemFire JPA QueryDSL HDFS MapReduce Hive MongoDB Neo4j Soir JDBC Splunk Pig Cascading SI/Batch Google App Engine AWS Beanstalk Spring Batch Spring Integration Spring Social Heroku Spring AMQP Spring Roo Twitter LinkedIn FaceBook Cloud Foundry Spring Web Flow Spring Web Services OpenShift Spring Security Spring Secure OAuth Tomcat 5+ Spring Framework GlassFish 2.1+ DI AOP TX JMS JDBC ORM OXM Scheduling WebLogic 9+ MVC REST JMX Testing Caching Profiles Expression WebSphere 6.1+ Java EE 1.4+ / SES+ JPA 2.0 JSF 2.0 JSR 250 JSR 330 JSR 303 JTA JDBC 4.1 JMX 1.0+ Spring JMS Configuration Java EE 6 Evolution of J2EE (later Java EE) May’98 Dec’99 Sep’01 Nov’03 May’06 Dec’09 Apr’13 Enterprise Robust Web Ease Productivit Application Scalable Services Development Lightweight y & HTML 5 Project J2EE 1.2 J2EE 1.3 J2EE 1.4 Java EE 5 Java EE 6 Java EE 7 JPE EJB 1.0 EJB 1.1 EJB 2.0 EJB 2.1 EJB 3.0 Prunning JMS 2.0 Servlet 2.1 Servlet 1.1 (CMP, MDB, Servlet 2.4 JPA 1.0 Extensibility Batch JSP 1.1 local EJB) JSP 2.0 JSF 1.2 CDI Caching JMS 1.0.2 Servlets 2.3 Web Servlets 2.5 JAX-RS TX JDBC 2.0 (Event, Services JSP 2.1 Servlet 3.0 Interceptor JNDI 1.2 Filters) JMX (Common EJB 3.1 Lite WebSocket JAF 1.0 JSP 1.2 J2EE EL) JSON JTA 1.0 JDBC 2.1 Deploy JAXB, JAX-RS 2.0 JTS 0.95 JCA 1.0 JACC SAAJ, JavaMail 1.1 JAAS 1.0 JAAS WebService JAXP 1.0 JAX-RPC Injection JAXR JSTL 10 specs 13 specs 20 specs 24 specs 28 specs 32 specs Lessons learned with Spring Project J2EE 1.2 J2EE 1.3 J2EE 1.4 Java EE 5 Java EE 6 Java EE 7 JPE • One monolitic server • Lightweight and • Hard to decouple technologies Heavyweight servers (separated • Heavyweight by Profiles) • Technologies doesn’t depend solely on containers • CDI is a gamer changer • Arquilian is ALSO a gamer changer Java EE 6 Highlights • Extensibility • Enhanced easy of Development • JSF 2.1 • Built-In AJAX • Expanded View Model • Profiles Java • Vendor Support EE 6 • CDI (Contexts & Dependency Injection) What is CDI anyway ? MyInterface hello = new MyImplementation(); What I want How is going to work What is CDI anyway ? @Inject MyInterface hello; • Less coding = More Productivity • Server (Container) “injects” the other part FOR YOU • Loose coupling Hollywood Principle: • Refactoring easy “Don’t call us, • Easy Maintenance we will call you” Java EE 6 Side-by-Side • Java EE 6 and Spring are both capable middleware solutions • Functionally equivalent Java EE 6 for the most part, with very different approaches • For very vanilla applications, code is almost identical Java EE vs Spring Framework Features Java EE 6 Spring Framework Dependency JSR 250 JSR 330 CDI JSR 250 JSR 330 Spring IoC Injection Container Spring AOP Inteceptor Decorator AspectJ AOP Persistence JPA 2 JPA 2 Hibernate JDBC iBATIS JDO Transactions JTA EJB 3.1 JTA JDBC JPA Hibernate JDO Presentation Spring JSF 2 JSF 2 Struts Tapestry WebWork Framework MVC Spring MVC JAX- Web JAX-WS JAX-RS JAX-WS XFire Services REST RPC Messaging JMS EJB 3.1 JMS Testing CDI EJB 3.1 JPA 2 JUnit TestNG Spring Framework and Java EE 6 (Side-by-Side) Components Spring MVC/IoC/Security/JPA/JAX-WS JSF/CDI/JAAS/JPA/JAX-RS/JAX-WS JBoss EAP 6 Server Tomcat 7 11 Kb (WAR file) File Size 32,153 Kb (WAR file) JARs/ XMLs 0 / 4 36 / 5 Configuration 37 Lines 92 Pre-Deploy 33 Mb Heap / 48 Mb Perm Memory 23 Mb Heap / 21 Mb Perm Post-Deploy 41 Mb Heap / 84 Mb Perm Memory 107 Mb Heap/ 52 Mb Perm Memory (100 71 Mb Heap / 92 Mb Perm Threads) 81 Mb Heap/ 47 Mb Perm Response 2459 ms (average) Time 1100 ms (average) Should I migrate my current Spring application to Java EE 6 ? Why ? To migrate or not to migrate ? • Application is a legacy (written in early versions of Spring) • A real benefit will come Java EE 6 from a migration • Faster • More secure • Easy to manage • Support from multiple vendors Java EE 6 CDI and IoC Java EE 6 @Named @Controller @RequestScoped @Scope(“request”) public class PersonBean { public class PersonBean { @Inject @AutoWired private SocialID social; private SocialID social; Persistence Java EE 6 @Stateless @Repository public class PersonDAO { public class PersonDAO { @PersistenceContext @PersistenceContext private EntityManager em; private EntityManager em; Persistence Java EE 6 @Stateless @Repository public class PersonDAO { public class PersonDAO { @Resource @Autowired private DataSource ds; private JdbcTemplate temp; public void save(Person p) { public void save(Person p) { try { temp.update( Connection c = “insert … values (?,?)”, ds.getConnection(); p.name(), p.age()); PreparedStatement ps = } c.prepareStatement(“… } ps.setString(1, p.name()); ps.setInt(2, p.age()); ps.execute(); … Transaction and Exception Java EE 6 @TransactionAttribute(…) @Transactional(…) @Stateless @Repository public class PersonDAO { public class PersonDAO { @PersistenceContext @PersistenceContext private EntityManager em; private EntityManager em; Transaction and Exception Java EE 6 @ApplicationException(rollback=tr @Transactional(rollbackFor=DaoExc ue) eption.class) public class DAOException public class PersonController { extends Exception { Web Java EE 6 @Named @Controller @RequestScoped @Transactional public class PersonMBean { public class PersonController { private Person p; @Autowired private List<Person> ls; private PersonDAO dao; @Inject @RequestMapping(“/add”) private PersonDAO dao; public ModelAndView add(Person p) { public void save() { dao.save(p); dao.save(p); ModelAndView mv = new resetForm(); ModelAndView(“ok”); } mv.addObject(“person”, … dao.list); return mv; WebService (SOAP) Java EE 6 @WebService @WebService public class PersonWS { public class PersonWS extends SpringBeanAutowiringSupport { @Inject private PersonDAO dao; @Autowired private PersonDAO dao; public List<Person> list() { return dao.list(); public List<Person> list() { } if(dao == null) … injectionContext(this); … … WebService (REST) Java EE 6 @Path(“/”) @Controller public class PersonResource { public class PersonResource { @Inject @Autowired private PersonDAO dao; private PersonDAO dao; @GET @RequestMapping( @Path(“/person/{id}”) value=“/person/{id}”, @Produces(“application/json”) produces={“application/json”} public Person method=RequestMethod.GET) load(@PathParam(“id”)Long ID) { @ResponseBody return dao.seek(ID); public Person } load(@PathVariable(“ID”)Long ID) … { return dao.seek(ID); … Messaging Queue Java EE 6 InitialContext ic = … @Autowired JmsTemplate t; ConnectionFactory cf = … @Autowired Queue q; Connection c = … public void sendMessage() { Session s = c.createSession(… this.t.send(q, new TextMessage m = s.createText( MessageCreator() { “hello”); public Message Queue q = (Queue)ic.lookup(… createMessage(Session s) throws QueueSender sender = … JMSException { Sender.send(m); return s.createTextMessage(“hello”); c.close(); }}); } Java EE 6 Java EE 6 and Spring coexistence Java EE 6 • Integration with Java EE API’s • Spring beans can be injected into JSF Managed Beans • Spring beans can be referenced in EL with no JSF Backing beans • Spring JmsTemplate can be used on top of raw JMS API for convenience • Spring Listeners similar to EJB MDB especially JCA rather than JMS listeners • Hibernate validator standardized as Bean Validation (JSR 303) • Spring 3 supports excellent bi-directional integration with EJB’s • CDI and Spring Integration through the Spring Bridge to CDI • Native support for Java EE • Java EE 6 annotations supported by Spring • Spring can use JPA / Hibernate natively • Application Server Integration • DataSources can use application Server QoS pooling, transactions, statement caching, debugging, monitoring and security
Recommended publications
  • Spring Roo - Reference Documentation
    Spring Roo - Reference Documentation DISID CORPORATION S.L. Table of Contents Getting started . 1 1. Overview . 2 2. What’s new in Spring Roo 2.0 . 3 Improved extensibility . 3 No backward compatibility . 3 Usability improvements . 3 Centered in Spring technologies . 3 Application architecture . 4 Domain model . 4 View layer . 4 3. Requirements . 6 4. Install Spring Roo . 7 Using Spring Roo . 9 5. The Roo shell . 10 6. Impatient beginners . 12 7. Create your Spring Boot application . 13 8. Configure the project settings . 14 9. Setup the persistence engine . 15 10. The domain model . 16 JPA entities . 16 DTOs . 20 11. The data access layer . 21 Spring Data repositories . 21 Default queries . 21 12. The service layer . 22 Service API and Impl . 22 13. The view layer . 23 Thymeleaf view engine . 23 Spring MVC Controllers . 23 Spring Webflow . 25 14. The integration layer . 26 REST API . 26 WS API . 26 Email . ..
    [Show full text]
  • 2019 Stateof the Software Supply Chain
    2019 State of the Software Supply Chain The 5th annual report on global open source software development presented by in partnership with supported by Table of Contents Introduction................................................................................. 3 CHAPTER 4: Exemplary Dev Teams .................................26 4.1 The Enterprise Continues to Accelerate ...........................27 Infographic .................................................................................. 4 4.2 Analysis of 12,000 Large Enterprises ................................27 CHAPTER 1: Global Supply of Open Source .................5 4.3 Component Releases Make Up 85% of a Modern Application......................................... 28 1.1 Supply of Open Source is Massive ...........................................6 4.4 Characteristics of Exemplary 1.2 Supply of Open Source is Expanding Rapidly ..................7 Development Teams ................................................................... 29 1.3 Suppliers, Components and Releases ..................................7 4.5 Rewards for Exemplary Development Teams ..............34 CHAPTER 2: Global Demand for Open Source ..........8 CHAPTER 5: The Changing Landscape .......................35 2.1 Accelerating Demand for 5.1 Deming Emphasizes Building Quality In ...........................36 Open Source Libraries .....................................................................9 5.2 Tracing Vulnerable Component Release 2.2 Automated Pipelines and Downloads Across Software Supply Chains
    [Show full text]
  • What's New in GWT?
    What’s New in GWT? David Chandler Google Web Toolkit Team Atlanta, GA USA [email protected] 1 Agenda Why rich Web apps with GWT? GWT Quickstart Developer tools GWT performance for your users Building with GWT 2.12 2 GWT in 10 sec Asynchronous JavaScript And XML++ 3 GWT in 60 sec Open source Java to JavaScript compiler Lets you write rich Web apps in Java Cross-browser just works (FireFox, Chrome, Safari, IE 6+) Produces small, fast JavaScript Easy (and efficient) RPC Great for large projects / teams 4 Browser-Proof Your JS Code IE Firefox Safari Chrome Opera 5 5 No plugins required Silverlight VML Flash 6 6 Can you find the bug? Hint: JavaScript is a dynamic language 7 7 Catch errors at compile time Java is a static language 8 8 Completion, refactoring... 9 9 Eating our own dogfood += AdSense, Maps, Docs, Groups... 10 10 Demos Booked In Typing race 11 Rich ecosystem www.gwtmarketplace.com 12 More ecosystem Util: GIN, gwt-dnd, gwt-fx, gwt-comet, ... Widgets: EXT-GWT, Smart-GWT, ... Frameworks: Vaadin! 13 4+ years in review May 2006 GWT 1.0 Launch at JavaOne … … Aug 2008 GWT 1.5 Java 5 language support Apr 2009 GWT 1.7 Dedicated IE8 support Fall 2009 GWT 2.0 UIBinder (XML template), runAsync() Oct 2010 GWT 2.1 MVP, RequestFactory, Spring Roo 14 14 GWT delivers... Productivity for developers - Language, IDEs, tools, libraries - People, ecosystem Performance for users - 'Perfect' caching - Whole program optimization 15 15 Developing with GWT Develop - Google Plugin for Eclipse, GWT Designer, STS / Roo Debug - In Eclipse with dev mode
    [Show full text]
  • Great Lakes Software Symposium Westin Chicago Northwest November 11 - 13, 2011
    Great Lakes Software Symposium Westin Chicago Northwest November 11 - 13, 2011 Fri, Nov. 11, 2011 Ballroom 3-4 Ballroom 1-2 Gallery Chambers Stanford Trafalgar 12:00 - 1:00 PM REGISTRATION 1:00 - 1:15 PM WELCOME 1:15 - 2:45 PM What&apos;s new in Spring Resource-Oriented Programming HTML5 Concurrency without Busy Java Introduction to Lean-Agile Craig Walls Architectures : REST I Tim Berglund pain in pure Java Developer&apos;s Software Development Brian Sletten Venkat Subramaniam Guide to Java 7 Paul Rayner Ted Neward 2:45 - 3:15 PM BREAK 3:15 - 4:45 PM NoXML: Spring Resource-Oriented NoSQL Smackdown! Collections for Concurrency Busy Java Measure for Measure for XML-Haters Architectures : REST II Tim Berglund Venkat Subramaniam Developer&apos;s Guide &#8211; Lean Principles Craig Walls Brian Sletten to Multi-Paradigm Design for Effective Metrics Ted Neward and Motivation Paul Rayner 4:45 - 5:00 PM BREAK 5:00 - 6:30 PM Introducing Spring Strategic Design Cassandra: Radical Towards a Humane Busy Java Resource-Oriented Roo: From Zero Using DDD NoSQL Scalability Interface&#8212;Aesthetics Developer&apos;s Architectures : to Working Spring Paul Rayner Tim Berglund and Usability Guide to Guava RDF/SPARQL Application in Record Time Venkat Subramaniam Ted Neward Brian Sletten Craig Walls 6:30 - 7:15 PM DINNER 7:15 - 8:00 PM Keynote: by Venkat Subramaniam Great Lakes Software Symposium Westin Chicago Northwest November 11 - 13, 2011 Sat, Nov. 12, 2011 Ballroom 3-4 Ballroom 1-2 Gallery Chambers Stanford Trafalgar 8:00 - 9:00 AM BREAKFAST 9:00 - 10:30
    [Show full text]
  • Spring Framework Cookbook I
    Spring Framework Cookbook i Spring Framework Cookbook Spring Framework Cookbook ii Contents 1 Spring Framework Best Practices 1 1.1 Define singleton beans with names same as their class or interface names.....................1 1.2 Place Spring bean configuration files under a folder instead of root folder.....................1 1.3 Give common prefixes or suffixes to Spring bean configuration files........................2 1.4 Avoid using import elements within Spring XML configuration files as much as possible.............2 1.5 Stay away from auto wiring in XML based bean configurations...........................2 1.6 Always externalize bean property values with property placeholders........................3 1.7 Select default version-less XSD when importing namespace definitions.......................3 1.8 Always place classpath prefix in resource paths...................................4 1.9 Create a setter method even though you use field level auto wiring.........................4 1.10 Create a separate service layer even though service methods barely delegate their responsibilities to correspond- ing DAO methods...................................................4 1.11 Use stereotype annotations as much as possible when employing annotation driven bean configuration......5 1.12 Group handler methods according to related scenarios in different Controller beans................6 1.13 Place annotations over concrete classes and their methods instead of their interfaces................6 1.14 Prefer throwing runtime exceptions instead of checked exceptions
    [Show full text]
  • Java Web Frameworks Which One to Choose?
    Java Web Frameworks Which One to Choose? Mohamadou Nassourou Department of Computer Philology & Modern German Literature University of Würzburg Am Hubland D - 97074 Würzburg [email protected] Abstract This article discusses web frameworks that are available to a software developer in Java language. It introduces MVC paradigm and some frameworks that implement it. The article presents an overview of Struts, Spring MVC, JSF Frameworks, as well as guidelines for selecting one of them as development environment. 1. Introduction Over the last decade, the number of Java Web Frameworks has considerably increased. There are basically two types of Java Web Frameworks: component oriented frameworks and action based ones. Action frameworks are mainly focussing on request/response processing. Action frameworks are very procedural with little reusability of code/components. Component frameworks focus on object oriented web design. They do not concentrate on request/response processing. There exist several actions frameworks among them Struts and Spring MVC that I am going to present. I will introduce Java Server Faces (JSF) which is a component framework. All the frameworks that will be presented follow Model-View-Controller design pattern. 2. Model-View-Controller (MVC) Model-View-Controller design pattern helps developers to better organise their program's code. In fact it provides a way of separating user interface i.e View from the business logic i.e Model. A Controller is responsible for invoking appropriate pages according to user's request. It determines also what business logic to call for a given request. Practically JSP pages represent the view and servlets the controller.
    [Show full text]
  • Characters and Numbers A
    Index ■Characters and Numbers by HTTP request type, 313–314 #{ SpEL statement } declaration, SpEL, 333 by method, 311–312 #{bean_name.order+1)} declaration, SpEL, overview, 310 327 @Required annotation, checking ${exception} variable, 330 properties with, 35 ${flowExecutionUrl} variable, 257 @Resource annotation, auto-wiring beans with ${newsfeed} placeholder, 381 all beans of compatible type, 45–46 ${resource(dir:'images',file:'grails_logo.pn g')} statement, 493 by name, 48–49 ${today} variable, 465 overview, 42 %s placeholder, 789 single bean of compatible type, 43–45 * notation, 373 by type with qualifiers, 46–48 * wildcard, Unix, 795 @Value annotation, assigning values in controller with, 331–333 ;%GRAILS_HOME%\bin value, PATH environment variable, 460 { } notation, 373 ? placeholder, 624 ~.domain.Customer package, 516 @Autowired annotation, auto-wiring 23505 error code, 629–631 beans with all beans of compatible type, 45–46 ■A by name, 48–49 a4j:outputPanel component, 294 overview, 42 AboutController class, 332 single bean of compatible type, 43–45 abstract attribute, 49, 51 by type with qualifiers, 46–48 AbstractAnnotationAwareTransactionalTe @PostConstruct annotation, 80–82 sts class, 566 @PreDestroy annotation, 80–82 AbstractAtomFeedView class, 385–386 @RequestMapping annotation, mapping AbstractController class, 298 requests with AbstractDependencyInjectionSpringConte by class, 312–313 xtTests class, 551–552, 555 985 ■ INDEX AbstractDom4jPayloadEndpoint class, AbstractTransactionalTestNGSpringConte 745, 747 xtTests class, 555,
    [Show full text]
  • A Domain Specific Graphical User Interface Framework
    Matti Panula A DOMAIN SPECIFIC GRAPHICAL USER INTERFACE FRAMEWORK Faculty of Engineering and Natural Sciences Master of Science Thesis December 2019 i ABSTRACT Matti Panula: A Domain Specific Graphical User Interface Framework Master of Science Thesis Tampere University Master’s degree Programme in Management and Information Technology December 2019 Since the early days of software development, there has been an ongoing trend towards higher- order or higher level abstractions in programming languages, software libraries and application frameworks. Some of the arguments for software development tools with higher levels of abstrac- tion include simpler software development, improved portability and better maintainability. Higher level abstractions can however lead to reduced performance. This thesis presents an innovative graphical user interface software solution that mixes high-level and low-level approaches to achieve acceptable performance while retaining good maintainability. The solution is an extension to a graphical application framework called JavaFX. The scope of this thesis is defined by a software development project which goal is to create a graphical user interface framework. The framework is used in the creation of customer specific user interfaces for an accompanying intralogistics system. The resulting user interfaces must be able to visualize possibly thousands of objects moving on a factory floor. The views must simul- taneously support user-initiated zooming, panning, and tilting of the two-dimensional view. Meet- ing these requirements while maintaining acceptable performance, requires an unconventional solution and a deviation from idiomatic JavaFX. The user interface framework in question is developed using a high-level graphical user interface application framework called JavaFX. JavaFX is the most recent graphical user interface toolkit included in the official Java Development Kit.
    [Show full text]
  • The Spring Framework: an Open Source Java Platform for Developing Robust Java Applications
    International Journal of Innovative Technology and Exploring Engineering (IJITEE) ISSN: 2278-3075, Volume-3 Issue-2, July 2013 The Spring Framework: An Open Source Java Platform for Developing Robust Java Applications Dashrath Mane, Ketaki Chitnis, Namrata Ojha Abstract— The fundamental concepts of Spring Framework is Supported deployment platforms range from standalone presented in this paper.Spring framework is an open source Java applications to Tomcat and Java EE servers such as platform that provides comprehensive infrastructure support for WebSphere. Spring is also a first-class citizen on major developing robust Java applications very easily and very rapidly. cloud platforms with Java support, e.g. on Heroku, Google The Spring Framework is a lightweight solution and a potential App Engine, Amazon Elastic Beanstalk and VMware's one-stop-shop for building your enterprise-ready applications. Cloud Foundry.[1] IndexTerms— Aspect Oriented Programming, Dependency Injection, IoC Container, ORM. II. SPRING FRAMEWORK ARCHITECTURE Spring could potentially be a one-stop shop for all your I. INTRODUCTION enterprise applications; however, Spring is modular, Spring is the most popular application development allowing you to pick and choose which modules are framework for enterprise Java. Millions of developers applicable to you, without having to bring in the rest. around the world use Spring Framework to create high The Spring Framework provides about 20 modules which performing, easily testable, reusable code. Spring can be used based on an application requirement. framework is an open source Java platform and it was initially written by Rod Johnson and was first released under the Apache 2.0 license in June 2003.
    [Show full text]
  • Spring Framework 4 on Java 8
    Spring Framework 4 on Java 8 Juergen Hoeller Spring Framework Lead Pivotal Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software, Inc. and licensed under a 1 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ The State of the Art: Component Classes @Service @Lazy public class MyBookAdminService implements BookAdminService { @Autowired public MyBookAdminService(AccountRepository repo) { ... } @Transactional public BookUpdate updateBook(Addendum addendum) { ... } } Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software, Inc. and licensed under a 2 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ The State of the Art: Configuration Classes @Configuration @Profile("standalone") @EnableTransactionManagement public class MyBookAdminConfig { @Bean @Scope("session") public BookAdminService myBookAdminService() { MyBookAdminService service = new MyBookAdminService(); service.setDataSource(bookAdminDataSource()); return service; } ... } Unless otherwise indicated, these slides are © 2013-2014 Pivotal Software, Inc. and licensed under a 3 Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ SPRING IO CORE: Introducing Spring Framework 4.0 Unless otherwise indicated, these
    [Show full text]
  • Patterns and Frameworks
    Patterns und Frameworks für die Entwicklung paralleler und verteilter Anwendungen in Java Verfasser: Prof. Dr. Jens Ehlers, Technische Hochschule Lübeck Webseite: https://oncampus.pages.th-luebeck.de/patterns-and-frameworks GitLab: https://git.mylab.th-luebeck.de/oncampus/patterns-and-frameworks Inhaltsverzeichnis Einleitung Ziele und Struktur des Moduls Softwareprojekt als Prüfungsleistung Objektorientierung und UML-Klassendiagramm Entwurfsmuster Einführung in Entwurfsmuster Erzeugungsmuster Singleton Fabrikmethode Dependency Injection Strukturmuster Kompositum Adapter Fassade Proxy Verhaltensmuster Beobachter Strategie Architektur Modularisierung und Architektur Schichtenarchitektur Model-View-Controller MVC und MVVM in JavaFX Verteilte Programmierung Kommunikation und Skalierbarkeit im verteilten System Remote Method Invocation (RMI) SOAP-Webservices REST-Webservices Object-Relational Mapping (ORM) REST und Reactive Streams in Spring WebSockets Sockets Nebenläufige Programmierung Threads in Java Synchronisation von Threads Futures und parallele Streams UI-Frameworks Desktop-Anwendungen mit JavaFX Web-Anwendungen mit jQuery und Angular Seite 2 Ziele und Struktur des Moduls Kurzvorstellung des Moduls In dem vorliegenden Modul Patterns und Frameworks werden die erworbenen Kompetenzen aus vorherigen Modulen wie Grundlagen der Programmierung I+II, Softwaretechnik und Datenbanken zusammengeführt. Die Prüfungsleistung ist ein Softwareprojekt, dass die Studierenden i.d.R. in einem kleinen Team bearbeiten. Die Studierenden lernen bewährte Entwurfs-
    [Show full text]
  • GROOVY Name: Groovy Description: Documentation and Web Site of the Groovy Scripting Language for the JVM
    Space Details Key: GROOVY Name: Groovy Description: Documentation and web site of the Groovy scripting language for the JVM. Creator (Creation Date): bob (Apr 15, 2004) Last Modifier (Mod. Date): glaforge (Apr 12, 2005) Available Pages • Home • Advanced Usage Guide • Ant Task Troubleshooting • BuilderSupport • Compiling Groovy • Compiling With Maven2 • Design Patterns with Groovy • Abstract Factory Pattern • Adapter Pattern • Bouncer Pattern • Chain of Responsibility Pattern • Composite Pattern • Decorator Pattern • Delegation Pattern • Flyweight Pattern • Iterator Pattern • Loan my Resource Pattern • Null Object Pattern • Pimp my Library Pattern • Proxy Pattern • Singleton Pattern • State Pattern • Strategy Pattern • Template Method Pattern • Visitor Pattern • Dynamic language beans in Spring • Embedding Groovy • Influencing class loading at runtime • Make a builder • Mixed Java and Groovy Applications • Optimising Groovy bytecodes with Soot Document generated by Confluence on Sep 20, 2007 16:02 Page 1 • Refactoring with Groovy • Introduce Assertion • Replace Inheritance with Delegation • Security • Writing Domain-Specific Languages • Articles • Community and Support • Contributing • Mailing Lists • Related Projects • User Groups • Cookbook Examples • Accessing SQLServer using groovy • Alternate Spring-Groovy-Integration • Batch Image Manipulation • Compute distance from Google Earth Path (in .kml file) • Convert SQL Result To XML • Embedded Derby DB examples • Embedding a Groovy Console in a Java Server Application • Executing External
    [Show full text]