Overview
Media Socializer is a one-stop social media desktop application used to help social media users keep track of all the social media platforms their contacts are using. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC.
Summary of contributions
-
Major enhancement: Added the ability to manage the social media platforms of each person
-
What it does: Allows the user to add the associated social media platforms to the specified person by typing in the links to the relevant profile pages or remove them by entering the names of the platforms.
-
Justification: This feature improves the product significantly because a user can have the application keep track of all the social media profiles of their contacts.
-
Highlights: This enhancement affects the overall feel of the product, since it is a core feature of the application. It required an in-depth analysis of design alternatives. The implementation too was challenging as it required touching upon multiple components to properly realise such a feature.
-
-
Minor enhancement: Added a sort command that allows the user to alphabetically sort the people in the list.
-
Code contributed: [Functional code] [Test code]
-
Other contributions: Assisted team members in fulfilling certain requirements for the milestones (Pull requests #70, #99)
-
Project management:
-
Managed releases
v1.5rc
-v1.5
(2 releases) on GitHub -
Identified the deliverables for each release to keep track of
-
-
Enhancements to existing features:
-
Documentation:
-
Community:
-
Contributions to the User Guide
Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users. |
Sorting all persons : sort
[Since v1.2]
Sorts all persons in the address book alphabetically and then displays the current list in sorted order.
Format: sort
Adding social media platforms to a person : addplatform
[Since v1.3]
Adds social media platforms to an existing person in the address book by providing the associated profile links.
Format: addplatform INDEX [l/LINK]…
|
It is not guaranteed that the link provided leads to an available page. Links are accepted so long as they match any of the patterns as defined above. This feature will be improved to test for broken/removed pages in future releases. |
Examples:
-
addplatform 1 l/www.facebook.com/johndoe
Adds the Facebook platform with the linkwww.facebook.com/johndoe
to the 1st person. -
addplatform 2 l/
Clears all existing social media platforms of the 2nd person.
Removing stored platforms of a person : removeplatform
[Since v1.4]
Removes the specified social media platforms of the stated person.
Format: removeplatform INDEX [smp/PLATFORM]…
Examples:
-
removeplatform 1
Removes all social media platforms tied to the 1st person. -
removeplatform 2 smp/twitter
Removes the Twitter platform from the 2nd person.
Contributions to the Developer Guide
Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project. |
Appendix A: Product Scope
Target user profile:
-
has a need to keep track a significant number of social media platforms of contacts
-
has a need to view the latest scoop of various people’s social life
-
prefer desktop apps over other types
-
can type fast
-
prefers typing over mouse input
-
is reasonably comfortable using CLI apps
Value proposition: one-stop access to multiple social media platforms
Feature Contribution:
Assignee | Major | Minor |
---|---|---|
Seunghwan Choi |
|
|
Chuang Cheng Heng |
|
|
Tan Wei Jie |
|
|
Appendix B: 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 |
see the page of the specified platform of a person |
get information of the person with my preferred social media platform |
|
user |
delete one of social media platforms of a person |
remove entries that I no longer need |
|
user |
find a person by name with the specified platforms |
locate details of persons who have the social media platforms without having to go through the entire list |
|
user |
apply the filter of a social media platform |
have a list of persons who are on the platform shown |
|
user |
apply multiple filters regarding social media platforms |
have a list of persons who satisfy the filters shown |
|
user |
clear filters applied |
get information regardless of them |
|
social media user |
select a person and see the social media platforms they are using |
have the option not to go to the various platforms to check |
|
social media user |
store the links to the profiles of a person (friend) |
have the app keep track of it for me |
|
social media user |
view the latest feed/status of a person |
get up-to-date information about them |
|
lazy social media user |
log out from all my social media account with one command |
remove potential unauthorised access effectively |
|
social media user |
log in to my account |
access private profiles in my friend list |
|
social media user |
search for profile in all social media platforms with the same command |
|
|
social media user |
send friend request from the app |
|
|
social media user |
be able to react to a post (like, comment, etc) from the app directly |
|
|
lazy user |
be able to remain logged in to my account |
|
|
social media user |
post and update my statuses |
let people know what I’m up to |
|
user |
hide private contact details by default |
minimize chance of someone else seeing them by accident |
|
advanced user |
use shorter versions of a command |
type a command faster |
|
user |
have the information of my social media accounts encrypted |
keep my personal information safe |
|
user |
add a new person with private contact details |
keep them in secret |
|
user |
search a person with the tags |
|
|
careless user |
logout from all my account remotely |
ensure my account security will not be compromised in case I lose my device |
|
social media user |
be able to customize what is displayed (profile, social media in use, or latest feed/status) when I select a person |
personalise the app to my liking |
|
careful user |
have an additional authentication system for editing my profile setting |
|
|
social media user |
be able to download files (e.g. images or documents) posted by others |
keep a copy and view them offline |
|
social media user |
send messages to the people on my friends list |
communicate with them |
|
social media user |
add people found in my friends list on social media to my address book |
create contacts of them and communicate through other means |
|
social media user |
find my friends that are near my location |
meet up and have fun with them |
|
user |
set up planned events with a group of my friends |
remember their details and be punctual for them |
|
user |
be reminded of important events (e.g. movie outings, birthday celebrations) |
be prompted not to miss them |
|
user with many persons in the address book |
sort persons by name |
locate a person easily |
Sort feature
Current Implementation
The sort mechanism is facilitated by the SortCommand
and is used for sorting all persons found in the address book by name alphabetically.
It inherits from UndoableCommand
and thus supports the undo/redo mechanism, enabling the ability to reverse the command and return the address book to its previous unsorted state.
When the user executes the SortCommand
using the command word sort
, the current list of persons shown in the GUI will be retained.
As illustrated, a filtered list of persons will be displayed in a sorted manner once the command is executed:
The command can also handle multiple persons with similar names (i.e. different letter-casings) as shown below:
During sorting, names of two different persons are compared using the static method, nameComparator
, found in the person class:
public static Comparator<Person> nameComparator() {
return Comparator.comparing((Person p) -> p.getName().toString(), (
s1, s2) -> (s1.compareToIgnoreCase(s2) == 0) ? s1.compareTo(s2) : s1.compareToIgnoreCase(s2));
}
As seen, casing is ignored when names are first compared with each other. The usual lexicographical order will instead be used when encountering identical names.
The following sequence diagram shows how the sort operation works:
Design Considerations
Aspect: Implementation of SortCommand
-
Alternative 1 (current choice): Create a custom sorting method for person names
-
Pros: Allows list to be displayed in a uniform manner, such that similar names are also sorted.
-
Cons: Requires extra work to write custom method.
-
-
Alternative 2: Utilise
String.CASE_INSENSITIVE_ORDER
for sorting-
Pros: Does not require additional work to write or override compare methods.
-
Cons: List may be inconsistent when sorting multiple persons with similar names.
-
Aspect: Implementation of Custom Sorting Method
-
Alternative 1 (current choice): Use comparators and create one for person names called
nameComparator
-
Pros: Potentially enabling the ability to sort different fields other than names.
-
Cons: May be more difficult to write.
-
-
Alternative 2: Implement comparable and override the
compareTo
method in person class-
Pros: Simpler to understand.
-
Cons: Can only define a single sorting sequence when comparing two different persons.
-
Aspect: Display of person list in GUI
-
Alternative 1 (current choice): Retain the current list of persons as shown in GUI but shown in a sorted manner
-
Pros: User would not have to key in the command to filter the list after sorting.
-
Cons: User may think that only the current list is sorted.
-
-
Alternative 2: Displays the list of all persons found in the address book sorted alphabetically
-
Pros: More properly describes what
sort
actually does by showing the full list of persons sorted. -
Cons: Current list is replaced by showing all persons.
-
Add Platform feature
Current Implementation
The add platform function makes use of a factory to facilitate the creation of various social media platforms.
A platform is created only when users provide a valid profile link; this object will be associated to the particular
person found in the list as specified by the user. Currently, only the Facebook
and Twitter
platforms are available.
The structure of the class diagram is as shown:
As seen, a client can make use of the SocialMediaPlatformFactory
to deal with the creation of social media platform
objects without the need of specifying the concrete class to construct.
Thus, it follows the factory pattern since the
creation logic is abstracted away by the factory. The difference here to other implementations of the pattern is the
use of an abstract class, SocialMediaPlatform
, instead of the usual interface.
In order to properly utilise the factory, a client needs to provide some form of specification:
public final class SocialMediaPlatformFactory {
// ... class variables, constructor ...
public static SocialMediaPlatform getSocialMediaPlatform(String type, Link link) throws IllegalValueException {
// ... social media platform instance creation logic ...
}
}
From the extract, a String
data type and a Link
object need to be provided by the caller when using the
getSocialMediaPlatform
method. The method will then return an instance of the available concrete classes.
The AddPlatformCommand
makes use of the implementation of EditCommand
as the foundation, editing the Person
model
to include the newly created social media platforms. Each platform is stored as an entry to the person’s platform map,
with the key being the name of the platform. An example is shown below as an illustration:
The links provided by the user will be parsed within the AddPlatformCommandParser
to convert them into Link
objects. From there, AddPlatformCommand
will create a new map and add the relevant social media platforms by
calling the getSocialMediaPlatform
method of SocialMediaPlatformFactory
for object creation. To merge the updates
with the targeted person, the command would also retrieve all of its information in order to create a new Person
object before replacement is done. The sequence of the events is as follows:
In the UI Component, the PersonCard
will be updated to show the icons of the platforms added. Suppose the user want
to add a Facebook
profile to the first person. The AddPlatformCommand
would be executed using the addplatform
command word. As illustration, the user has successfully added a Facebook
platform to the targeted person by typing
addplatform 4 l/www.facebook.com/david
:
Since the basis of AddPlatformCommand
is heavily inspired by the EditCommand
, interactions between the various
components is exactly the same:
Design Considerations
Aspect: Storing of Links in Person Model
-
Alternative 1 (current choice): Create social media platform objects with the links as attributes and store into a map
-
Pros: High potential of implementing methods for interactions between the actual profile page using the corresponding API.
-
Cons: Accessing and inputting of data will be more complex.
-
-
Alternative 2: Store using a set of links
-
Pros: Ease of access to data.
-
Cons: Can only be used for the displaying of pages, no room for other implementations.
-
Aspect: Usage of Interface or Abstract Class
-
Alternative 1 (current choice): Have
SocialMediaPlatform
be an abstract class-
Pros: Allows common methods to be used by classes that extends from it and still provide a means of ensuring critical methods that are abstract be implemented.
-
Cons: Classes that want to make use of the implementations can only extend from it.
-
-
Alternative 2: Have
SocialMediaPlatform
be an interface-
Pros: Higher flexibility for classes since they can implement many interfaces.
-
Cons: Limitations in sharing and utilisation of default methods between classes.
-