meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
opendata2015:group4:start [2015/03/05 18:08]
m1371
opendata2015:group4:start [2015/03/16 10:25] (current)
m1371
Line 1: Line 1:
-====== TEAM ======+====== Good morning team @ODCC2015 ====== 
 + 
 + 
 +{{ :opendata2015:group4:images.jpg?200|}} 
 +|            ^localEAT production ^ 
 +^ 1  | Anar Bazarhanova              | 
 +^ 2  | Khan Mohammad Habibullah      | 
 +^ 3  | Marie Leslie Melanie Pittumbur| 
 +^ 4  | Julien Dhallenne              | 
 + 
 +====== Poster, Presentation & Report ====== 
 + 
 +{{:opendata2015:group4:localeat_-_poster.pdf|}} 
 +{{:opendata2015:group4:presentation.pdf|}} 
 +{{:opendata2015:group4:localeat_report.docx.pdf|}}
  
-  * Anar Bazarhanova 
-  * Khan Mohammad Habibullah 
-  * Marie Leslie Melanie Pittumbur 
-  * Julien Dhallenne 
  
 ====== What is LocalEAT ====== ====== What is LocalEAT ======
  
-Due to fierce competition from supermarkets and other food-based corporations, it is increasingly difficult for local producers of fresh food to attract consumers. Also, information about where to find certain types of fresh food is not readily available for consumers. + Due to fierce competition from supermarkets and other food-based corporations, it is increasingly difficult for local producers of fresh food to attract consumers. Also, information about where to find certain types of fresh food is not readily available for consumers. 
  
-LocalEAT is a hybrid mobile application that will help users to find locally produced food in a certain area in Finland. By using this application, producers will be able to advertise their food and buyers will be able to find out food in their nearest local market as well. This application is used to encourage the sustainability of local and small producers of food and creates awareness among citizens about buying local products reaping on the way the benefits of eating fresh food. + LocalEAT is a hybrid mobile application that will help users to find locally produced food in a certain area in Finland. By using this application, producers will be able to advertise their food and buyers will be able to find out food in their nearest local market as well. This application is used to encourage the sustainability of local and small producers of food and creates awareness among citizens about buying local products reaping on the way the benefits of eating fresh food. 
  
-The application is realized on an open REST API through which everyone can participate and contribute to add information about where different types of fresh food can be found from markets of their locality. + The application is realized on an open REST API through which everyone can participate and contribute to add information about where different types of fresh food can be found from markets of their locality. 
  
 ====== Goal ====== ====== Goal ======
Line 24: Line 34:
 ====== Application Architecture ====== ====== Application Architecture ======
  
-{{:opendata2015:group4:first_draft_arch.png?1000|}}+{{ :opendata2015:group4:architecture_localeat_1_.jpg?700 |}}
  
  
Line 42: Line 52:
 ====== Day 1 ====== ====== Day 1 ======
  
-Once the tasks were decided, we realized a first draft of our client application communication with our REST API.+ Once the tasks were decided, we realized a first draft of our client application communication with our REST API.
 Here is the PNG result : Here is the PNG result :
-{{:opendata2015:group4:first_draft_arch.png?1000|}}+{{ :opendata2015:group4:first_draft_arch.png?450|}}
  
 and the source file : https://drive.google.com/file/d/0B34EEgIPSoIrVTVPX3ZtcEdySjA/view?usp=sharing and the source file : https://drive.google.com/file/d/0B34EEgIPSoIrVTVPX3ZtcEdySjA/view?usp=sharing
Line 50: Line 60:
 We also worked on a decent logo for our application. The result is the following : We also worked on a decent logo for our application. The result is the following :
  
-{{:opendata2015:group4:font_edited.png?200|}}+{{:opendata2015:group4:font_edited.png?300|}}
  
 Finally for the back-end server side, it was agreed that the MEAN stack would be deployed on the Cloud 9 hosting platform.  Finally for the back-end server side, it was agreed that the MEAN stack would be deployed on the Cloud 9 hosting platform. 
Line 56: Line 66:
  
 ====== Day 2 ====== ====== Day 2 ======
 + The second day is dedicated to create a mongoDB database to hold products and markets collections that will provide the client application with required information. The database is functional but some problems are encountered to link the database to the NodeJs server.  
  
-The second day is dedicated to create a mongoDB database to hold products and markets collections that will provide the client application with required information. The database is functional but some problems are encountered to link the database to the NodeJs server.+ On another side, the client application design, using the Ionic tool and based on the AngularJS framework, is on its way and the following screenshots can already be made available (the data is a little random) :  
 + 
 +^   iPhone 4 view  ^   Nexus 5 view   ^ 
 +|{{ :opendata2015:group4:nexus5_view.png?300 |}} | {{ :opendata2015:group4:iphone4_view.png?300 |}}|
  
