OpenText Smart UI - OScript Developer's Perspective
Siva Prasad
Head of Software Engineering | Agile Transformation & Enterprise Content Management | Building Scalable Applications and High-Performance Teams
For the last one decade I have been writing OScript code and customizing Content Server(Livelink) through new modules, Patches, Web Reports, Forms, Web Services , Java classes, .net utilities, Rest API and so on, mostly with server side scripting. HTML, Javascript , CSS, Bootstrap and jQuery were purely used as Presentation layer to support server side Business Logic implementation.
OpenText have introduced Smart UI and are still in the process of getting most of the Classic UI functionalities. As a technical end user with exposure to other modern websites and fancy UI screens, I loved it and the new look has somehow fascinated me. But then after going through the documentation, available for developers and exploring the examples my fascination had transformed into a nightmare.
I have spent last 6 months on Smart UI customizations, developed command based, widget based functionalities, implemented Perspectives, routers and created Rest API components to support the Smart UI code. I have started loving Smart UI sdk and the customizations. Now when I look back at my previous experiences and design approaches, everything seemed to have turned by 180 degrees. Most of the code changes are now at the client side and less of it is done at OScript level. Now I am more concerned about the design patterns at the client side. Suddenly I have started respecting client side scripting languages more than I used to do earlier. I have also noticed that with Marionette framework I am writing less code than I previously wrote using JavaScript. I am being more productive by using the underscore utilities, Marionette views and concentrating more on my Business logic than getting bogged down with UI implementation details.
Before exploring Smart UI sdk, I had used plain JavaScript functions and variables, jQuery, CSS and Bootstrap. But never had to use or apply MVC patterns or other Object Oriented design patterns at client side. Nor did I ever use Closures, promises. I went straight into sdk documentation, samples and then decided that it is way beyond my head. Then gave myself a second chance, thought to myself, 'probably because I did not know much about Backbone and Marionette, I was not getting it'. Another two weeks I spent quality time(15-18 hrs a day, 7 days a week) on Backbone and Marionette documentation, examples and projects. I went back to Smart UI documentation and samples, still it hounded me, with no results.
Then came my awakening moment, on my 20 hr flight from Singapore to Canada to attend Enterprise World. I read this book "JavaScript Patterns" by Stoyan Stefanov. It dint say anything about OpenText Smart UI, Backbone or Marionette. But after reading that book, my basic JavaScript awareness has increased exponentially and the documentation and samples in Smart UI made sense and now Smart UI Development fascinates me.
I might have made it sound simple in the end. But what I am recommending to starters and fellow Content Server developers, is first brush up your JavaScript patterns knowledge, understand what JavaScript modules are and how the require.js is used for dependency management, get an in-depth understanding of Backbone and Marionette frameworks and then go and explore Smart UI samples. Most important advice I would give is not to expect your samples to be working, even after following the Smart UI documentation to the letter. There is more to be configured than instructed. To add to the confusion, the initial version of Smart UI was using Marionette v2.3.0 and now v2.4.7. Most of the online materials, tutorials and books are outdated and might be demonstrating the examples using deprecated functions in Marionette. So keep an eye on the versions. By the way, my best partner in crime, tutor and trainer in this roller coaster ride was... "Chrome DevTools".
I wish I had this advice at the start of my journey :-)