The application is a simple task management system in which an employee can have multiple tasks and a task can be assigned to multiple employees. So the first Model is Employee, which has the following attributes:
Class Employee {
Long id; //primary key
String name;
String employeeCode;
String position;
}
The task Model is as follows:
class Task {
Long id //pri开发者_JAVA技巧mary key
String name;
String description
}
and an employee is assigned to tasks in the following relation:
Class EmployeeTasks {
Long id // primary key
Long employeeId;
Long TaskId;
Date assignedDate;
Long assignedBy; //employee ID
}
I have two list views(through AJAX) for the employee module -
The first list has the following columns and it is intended for System Administrators:
Employee code | Name | Position | Date Created
The second list has the following columns and is for the Managers:
Employee Code| Name | Position| No of Tasks assigned | Date of last assignment
I know that in GAE we need to consider the queries(views) while designing the database model. So my question is whether the above model is ideal for my requirements?
The application is being developed in GAE+Spring+JDO+Jackson+YUI. Does it makes sense to stick on with this model and use Jackson ObjectMapper to change the views? Or is it a good practice to write non-persistent objects for the views?
精彩评论