Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Developing SAPUI5 applications with WebStorm

Looking at some of the delivered SAPUI5 code on HANA I noticed that WebStorm and even RubyMine was used by some SAP developers. I have also heard that various other developers on customer sites use WebStorm for code checked into the ABAP repository.

Both the HANA and ABAP repositories technically look to be proprietary. The default method for syncing SAPUI5 code with HANA and ABAP repos seems to be using Eclipse or the Eclipsed based HANA Studio, via SAP delivered plugins installed.

I searched and couldn't find any plugins or help on how you could check in and out of HANA or ABAP repo easily not using Eclipse or Orion.

For HANA you can put Github in the middle using something like the SAP HANA Deployment Shell and on the ABAP stack you can /UI5/UI5_REPOSITORY_LOAD to manually upload, i have heard alternatives for both where developers have reverse engineered the services eclipse use by listening on the HTTP traffic or de-compiling the plugins.

My question how are others using Webstorm to develop SAPUI5 applications within a team and how do you sync your code with the SAP repository?

like image 414
Jasper_07 Avatar asked Jul 25 '14 09:07

Jasper_07


1 Answers

I use Webstorm for my UI5 development. We store the code in a GIT repository hosted through an internal Gitlab server (https://about.gitlab.com/) running on Ubuntu! You could just as easily use cloud solutions such as Gitlab or Bitbucket.

There are two ways to circumvent Eclipse and remove the need for the ABAP team repository:

(1) Use the abap program /UI5/UI5_REPOSITORY_LOAD in t-code SE38 on your Gateway ABAP stack. Just point it to your git directory and execute!

(2) Use the program /UI5/UI5_REPOSITORY_LOAD_HTTP to do the same thing from a webserver. You could imagine a scenario where you have a HTTP service that triggers the pull on SAP but we always use the first method!

Edit @ 03-SEP-14

To clarify my thoughts on (2) the ideal scenario would be to implement a small post commit handler so that on a repository change it would:

  • Pull the changes from the repository
  • build the UI (i.e. perform minification/uglify on the JS & CSS) to a separate build folder (create preload files)
  • perform any unit tests on the code (if they exist)
  • if the tests pass, upload to Gateway by either:
    • zip the build folder and post it to a custom Gateway service (or)
    • call a custom gateway service to then trigger a pull of the build folder via HTTP

(Since master is always deployable :-)!)

You end up with a continuous integration platform that ensures the integrity of your code and ensures that you also deploy only the production code (always a little uncertain of deploying non-minified source code with comments etc. to a productive internet facing server..).

This method is agnostic of the IDE you use and if you do it right, also of the source code repository setup.

Hope this helps & happy developing!

Oli

like image 136
orogers Avatar answered Oct 13 '22 12:10

orogers