Each line of code costs money. Not only writing code, but also maintaining it later on. As SAP turned toward the OpenUI5 environment a huge need emerges for JavaScript skills. In this article I discuss aspects of JavaScript programming in SAP and my subjective view on how to optimize this process. It is aimed for SAP developers and project managers.

Costs

In his 1981 book Barry W. Boehm stated that an average of 60% or more of software costs is maintenance. This experience is still valid as discussed in “Frequently Forgotten Fundamental Facts about Software Engineering” by Robert L. Glass (an article in IEEE Software May/June 2001).

I would argue that maintenance costs and risks even increase while using a relative new and changing development environment like JavaScript or responsive design. So before starting costly projects it’s worth looking around for solutions.

Apps

Meanwhile “SAP’s OpenUI5 JavaScript Library is Surprisingly Well Done”, there is an ever growing need for responsive apps that can run on phones, tablets and on the desktop as well. For example business would like to have access to service orders on phones and tablets. How can one deliver such apps without sacrificing hundreds of hours of development time?

ABAP versus JavaScript

Let me give a very short comparison of ABAP and JavaScript:

Of course JavaScript brings a lot of new cross-platform functionality and new paradigms. It runs on billions of computers and many companies pour millions of dollars into JS development. I don’t mean that it is not a usable tool; however I have some issues regarding some aspects of it.

JavaScript Technical Issues

Some programming details are mentioned here, you can skip this paragraph if you don’t have interest.
Who coded a JS app more than a few hundred lines long might know this line ending: …”)}})()”
You have a multitude of closing braces of different types. This is the result of flexibility of JavaScript:  expressions usually have return value that are used for the next step. JS hand coding works for small apps, but if you have any issues with something thousands of lines long, you can spend frustrating hours and maybe days until you solve it. This whole issue gets exponentially worse the larger JS code base you have. I don’t want to paste screens of code here, because it would distract most of my readers. However basically you will need more than one full time JavaScript developer fixing these issues and working on new transactions.

Browser Wars

There was a “browser war” between Internet Explorer and Firefox starting around 2003. This “war” costs millions of dollars and as of 2014 is still raging on between current browsers. SAP OpenUI5 tries to cover these issues, but a certain JS function suddenly not running in some browsers might cause headaches.

Retrain ABAP developers?

One possible solution is to train conventional ABAP programmers to develop in JavaScript. I consider it like retrain truck drivers to drive sport racing bikes. (I am an ABAP dev too, so I may say this 😉 ) It is not impossible, but the tool itself is totally different: Way faster, way more error prone, especially if you want to carry products on it.

What then?

So to stay with the truck-bike metaphor I propose another solution: let’s put self-driven electronic bikes into those trucks to deliver packages to their end customers. What does it mean in development terms? It means that it is possible to generate JavaScript code using predefined application structures.

OpenUI5 without the JS-headaches

You can have this:

Instead of this:

It is just 1300 lines, but if you have spent hours – if not days – looking for a mistyped character in it, you understand the difference. All this code will be generated for you from the application screen you see above.

So basically you don’t need to build up a separate Eclipse environment, you just need your conventional ABAP/Web Application Server stack and everything will be generated for you.

Video

This video was made by Neptune employees and shows the generation of apps.

Conclusion

Before investing in new projects in your country or in any other outsourced country I would consider using a code-generating solution like Neptune. It has costs, it is only an assumption of mine that generally it has a ROI under two years. You calculate your numbers yourself. I don’t know if any other similar generative approach is out there, I was looking for it, didn’t find it yet.
Disclaimer: I have to tell, that I got a two day course in my company about this system.

Feedback

I always think from the viewpoint “if it would be my system” what would be the best solution. However I might have been totally wrong about this. Please feel free to point to alternative solutions or give some constructive critique. Trademarks like “SAP” and “ABAP” belong to their rightful owners.