├── JavaEE Design Patterns and Architecture - Presentation v0.7.pdf └── README.md /JavaEE Design Patterns and Architecture - Presentation v0.7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/in28minutes/Java-EE-Design-Patterns/c47509735f63e390cd9319de9c85ca3076a34ec7/JavaEE Design Patterns and Architecture - Presentation v0.7.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Java-EE-Design-Patterns 2 | 3 | ##Todo 4 | - Make it a very short course 5 | - Look at Santosh's book further 6 | - Decide if creating the course makes sense. It does now!! 7 | - Dependency Injection 8 | 9 | # Front Controller 10 | - Look at all incoming requests. 11 | - Mapping from String to the View. 12 | - DataBinding 13 | - Spring MVC - DispatcherServlet 14 | - Security - Spring MVC 15 | - Logging 16 | 17 | #Application Controller 18 | - Invoke business components. 19 | - Identify and redirect to the next view. 20 | 21 | #Context Object 22 | - Typically Presentation Tier is tightly coupled to the Servlet API - extensively using HttpServletRequest and HttpServletResponse . Page controllers cannot be reused outside Web Application context. 23 | - Increase the reusability of page controllers. 24 | - Use a context object to encapsulate and share form data without any protocol dependency. 25 | - Spring MVC uses ModelMap as the Context Object. This class serves as generic model holder for both Servlet and Portlet MVC, but is not tied to either of those. 26 | - Easier to Test 27 | 28 | #Composite View 29 | - Tiles and SiteMesh 30 | - Web pages have header footer navigation and content. 31 | - View in mobile might be different from a desktop 32 | - The solution to this is to use composite views that are composed of multiple atomic subviews. 33 | - Layout of the page may be managed independently of the content. 34 | - Web designers can design the layout of a site, using static content in each of the template regions. 35 | 36 | #View Helper 37 | - Tag Libraries used for Date Formatting 38 | - Spring Tag Libraries for Form Binding 39 | 40 | #Intercepting Filter 41 | - AOP 42 | - Logging 43 | - authentication filters , logging & auditing , Image conversion , data compression , encryption 44 | 45 | 46 | 47 | #Service Locator (With Spring - these kind of things have become obselete) 48 | - Is a Singleton that is used to reuse code performing the JNDI lookup . 49 | - Abstracts complexity 50 | - Provides uniform service access to Clients 51 | - Improves performance 52 | - Sometimes referred to as the EJBHomeFactory ( EJB design patterns ) . 53 | 54 | #Session Facade 55 | - The session bean will probably interact with two or more entity beans 56 | - Transaction 57 | - Easier to use for the Client 58 | - Better Performance 59 | 60 | #Business Delegate 61 | - Presentation Tier need access to Distributed Business Services. 62 | - Code needed to access them might need understand the fact that the service is distributed, there-by, will be more complex. Example, EJB Remote Methods from time before. 63 | - Plain Java classes that hide EJB API complexity by encapsulating code required to discover, delegate to and recover from invocations on the session and message façade EJB layers. 64 | - Use on large projects where the web team is separate from the EJB team . 65 | 66 | # Service Activator 67 | - Some long-running use cases take long time. Instead of blocking the users, we can run these asynchronously 68 | - JMS Can be used 69 | 70 | #Data Transfer Object / Value Object 71 | - Typically created by a Session Facade 72 | - Reflects the structure of the data needed by the view 73 | - Anaemic, without Business Logic 74 | - For me its an anti pattern 75 | - Client makes a single remote method invocation to the enterprise bean to request the Transfer Object / Value Obects instead of numerous remote method calls to get individual attribute values. 76 | - A value object is an object that encapsulates all the data required by a client . 77 | - The client can then call get methods on the value object to get all the data needed by the client . 78 | 79 | #Data Access Object (@Repository) 80 | - Use a Data Access Object ( DAO ) to abstract all access to a data source. 81 | - The DAO will help to hide details of access to the data source from the client. 82 | - Promotes easier migration from one data source to another 83 | 84 | 85 | 86 | #Value List Handler 87 | - Used to retrieve large amounts of data 88 | - Provides alternatives to EJB Finders for large queries. 89 | - Cache query results on server side. 90 | - Value List Handler sequence 91 | 92 | 93 | #Domain Model 94 | 95 | #Model View Controller 96 | 97 | #Page Controller 98 | 99 | 100 | --------------------------------------------------------------------------------