Clone wiki

Java EE 6-Galleria / AreasForImprovement

Areas for Improvement

There are some areas for improving this project:

  • Use Liquibase or another database migrations tool, instead of dbdeploy. Use any tool with sufficient documentation, especially one that contains documentation on organizing developer, test and production environments and also demonstrates the ability to rollback changes from a version to another.
  • Use the Arquillian-Embedded GlassFish plugin instead of the EJBContainer to run the integration-tests for the galleria-ejb module. Note - this might need feature requests ARQ-197 and ARQ-567 to be completed.
  • Split the AllPagesIntegrationTest class into several classes with related tests; this will have to wait for feature requests ARQ-197 and ARQ-567 to be completed.
  • Make the domain model even richer. The current domain model is a bit anaemic - it is responsible for referential integrity in most or all cases. Move some of the operations from the application/service layer to the domain entities - this would require injection of services & repositories to occur into entities read from the database using JPA. This looks like a job for an EntityListener. Also, injection of services & repositories would have to be done for domain objects created in the presentation layer as well.
  • Improvements for the tests in the presentation layer - currently the data and error messages in them are hard-coded. This is especially true of tests that verify application behavior for input boundaries. This might have to wait for the Arquillian QuickCheck or JCheck integration to enable providing random data to the tests (where the tests would continue to fail). Additionally, one could also write a specification-based testing library that operates with JSR-303 annotations.
  • Use CDI throughout the application, to handle dependency injection. Currently, different annotations as used to inject dependencies into the different layers of the application.
  • Refine the tests in the galleria-jsf module to allow for the tests to succeed even if the browser locales used during the tests were non-English by nature.
  • Addition of unit tests in the galleria-jsf module. Right now, this module has only integration-tests. Investigate the use of fake FacesContextFactory that can be used in a JavaSE VM. Also investigate the use of JSFUnit.

Features to add

  • Introduce a cache for storing image thumbnails (could be a NoSQL store), to prevent a full roundtrip to the database for presenting cover photos.
  • Support for private albums and photos. Public albums and photos would be visible to all users.
  • Search for Albums and Photos across users.
  • Web-services using JAX-WS.
  • Web-services using JAX-RS.