profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/Thodd/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Thorsten Hochreuter Thodd Ludwigshafen (Germany) http://www.thodd.net

Thodd/LEXJS 1

Simple lexer for JavaScript. Rules can be defined in a style similar to lex.

Thodd/TangibleServer 1

A Tangible-Websocket Bridge to access Pixelsense-Tags from JavaScript.

tobiasso85/xmldom 1

A PURE JS W3C Standard based(XML DOM Level2 CORE) DOMParser and XMLSerializer.

Thodd/Crates 0

A small Flashpunk puzzle-game, based on the classic "BlockDude".

Thodd/GOL_JS 0

A simple canvas based implementation of Conway's "Game of Life".

Thodd/Minze 0

A simple Canvas based game engine for Coffee Script

issue commentSAP/openui5

Documentation: `sap.ui.core.IAsyncContentCreation` is not mentioned in "Use Asynchronous Loading" of the Best Practices for App Developers

Hi @pubmikeb,

thanks for finding this missing piece. We are currently working on a similar documentation clean-up. We will update this issue once the documentation is updated.

BR, T

pubmikeb

comment created time in 5 days

issue commentSAP/openui5

`Core.createComponent` has no `async` flag - API still relevant?

Hi guys,

ha funny that you found this, I also stumbled upon this last week and just forget to talk to @codeworrior ;) I'll make a commit to deprecate this API. As @boghyon stated, there are more modern ways to create (reuse) Components.

There are other things like the rootComponent configuration that is superseded by the ComponentSupport.

boghyon

comment created time in 12 days

issue closedSAP/openui5-docs

Walkthrough's "Step 19: Reuse Dialogs" is now missing on https://openui5nightly.hana.ondemand.com

I've just paid attention that the Walkthrough's Step 19: Reuse Dialogs has been removed from the https://openui5nightly.hana.ondemand.com.

The Walkthrough on the stable version is a 38 steps manual, while the nightly version contains only 37 steps.

https://openui5nightly.hana.ondemand.com/topic/19453962b8074b7399372c65cbe05370 returns «Not found The requested resource was not found».

What's the reason of removing this step? Code reuse sounds quite critical for any framework. It's interesting to get some details.

closed time in 21 days

pubmikeb

issue commentSAP/openui5-docs

Walkthrough's "Step 19: Reuse Dialogs" is now missing on https://openui5nightly.hana.ondemand.com

@pubmikeb I'll close this issue, @h4ze has described the reasoning behind the removal.

pubmikeb

comment created time in 21 days

issue commentSAP/openui5-docs

Assigning function directly to "renderer" should no longer be encouraged

Hi @boghyon,

sorry this issue got lost somehow. I'm adapting some parts of the Renderer documentation right now, so I adapt it where I find this inconsistency.

Additionally I'll see that I make a backlog item or something for a broader cleanup. I guess there are a couple of occurrences... I haven't grep'ed yet.

BR, Thorsten

boghyon

comment created time in 21 days

issue commentSAP/openui5

`sap.ui.core.IAsyncContentCreation` leads to "Cannot read properties of null (reading `getId`)" on `Fragment` loading

@pubmikeb The issue #3134 refers rather to the v2.ODataModel requiring sap/ui/thirdparty/datajs.js synchronously if "preload": true. Not sure about the current state of i18n resources.

There is also a known issue wrt. sync loading of i18n files. This can happen if you use {{placeholder}} texts in the manifest.json, e.g. for "sap.app"/description. Additionally, we have seen that this issue also occurs if you have multiple Components extending each other. So each parent Component might cause an additional sync XHR for the i18n file.

