cancel
Showing results for 
Search instead for 
Did you mean: 

Best Development Paradigm (XML/JS/JSON/HTML)

0 Kudos

Hi,

I'm trying to figure out which development paradigm is the best practice in our Mobility project. We have following options.

1. XML

2. JavaScript

3. JSON

4. HTML

I searched in SCN and found some people preferred XML over another but there are also threads recommending JS. Please advise me what is SAP's best practice and the way to go in future. Thank you in advance.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

if by paradigm  you mean type of views, i would recommend xml

all fiori apps that i know are done via xml

0 Kudos

Thanks Maksim. I think JS/XML will be best choice for all scenario.

Answers (3)

Answers (3)

Former Member
0 Kudos

Use XML for views and fragments (Layouts). Use JS for controllers and formatters.

sivakumar_mobility
Active Participant
0 Kudos

Hi abdul,

Better you refer below one.It will helpful to you.


XML Views

Js Views

HTML Views

JSON Views

XML  Views are declarative and is the cleanest approach to built a UI.

It prevents too much logic to being added in the view.

Js Views aren’t declarative.

It can be developed fast.

HTML Views are also declarative.

Using sap.ui.core.plugin.

DeclarativeSupport

UI are defined as element.

JSON views are meant for mock data.

Controls in Declarative Views(XML,html) will be converted into Javascript controls internally when app is being executed.

In  Javascript view conversion will not happen since we are creating the Controls in Javascript directly.

Controls in Declarative Views(XML,html) will be converted into Javascript controls internally when app is being executed.

HTML can already be embedded into XMLViews.

But here events can’t be binded in view definition.

Easy to parse inside the tools like WEBIDE.

Hard to parse inside the tools.

Easy to parse inside the tools like WEBIDE.

with Regards,

siva.

sivakumar_mobility
Active Participant
0 Kudos

Hi Abdul,

SAP standard uses XML paradigm. So if you want to customize from standard i would recommend xml.

If you want to develop your own go with JS views. Lot of flexibility is there in JS view.

with regards,

siva

0 Kudos

Hi Sivakumar,

Thank you for the reply.

Do you have any reference for the below table? Is it from help.sap.com or some other link?

sivakumar_mobility
Active Participant
0 Kudos