Just a Momento

Back in June I was in interview mode looking for a good opportunity at a company that I could help rock their world. One particular company challenged me with a homework assignment - generate an architectural design document that would represent something I would actually hand off to a senior developer to implement. It would need to contain sufficient detail to make the requirements clear and it could be on any topic I wanted.

I decided to take re-use to a new level and use a recent Exparency implementation component that I had yet to document - the implementation of the Momento Pattern in a SaaS application. In this manner I would be knocking off two birds with one stone - provide the architectural design document per the homework assignment, and document the implementation I had already built - something I try hard to keep up with. That company was supposed to review my design on a Skype session the next day, and after waiting for over an hour on Skype for them to get onto the session I abandoned hope, and despite their apologies and request to reschedule, I decided that there was not a fit. I was glad that I had marked my document as Confidential.

Nevertheless, the implementation is solid and I am prepared to share my design with the outside world - in other words, I no longer find it to be Confidential nor a game changer in my industry (Workflow) and have attached the document to my profile for your reading pleasure.

So exactly what is this all about?

We are all very accustomed to CTRL-Z/CTRL-Y behavior in client tools (Edit Do/Undo/Redo) and yet this type of functionality is hard to find on SaaS applications. When was the last time you created an order in Amazon only to discover that you had accidentally added an item you did not intend to purchase, or decided was too expensive for your pocketbook? Instead of being able to hit CTRL-Z to remove that item, you have to go to the order and physically remove it. If, after thinking about it, you decided "You know what - I really want that item after all" you then have to go and search for the item again and add it to your cart. Wouldn't it be nice if you could just hit CTRL-Y?

The convenience of CTRL-Z/CTRL-Y behavior is enough justification for adding an implementation of the Momento Pattern to your SaaS application. However, there are other benefits:

Maintain a history of user activity. This can be useful when a user reports a problem and the Customer Service Representation needs a record of exactly what it is that user was doing to manifest the problem. Too often you will hear the user state "I can't remember exactly what it is I was doing, but I think I did ..." Adding a menu item to transfer the sequence of activities to some link that the CSR can access is something that can be easily added.

Macro recording. Saving snippets of activity as a sequence of commands and then saving that sequence as a named macro is another convenience that can be provided to the user. Long, repetitive activities are a perfect example of where macros can be beneficial. Again, we are accustomed to having this functionality in many client applications, but rarely find them on SaaS systems.

Offline Application. Some applications need to run in a disconnected environment. For example my current employer is in the oil and gas logistics industry and running applications out in the field oftentimes requires offline operation. One solution to this is to maintain a local database which stores activity data and then synchronizes the database to the application back-end database once in a connected mode. This is a level of complexity (install of a local database, synchronization, etc.) that can be avoided by saving activity instead of data. Instead of synchronizing data in a database, you can simply re-execute the sequence of commands that were saved as an activity history - dramatically reducing the complexity of synchronization.

Testing. Having macro-like sequences of activities are useful for testing applications - SaaS or otherwise. This includes regression, functional, integration, performance and concurrency testing.

As mentioned in the associated document, the Exparency implementation of the Momento Pattern uses the HTML5 local storage to store the sequence of activities and their inverse operations. In the current implementation, two stacks (Javascript arrays) are maintained in that local storage, and because HTML5 local storage can only store name/value pairs as strings (as opposed to objects), then with enough session activity performance in running the application will start to degrade on the client (due to the excessive need to serialize and de-serialize JSON command objects.) In a future implementation I will fix this problem and re-post the update.

The Exparency Workflow system is behind schedule - I was hoping to have a demo-ready version by end of September of this year. With my mother's death due to cancer back in August prior to which I was spending a lot of time up in NJ as a caretaker, starting a new job in September, and my daughter getting married only a few days ago, I was not able to achieve this goal and I am pushing it out to the end of Q1, 2017. This will include resurrecting the Exparency website.

Meanwhile, feel free to use this design in your own applications. The greatest form of flattery is to see your ideas copied :)

you know, I really never thought of this as NOT being a common feature. with the proliferation of SaaS now, I'm seeing it less and less...like it's being overlooked! Even in this happy little LinkedIn mobile app!

Like
Reply

To view or add a comment, sign in

More articles by Steve Widom

  • Stayin' Alive

    As Exparency prepares to go live with its first app which uses its own Microservices based architecture a problem…

    3 Comments
  • Grid Lock

    Not what you're thinking. This has nothing to do with a traffic jam, although I will admit that a lot of my postings…

  • Things That Irk Me Part IV

    A lot of the little things in life that annoy me have to do with dining. I guess it is because it is such a big part of…

    1 Comment
  • Cheating is OK Part II

    I came across a weird problem using Angular2 these past couple of days. I am attempting to write a single Admin tool…

  • My Experiences Learning Angular 2

    It's very rare that I allow myself to live on the bleeding edge and it's no secret that at this point in time Angular 2…

    1 Comment
  • Designing a Review

    That's right. I know you typically think in terms of reviewing a design, and from time to time I am asked to do just…

  • Things That Irk Me Part II

    How Long it Takes To Purchase a Simple Item In today's automated world one would think that purchasing an item should…

    3 Comments
  • Automated Music and The Coming Election (What?)

    About 35 years ago my wife, Pam, and I made a visit to the Museum of Science in Boston and in the course of browsing…

    2 Comments
  • It's All About the Base

    One of the design goals of Exparency's framework from the very start was to allow the client to extend the system in a…

    1 Comment
  • Things That Irk Me

    1. Referring to me and my colleagues as "you guys".

    2 Comments

Others also viewed

Explore content categories