Convert full LAMP stack Laravel application to SAP Hana

2.3k Views Asked by At

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.

2

There are 2 best solutions below

2
On

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?

2
On

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.