Technical Articles
Detecting and Updating Deprecated UI5 Controls
I have recently been involved in a system upgrade where the client was making a significant jump in UI5 version. Rather than performing a manual audit first identifying deprecated controls then finding their location in every controller, view and fragment, I decided on taking a different approach; writing a chrome extension to perform the task for me!
The extension simply:
- Detects UI5 and the version used
- Loads the UI5 API references
- Traverses the DOM searching for UI5 controls
- Performs an API lookup for the detected controls in the API reference
- Alerts results and outlines all deprecated controls on screen.
After writing and using this tool, I have decided to release this extension free to the public on the chrome store so that everyone can share in these significant time savings.
direct link: https://chrome.google.com/webstore/detail/ui5-deprecated-control-ch/elhnbenefognbdlagakaeocbkibcmceh
Hello Bradley,
Great stuff. I am going to try this.
I recently faced a similar situation when UI5 version was upgraded from 1.44 to 1.60 for one of our clients and some applications crashed.
I am not sure about the feasibility but it would also be a nice feature if we are able to get the warning about deprecated controls or methods during the development in WebIDE.
BR, Ekansh
This is really cool man
This is awesome !
Helps alot to identify the application controls ☺️
Hello Bradley Smith
I tried to run this chrome extension to find out the deprecated controls in my UI5 Application but everytime I ran it it shows that there are no deprecated controls. May I know against which UI version it compares? Is their any option in extension settings to change it manually.?
Hi Amit,
Thanks for getting in touch. This extension runs against the latest version of UI5 and advises which version each control was deprecated in.
When this extension was first written it was limited to a subset of commonly used namespaces, this picked up majority of controls in my project at the time. These were: ["sap.m", "sap.ui.core", "sap.viz", "sap.uxap", "sap.ushell", "sap.f"]
The most recent update version 0.0.4 is not limited in this way and caters for all ui5 libraries now and in the future.
Thanks,
Brad.