Hello, At my current place of employment we are using wicket for quite some time and I believe that we are comfortable with it..but this days I had a discussion with a colleague about the javascript files that we write for our components.We could not agree and I think that we can find the answer on wicket forum.So here it goes: I believe that because wicket is a component-based web framework the javascript code that only applies to one component should be only loaded when that component is being used.We have a global js file where I believe that we can keep javascript code that can be applied in multiple places like validation behavior for textfields.This way we also support component portability. My colleague believes that we should only use the global js file and place all our javascript code there.One argument witch i believe is true is that one js file loads faster that multiple js files - but i think that this is true only when you load all the js code in that multiple files.I think that if you only load what you need it cannot impact the page load time. To give you a example of our problem: We have a component that handles file upload witch is only used in one place in the entire application. I think that the js code that handles validation for this component should only be used when the component is used.I see no reason the load the js code it the entire applications if it is only used on one page. Any opinions are appreciated.
TL;DR: Should javascript code that is only used on one component/panel be placed on a js file that is loaded only when component/panel is used or on a global js file that in loaded on every page. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Application-Design-Question-tp4657388.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
