cancel
Showing results for 
Search instead for 
Did you mean: 

Design question on UI5 applications: 1-tier or 3-tiers?

former_member190457
Contributor
0 Kudos

Hi all,

I'd like to ask for advice on a general design question related to UI5 applications.

I can see two different approaches to development: 1-tier vs 3-tier.

1-tier: the UI5 application directly invokes OData services available on Gateway/PO/etc possibly with the help of a Web Dispatcher to prevent cross-origin issues. This leaves no place to add any server side business logic (e.g. to handle transactions that span multiple systems, error handling, validation and so on). The UI layer must take care of any logic and possibly must integrate data from different data sources.

3-tier (UI/logic/DB): the UI5 application is part of a container application (such as Java EE app) and invokes a local REST api, deployed in the same application. The local REST API hides the server side logic. Local persistence is available and integration with external systems takes place through the business logic layer e.g. through SOAP.

Which approach would be better or recommended?

I'd be grateful if any best practice/experience could be shared on this.

Thanks, regards

Vincenzo

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I am not sure whether world or SAP WORLD is going in n-tier or 1-tier, but looks like SAP and UI5 architecture is still trying to suggest customers to consider 1-tire ..

Instead of Portal, SAP is suggesting to use Gateway Server just to host your web apps..

WDs were hosted in ECC earlier not for UI5 we are going in Gateway way..

former_member189945
Contributor
0 Kudos

Hi Vincenzo,

I would say that there is no one correct answer. It all depends on application architecture and purpose. I think Fiori type apps with 1 use case and only a few screens are better on 1-tier architecture. That's what I think is also SAP's recommended practise.1-tier makes application architecture simpler, so that there's fewer layers that can break.

Once you start integrating multiple systems, especially non-SAP, 3-tier architecture becomes more valid. I wouldn't add another layer just for validations or error handlings. These would have to be done on the backend system in any case. 3-tier architecture is also useful in case you have to use existing services and cannot modify them when need be. 3-tier architecture also helps in keeping the business logic out of the client, which makes it easier to reuse or replace parts of the services or application.

Of course, you also have the option to combine both approaches...

Regards,

Kimmo