Open chathuriM opened 7 years ago
201611181130 CM
Mokeup design for tutor profile
201611211200 CM INIT c36-add-tutor-details-cm branch. (Branch off from c13-display-course-details-MP-cm)
201611211223 CM
201611211448 CM
201611211657 CM
201611221011 CM
2016112221657 CM
201611231350 CM
201611231559 CM
201611251623 CM
c36- Add Tutor Details Moved to Code review.
201611281300 CM - Code Review undertaken by MM
} catch (Exception exception) {
log.error("execute() : Exception " + exception.toString());
throw exception;
}
2. Remove redundant `finally` block.
* CmdCheckUsername.java -
The potential that `tutor.setUsername(helper.getParameter("USERNAME"));` may return `null` has not been handled. This has the potential to produce problematic behaviour in DAO.
* CmdAddTutorProfile.java -
1. The unneeded, commented-out lines are better to be removed.
2. Exception type thrown is better to be mentioned in logger statements.
* CountryDAO.java -
1. The exception type that is thrown is not mentioned in logger statement
2. Missing JavaDoc comment
* TownDAO.java -
Missing JavaDoc comment
* TutorDAO.java -
1.`add()` method:
- [ ] Use the now-available `ApplicationStatus` enum to set values for columns such as `ISACTIVE`.
- [ ] Better to move the statement `final Tutor tutor = (Tutor) object;` within the `try `block because of the risk of a `ClassCasteException`
- [ ] The exception type that is thrown is not mentioned in logger statement
2. `findById()` method:
- [ ] Better to move the statement `final Tutor tutor = (Tutor) object;` within the `try `block because of the risk of a `ClassCasteException`
- [ ] The exception type that is thrown is not mentioned in logger statement
- [ ] JavaDoc not present
* Tutor.java
1. Make identifier `MySpace` lowerCamelCase (`mySpace`) to conform to naming conventions.
2. Better to change field names to be more meaningful. E.g., instead of simply `viber`, this could be `viberNumber`. Personally, i feel this applies to fields `facebook`, `linkedIn`, `twitter`, `instagram`, `MySpace`, `whatsApp` other than `viber`.
* PublicController.java, PublicCmdFacotry.java -
These files do not seem to be utilised in the issue. The are, therefore, better be removed to minimise merge conflicts.
* Validator.java -
Missing JavaDoc comment for `calculateYears(String)`
* addTutorDetails.jsp -
Better to place addTutorDetails.jsp file inside `dist\partials\` directory to adhere to the common practice followed in other issues.
**Assigning back to the developer to address the above points in MX.**
201611281749 CW c36-add-tutor-details-working on c36 code review issue solving - cw 3777de9fc5
201611291504 CW c36-add-tutor-details - code review issue solving done in the branch of c36-add-tutor-details-cw 142612f89d
201612011148 -JH Code review comments
/**
* Calculate number of years in the Duration
*
* @author Chathuri
* @param duration
* @return void
*/
Log the error in catch statement with the word Exception in it. Ex: instead of this
catch (Exception exception) {
log.error("calculateYears: e" + e.toString());
throw e;
}
Use
log.error(“calculateYears: Exception “ + exception.toString());
In calculateMonths(),calculateWeeks(), and calculateDates() methods it returens an int value. But in method comments it says “@return void”
-CmdAddToturDetails.java
execute() method
tutor.setLandAreaCode("0");
tutor.setMobileNetworkCode("0");
There are static values assigned to some of tutor attributes. Explain the code. It static values are needed then give reasons.
setVariables(IDataHelper helper) The method name in the method and the comments are not equal. Check the name and the method comments.
Validator.js, tutor-helper.js, addTutorDetails.jsp
url : '/TutorController'
TownDAO
log.info("getAll(): SQLException " + sqlException.toString());
instead oflog.info("getAll(): SQLE " + sqlException.toString());
@chinthakacw assigning this to you back to fix the coding issues.
201612011747 - CW
201612020951 CW New modifications in the c36-add-tutor-details
Estimation:
201612042207 CW c36-add-tutor-details-Removing the tutor image path from the coding done - cw db46c65b8e
201612190849 CW c36-add-tutor-details-loading town codes according to Country done - cw 0272aaa700
201612191305 CW Modify the code and the classes to add details to the Country code, Area code and the phone number fields separately done - cw e191cdc41d
Business benefit : A tutor can register in campus.lk as a lecturer/tutor and use his/her created profile to log into the system so that he/she can interact with the system to view course details.
Tasks:
UI pages : Tutor registration page
Estimation: UI - 64sp Dev - 64sp Testing - 32sp