Specifically you should see that the same i18n files is loaded twice, once async and once sync :(

Though it's hard to say if this is the case here, but judging from @pubmikeb's last screenshot, I think it is. This is a problem which we might tackle in the future, so for now I don't think there is anything you can do.

pubmikeb

comment created time in 21 days

issue commentSAP/openui5

Embedded View in declarative views should be loaded asynchronously

@pubmikeb, yes that's correct. Though you're right, the documentation is a bit hidden: https://ui5.sap.com/#/api/sap.ui.core.IAsyncContentCreation

I'll check the walkthrough if there should be a deeper explanation on this topic.

boghyon

comment created time in 21 days

issue commentSAP/openui5

`data-sap-ui-xx-waitfortheme` accepts `init`/`rendering` and not `true`/`false`

Hi @pubmikeb,

thanks for finding this, we have adapted the documentation accordingly. The update now goes through the documentation channels and will be visible with version 1.95+.

BR, Thorsten

pubmikeb

comment created time in 25 days

issue commentSAP/openui5

Consolidate async-related configurations into one single property

Hi @pubmikeb,

we feel you, the "async-switch" situation is a bit out of hand. I agree that it would be much better to have one switch to rule them all, but (ugh... I don't want to be that guy...):

We have big reservations with respect to compatibility.

We have discussed this many times already, but the harsh bottom line is, we can't keep it compatible. We can introduce a new switch now, capturing all currently available flags, but once other asynchronous behavior or features are added we cannot change the behavior of such a switch under the hood.

I'll try to give you a bit of insight in some of issues we have encountered when dealing with asynchronous APIs in the past:

  • Sometimes we see a chance to capture more asynchronous behavior in an already asynchronous closure, but even that causes quite a number of problems. Since a couple of weeks we now capture the async root-view loading in the already async Component factory, but even this caused major problems, e.g. with eventing order and timing. Quite some applications had issues that are sometimes impossible to resolve compatibly.

  • We tried something similar with the sap.ui.core.IAsyncContentCreation interface, but this also lead to quite some issues, again because of changed timing. Especially the handling of nested components gets tricky, since you of course control your own component, but you can't simply propagate the asynchronous switches down to your child components. Neither developer nor framework might know the internals of the nested component. If it is not async ready, your app blows up.

  • Same is true for Views, if a nested View depends on synchronous loading and eventing, you cannot simply propagate the asynchronous behavior down, that breaks just too many applications.

So far the IAsyncContentCreation interface is the best version of a "cover-it-all" switch we have: https://sapui5.hana.ondemand.com/#/topic/b430345887f1419fba50320b57c1bdf9 As I motivated above however, it still can't capture everything in a compatible manor and any async additions cannot simply be made under this interface, again due to compatibility.

I hope this does not sound too defeated and you understand that we are on it and are trying our best to make this is easy as possible. Still even if we get a "fully-async" switch running now, the next time we would need to top it with a "finally-async" switch and so on ;) Jokes aside, maybe @codeworrior can add something else to this discussion.

BR, Thorsten

PS: Don't forget to set your ComponentContainer to async:true ;)

pubmikeb

comment created time in 25 days

issue commentSAP/openui5

Firefox: XML Parsing Error: not well-formed when running OpenUI5 on SAP CPI

Hi @tphoang,

the manifest loading is already correctly setting the dataType to "json" on the jQuery.ajax API. You can see this in the mOptions on the right side of your 2nd screenshot. This instructs jQuery to pre-process the response as JSON before calling the success handler. You can also see a valid Accept header for application/json sent by us.

However, as @codeworrior pointed out your server does not provide a content-type. That is most likely the root-cause.

In your case Firefox seems to assume XML by default. While Chrome must be doing some form of MIME sniffing to compensate the missing Content-Type header, e.g. relying on the Accept header or the file extension as guidance. AFAIK Safari does the latter.

I would suggest to investigate why your server does not respond with a Content-Type.

Best regards,

thodd

tphoang

comment created time in 2 months

issue commentSAP/openui5

Embedded View in declarative views should be loaded asynchronously

@Thodd

If a UIComponent implements [sap.ui.core.IAsyncContentCreation] you get the following:

  • you can now return a Promise in the createContent function
  • Routing and Root View are automatically async by default
  • Views (and Fragments) nested in async Views are now also created asynchronously, if the owner-component implements the mentioned interface (this of course includes the root-view)

Any consideration to include /sap.ui5/resources/js files to that list? From: #3137 (comment)

Sorry I missed that you tagged me... I answered you here: https://github.com/SAP/openui5/issues/3137

boghyon

comment created time in 2 months

issue commentSAP/openui5

manifest.json: sap.ui5/resources/js/* files are fetched synchronously

Hi @boghyon,

I'm a bit late to the party, but in the meantime we have made some changes on the loading of the /sap.ui5/resources section. When using an asynchronous factory variant, there should not be any more sync XHRs for the JS resources. So even without using the sap.ui.core.IAsyncContentCreation interface, the JS resource should be loaded async:

https://embed.plnkr.co/8rnwX287K71Jh3Be?preview

We built this with this Commit: https://github.com/SAP/openui5/commit/f4a98d962390fd27293a41e8472d5578a990a81e

boghyon

comment created time in 2 months

issue commentSAP/openui5

CSS lazy loading

Hi @Denis2017,

sorry for the late reply, the issue got burried somehow.

I'll try to give you some input here, on how you could achieve what you are looking for. As you probably have figured out, there is no out-of-the-box way to achieve this with just a Component. The CSS includes defined on a Component/manifest.json are not handled language dependent.

While I can't give you a perfect solution here, I'll try to give you some input.

Problem 1 The first problem you want to solve could be achieved by placing your CSS in a custom library. Your Component could then maintain a dependency to this library. That should also hook you into the standard framework mechanisms and you would get a RTL/LTR dependent library.css request automatically. When you declare such a library as lazy: true you also get control over when this library is loaded. In this case you need to make an async. sap.ui.getCore().loadLibrary(...) call manually when needed, see: https://ui5.sap.com/#/api/sap.ui.core.Core

You can configure a project to be a UI5 library (respectively a theme-library) like this: https://sap.github.io/ui5-tooling/pages/OpenUI5/ https://sap.github.io/ui5-tooling/pages/Builder/#theme-library

With the UI5-Tooling you should be able to build both of these project types.

Additionally you could structure your Component also as part of such a library. This way you don't need to maintain multiple sub projects, but that's up to you.

You can define that a Component is contained in a library via the "embeddedBy" option in the manifest: https://ui5.sap.com/#/topic/7701636d088147569d99b4f08d418bd9

How to build a library.js file: https://ui5.sap.com/#/topic/bd039ed5f99e4d3f8d020b0da62f9d85

Problem 2 A view cannot define any additional CSS that is needed only when this view is instantiated. There is no declarative way to achieve a conditional CSS loading for views. You have to do this programmatically.

However you can be solve this by manually including a stylesheet on demand with this module: https://ui5.sap.com/#/api/module:sap/ui/dom/includeStylesheet

You get a Promise on which you can then chain your view creation.

Hope that helps you a bit.

Best regards, Thorsten

Denis2017

comment created time in 2 months

issue commentSAP/openui5

XMLView and namespace too much writing

Hi @wernerdaehn,

you are right, the explicit referencing of the same namespace for aggregations is indeed ugly. Yet sadly we cannot change this anymore. You are correct that the naming convention should in theory be close to reality, but we know that existing (customer) applications don't stick to it. In the past this has not been enforced and we could not do so because of compatibility issues.

We have discussed this in the past quite often already, but so far have not come to a compatible solution, which we felt safe to pursue.

We had this discussion also with respect to a potential XMLView format version 2, but this is a much broader topic.

So for now we don't see a quick win improvement here. However we created a Backlog Item for the development team to have another go at this: CPOUI5FRAMEWORK-269.

Best regards,

Thorsten

wernerdaehn

comment created time in 3 months