Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Diff between create component vs extend


I've read about the creating new UI5 control with extend but I found that there is option to use component but

I didnt found any docs about the following

1. what is the difference between them?

2 pros and cons    ?

3. in which cases is recommended to use any of them?

Component docs

How to create custom control from scratch



Former Member
Former Member replied

HI Miley

I am trying to understand your question. Maybe it is easier to have an example.

For example, you have a new Control, ControlABC. And you want to have a common logic (alert('Hello World') in the click delegate. On top of this you want controller code in the control.

I do not advocate having controller code in control. The common logic in control is ok.



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question