Friday 24 June 2016

Adding templates and views to Sim

Up and till this point, I had completed work on the admin side of things (and by that I mean getting tables to the admin site). Today was the turn to give some presentable interface to the whole thing. The way I decide to go about interfacing the display of all these tables was by using an index page. The index page was intended to contain links to all different tables that the user was allowed to access. Clicking on each of these links would open the table in front of the user. That was it. This was my goal the entire time. 
First of all I designed an index page. It was a very basic html page with a bunch of links to other html pages. The url of each of these pages was mapped to one template: the table template. This template took as parameter the name of the table that the user wanted to see. And then contents of that tables were rendered on the page. I must add this included a lot of typing. An annoying lot. 
Abstraction makes things to sound easy, whether it be a problem or a solution. But the pain lies in the details. Every thing needed to make this possible required an "how to" on Google. By this point, I don't even remember what all I searched for today. That is perhaps a bad thing. I should be able to recall what I have looked for and hence found on the internet. Otherwise what is the point of doing all of this if I can't repeat it without internet? But wait, what is the browser history for? That is indeed a good idea to link my browser history for the day to my daily dairy. After all searching the web constitutes a major part of activities during training. 
Anyway, during the later part of the day I asked for help from Tamandeep (a fellow trainee) to add some beauty to my html. He agreed. Hopefully he'll do a good job. Presently there are only two people working on SIM (me and an occupied Amarjeet), if all goes well then who knows maybe there is a third contributor in the making. All hinges upon the sincerity of his efforts. 
Training for today ended with the sequel to a presentation on Octave. It was continued by Amarjeet as an attempt to introduce Octave to students of Civil Engineering. Today's presentation was mostly about interpolation. Amar introduced the topic nicely to everyone. And since the topic of the presentation had all the Civil students relate to it, the seminar soon became very interactive. I mean people were literally jumping off there seats to go on to the stage and explain their points. All in all, a good exciting session.

No comments:

Post a Comment