Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8538

Shared Formatter.js?

$
0
0

Hi,

 

The UI5 application I have written is using multiple UI5 Components. At this point in time I have created a util Formatter.js per component. However I am finding that most of the formatter functions are duplicates, such as date formatting etc.

 

Are there any best practices or recommendations regarding creating a Shared Formatter.js file which can then be included in each component to avoid duplication of code and have one location to maintain the code. Do I just create it in 1 of the components and reference that Formatter.js from the other components? Is this perhaps an appropriate use of a Faceless Component? Or would that be overkill?

 

Keen to hear any recommendations or what others have done to achieve this.

 

Thanks,

Brad


Viewing all articles
Browse latest Browse all 8538

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>