Download
presentation n.
Skip this Video
Loading SlideShow in 5 Seconds..
Presentation PowerPoint Presentation
Download Presentation
Presentation

Presentation

144 Views Download Presentation
Download Presentation

Presentation

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Presentation SE18 T07S

  2. SE 18 Team 07 S

  3. Agenda • Recap • Business Domain • Global Use Case Diagram • Architecture View of ECMS • Design Use Cases • Development • Important Features • Technical Challenges • Future Aspects and Improvements • Doing It Again • Management Highlights • Q & A

  4. Recap • Project Sponsor • WWW Cargo Pte Ltd • Project Background • Daily business operation heavily relies on shared MS Excel files • Project Objective • To develop ECMS system which will assist their daily business operation • Main Project Scope • Customer/Agent Profile Management • Customer Cargo Tracking Management • Sea/Air Import Operation Processing

  5. Recap Global Use Case Diagram

  6. Recap • A multi layer architecture powered by Spring Framework, ExtJS, Spring Security and Hibernate. • Taken advantage of Spring’s multi layer injection and loose coupled approach of having an MVC architecture. • Rich UI achieved using ExtJS 4.0 Framework at UI layer. • Communication achieved using AJAX calls (XMLHttpRequest) from Client to Server using JSON objects.

  7. Recap Architecture View of ECMS

  8. Design

  9. Design Use Case #1 (UI Layer)Maintain Air Freight Job Records

  10. Design Use Case #1 (Service Layer)Maintain Air Freight Job Records (ADD)

  11. Design Use Case #1 (Service Layer) Maintain Air Freight Job Records (Update)

  12. Design Use Case #1 (Service Layer) Maintain Air Freight Job Records (Remove)

  13. Design Use Case #1 (Service Layer) Maintain Air Freight Job Records (List)

  14. Development

  15. Development Approach • A reference model developed for an important use case (Air Job) including UIwidgets, controllers, services and DAOs. • After full requirement analysis Entities and DAO layer interfaces are finalized, and implemented. • Individual was assigned use cases to construct both UI components and Service components.

  16. Flow of Development Activities Requirement Gathering, UI Prototype and Analysis Continuous Integration and Test Entity and DAO Implementation Design and Development Of Use Cases Experimental Reference application development Improvement And updates in Reference App

  17. Development Activities

  18. Important Features

  19. GRID Panel • All use cases has their entry point at Grid Panels, details of the record can be view in pop-up window and arranged in tabs. • Grid Panels are build much powerful to provide functionalities such as • Filter/Search Records ( Including advanced search) • Refresh the Grid without navigating away from the page. • Pagination. • Add, Remove and Update records, all in one request to server (which enhance usability and makes less server calls) • Sorting by columns and mix of columns.

  20. GRID Panel

  21. Tab Panels with Forms • Detail of records are shown in a pop-up window. • Pop-up window can include as many tabs as required. • Tabs contains as many forms as required using Accordion layout.

  22. Tab Panel with Forms

  23. Event Based UI programming model • Following important events are used to make server calls upon events trigger when User interacts with the system. • beforeShow (to assemble different forms and their data before it shown to the user.) • afterRequest (to fetch the records to sync UI store with database asynchronously and avoid any race conditions) • beforeRequest (to set parameters to the request) • beforeDestroy (to avoid destroying the pop-up windows and forms to enhance the performance of the system) • expand (upon expanding the accordion layout’s panels) • Collapse( upon collapsing the accordion layout’s panels). • beforeRender (executes before rendering any view)

  24. Filter/Search Records

  25. Transaction Management and Concurrency Control • Optimistic Concurrency control mechanism is used. • This is achieved by version checking against session and retrieved objects, upon any update and delete.

  26. Versioning to control Concurrent updates RequestContextHolder Request Session Version ECMS DB DAO Version

  27. Navigation Controls • A portal style of navigation controls implemented. • Java Scripts are loaded and un-loaded in and from the browser’s DOM respectively to build UI components. • Single page provide access to all the functionalities.

  28. Spring Security

  29. Spring Security • Plug and play way of applying security to the web application. • More configuration less of coding to maintain the security aspects of the application. • Aspect Oriented Programming model (AOP) • Spring Security 3.0 release is experimented and successfully plugged into Spring Framework 3.x. • Secure and extremely secure folders are created to secure static and dynamic contents of server. • Access level of such folders are described in security configuration xml. • Cryptography is used to protect password from exposure.

  30. Security Context Security Context Authentication Object Authority WebAuthenticationDetails Object User

  31. Security Schema

  32. Hibernate

  33. Hibernate (DAO Layer) • JPA with Hibernate 3 as persistence provider • DAOs are configured through Dependency Injection and participate in Spring's resource and transaction management. <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory"><ref bean="sessionFactory"/></property> </bean> • Open Session In View Pattern • To prevent LazyInitializationException" while rendering the view • CascadeType.ALL • For all parent-children OneToMany relationships in the system, such as customer to suppliers, job to subjobs etc

  34. Others

  35. Jasper Report • Most popular open source Java reporting engine. • Jaspersoft iReport Designer 4.1.3 is used to design the 9 reports used in the system -> save us a lot of time • Easy Spring integration by configuring ViewResolver <bean id="pdfAirCosting" class="org.springframework.web.servlet.view.jasperreports.JasperReportsPdfView"> <property name="url" value="/WEB-INF/reports/aircosting.jrxml" /> <property name="reportDataKey" value="datasource"/> </bean> • Spring framework automatically compiles the .jrxml file on the fly into .jasper file on server starts up • The Spring ModelAndView is populated with report parameters in order to render the report properly

  36. Email • Spring Framework's email support is used to send emails to simplify the e-mail sending process via JavaMail API. • Gmail SMTP server is used • Bean configuration file <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> <property name="host" value="smtp.gmail.com"/> <property name="port" value="25"/> <property name="username" value="www.cargo.pte.ltd@gmail.com"/> <property name="password" value=“…"/> <property name="javaMailProperties"> <props> … </props> </property>

  37. Technical Challenges & Lessons Learnt

  38. Race Conditions • During the coding, many race conditions are discovered, because of asynchronous nature of the requests. • Among such scenarios the most encountered one is, when a code segment is in under UPDATE or CREATE operation, during this time sending a SELECT request for the same record within the same session is found to be a race condition. • Above race condition identified, and resolved by using afterRequest event handle the SELECT request to update the UI Store.

  39. Race Conditions-Problem Result with no updates Race condition here

  40. Race Conditions-Solution After request event fired

  41. Technical Challenges • Novelty of technology at UI layer. • ExtJS 4.0 released in April 2011, hence not a mature online contents to study the technology. • ExtJS documentation studied and referenced. • Wiki pages were used to share the knowledge within the team. • www.code.google.com/p/iss2011s7/w/list • JSON Parser wasn't able to parse, if object properties contain null values • Work around • Null values are replaced with empty string before it transmitted from server to UI layer. • Long term fix strategy • JSON Parser to be fixed.

  42. Technical Challenges • Handling complex objects at UI Layer (ExtJS) • Mapping between objects • Communication and parsing of Complex object from UI to Service Layer. • Additional Transfer Objects used to communicate. • Lazy Fetching • Lazy fetching was not able to achieve because of JSON Parser limitation of unable to handle null values, where lazy fetching operations are tend to contain null values for contained complex objects.

  43. Future aspects and improvements

  44. Future aspects and improvements • Refreshing the stale records by estimating user’s operation Rest Time. • UI layer can be enhanced to have capability to refresh the data grids by estimating user’s rest time, and if it reaches a particular threshold value, the system would refresh the data grid by using beforeActivate event of the RowEditor. • Above would avoid user to get into a situation of updating a stale record on grid, and end up with unsuccessful updates.

  45. Future aspects and improvements • Enhancing UI for Mobility in work place • Proposing client for an update of UI version for Tablets and Smart Phones. • ExtTouch( A mobile javascript framework) shall be used to built tablet and smart phone applications. • HTML 5 standards. • User Interface shall required to update and services may remain as it is. • This is to have an advantage of mobility and instant access to the application with greater performance.

  46. Future aspects and improvements • Integration Requirement • Understand from client that they would like to have operations to be integrated to the third party Accounts system. • Proposal for an integration between both of the systems can be considered.

  47. Future aspects and improvements • Concurrent updates acknowledgement • Grid Panel records can be highlighted in red color of text to notify users that the local copy of the record is stale or no more fresh, and any updates to the stale data will not be persist in database. • The above can be achieve by Observer Design Pattern and Push model of communication from server.

  48. Doing It Again • After getting full understanding of the domain (cargo management), we would like to go for more generalized and multi-tenancy approach of building this application. • Metadata entity model can be used instead of rigid domain model, by which we can achieve customization requirements of data grids, forms and any other view panels for different customer. • Spring’s web service framework can be used to expose server side operation as web services, if necessary. • Releasing it as a software as a service (SaaS).