Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimize 3rd party library lock in #772

Open
ChristianMayer opened this issue Dec 13, 2018 · 3 comments
Open

Minimize 3rd party library lock in #772

ChristianMayer opened this issue Dec 13, 2018 · 3 comments

Comments

@ChristianMayer
Copy link
Member

The source code should use as much native libraries (-> W3C) and as little 3rd part libraries (Qooxdoo, JQuery) as possible and sensible.

Reasoning: This will make future library changes more easy.

To get closer to this target requires personal judgement at each library use. Good guides are:

  • is that feature (e.g. modifying attributes of a DOM element) also possible with a browser native library?
  • is the native library well implemented in many browsers (-> caniuse)?
  • is it also implemented in older browsers (plugins are allowed to use bleeding edge, core code must stay conservative)? Desktop browsers can be assumed to get updated but mobile browsers might not
@peuter
Copy link
Member

peuter commented Dec 13, 2018

Well I don't see that much potential here, lets see what we use:

  • Qooxdoo: cannot be replaced unless someone wants to rewrite evenrything again. So it makes no sense to avoid using Qooxdoo inside the source code, as its the basis of everything
  • EventRecorder.js: needed for log recoding and is no 3rd party library, because I wrote it
  • sprintf.js: Used for mappings AFAIR. Might be possible to replace it, but if you want to keep the same syntax you have to use another library or write it yourself => both options provide no benefit
  • JQuery: not used by the core anymore. Only some plugins still need it. We should take care that new plugins do not rely on jquery and in the very long run remove the jquery dependency from the remaining plugins. But this has a very low priority for me.
  • strftime.js: Could be replaced with Qooxdoos own Date/Timeformatting skills. but that would imply a syntax change
  • svg4everybody.js: Not really sure but AFAIR this is needed for SVG-Support in some IE Browsers. Might be obsolete in future (or even now)
  • favico.js: Used to change the Favicon dynamically (e.g. show how many (error) messages are in the Notification center. Can't be replaced without using that feature.

@ChristianMayer
Copy link
Member Author

This issue is clearly long term. And it's not about writing everything our self. It's about keeping the ability to choose in the future. So it's purely strategic.


  • To throw out libraries I see most potential at the remaining JQuery use.
  • To reduce lock in I see most potential at Qooxdoo. E.g. DOM handling in the browsers has improved significantly since the CV has started. Anything that's easily(!) possible native should be done native and not by the Qooxdoo wrappers. Anything that's not easily possible, well, that's the reason we are using a library, isn't it?

@peuter
Copy link
Member

peuter commented Dec 13, 2018

Well, using libraries only when they provide some kind of benefit (performance, easier to use, additional features, etc.) should be obvious.

The plugins that still use jquery are:

  • Openweathermap
  • Rss
  • Powerspectrum (by using flot)
  • Diagram (by using flot)
  • Colorchooser
  • Clock
  • CalendarList

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants