Sunday, March 25, 2012

Use Case and ACLs

These last two weeks I have been working mostly on the design of the application. This is what I currently have:

  • One activity where the user can select between two different google accounts - this has to be modified, so that the application can only use one account. 
  • One tab layout with two tabs, each of them being an activity.
    • The first tab allows the user to see what they have in the database - also has for each entry an ImageButton, which, when clicked, deletes the selected entry. 
    • The second tab allows the user to add an entry to the database. It contains of one simple EditText, one multiline EditText and one DatePicker
Next, I am going to demonstrate an Use Case - Add and Delete of a task. 
The user has in the database two tasks, a Meeting and an Exam. In the next step I add a task, named Conference.


The new Task is now visible in the first tab. Next I delete the task named Meeting by clicking on the ImageButton.

This what the user has in the database at the end.

I had a hard time creating a multiline EditText, but I realized the problem was that I was disabling the virtual keyboard:
/*Get the EditText for task description*/
note = (EditText) findViewById(R.id.note);
/*Hide virtual keyboard*/
note.setInputType(InputType.TYPE_NULL);
When the virtual keyboard is disabled, the EditText will be singleline (setting the inputType to textMultiLine has no effect in this case). I solved this by removing the code which disables the keyboard, and adding in the xml file android:editable="false".
<EditText
    android:id="@+id/note"
    android:hint="Description..."
    android:layout_width="fill_parent"
    android:layout_height="100dip"
    android:gravity="top|left"
    android:inputType="textMultiLine"
    android:editable="false">
</EditText>
For next week, I discussed with my colleague and we are going to start implementing Access Control Lists. On the server side, he currently has implemented namespaces, but only the basic approach - every user has one namespace. We are going to allow users to create groups and add other members to the group. For this, I am going to have an Administrator option in the menu, where the user can create new groups.

Another important thing about this approach is that the users must have assigned roles. For example, the owner of the group will be able to add and delete tasks from the common database of the group. He is going to be the group administrator. Simple members cannot delete or add tasks. In the future, we are thinking about enabling administrators to add another administrators to the group. 

All members of one group share the same namespace, so they share the data from the database. This feature is very important for companies for example, which prefer to have a common database for all employees. Monitoring the activity and maintenance is a lot easier.

No comments:

Post a Comment