Wednesday, December 30, 2015

Marching towards Microservices

To say that microservices have arrived would be the understatement of the year 2015 when most of the enterprise application creators seem to have realized the importance of keeping individual parts of application separately.
There is nothing new when it comes to microservices and there are tons of literature - ranging it from precise definitions stated by Martin Fowler, to the loosely coupled architectural term.

It is also easy to confuse microservice with SOA as the design seems similar; however, SOA is an integration of different applications, but microservices remain independent to each other - you can simply plug in and out different services while using them across different applications.

The  rise of javascript based frontend for web applications and in general, polyglot programming of applications has further argued the premise of having standalone pieces of applications that can

A) Scale very well

The individual service can scale up easily - as its underlying micro-architecture contains the least surprises and given today's virtualized/cloud environments, such services can be increased in volume as well as tested and rectified if something goes wrong.

B) Standalone

The services are standalone in the sense that each application that uses a microservices can use it with a specific set of data and as applications interact over http, there are no hassles of contract based services over SOAP/REST based services, which were based on service contract and were the norm earlier. So, we do not need an elaborate contract or some specific tool ; just a miniature web application framework would do.


An example of microservices making waves is into the SAP Hybris ecosystem via the YAAS that serves both as a place to host as well as market individual microservices for different e-Commerce implementations. Hosting is important because of the sensitive nature of data of different clients (which can be stored as different tenants) and also to remove the complexity of managing the server load when there are a lot more things to be completed.

Creating standalone applications and utilizing their mashup is no longer a field dominated by selected few, but are quickly becoming the norm in the coming  time and is poised to become the disruptive force of the decade.

Monday, November 2, 2015

On JavaScript generating engines

Javascript has become so pervasive today that there are camps which are trying to fight the syntactical challenges that it posts in order to leverage the benefits of the approach and the platforms using it i.e. making the browser (be it computer or mobile) do the hard work of rendering and html generation.

However, the catch is that there are different 'languages' that effectively generate JavaScript code. in this regard, again the Rails community scores a point as they where the first ones to leverage CoffeeScript for this job. Other technology have came late into play, but there is still room for these different langugages to manuever.
I've already covered coffeescript, which is in vogue with Rails/Django crowd and there are others like Dart for the GO/Java community - although Dart can be used as-is (native compilation for the crome browser) but since not all browsers support Dart, practical implementations have to live with the Dart2Js tool, which ends up being javascript anyways.


Dart VS TypeScript

After learning Dart for a month, I'd sum it up as an ambitious attempt towards improving web applications but it has a learning curve, which in my personal option is unwarranted. I am inclined towards TypeScript as it allows me to code in javascript (or a close to JS syntax) rather than forcing me to learn another language just to get things done.

Given the fact that Angular.js 2.0 is choosing later over former even if that means using a Microsoft based framework instead of in-house one, investing in TypeSafe seems more prudent today.

my 2 cents

Monday, September 14, 2015

True Omni-Commerce with IoT

The changing face of e-commerce means that successfully buying a product is more than just a few clicks away. Today, with the widespread influx of communicative devices and advertisements, the customer is constantly bombarded with advertisements of interest right from the morning tea to the evening commute, everywhere advertisements try to sell different products. However, this might only affect the user decision, which might be in the favor of competitors of the advertiser. So the context of advertisement with respect to the end customer needs to be revised and the user needs to be engaged -  buy the product rather than just influence decision making. SAP Hybris is currently aiming towards creating the online storefront of the future and is tinkering with some of the things that I am discussing- but a lot needs to be done before things are

Internet Of Things

As defined in Wikipedia, "The Internet of Things (IoT) is the network of physical objects or "things" embedded with electronics, software, sensors, and connectivity to enable objects to collect and exchange data."
Smart devices/sensors are already increasing exponentially and are poised to make the next big change in everyday life since the rise of internet and by 2020, only the B2B based such devices would be around 5.4 Billion.


Applied IoT

We've all heard about Amazon drones but the ideas do not stop there; by making a user context aware, the e-commerce can jump out of browser to mobile notifications through NFC enabled portals in physical stores. On the other hand, the user based sensors could be used for kiosks and physical display stores, making them intelligent. Another scenario could be the use of RIFD enabled tags on consumables, which can enable gamification based points for repeating customers, leading to repeated orders. These ideas are dime a dozen, but it remains to be seen which technology and business goes all out to adapt them.

