0

SAP Hana can be used as a substitute database for any sort of application, including a LAMP application on Laravel.

Recently, there appears to have been a push towards moving application code closer to the actual database via XS Engine and XSJS applications. This is essentially an app server that serves applications natively in SAP Hana.

Here's the dilemma. If I have a PHP/Laravel application running on mySQL, what are the options to get it as close as possible to being a native UI5 app by re-writing as little code as possible?

The reason that we need to move our app from Laravel/LAMP to use SAP Hana is because our startup Tallyfy is a member of the SAP Startup Focus program. There's thousands of startups in that program, I believe. This requires not just casual usage of HANA as a database, but a fair amount of other controller/UI-heavy code within the HANA container.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Amit Kothari
  • 520
  • 8
  • 23

2 Answers2

1

I'd say you're probably in for a total rewrite if that's what you want to do. Re-using your existing code is probably going to be more trouble than it is worth.

It sounds like you're probably using Laravel's views and templates, but if you want a UI5 application you'd probably have to convert to using an API based on Laravel or something else (XS Engine? River RDE?) with your UI5 app hitting the API.

If you want to use HANA as your database, Laravel's ORM doesn't appear to support that, so you'd have to either write a connector for Laravel's ORM or connect to HANA directly without the ORM. There is some information about accessing HANA from PHP if you Google for it.

Of course, HANA doesn't run PHP natively. I'm sure you could install it on a HANA node, but that probably wouldn't be a supported configuration, so you're looking at still having an application server talking to HANA via an SQL-based driver if you want to use Laravel.

My main question is why you want to do this? What do you expect to gain from switching to HANA and why the focus on rewriting as little code as possible?

Ethan Jewett
  • 6,002
  • 16
  • 25
  • Adding to your other points. We are using Laravel as an API too, with a Swagger-based documentation layer on top. Hence, there is scope to build into that layer. However, it appears that I still need to build a UI5 app from scratch to hit our API, which doesn't facilitate re-use - since AngularJS and socket.io are used on our client-side-heavy web app. About simply connecting the app to HANA - yes, a connector for Laravel ORM is possible, and there exists a PHP/ODBC to connect to Hana. However, both are not valid for the program, which requires "deeper" integration to HANA. – Amit Kothari Aug 28 '14 at 08:38
  • I'd ask the SAP startup program what they mean by "deeper" integration with HANA. If it's something that you can do through an ODBC connection, you might be able to pull it off by writing a Laravel ORM connector and then calling stored procedures for the "deeper" integration. You'll have to weigh the work to do this against the amount of value SAP can provide in terms of sales leads. – Ethan Jewett Aug 28 '14 at 08:45
1

The key is where you see the join between the client and the server, both in your existing PHP/Laravel app and a future HANA/UI5 app.

You said

there appears to have been a push towards moving application code closer to the actual database via XS Engine and XSJS applications

but I'd challenge that and suggest that it's quite the opposite, of course depending on the join question above, and more generally what "application code" means to you. UI5 is a toolkit for building applications, applications that run in the browser and reach back to the server for data persistence and other business functions. The line is certainly blurred, but I'd say that you're looking at a more client-heavy approach with HANA/UI5 (and rightly so).

So with this in mind, we can start to address your question, turning back to the one I posed at the start - where is the join in the existing PHP/Laravel app? How tightly coupled is that join, or, what parts below the join could you practically and logically reuse as Backend-as-a-Service (BaaS) style resources?

If you can answer that then you can get closer to the answer to your question.

qmacro
  • 3,025
  • 23
  • 33
  • 1
    Thanks for this, which seems a clearer way of thinking about this. Laravel serves a JSON API, which AngularJS consumes. Could this be the join point? If it is, then it does mean that the entire UI layer needs to be written from scratch in UI5 - is that understanding correct? – Amit Kothari Aug 29 '14 at 08:46
  • An API is always a potential join point, and in this case it seems as though it would be. I don't know enough about the existing UI to make a definitive comment about rewriting, but if you're moving from one tech to another, there is some level of inevitability in the rewrite question, I'd say. – qmacro Aug 29 '14 at 09:15