Skip to content

Commit

Permalink
[68] Flatten doc structure
Browse files Browse the repository at this point in the history
  • Loading branch information
damithc authored Sep 20, 2016
1 parent f060198 commit 295e974
Show file tree
Hide file tree
Showing 14 changed files with 683 additions and 200 deletions.
35 changes: 30 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,33 @@
[![Build Status](https://travis-ci.org/se-edu/addressbook-level4.svg?branch=master)](https://travis-ci.org/se-edu/addressbook-level4.svg?branch=master)

# Address Book Sample Application - Level 4
# Address Book (Level 4)

- [Gradle](docs/devops/gradle/Introduction to Gradle.md)
- [Configuration](docs/addressbook/Configuration.md)
- [Logging](docs/addressbook/Logging.md)
- [Setting up Travis CI](docs/devops/integration/Configuring Travis CI.md)
{TODO: add screenshot here}

* This is a desktop Address Book application. It has a GUI but most of the user interactions happen using
a CLI (Command Line Interface).
* It is a Java sample application intended for students learning Software Engineering while using Java as
the main programming language.
* It is **written in OOP fashion**. It provides a **reasonably well-written** code example that is
**significantly bigger** (around 10 KLoC)than what students usually write in beginner-level SE modules.
* What's different from [level 3](https://github.com/se-edu/addressbook-level3):
* A more sophisticated GUI that includes a list panel and an in-built Browser.
* More test cases, including automated GUI testing.
* Support for *Build Automation* using Gradle and for *Continuous Integration* using Travis CI.


#### Site Map
* [User Guide](docs/UserGuide.md)
* [Developer Guide](docs/DeveloperGuide.md)
* [Learning Outcomes](docs/LearningOutcomes.md)
* [About Us](docs/AboutUs.md)
* [Contact Us](docs/ContactUs.md)


#### Acknowledgements

* Some parts of this sample application were inspired by the excellent
[Java FX tutorial](http://code.makery.ch/library/javafx-8-tutorial/) by *Marco Jakob*.


#### Licence : [MIT](LICENSE)
7 changes: 7 additions & 0 deletions data/addressbook.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@
<tagged>owesMoney</tagged>
<tagged>friends</tagged>
</persons>
<persons>
<name>Jane Doe</name>
<phone isPrivate="false">98765432</phone>
<email isPrivate="false">[email protected]</email>
<address isPrivate="false">232, Bukit Batok Ave 2, #34-40</address>
<tagged>buddies</tagged>
</persons>
</addressbook>
45 changes: 45 additions & 0 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# About Us

We are a team based in the [School of Computing, National University of Singapore](http://www.comp.nus.edu.sg).

## Project Team

#### [Damith C. Rajapakse](http://www.comp.nus.edu.sg/~damithch) <br>
<img src="http://www.comp.nus.edu.sg/~damithch/images/damith2.jpg"><br>
**Role**: Project Advisor

-----

#### [Joshua Lee](http://github.com/lejolly)
Role: Developer <br>
Responsibilities: UI

-----

#### [Leow Yijin](http://github.com/yijinl)
Role: Developer <br>
Responsibilities: Data

-----

#### [Martin Choo](http://github.com/m133225)
Role: Developer <br>
Responsibilities: Dev Ops

-----

#### [Thien Nguyen](https://github.com/ndt93)
Role: Developer <br>
Responsibilities: Threading

-----

#### [You Liang](http://github.com/yl-coder)
Role: Developer <br>
Responsibilities: UI

-----

# Contributors

We welcome contributions. See [Contact Us](ContactUs.md) page for more info.
8 changes: 8 additions & 0 deletions docs/ContactUs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Contact Us

* **Bug reports, Suggestions** : Post in our [issue tracker](https://github.com/se-edu/addressbook-level4/issues)
if you noticed bugs or have suggestions on how to improve.

* **Contributing** : We welcome pull requests. Follow the process described [here](https://github.com/oss-generic/process)

* **Email us** : You can also reach us at `damith [at] comp.nus.edu.sg`
164 changes: 164 additions & 0 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
# Developer Guide [Work in progress]

* [Setting Up](#setting-up)
* [Design](#design)
* [Testing](#testing)
* [Continuous Integration](#continuous-integration)
* [Making a Release](#making-a-release)
* [Managing Dependencies](#managing-dependencies)
* [Appendix A: User Stories](#appendix-a--user-stories)
* [Appendix B: Use Cases](#appendix-b--use-cases)
* [Appendix C: Non Functional Requirements](#appendix-c--non-functional-requirements)
* [Appendix D: Gloassary](#appendix-d--glossary)


## Setting up

#### Prerequisites

1. **JDK 8** or later
2. **Eclipse** IDE
3. **e(fx)clipse** plugin for Eclipse (Do the steps 2 onwards given in
[this page](http://www.eclipse.org/efxclipse/install.html#for-the-ambitious))


#### Importing the project into Eclipse

0. Fork this repo, and clone the fork to your computer
1. Open Eclipse (Note: Ensure you have installed the **e(fx)clipse plugin** as given in the prerequisites above)
2. Click `File` > `Import`
3. Click `General` > `Existing Projects into Workspace` > `Next`
4. Click `Browse`, then locate the project's directory
5. Click `Finish`

## Design

Architecture overview

UI

Logic

etc.

## Testing

**In Eclipse**:
* To run all tests, right-click on the `src/test/java` folder and choose
`Run as` > `JUnit Test`
* To run a subset of tests, you can right-click on a test package, test class, or a test and choose
to run as a JUnit test.

**Using Gradle**:
* See [UsingGradle.md](UsingGradle.md) for how to run tests using Gradle.

Tests can be found in the `./src/test/java` folder. We have three types<sup>[[1](#footnote1)]</sup> of tests.

1. **Large Tests** - These are _System Tests_ test the entire App by simulating user actions on the GUI.
These are in the `guitests` package.

2. **Medium Tests** - These target higher-level code (i.e. code that depend on other code).
e.g. `seedu.address.logic.LogicTest`
For simplicity, we assume the dependent code is working correctly (as such, these tests are
a mix between _Unit Tests_ and _Integration Tests_)
A better alternative is to use _Dependency Injection_ and/or _Mocks/Stubs_
to isolate from dependent code.

3. **Small Tests** - These are the _Unit Tests_ targeting the lowest level methods/classes. <br>
e.g. `seedu.address.commons.UrlUtilTest`<br>
Tests that target higher level code (i.e. code that depend on other code) are not pure unit tests
because we don't use mocking/stubbing to isolate the SUT. Such tests are recognized under the
'Medium Tests' category above.

**Headless GUI Testing** :
Thanks to the ([TestFX](https://github.com/TestFX/TestFX)) library we use,
our GUI tests can be run in the _headless_ mode.
In the headless mode, GUI tests do not show up on the screen.
That means the developer can do other things on the Computer while the rests are running.<br>
See [UsingGradle.md](UsingGradle.md#running-tests) to learn how to run tests in headless mode.

## Continuous Integration

We use [Travis CI](https://travis-ci.org/) to perform _Continuous Integration_ on our projects.
See [UsingTravis.md](UsingTravis.md) for more details.

## Making a Release

Here are the steps to create a new release.

1. Generate a JAR file [using Gradle](UsingGradle.md#creating-the-jar-file).
2. Tag the repo with the version number. e.g. `v0.1`
2. [Crete a new release using GitHub](https://help.github.com/articles/creating-releases/)
and upload the JAR file your created.

## Managing Dependencies

What are dependencies and A project often depends on third party libraries. For example, Address Book depends on the
[Jackson library](http://wiki.fasterxml.com/JacksonHome) for XML parsing. Managing these _dependencies_
can be automated using Gradle. For example, Gradle can download the dependencies automatically, which
is better than these alternatives.<br>
a. Include those libraries in the repo (this bloats the repo size)<br>
b. Require developers to download those libraries manually (this creates extra work for developers)<br>

## Appendix A : User Stories

Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unlikely to have) - `*`


Priority | As a ... | I want to ... | So that I can...
-------- | :-------- | :--------- | :-----------
`* * *` | new user | see usage instructions | refer to instructions when I forget how to use the App
`* * *` | user | add a new person |
`* * *` | user | delete a person | remove entries that I no longer need
`* * *` | user | find a person by name | locate details of persons without having to go through the entire list
`* *` | user | hide [private contact details](#private-contact-detail) by default | minimize chance of someone else seeing them by accident
`*` | user with many persons in the address book | sort persons by name | locate a person easily


## Appendix B : Use Cases

(For all use cases below, the **System** is the `AddressBook` and the **Actor** is the `user`, unless specified otherwise)

#### Use case: Delete person

**MSS**

1. User requests to list persons
2. AddressBook shows a list of persons
3. User requests to delete a specific person in the list
4. AddressBook deletes the person <br>
Use case ends.

**Extensions**

2a. The list is empty

> Use case ends
3a. The given index is invalid

> 3a1. AddressBook shows an error message <br>
Use case resumes at step 2

## Appendix C : Non Functional Requirements

1. Should work on any [mainstream OS](#mainstream-os) as long as it has Java 8 or higher installed.
2. Should be able to hold up to 1000 persons.
3. Should come with automated unit tests and open source code.
4. Should favor DOS style commands over Unix-style commands.

## Appendix D : Glossary

##### Mainstream OS

> Windows, Linux, Unix, OS-X
##### Private contact detail

> A contact detail that is not meant to be shared with others
----
**Footnotes**

<a name="footnote1"/>[1]</a> This test categorization was inspired
by [this Google Test Blog Post](https://testing.googleblog.com/2010/12/test-sizes.html)
Loading

0 comments on commit 295e974

Please sign in to comment.