openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

`sap.ui.webc.main.Table` vs. `sap.m.Table` vs. `sap.ui.table.*Table`: Which One Should I Choose?

Open pubmikeb opened this issue 3 years ago • 4 comments

In the documentation there is a great article «Tables: Which One Should I Choose?» with a comparison table and main use cases when each type of table is an option choice. However, this table doesn't cover relatively recently added sap.ui.webc.main.Table.

The questions:

  1. Is sap.ui.webc.main.Table intended to replace the previously added table classes?
  2. What are the benefits of using sap.ui.webc.main.Table over the rest UI5 table classes?
  3. Is there any preference to use one table class over another for the future development? In other words, are there any plans to replace sap.ui.table.Table with sap.ui.webc.main.Table or something similar?

Thanks.

P.S. This issue can be perceived as suggestion to elaborate the «Tables: Which One Should I Choose?» article and to address sap.ui.webc.main.Table as well.

pubmikeb avatar Oct 04 '22 12:10 pubmikeb

Hi @pubmikeb ,

the sap.ui.webc.main.Table control is part of the UI5 Web Components enablement of OpenUI5. This means the UI elements developed as UI5 Web Components will be wrapped as UI5 controls and can be used natively in OpenUI5. More details about this can be found here: https://blogs.sap.com/2022/03/10/ui5-web-components-enablement-for-openui5-sapui5/

The UI5 Web Components will be the future direction of writing UI elements in a framework agnostic way and currently the enablement is experimental. The APIs are not yet perfect for the usage in OpenUI5 and requires some more massage. As of today, most of the UI5 Web Components control wrappers are just 1:1 wrappers and there is work in progress to ensure a proper usage within OpenUI5 with databinding support. The UI5 Web Components APIs are more classic web development (HTML) centric.

But my blog post linked above will hopefully shed more light...

Independent from that, you are right that the documentation «Tables: Which One Should I Choose?» should be updated once the sap.ui.webc.main.Table is not experimental anymore.

petermuessig avatar Oct 04 '22 13:10 petermuessig

@petermuessig, thanks for the link to the blog post with detailed info regarding UI5 WebComponents.

A further question regarding UI5 WebComponents, in the script-section of the HTML bootstrapper it's written:

data-sap-ui-libs = "sap.ui.webc.main"

In classical UI5 HTML bootstrapper I didn't use data-sap-ui-libs. Is it mandatory to use data-sap-ui-libs = "sap.ui.webc.main" in the HTML bootstrapper additionally to the dependencies block in the manifest.json?

"dependencies": {
	"libs": {
		"sap.ui.webc.main": {}
	}
},

Isn't the same configuration? Once made in declarative way via manifest.json and once in index.html?

And one more question regarding UI5 WebComponents, do I understand it correctly, that for new apps development based on OpenUI5 without SAP Fiori Launchpad it's better to use sap.ui.webc.main instead of sap.m?

pubmikeb avatar Oct 04 '22 14:10 pubmikeb

Hi @pubmikeb,

Isn't the same configuration? Once made in declarative way via manifest.json and once in index.html?

This answer might help: https://stackoverflow.com/a/56136611/5846045

For new apps [...] it's better to use sap.ui.webc.main instead of sap.m?

See Peter's comment at https://blogs.sap.com/2022/03/10/ui5-web-components-enablement-for-openui5-sapui5/#comment-620432 While sap.ui.webc controls are still experimental, you're highly welcome to try them and to give feedback!

boghyon avatar Oct 04 '22 15:10 boghyon

Hello @pubmikeb,

Thank you for sharing this finding. I've created an internal incident 2270143198. The status of the issue will be updated here in GitHub.

i556484 avatar Oct 05 '22 09:10 i556484

Hello, As Peter said, the webc library is currently under an experimental flag, we are looking to gradually improve its documentation and its should be more complete when the it is no longer experimental.

Kind regards, Nikolay

ndeshev avatar Oct 24 '22 06:10 ndeshev