Skip to Content
author's profile photo Former Member
Former Member

Should UI5 be rewritten based on react.js?

As Title.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

9 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 17, 2015 at 03:01 AM

    OK, I know the front-end frameworks and libraries are changing crazy fast. But I think react is not just "another" framework like angular or UI5. To me, react is like a huge step forward. A step from imperative to declarative. It's a big change for my mindset. When the first time I learned the concept behind react, I was like, oh my god, it's the way I always want to build component and structure my application. That is how a component should be.

    Just like Dennis said, "UI framework has to evolve", changing from jQuery to Angular is not evolve, but moving from jQuery to React( imperative to declarative) is evolve IMHO.

    Apart from the idea about building component, with server side rendering, virtual dom and diff algorithm, react is claiming performance is super fast. Performance is critical to enterprise application I think you would all agree.

    I haven't been very deep into react, just learning the basic concept leads me to ask this question. I know as a company, SAP has to consider a lot more than just a technology preference. But as a developer I really would like to make a bold vision and discuss with you guys.

    Add a comment
    10|10000 characters needed characters exceeded

    • Although I'm not well-versed in reactjs either, to me it is indeed "just another framework"

      UI5, just like reactjs, recommends you to use a declarative approach, not only with view creation (XMLView and HTMLView types)

      And as for writing UI5 javascript, you can perfectly use the imperative way, but a seasoned Javascript developer would probably go for a more imperative coding style anyway. That is not something limited to reactjs, UI5, or any other JS framework

      As for serverside rendering, we all remember Web Dynpro's umptillion requests to the server to update the tiniest screen element, so I'm all in favor for browser rendering (IMO that's what browsers are for anyway)

      The bootstrapping process may be slow initially, but I found the rendering (and updating!) of UI5 views blazingly fast

  • Posted on Feb 16, 2015 at 05:41 PM

    It is kind of interesting to ask a one liner question and then what am I suppose to "react* :-)

    I do not know how much you have learned about FB react.js. Personally, I spend about 6 months looking at different UI technologies and browser capabilities. From Google Angular.js and Polymer, FB react.js and back to SAPUI5. Looking at shadow DOM and other new HTML5 features across different browsers.

    The bottomline is "What are we building?"

    SAPUI5 is good for building enterprise application. It is not only the set of controls and binding functionalities. It also has the tools that it provides to bundle the javascript, css and properties files. The goal is to keep the design of UI framework library clean so that it can be evolved over time. And UI framework has to evolve. We cannot have SAP partners and customers having YahooUI and then AngularJS. And know what? Google is moving to Polymer (like at Google Inbox and Doc). We need to focus on our core business domain and use a stabile UI framework that have APIs that shed us from future changes.

    I have shared my thoughts. You? Please be generous :-)

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 16, 2015 at 03:19 PM

    Will be interesting to see where this goes...

    On my personal journey to explore and learn more about JavaScript, in a non-SAP perspective, I'm getting overloaded by all of the frameworks, libraries, etc. that supposedly make things easier for the developer...

    That may be well and good, however what happens when the project developer disappears and the support team take over but they are familiar with a different JS library/framework/whatever?

    You can level all sorts of negatives at past SAP technology but at least there was some consistency, and you knew if you wanted a BSP/WD4J/ABAP/ITS developer, they'd all pretty much understand the same tools, libraries and features.

    It's a brave new world (and probably one that I should reserve for a blog post instead of derailing this discussion any further...)

    Cheers,

    G.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 28, 2016 at 07:10 AM

    Hi,

    It's been a long time I do think so. Mostly for four reasons:

    1. Simplicity

    In my opinion React's rendering philosophy is very close to the SAPGUI (and Web Dynpro ABAP). Everything is redrawn on every event. Not great performance you could ask? In fact, on the contrary. Even if every UI element is "redrawn" everytime, React managed to get excellent performance by updating the DOM only when it's required (due to the virtual DOM handled by the framework). I suppose that the SAPGUI works like this too.

    So what's the advantage for us, the developers? It results in a great simplification of the development process. It just makes code easier to reason about.

    2. Framework size.

    SAPUI5 framework requires to upload to the client almost >= 10Mb (data excluded)! It's just too much. I know you have the ability to reduce the size, optimise the loading process... but in SAP enterprise perspective, we should not have to deal with that. Did you hear about a developer working on the optimisation of the SAP DIAG protocol?

    React is a lightweight framework. But to be honest, if SAPUI5 is rewritten in React, the new version will be heavier than the simple framework itself, because of the rich UI library. But anyway, most of the overall binding related code should be removed (see next point).

    3. Data binding.

    When you need to go a little beyond the simple binding, you can finish with a headache because of the complex binding: formatters, parts, table/array data binding... With React it's way simpler. Since everything is redrawn, with simple code you just set the UI element value (or any other property). That's it.

    4. oData.

    After more than three years of active development on OpenUI5/SAPUI5 against SAP servers, it appears to me that the oData protocol, including its implementation in the Netweaver Gateway, is not adapted for business applications, as we expect to have in a SAP environment:

    - No lock handling

    - Useless complexity for deep structures manipulation (read with expand option, deep insert...)

    - Stateless services (impossible to cache some data)

    - Impossible to use metadata in the UI (like SAP DDIC). The annotations are just too ... to use.

    oData may be a good option for reports or dashboard like applications. But when dealing with more "serious" applications, you could spend a lot of time just trying to make data communication "just" work properly. Things that are non-brainer in SAPGUI / Web Dynpro ABAP are just pain to do within the SAPUI5/Gateway environment. It's just not adapted for SAP applications.

    Besides, loading multiple oData model entities could results in multiple server calls. As a result you may have to deal with multiple asynchronous calls that may be complex if you have some dependencies. And if you are thinking about "batch" request, it does not work all the time...

    The "Flux" data framework (with a stateful service) seems a better fit to me.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 16, 2015 at 12:11 PM

    Why?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 16, 2015 at 01:14 PM

    Hi Aaron,

    Is there a particular reason that you ask this question? Some outline of your situation would be a bit more helpful in understanding. In Robin's succinct question, Why?

    Thanks, Mike

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 17, 2015 at 08:11 AM

    I believe React is the future of the frontend technology, for the following reasons:

    1) component-oriented. You create your reusable UI component, which can contain other components.

    2) declarative. You describe how your UI would look like, and don't need to worry about how to update a previous screen, nor about UI rendering performance.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Robin Van Het Hof

      Components in UI5 are much more complex than components in React. Complex in the sense that you need far more stuff to create a components in UI5. In React it can be all in one file that is just Js and JSX. Much more concise that the folder-based approach of UI5.

      This stems from the fact that UI5 components serve a different purpose than React components. I personally find React-style components to be sufficient for everything. I prefer them because they are far simpler.

      As for declarative, there is a large difference between using an extra XML or HTML file for your markup and using JSX directly in the JS code. JSX may seem messy but it is really not. And less context switching is easily worth it for me.

      Reacts development style and code organization is generally just far simpler than that of UI5. Also the documentation is much better and more complete. And it's becoming and industry standard, everyone uses it. UI5 is only used in conjunction with SAP. Why not make use of achiements others have already made?

  • author's profile photo Former Member
    Former Member
    Posted on Nov 05, 2015 at 02:15 AM

    React offers better performance. Due to its virtual DOM.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2016 at 06:18 AM

    Some good arguments by R. van het Hof however it would be very interesting to have a discussion between the architects of the React with Flux (Facebook) and the architects of OpenUI5 perhaps SAP can arrange something here? This could give a good insight in the pro's & con's of the different frameworks.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.