True Omni Commerce

Although this sounds good in theory, in real world things like scalability and security take precedence and instead of just improving the context, there is a need to provide actual sales through these additional channels, or in other words, creating a mashup involving existing channels to generate even more avenues. I am currently working as a Hybris developer and am hoping to see some positive influences due to rise of such a technology, which is currently in the playground stage.

Thursday, August 13, 2015

Debugging Javascript

Just sharing a handy tip that saves a bit of time during javascript development. By using deb.js, it is possible to have stack trace in browser on errors (as javascript is not expressive while throwing errors). By using deb.js a lot of console.log statements and debugging sessions on chrome/firefox can be avoided.

Tuesday, August 11, 2015

Not just another bot

I receive a lot of mails from recruiters regarding job opportunities in some xyz technology. The trouble is that after five years of working in software development, I've picked up some mundane as well as niche skills and added them to my skillset.
However, when confronted with people who like to only concentrate on their requirements, I come up with something like this:
http://ma.tt/2014/08/specialization-is-for-insects-and-developers
I guess, specialization matters, but real world requirements are different. If you happen to be a recruiter or a manager, you would have to take this fact into account that any person that knows about the tool that you are hiring is a unique individual who also happens to know other related and unrelated stuff.

Saturday, July 25, 2015

Going agile

I'll start this with a tool inspite of the title named after agile, a practice that cold shoulders it.
Sometimes, the tools that you desire are not available for customization and all the relevance of a given tool seems unrealistic. However, there are alternatives and when they are available, it becomes a pleasure to share.
Restyaboard is one such trello like tool which is opensource and you can setup and customize to your heart's content.
These days, as I am busy in an agile project (that is unfortunately not followed in an agile fashion), doing other things increasingly becomes difficult and same goes for my blogging also.
But one must not give up on good things in life and keep trying and exploring.

Wednesday, June 17, 2015

that frantic rush to jump the JS MVC brandwagon

I came across an advice on an online comment which is worth sharing:
'
Forget about it (at least for now). Simply stick to plain old jQuery, master it, be your friend.
If you suddenly find yourself getting swamped into a lot of jQuery spaguetti code, that means that your application is getting way too complex and your code needs some structure to make it maintainable.
This is where an MVC framework can help you, by giving some logical structure to your code, making it more modular and reusable, easier to read and to understand.

However, it's hard to learn a solution to a problem you never had...'
This is quite like the advice that veteran programmers give - if it isn't broke, don't fix it. There is a time and  place for sticking with MVC, but the traditional approach of keeping things simple is not a poor choice  - especially when the code is readable.

Sunday, April 26, 2015

My tryst with Hybris... continued

