Monday, February 24, 2014

Client side graphs

I came across many instances, where people jumped at some expensive client side libraries just by looking at the graphs. Here are some simple points you need to consider.

image

  1. Generating graph on client side is not a rocket science. Now its more and more simple, no one plays around with DIVs to create bar chart anymore.
  2. Most of the libraries use Canvas or SVGs for creating charts.
  3. Flot library is the best library available under MIT license. I have used it and i totally recommend it. Binding or customization is super simple. I have created newer types of charts in very short time.
  4. Use expensive libraries, only if you want swanky grids, edits and other UI features. Not just for graphs.
  5. You can play around with events easily and create what ever you want, like making nasty sound on hovering on some point :)
  6. For all short comings, you can find one more more plug-in. FlexiSlider is one of the great addin i found for handling touch.
  7. Use a thumb rule based on the budget you have where you set a threshold for number of plug-in you will be cherry picking before switching to a commercial library.
  8. Enjoy playing around with jQuery!

It’s about not to code

“You don't have to solve all problems through code – My Boss”

This was the quote from my conversations from one of our conversations. However i remember this every time i think of a solution for any problem that i deal with, while working on a software projects. Context has changed from the time he quoted this but i have followed same instruction many times.

This goes well with INVEST mnemonics associated with good User Story. I use the above quote for ‘Negotiating’ the scope of the user stories. As an architect, i have an advantage of having good understanding of the requirement as well as the system. This allows me to put forward options that are easier to implement at the same time solves the problem.  Couple of examples i want mention here, where i realized that i gained a lot.

1) I was working on a client-server application, which had an management portal for modifying some back end data. We had created an ASP.Net Dynamic data site for this. Now we had to restrict the access to this portal, only for admin users. Going by the standard implementation, we had to create roles, then associate users to roles and then give some UI where one can manage both. This would take quite a long time and we wanted this to be done for the first roll out. 

Here comes the negotiation part. We managed to convince the product owner that given 30 minutes notice, i will make anyone admin till next release. Overall, my product owner agreed to de-prioritize the story and moved it to next release. What i did there was used IIS feature to allow/deny access to a web application. As there were only 2-3 people who required admin access and possibility of it changes required was almost like once in a 6 month. 

image   

So, We managed to deliver this feature for first release under an hour. And the rest of the user management part of the story moved back to the backlog. I don't see this feature ever getting the daylight.