Today I would like to share a story with my audience. This is regarding one of challenges which once I faced in my technical career, well the hurdle was not Mount Everest peak ! but was not less than it for me. Now I explain what was the task. One of my clients wanted me to write a program where user can do drawing. It was easy using HTML5 canvas and we all knows that canvas is very common now a days but he added some more points, he wanted to register hand drawing with time and options, and then save each draw with the record (pixels) in a database table i.e. whole the process of drawing like a video of various image frames.
Hand Drawing RePlay
Hand Drawing RePlay
So my breakpoints for application were: Draw image with options Record & Save it with pixels and time Replay option (single and multiple together of same options) Replay should be with same time frame as it was drawn There are a lot of tools available which provides the facility of drawing (for images, sketches etc.) but no facility to save with pixel & time (some tools may be providing now but at that time none) also most of the tools were desktop/window application. So I need to develop my own application as client need was web application but the biggest challenge was to save drawing with time and pixels i.e. if user pauses for few moments while sketching and then continue, it should be recorded in the same manner and when user replay the drawing it should play like a recorded video. For the ease of user convenience I decided to using JQuery for all client side events and AJAX to save data and replay drawing. I opted .Net as platform, C# as server language, SQL Server as Database and HTML5 for canvas. I interacted with database via .Net web Services using AJAX. And now was able to save drawing with time and options as well as replay. HandDrawing_Reports and the best part is that was also able to play multiple drawing of same options together. HandDrawing_RePlay_Multiple_Together I am sure that it gave you some idea for approach if you encounter with similar problem. Use client side script to not to refresh page at every event and for awesome user experience and web services for server interaction. Cheers! Pramod In case you need Certified Salesforce Consultant for any Salesforce related work, then please feel free to reach out to sales@girikon.com

About Author
Girikon LLC
Girikon LLC
Share this post on: