List the features assigned to particular iterations [2 marks]

advertisement
CP2011 Assignment 2 Documentation
Team work
Present evidence of your project communications, show that your team tracked
useful project communications [3 marks]
Jason and myself communicated frequently via numerous methods (SMS, Telephone,
meetings, etc.). Both team members used Google code as a Subversion Repository (SVN) to
keep track off changes made to the code, review older revisions and as a main location for
backing up the project in regards to subversion. See attached images of Google Code and
emails for proof of SVN usage. (Images to be added after further commits have been done to
the SVN on Google Code)
Simon Marshall & Jason Allen
Page 1
2/9/2016
List the tasks assigned to team members during iterations [3 marks]
In phase one, Jason was assigned the transition of the server (backend) code to use Aspects
where necessary and Simon was assigned the transfer from WinForms to WPF (frontend) for
the User Interface (UI).
In phase two, Jason added chat throttling and ROT-13 cipher for security on the server.
Simon worked on ROT-13 cipher on the client side, so that it would work seamlessly with the
server for handling of encrypting and decrypting messages sent to and from chat clients. Both
team members collaborated throughout each phase to see how each other was progressing and
to help out where and when needed.
Iteration Planning
List the features assigned to particular iterations [2 marks]
Project Checklist
Task to be completed by
Jason Allen
Simon Marshall
Change server code to use Aspects, SRP, Change frontend from WinForms to
DIP, DAO, DI. (Phase 1) DONE
WPF. (Phase 1)
Implement ROT-13 encryption. (Phase 2) Implement ROT-13 encrypt/decrypt on
chat client. (Phase 2) DONE
DONE
Implement chat throttling. (Phase 2)
Investigate the use of a tabbed wpf
application to save screen real estate and
DONE
for something different. (Phase 2)
INVESTIGATED & SORTED
Check to see if chat throttling is better
Check to see if chat throttling is better
handled by the server (Phase 1/2)
handled by the client (Phase 1/2)
INVESTIGATE & SORTED
INVESTIGATED & SORTED
Code needs to be changed to suit WPF
and XAML (for example, BeginInvoke to
Dispatcher.Invoke) (Phase 2)
Discuss why features were assigned to a particular iteration [2 marks]
It was decided that phase one would be the phase where major changes to the code would be
made on the frontend and backend using aspects and wpf. Phase two was about adding in the
little things like ROT-13 and chat throttling.
Simon Marshall & Jason Allen
Page 2
2/9/2016
Tools and Technologies
Test-driven Development
All unit tests succeed [2 marks]
Originally all of the unit tests were built to fail when running a unit test. All unit tests now
succeed as there is only one test for it to try and if a test causes an exception it is either caught
by SQLException or ClassNotFoundException and send to printStackTrace for debugging and
logging purposes.
Unit tests obey FIRST principles [2 marks]
All unit tests obey the FIRST principles of programming by adhering to KISS, DRY and
YAGNI (Keep it Simple, Stupid! Don’t Repeat Yourself and You Ain’t Going To Need It).
The assignment also adheres to the clean code methodology, which makes readability of the
code easier, and it doesn’t look like a can of tinned spaghetti has exploded in the code,
although tinned spaghetti is apparently delicious.
Unit tests are single concepts, with appropriate asserts [2 marks]
All unit test are single concept with appropriate asserts (assertNotNull and assertEquals).
AssertNotNull is used for public void testDerbyDriver, public void testDerbyConnection and
public void testDerbyMetadata. AssertEquals is used for public void testRot13 and public
void testSetPortNumber.
Simon Marshall & Jason Allen
Page 3
2/9/2016
Software Demonstrations
Show how a user can:
Register with the system [2 marks]
Once the Chat Server is up and running, a user can run the Chat Client. Enter their user name
and click on Login and the database then register that user into the list of users of the Chat
Client.
Participate in drop-in chats [2 marks]
Once logged in, a user can post a message in the drop-in chat section and then
clicking on Send.
Simon Marshall & Jason Allen
Page 4
2/9/2016
Add a post to the forum [2 marks]
By clicking on the forum tab, a user can then post a message into the forum. The
forum will display a timestamp, username and their message.
Add a reply to a post [2 marks]
Once another user logs into the client, they can then proceed to reply to a post another user
has made in the forum.
Simon Marshall & Jason Allen
Page 5
2/9/2016
Show how the system admin can create a drop-in chat for a group of users [2
marks]
This is the default mode for the chat server when running it and the chat client/s. This has
been in the chat server from the initial version in Assignment 1.
Show how user access to posts can be controlled [4 marks]
Implemented on the frontend, need to add code on the backend to fully integrate and
make use of. Basically a checked list box is used in the forum that allows any user to
select which other user/s are able to see and reply to their posts in the forum.
Source code demonstrations
Show how chat encryption was handled by the software [2 marks] using aspects
[2 marks]
In either chat or forum, a user types in a message then clicks on Send/Post, the message is
encrypted client side before getting sent to the server. The server then decrypts the message
and checks the relevant protocols for the message, re-encrypts the message and sends it to the
other client/s. Once the other client/s receive the message, the frontend then decrypts the
message and the user receives the plain text aka the original message sent by the other
client/s.
Show how chat throttling was handled by the software [2 marks] using aspects [2
marks]
Chat throttling is handled by limiting the amount of clients that can access the server at the
same time, using a timer is still a possibility and that would be on the clients and server. So if
a user posts a message and then immediately tries to post another message within so many
seconds (say 3 seconds) the server would then send a message or display a popup notification
stating that the user needs to wait a further amount of time (time remaining from the 3
seconds) before been able to post again. This would apply to chat and forums.
Simon Marshall & Jason Allen
Page 6
2/9/2016
Show that WPF was used to implement the client-side apps [4 marks]
Simon Marshall & Jason Allen
Page 7
2/9/2016
Show how clean coding principles were applied
General principles – naming, formatting, commenting [2 marks]
Naming, formatting and commenting follow best practices and allow other programmers to
view the code and see what each method is doing and how they are doing it. Names of the
functions are named as to say what single purpose they do, this also applies to classes and
methods.
Formatting of the code is in line with C Sharp and Java standards with indentation and line
spacing where it is expected and as standard practice. Commenting is standard style of
commenting saying what the method/function does and then by viewing it another
programmer can actually see how it goes about doing it.
Various techniques – error handling, boundaries, emergence, concurrency [2
marks]
For example in the SQL portions of the code, there are try/catch blocks that if an
exception occurs it is handled by SQLException and sent to StackTrace for
debugging.
Design patterns – SRP, DIP, DAO, DI [4 marks]
All methods adhere to SRP by doing one thing and one thing only, DAO & DTO are
used on the database side of the server.
The total marks for this assignment is ______ out of 50
Simon Marshall & Jason Allen
Page 8
2/9/2016
Download