Updates for this week regarding the project.
- Since, the previous I am not entirely done with the frontend part, this week -I have invested in completing it and I am done with the same.
- Got the legend for the atlas up and now I can easily switch between the types, versions and distro options from the controller on the atlas.
- The markers are up from the previous week.
- Gained some knowledge regarding the SSO authentication and multi-pass.
- Commits for this week : Link .
- Will be working on authentication part, using the multi-pass authentication(SSO) against the openmrsID.
- Get the RSS feed consistent.
- Atlas cronjob (screen-captures) using the PhantomJS.
- Make sure the REST URI are consistent with the module and updates from the module.
This week, I started with getting the map show up when the app runs with the rest URI’s I’ve written in node, but surprisingly that didn’t happen as expected so I have to run through the code related to the frontend part and figured out a few points as how the frontend was designed.
- So up till now I am able to show the map on the browser and markers showing up on them
- The view files that I use right now are .ejs which are relatively very easy to understand and write
Objectives yet to achieve and plan coming weeks
- Probably it may take a few days to come up with the markers and Legend/Distributions show up on the map.
- Start the authentication part with the help of the community.
This week, I exposed the REST resources of OpenMRS Atlas using Node, Coming to the timeline, I have almost accomplished what I’ve planned earlier this month.
Some of the key Resource and routes for accessing them are
- GET /distributions : Response is a JSON object with all the type of distributions.
- GET /markersites : Response is a JSON object with all the markers available in the database
- GET / marker/:id : Get a specific marker with UUID parameter.
- GET /markers : This route will respond with a JSON object with a group of markers of a given type and version as parameters in the URI.
- POST /marker : Creates a new marker on the Atlas.
- POST /marker/:id : to update the specific marker.
I have completed the midterm evaluation of my mentor earlier this week and I’ve almost achieved what I have planned in the timeline .
Yet to achieve/plan for post-midterm
Hopefully, the following are the key things I’ll be working until the completion of GSoC.
- Consistent REST API.
- Get the UI done in a week(probably by the end of June).
- Authentication against OpenMRS ID .
- Adding functionalities to support arbitrary metric from the client.
- Compatibility to use the atlas through the module.
- Release the Atlas 3.0
All this week, I was constantly looking at the PHP code and figuring out some of the rest end points which I am gonna rewrite into node.
So my updates this week are as follows
- Working on REST URI in the node app.
- voraciously read and learnt some PHP laravel concepts.
- Added favicon and the title for the app.
- At last, Learnt a lot this week
commits this week : Link
Hope you all are doing well and I’ll explain how I made a favicon show up successfully on my browser after an hour of search.
Currently, I am working on building a node app using express with restful service. So this post will explain how I made a favicon show up in the browser using the features of the express framework.
Initially, I want to brag a bit about the express framework. It is a lightweight node.js web application framework which is currently holding huge recommendation from the node.js community if one wants to build a web app presenting rest services. It has 25750 stars and 4800 forks as I write this.
Some useful resources for express framework
GitHub : Link
How I have done it
- Initially, I recommend you to take the code generated by the express generator module (google how u can get the express generator installed locally )
- If u generate the code using express generator then all u have to do is jus uncomment the following code which u get by default.
in the above line we use path and favicon dependencies which come by default if u have used the express generator.
if not you have to do the following
var path = require(‘path‘);
var favicon = require(‘serve-favicon‘);
you’ll have to place the favicon.ico file in the public/images directory 🙂
For any queries ask in #express , #nodejs channel via IRC. I am sure they’ll help you.
This week I was very busy doing following tasks
- Figured out a little part of the API for the existing Laravel framework and started designing it.
- Committed little bit of code which I will develop into an app running in the coming weeks(hopefully).
- Attended scrum meets.
- Updated the mentors through the call.
- Relatively it was a huge learning experience and due to which I am a bit behind the schedule.
I would like to explain a bit about REST
REST : Representational state transfer, In my terms if I could put it in one line, it is a renaissance in software industry which came along with web 2.0
Some terms which are useful in understanding rest are
- API server: main REST application serving the API, in this case, written in PHP.
- API endpoint: a backend “method” which the client communicates with to perform an action and produce results.
- API endpoint URL: URL through which the backend system is accessible to the world.
- API token: a unique identifier passed via HTTP headers or cookies from which the user can be identified.
Currently I am going to design the API and write the specifications in swagger specifications and generate the server side code and tweak it accordingly to make it work.
Finally submitted the feedback, little bit nervous about the coming mid-term evaluation. 🙂
Commits of this week : Link
Thanks for reading 🙂
In week 2 of GSoC 2016 here are my accomplishments, this week was exciting than the last week but a bit scared.
- Made a scaffold app with express locally and started commits to it.
- Listed out some of the resources and learnt huge things regarding express and node.js which are going to be useful in the coming weeks a lot.
- coming to coding I’ve made a good progress this time compared to last week.
- Call with Burke on Friday, encouraged to do the app asap.
- Updated the database locally.
- Planned few milestones for the coming week in the call.
- Scrum meetings(missed few days :p).
- feedback form.