-On another side, the client application design, using the Ionic tool and based on the AngularJS framework, is on its way and the following screenshots can already be made available (the data is a little random) : 
  
-iPhone 4 view : {{:opendata2015:group4:nexus5_view.png?200|}} ; 
-Nexus 5 view : {{:opendata2015:group4:iphone4_view.png?200|}} 
  
  
 ====== Day 3 ====== ====== Day 3 ======
  
-On the third day, the connection problem between the database and the server has been solved. The design of the Rest API interface has started so that new products and new markets can be added to the database when POST method is issued, entire list of products and markets and list of products depending on market criteria can be listed when receiving  using appropriate requests from the browser. For the communication between the client and the server, the data is exchanged in JSON format. + On the third day, the connection problem between the database and the server has been solved. The design of the Rest API interface has started so that new products and new markets can be added to the database when POST method is issued, entire list of products and markets and list of products depending on market criteria can be listed when receiving  using appropriate requests from the browser. For the communication between the client and the server, the data is exchanged in JSON format. 
  
-{{:opendata2015:group4:meanstack.jpg?200|}}+{{ :opendata2015:group4:meanstack.jpg?450|}}
  
-On the client-side the data structures for the products and markets are defined and the communication with the server through the Rest API is tested and debugged until it works.+ On the client-side the data structures for the products and markets are defined and the communication with the server through the Rest API is tested and debugged until it works.
  
 Designing MEAN stack architecture Designing MEAN stack architecture
Line 82: Line 93:
  
 ====== Day 4 ====== ====== Day 4 ======
-Populating the database and testing communication between server and client using the front-end application on mobile and tablet. + 
 + Populating the database and testing communication between server and client using the front-end application on mobile and tablet. 
  
 Open Street map is used to plot the locations of the markets and the filtering of markets displayed on the map is done according to user's current position. Open Street map is used to plot the locations of the markets and the filtering of markets displayed on the map is done according to user's current position.
Line 94: Line 106:
    
  
 +====== Example of REST Api data sets ======
 +  * GETting response of a particular market:
 +<code>
 +   {  
 +      "_id":"54f8258e9783a587422f1c94",
 +      "name":"Hakaniemen Kauppahalli",
 +      "desc":"Hakaniemen Kauppahallissa on 38 elintarvikeliikettä 1. kerroksessa ja 28 erikoisliikettä 2. kerroksessa. 
 +      Arkkitehti Karl Hård af Segerstadin suunnittelema Hakaniemen Kauppahalli avattiin vuonna 1914.",
 +      "lat":"60.180055",
 +      "lng":"24.950989",
 +      "address":"Hakaniemen Kauppahalli, Hämeentie, Suomi",
 +      "postcode":"00530",
 +      "town":"Helsinki",
 +      "opening_time":"ma-pe 8-18; la 8-16",
 +      "photo":"http://www.hakaniemenkauppahalli.fi/wp-content/uploads/2014/01/halli-400x266.jpg"
 +   },
 +</code>
 + * POSTing a new product:
 +<code>
 + {  
 +      "_id":"54f84be39783a587422f1c9b",
 +      "name":"Zucchinis",
 +      "price":4,
 +      "desc":"Good source of vitamins A and niacin.",
 +      "origin":"Etelä-Savo",
 +      "measureunit":"kg",
 +      "market_id":"54f8258e9783a587422f1c94",
 +      "photo":"http://d33y93cfm0wb4z.cloudfront.net/Jen_Cheung/Catagory%20Pictures/Zucchini.article.jpg"
 +   },
 +</code>
 +  * Querying products list by a market_id attribute:
 +<code>
 +  {  
 +      "_id":"54f84c609783a587422f1c9d",
 +      "name":"Watermelon",
 +      "price":6,
 +      "desc":"Antibacterial and anti-cancer. Contains vitamin A and C, as well as iron and potassium. Their high water content makes them ideal for juicing.",
 +      "origin":"Keski-Pohjanmaa",
 +      "measureunit":"kg",
 +      "market_id":"54f8258e9783a587422f1c94",
 +      "photo":"http://www.fut-science.com/wp-content/uploads/2014/07/watermelon.jpg"
 +   },
 +</code>
 +  *  localEAT Back-end implementation can be accessible via {{:opendata2015:group4:firstproject.tar.gz|}}
 +
 +====== Night 4 ======
 +
 +  * Client application views:
 +{{:opendata2015:group4:screen_shot_2015-03-05_at_23.03.05.png?200|}}
 +{{:opendata2015:group4:screen_shot_2015-03-05_at_23.03.48.png?200|}}
 +{{:opendata2015:group4:screen_shot_2015-03-05_at_23.04.08.png?200|}}
 +{{:opendata2015:group4:screen_shot_2015-03-05_at_23.03.19.png?200|}}
 +{{:opendata2015:group4:screen_shot_2015-03-05_at_23.04.22.png?200|}}