简体   繁体   中英

OpenUI5 Code Reading

Just for curiosity, I thought about reading the OpenUI5 code available on GitHub . However, I don't know where to start. What would be the "Chapter 1" of OpenUI5 code? There are so many libraries and code that I don't know where to begin. Can someone help me on this? Thanks in advance!

it would help a lot to decide on one certain aspect first, eg on how controls work, or how the UI5 core handles rendering these controls and their combination, or on data binding, or on translation, or on module loading, or on themes, or...
If you don't have a particular interest, I'd suggest to start looking at controls because they are relatively isolated and range from trivial to complex and you are more likely to write your own control than to change let's say the data binding.

You could for example have a look at the sap.m.Link control: - https://github.com/SAP/openui5/blob/master/src/sap.m/src/sap/m/Link.js - https://github.com/SAP/openui5/blob/master/src/sap.m/src/sap/m/LinkRenderer.js A Link is quite a simple control, of course, but looking at the code you will notice there are some special things that need to be handled.

The following resources will give you some context to understand better what the Link implementation does:

Depending on how comfortable you feel, you can pick other controls then or move on eg to the RenderManager, which is taking care of calling the control renderers to produce their HTML: https://github.com/SAP/openui5/blob/master/src/sap.ui.core/src/sap/ui/core/RenderManager.js

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM