Assignment 2

Working in groups of three, design and develop a web application. Using Enterprise Java Beans and the Java Persistence API, develop a website with a range of sophisticated functionality that includes secure login and the ability to manage data and an administrative roles. Demonstrate your application in a lab session.

Final deadline: Your lab session on Monday 17 October 2016 (Week 11). You may also present during the assessment period by appointment (a timetable will be released later in the semester).

Weight: 40% of your final grade

Assessment Type: Group project (groups of three) group and individually assessed

Learning Objectives: This activity assesses objectives 1, 2, 3, 4, 5, 6 and 7 from the subject outline.

Great work on Assignment 1!

Now that you've built a functioning web application, it is time to improve the design, improve the reliability and add some more sophisticated functionality.

There are many strategies for building reliable and scalable distributed systems. While approaches such as web services, object-relational mapping and transactions are not the answer to every possible situation, they are powerful tools to have in your ‘toolbox’ as a developer. For Assignment 2, you will use these technologies to build a web application that can perform CRUD operations and that incorporates a range of innovative features.

As with Assignment 1, you will create a web application that has the ability to create, read, update and delete (CRUD) data of a particular record type. For Assignment 2, your application will have features that go beyond Assignment 1: an ability for users to create new accounts; an administration zone; and more complex innovation functionality (described later in this document).

Your application can be based on any idea that has the following core functions:

  • Sign up
  • Login
  • Create a record
  • View or search for records
  • Edit a record
  • Delete a record
  • Logout
  • Administration zone
  • Integration with a web service

The records can represent anything that your group agrees on. You will need to decide for yourself what purpose your website will serve. You can build on an idea from Assignment 1, or you can work on an entirely new idea.

You will not be assessed on the quality of your idea. The idea does not have to be ‘good’ so long as you implement it well (i.e., using patterns and principles covered in this subject).

Please note:

  • You must NOT create an application that is sexist, pornographic, vulgar, hateful or otherwise inappropriate in a professional setting.
  • You must NOT create an ‘Address Book’ or ‘To do list’ application.

Your web application will need to offer core functionality similar to Assignment 1: the ability to login, create, read, update and delete records in a simple database schema:

  1. Log in
  2. Create a record (e.g., INSERT INTO ...)
  3. List records (e.g., SELECT ... WHERE ...)
  4. View a record (e.g., SELECT ... WHERE id = ?)
  5. Update a record (e.g., UPDATE...)
  6. Delete (or hide) a record (e.g., DELETE ... or UPDATE ... SET visible = 'N' WHERE id = ?)
  7. Log out
  8. Your application must provide useful error messages if the user enters invalid input

In addition, it must also have the following functionality:

  1. Sign up as a new user (e.g., INSERT INTO SystemUsers ...)
  2. An administrator account that can view and edit the details of all users in the system as well as make changes that an administrator would normally perform, as appropriate to your application (e.g., in an online store, the administrator might be able to view all orders placed)
  3. Your application must use the JAX-RS client to integrate with at least at least one RESTful web service API (e.g., Pin Payments, Twilio, Nexmo, Google Cloud Platform APIs, The Echo Nest)

Innovation Functionality

For this assignment, 15 marks are devoted to innovative use of Java EE technologies. To get 15 marks, you would be expected to implement three of the following innovation features:

  1. Add shopping cart functionality with checkout (the shopping cart should be retained even if the user logs out)
  2. Provide AJAX interactions (e.g., an AJAX-enabled search)
  3. Live real-time updates in the user interface (i.e., users are notified of updates without needing to refresh the page)
  4. All record updates are protected against concurrent modifications (Hint: See the Week 11 Challenge problem)
  5. Implement the user interface as a single-page web application using React.js, Angular.js or a comparable modern client-side JavaScript framework
  6. Send email messages to verify the address of new users when they sign up and provide email-based password reset functionality
  7. Deploy your application on the internet using a Java EE server hosted on Amazon Web Services (EC2) or Microsoft Azure
  8. Implement a comprehensive suite of unit tests for your application

You are not limited to this list: please feel free to negotiate alternative functionality of comparable difficulty with your tutor.

Note that the innovation functionality should go beyond the subject matter taught in class. You are expected to do independent study and learning in order to complete this functionality.

Costs

Please use trial periods and free non-commercial licenses when integrating with commercial services. Reimbursement or financial support will NOT be provided if you choose to use paid plans or services that cost money.

Functionality Proposals

You must propose your application to your tutor within two tutorials following your group’s formation.

Your tutor will provide the following template for you to complete:

(Application Name):
My application will help (user) to (need) by keeping track of (record).
My application will allow users to sign up, login and then create, read, update and delete (records).
My application will allow administrators to login and then view and edit users as well as (perform administrative tasks).
My application will integrate with (web service) to provide (functionality).
My application will also (provide innovation functionality).

Consider the following two examples of how to use the above template:

1.

Restaurant Booking System:
My application will help restaurant owners to manage their tables by keeping track of reservations.
My application will allow users to sign up, login and then create, read, update and delete table reservations.
My application will allow administrators to login and then view and edit users as well as view reservations and send reservation reminders by SMS.
My application will integrate with Twilio to provide SMS reservation reminders.
My application will also provide administrators with real-time updates of new bookings (3), be implemented as a single-page web app using React.js (5) and have a comprehensive suite of unit tests (8).

2.

Ben’s Java Book Store:
My application will help Java Programmers to learn about Java by keeping track of books in their shopping cart that they can then purchase.
My application will allow users to sign up, login and then create, read, update and delete books in their shopping cart.
My application will allow administrators to login and then view and edit users as well as see the details of ordered placed by customers.
My application will integrate with Pin Payments to provide credit card payment processing.
My application will also provide shopping cart functionality with checkout (1), confirm email addresses and provide email password resets (6) and be deployed on Amazon Web Services using the Free Hosting Tier (7).

  1. Your user interface must follow a modern design pattern such as Model-View-Controller. JavaServer Faces is one option. However, you are permitted to use other modern frameworks in this assignment (please discuss with your tutor first if you are not using JavaServer Faces).
  2. You must make use of the Java Persistence API (JPA), Enterprise Java Beans and database transactions to implement the core create, read, update and delete functionality.
  3. You must use the Java EE authentication facilities built into Glassfish or an established security framework (do not write your own security code).
  4. You must use git to track your changes and you must regularly push your commits to a private repository shared with your tutor on BitBucket.
  5. Your application must run on GlassFish 4.1.1.
  6. You must use the JAX-RS client to integrate with remote web services. Even if the web service provides a custom Java client library, you must still use the JAX-RS client for this assignment.

Bitbucket provides free private Git hosting. Please sign up to bitbucket with your student email address. This will give you a free academic account. Ensure that any repositories that you create are private and invite user benatuts and user ryanuts to your repository with write access (i.e., the tutors). http://www.bitbucket.org/

You may demonstrate your assignment in any lab session between weeks 2 and 11 (inclusive). You may also present your application, by appointment, during the assessment period.

You will receive a one mark bonus for submitting in Week 11. You will receive a two mark bonus for submitting on or before Week 10.

You can demonstrate this assignment on lab computers or on your own laptop. You may develop using any operating system (including Windows or Mac OS) and any Java EE application server that is compatible with Glassfish 4.1.1.

During the demonstration, you will need to submit your project files as a single ZIP to UTS Online. Your submission will be subject to checks for plagiarism and may also be reviewed by other students in the subject as part of a weekly laboratory exercise.

The ZIP file should contain:

  1. Your complete source code (e.g., your NetBeans project folder)
  2. SQL statements to create the application’s database
  3. Any other files required to run your application

Hint: If you are concerned about being able to complete the assignment, focus on the core CRUD functionality: the innovation functionality is only worth 15 marks so you can still pass the assignment without implementing any innovation functionality.

  • Week 8: Choose an idea, set up a source code repository and create database schema (5 hours per group member)
  • Labour Day Holiday Week: Research innovation functionality (6 hours per group member)
  • Week 9: Implement CRUD functionality and administration zone (6 hours per group member)
  • Week 10: Implement sign up and web service integration (6 hours per group member)
  • Week 11: Implement innovation functionality (6 hours per group member)
  • Review/Assessment Period: Test application (2 hours per group member)
  • Assessment Period: Demonstrate application

You should present your work during (or prior) to Week 10 to receive feedback on your progress.

Assuming that you have completed the relevant tutorial exercises, the full functionality of this assignment is expected to take approximately 30 hours per group member to complete.

Your assignment will be demonstrated to your tutor during a lab session (or by scheduled appointment during the assessment period). You will run the project for your tutor and he will test your system and examine the source code. You will have an opportunity to discuss your assignment and mark with your tutor.

This is a group assignment. You are encouraged to discuss your idea with other groups. However, all other work that you submit as part of this assignment must be entirely your own and any assistance properly identified and acknowledged. You are permitted to make use of libraries and other resources found online but you must clearly identify the source.

It is expected that group members will contribute equally to the assignment. The assignment will be marked as a group, and then individual marks are allocated on the basis of a peer assessment process.

Please discuss with your tutor if a group member is not contributing to the assignment (or if you are not given opportunities to contribute). Your tutor may, on the basis of contributed workload, heavily penalize students who do not contribute to the assignment. A student who contributes nothing may receive zero marks for the assignment. The use of revision control will assist your tutor in understanding the contribution of each group member.

Based on consultation with group members and/or an analysis of the revision control logs, your tutor or subject coordinator may override peer assessment to more fairly reflect contributions.

If you are experiencing group problems, do not wait until the “last minute”. Discuss with your tutor as soon as possible so that there is sufficient time to correct any issues or negotiate a solution.

If you are in doubt, please ask your tutor. Please refer to the faculty’s handbook for more information about Student Misconduct: https://my.feit.uts.edu.au/modules/myfeit/downloads/StudentGuide_Online.pdf

Please consider the marking criteria carefully and allocate your effort accordingly.

This assignment is marked out of 40 and counts 40% towards your final grade. You will be marked against the criteria listed below. Your mark is calculated by adding together the grade for each criterion.

At the time of your final submission, your group members will negotiate the percentage contribution of each member (e.g., Student A contributed 30%, Student B contributed 50% and Student C contributed 20%). Your final mark will be calculated in proportion to this peer assessment.

As Java code, your mark will be calculated from the group mark as follows:

your_mark = group_mark * individual_contribution_percentage * number_of_group_members / 100.0;

If each group member provides an equal contribution, then each individual group member’s mark will be the same as the group mark.

Your mark may be varied by penalties and bonus marks as detailed in the criteria. After penalties, bonuses and peer assessment, marks will be capped at a minimum of zero and a maximum of 40.

Before you demonstrate your system, you should thoroughly test your system:

  • Attempt to log in with an incorrect password
  • Enter invalid data and check that validation works on all fields
  • Check that you can log out
  • Attempt to access secure pages without logging in

Core Functionality

  • 0: The system is unusable or regularly crashes.
  • 2: The system does not implement all of the core functionality or validation does not work.
  • 5: The system implements all of the core features. User friendly error messages are displayed when the user enters invalid input.

Innovation Functionality

  • 0: The innovation functionality is not implemented.
  • 5: The innovation functionality is implemented but poorly designed.
  • 7: Only half the proposed innovation functionality is implemented but it is well designed.
  • 15: The system implements all of the proposed innovation functionality and the functionality is appropriately implemented and well designed.

Non-functional requirements

  • 0: The system does not make use of EJB, transactions or JPA
  • 2: The system is using Java EE technologies but incompletely or inappropriately.
  • 5: The system uses Java EE technologies elegantly and appropriately, including appropriate use of transactions in EJBs.

Design and architecture

  • 0: The system lacks structure or coherent design.
  • 1: The system does not separate code into layers. Data access code, domain logic and presentation logic are integrated. Presentation logic is mixed with HTML.
  • 2: The system has been partially separated into layers but there is some mixing of presentation, domain and data access logic.
  • 5: The system is separated into clear layers with separate responsibilities.

Documentation and coding style

  • 0: There is little to no documentation. Code is messy. There are large amounts of unused or commented-out code.
  • 2: Some code has comments. Classes, methods and variables have clear names.
  • 5: All non-trivial methods and classes have comments. All code is consistently clear and well presented. Technologies are used appropriately and idiomatically (i.e., using standard coding conventions for the technology). There is no unnecessary duplication of code.

Revision control

  • 0: Revision control has not been used.
  • 2: Revision control has been used.
  • 5: There are at least 5 meaningful commits from each group member and every commit has a clearly written commit message explaining the changes made.

Bonus and Penalties

  • -5: The system crashes during demonstration
  • -5: No proposal given to your tutor within two weeks of group allocation
  • -5: Each day late (five mark penalty per day late)
  • -3: Use of a web service client library other than JAX-RS
  • +1: The system is demonstrated in Week 11
  • +2: The system is demonstrated in or before Week 10