sanal-cem / fall2016swe573_cem_sanal Goto Github PK
View Code? Open in Web Editor NEWBMI Calculator Project and its documentation
BMI Calculator Project and its documentation
Below google chart shows users weight, BMI, increased and decreased calories in time.
Written Google Charts Script:
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Date');
data.addColumn('number', 'Weight');
data.addColumn('number', 'BMI');
data.addColumn('number', 'Calorie');
data.addRows([
<core:forEach var="uHist" items="${uHistList.getUHistList()}">
[ '<fmt:formatDate value="${uHist.IDate}" pattern="dd-MM-yyyy"/>', ${uHist.weight}, ${uHist.bmi}, ${uHist.calorie} ],
</core:forEach>
]);
var options = {
'title' : 'Your BMI Graph',
is3D : true,
tooltip : {showColorCode: true},
'width' : 1000,
'height' : 540,
'min' : 0,
};
var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
Consumed calories will be found using below formula.
Formula: 1 MET = 1 kcal / kg * h
Performed kcal = (Performed MET) * kg * h
Burned calories should be saved with related activity into UACTIVITY table.
These links below were the most important links for me to learn git.
https://help.github.com/articles/importing-a-git-repository-using-the-command-line/
https://help.github.com/articles/adding-a-file-to-a-repository-from-the-command-line/
https://git-scm.com/docs/git-fetch
https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository
Recursively summation of
calorie = measure.getValue() * measure.getEqv() * amount;
Calory should be calculated for all food measures.
I never include my coffee, tea, etc. break times, talking, messing around times. I really work in these times below.
Task Description | Initially Estimated Time | Actual Time | Status |
---|---|---|---|
Adaptation for Github - Learning Markup language and to use Github. | 2 hours | 6 hours | Finished |
Adaptation for Git - Command line for GitHub. | Not Expected | 3 hours. | Finished |
I used Eclipse before, so finding and configuring proper version did not took much time. However, finding the working and full Spring IDE took much time and required many tryings. | 2 hours. | 2 hours. | Finished |
Setting up the Web Service. (later understood web service is not needed) | 5 hours | 3 hours | Finished |
Requirements Elicitation. | 4 hours | 10 hours | Finished |
Creating Visual Mockups. | 7 hours | 9 hours | Finished |
Documentation (GitHub issues, ProjectLibre etc.). | 5 hours weekly | 25 hours | Not Finished |
Registered user Use case. | 3 hours | 4 hours | Finished |
Enabling Jquery and Bootstrap inside Java Spring MVC project. | 6 hours | 15 hours | Finished |
Learning Java Spring MVC structure. | 20 hours | 60 hours | Finished |
All detected query errors are corrected in AppServiceImpl.java. | 5 hours | 5 hours | Finished |
Creating Context, Class, Database and Component diagrams | 10 hours | 2 days | Finished |
Creating Use Case Diagrams and Use Case documentation. | 16 hours | 6 hours | Finished |
Creating Sequence Diagrams. | 24 hours | 9 hours | Finished |
Fetching USDA API data | 3 hours | 4 days | Finished |
Saving USDA API data into the local database. | Not expected | 3 days | Finished |
Showing user's foods with using local USDA data. | 2 hours | 1 day | Finished |
Changing the project structure (Folder and file structure) to Java Spring MVC standards. | Not Expected | 6 hours | Finished |
Using internal libraries (JQuery, CSS files, images, Bootstrap, JQuery UI, etc.) locally. | 3 hours | 5 days | Finished |
Removing unnecessary controllers. | 2 hours | 2 hours | Finished |
Correcting controller codes with considering data transportation to JSP files via controllers. | Not expected | 2 days | Finished |
Graphical displaying users Food Page created. | 1 hour | 2 hours | Finished |
Correcting controller codes with considering data transportation to JSP files via controllers. | 1 day | 1.5 days | Finished |
Graphical displaying users Food, users Activity and USDA Search Pages created. | 1 day | 3 days | Finished |
Simple Sidebar left side menu added into the necessary pages. | 1.5 days | 0.3 days | Finished |
Research made on Amazon AWS to understand which tools should be used. | 0.5 days | 1 day | Finished |
Creating and configuring MYSQL RDS in the Amazon AWS. | 3 days | 1 day | Finished |
Configuring Elastic Beanstalk module in the Amazon AWS server to deploy BMISystem as a .WAR file. | 1 day | 1.5 day | Finished |
BMI Calculation function added into loginSuccess page and fully working using users registration data. | 0.5 days | 0.2 days | Finished |
Displaying users activities. | 1 day | 1 day | Finished |
Activity fetching from json file. | 0.3 day | 2 days | Finished |
Adding Activities to users profile. | 1 day | 1 day | Finished |
BMI Calculation corrected with using gender. | 1 hour | 3 hours | Finished |
Users' old information Settings page should be displayed initially. | 2 hours | 9 hours | Finished |
Query bug in the Adding Food functions. Added Food, Some nutrients and measures could be saved into the database. All chosen should be saved. | 4 hours | 1.5 days | Finished |
Changing the places of functions to related classes. | 3 hours | 6 hours | Finished |
Fetching Activity information from JSON. | 2 hours | 1 day | Finished |
Adding new activity classes. (Adding new functionalities to the activity searching, adding, showing pages.) | 2 days | 2 days | Finished |
Changing activity tables in the database. | 2 hours | 2 hours | Finished |
Food and Activity Showcase pages should be fixed to be more user friendly. | 0.5 days | 0.5 days | Finished |
Showing activity duration using units such as minutes or hours. | 0.2 days | 0.2 days | Finished |
Dynamic Search function for activities. | 0.5 days | 0.5 days | Finished |
Users weight, calory, BMI and other historical data saved. | 3 hours | 2 hours | Finished |
User weight tracking, BMI tracking, increased and decreased calories tracking graphes added. | 2 days | 1 day | Not Finished totally |
User Friendly Food and activity search and addition pages created. (Dropdown used.) | 1 day | 1.5 days | Finished |
Multiple food addition function should be added. | 3 hours | Not Finished | |
Calculating and showing food calory and weight. | 5 hours | 1 day | Finished |
Code refactoring classes with more than 5 lines of code and refactoring packages. | 5 days | Not Finished |
Activity and Food data are huge lists and hard to in as a normal html page. A sequential item list is created for choosing to show only required items.
Moreover, a dropdown is used to show only chosen item by its name.
DropDown script:
function setItems(dropDown) {
var currentPage = $(dropDown).find(":selected").val() - 1;
var numPerPage = 5;
var
$table.bind('repaginate', function() {
$table.find('tbody tr').hide().slice(currentPage * numPerPage, (currentPage + 1) * numPerPage).show();
});
$table.trigger('repaginate');
I used Eclipse before for writing java codes. I didn't need to search which IDE should I use.
Bootstrap is very suitable for my project because it scales the website easily and efficiently from phones to tablets to desktops with CSS media queries and JavaScript, JQuery can be used with JQuery UI. Moreover, JQuery UI is not full of features such as Django so it should work more efficiently. Moreover, Java Spring with MVC provides a better structure for the BMI Project. Codes will be more understandable and more efficient. Therefore, Java Spring MVC with JQuery and JQuery UI are enough for coding.
Creating a web service with Java.
Mockups will give a representation of the product’s visual appearance. Mockups will focus mainly on the visual look of the product, but also hint at the basics of its functionality. These mockups will be shown to the stakeholder for early feedback.
These mockups below are not fully thought and still more pages should be illustrated.
Log in page mockup is different from the real log in page. Buttons and idea of the real log in page will be the same but illustration will be different. - This will be corrected later.
Log in page mockup
Activities page could be shown as daily, weekly, yearly or preferable time between. Activities page contains health status graph, time by time calories consumption graph, most significantly calories consumption graphs for the desired time and a total calories info text for the desired time.
Activities page mockup 1
Calories page could be shown as daily, weekly, yearly or preferable time between. Calories page contains health status graph, time by time obtained calories graph, most significantly obtained calories graphs for the desired time and a total obtained calories info text for the desired time.
Calories page mockup
User would select breakfast, lunch, dinner or snack from the upper left side dropdown in the food addition page. Every food type is shown in the page. User can decide and select meal types inside the list. That list helps users to gain time. After selecting a type, a colorful food type list will be opened.
Food Addition page mockup
Total labour time for the project: Minimum 30 days in 14 weeks. Flexible considering intense exam times. Work below will be done seperately, I'm tracking and inserting my time passed for each work piece by piece into actual time.
Task Description | Estimated Time | |
---|---|---|
I don't want to state my gender option. | 2 hours | |
Optimising Food Search function considering to show all searched foods to the user. | 1 day | |
Fetching food unit from JSON data. | 0.5 days | |
USDA API connection speed optimization. | 0.5 days | |
Multiple Food Addition function. | 0.3 days |
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.