Skip to Content
avatar image
Former Member

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

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Oct 26, 2015 at 07:29 AM

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

    all fiori apps that i know are done via xml

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 26, 2015 at 09:11 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 26, 2015 at 09:07 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 26, 2015 at 11:26 AM

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

    Add comment
    10|10000 characters needed characters exceeded