Rather than making a new post on my thoughts about development over hybris platform, I felt prudent to continue my older post about SAP Hybris and bring out some of the challenges felt and my take on this e-commerce platform.
Currently, I am still a newbie developer working on various features and parts of the platform.
My team is also in the young hybris phase as explained in detailed manner here ( http://time2know.net/young-hybris-partner ) and the knowledge sharing is limited and as frustrating as it seems, the development work is generally slow due to long list of assumptions that hybris platform assumes.
One example is in implementation of AdminCockpit - where all the fields in various editors are laid out in various xml files:


< editor >
    < group qualifier="General" visible="true" initially-opened="true" >
        < label >General< / label >
        < property qualifier="B2BRegistration.title" / >
        < property qualifier="B2BRegistration.name" / >

These files are editable, but changing them yielded nothing - and no suitable help was found in hybris wiki or experts forum. Next , I tried doing ant all and searching for generated files but found nothing of importance. Finally, I tried doing an initialization of cockpit and admin cockpit which made the changes appear - the amount of efforts that I invested were shockingly huge as compared to the actual work needed.
If some hybris expert/creator reads this, I hope my plead for greater technical and functional documentation reaches - debugging without a knowledge of how the APIs function is like learning to swim inside a boat.
Development and trying to appear for hybris certification remain my top priority missions for the coming month and I hope to be a hybris certified developer after then and work on this platform for the near future.

Thursday, February 19, 2015

Database Migrations for Java Application

One of the tools that I've used in the recent days that merits a blogpost is Flyway.
Flyway is a database migration tool that provides database state migration in applications that do not have a built in migration.
Rails and (some) rails based frameworks already have this, but it is pain to implement this in say, a java application. Flyway alieviates the need to create this as it has native support for many popular databases(including cloud based Dbs and counting?) as well as a Java based api with support for build tools like ant, maven and gradle.
It has only 6 basic functions: Migrate, Clean, Info, Validate, Baseline and Repair.
Unlike rails, you are not restricted with timestamp values (and they are a pain if you have renamed a file and left out a digit - which makes ordering difficult to trace). Here, you can specify a file as V__.sql

While a rails developer is bound to miss the up and down in a migration file (as the rails like backward migration is missing in the current version), the rest of the application works as desired and is indeed handy.

Having some significant traction, this project is in use by different teams and does not require huge overhead/configuration to work easily with hibernate/spring based applications as well. The project is located at github so you can easily head over there to check out its source as well.

Tuesday, January 27, 2015

Book Review: Mockito Essentials

Book Review: Mockito Essentials by Sujoy Acharya

Mockito essentials is a straightforward insight towards writing proper form of unit tests using mockito framework. Targeted at existing developers, this book goes beyond the documented library and explains the method of correctly writing unit tests and its corresponding code.
The book starts by introducing test doubles, or assumptions that we make while writing unit tests which is essentially done through mockito, effectively laying the foundation of the book. Two subsequent chapters are devoted to the innards of the framework - which is very handy if you have mockito's programming reference ready.
However, the main problem of unit test lies in its implementation as real world code is generally not testable and often is unchangeable. Using mockito under BDD tests is also worth mentioning as this concept is not covered elsewhere till now. The book concludes with implementation of mockito based tests over webservices and rich client applications.
Overall, the book not only covers the mockito framework but also covers practical advice regarding testing existing code and making both legacy and new code testable and I'd highly recommend this book if you are looking to write unit tests in java applications.



Disclaimer: I received a copy of this book from packt publication before doing a review.
Access the book here:
http://bit.ly/1IoUXzo

Sunday, January 11, 2015

On finding loopholes through visualization

Sometimes, visualization provides you with insight that is not instantly available. for example, I was playing with the open data that Indian Government provides for irrigation methods in different districts of India, and here's the aggregate data:
 The visualization above lists all the power sources used for irrigation across India. In most of the states, this was coming similar to what was expected (such as larger use of solar pumps and windmills in Gujarat and Rajasthan), but there were few anomalies too, like in the display below:
This information is obviously incorrect as someone has erroneously or lazily set all the non manual sources for irrigation to the Other/uncategorized source and thus, this set of data becomes inconsistent with the rest of the data.

Being on the information highway (with Right To Information) is important for India, but still there is still to go before we are able to make this data comprehensive enough for forecasting and predicting useful outcomes.

Wednesday, January 7, 2015

Hack learning android, freelance and other ramblings

In between doing mundane things in life, I've started doing more work to keep myself sharp as my office work has diminished vastly. This year has turned out good for me as I've started freelancing on my own on part-time basis and am currently relearning android application development to take advantages of the newer generation phones and create an app or two. The new android studio merits a mention here - from eclipse, it has now moved to intellij ide and different wizards as well as gradle based build tool is added, which augments development. However, emulating newer mobile devices does not work on my machine as it takes up quite a lot of time to initialize and random crashes also occur, so using a physical devise is the only workable option for now. My approach towards learning has also undergone a change and now I am working in shorter sprints of hack and learn cycles that ease my understanding process.

I get sidetracked by various side projects often and am also preparing for the hybris core and commerce developer certification, which to me seems like a college level exam - you sulk at it till the penultimate day. I do hope that businesses realize the importance of knowledge over a certificate given the presence of questions to be asked in exam over the internet, often called dumps.
Since I am having the luxury of time at my disposal, I am able to plan for my tech startup/business idea that would sustain me in future as well as allow me to be an entrepreneur.