odatasapui5hana-xs

OData vs XSJS in SAP Hana Development


I am developing an application using SAP Hana studio and I am confused on why I would use XSODATA and why I would use XSJS. Why can't I just use a XSODATA file to perform all of my database transactions? I get XSJS is server-side, but if I am doing basic CRUD operations could I just use XSODATA?

A related question, would the XSODATA file be create in SAP Hana studio and work fine from there? The reason I ask is because before I had to create a service in Gateway service builder and provide the URL to the application to access it. But now I am assuming everything is done on hana studio and there's no need to do anything beside this.


Solution

  • You are right. If all you need is CRUDQ on the database, then XSODATA is the way to go. XSJS should be used for non-CRUD operations (e.g. custom processing operations, file uploads, etc).

    And yes, you can create it directly in the HANA studio or in the Web Based Workbench. The Gateway is used when you have a Netweaver system (not necessarily a HANA system) and you want to expose some business entities from there. They are two distinct technologies (Netweaver vs HANA XS Classic) with different usage scenarios (albeit you can combine them in some cases).