Very astute. This is a good approach to me, and I'm always happy to see that people have picked up on a pattern I've put into the code.
As Daniel points out, Tapestry's mix-and-match on the server could, potentially, cause some confusion on the client, especially if different versions of the same JavaScript library are all included on the page. I'm not sure what Tapestry can do to address that. On Jan 11, 2008 9:27 AM, Michael Lake <[EMAIL PROTECTED]> wrote: > > Let's say Sven, Chris, and I each are creating component libraries for > re-use and each of us are using the ExtJs library. > > And supposing that a T5 project used all of our libraries, then there > could potentially be a conflict on the client side > because multiple javascript files of the same library (with different > package locations) might get included on the same page. > (i suppose it might depend on the specific js library and how it might > handle onPageLoad events for example) Now, if all three of you use the same symbol abstraction from your example, that means that a developer using all three can add ApplicationDefaults contributions to override two of the libraries in terms of the third and it should all knit back together properly, assuming the three libraries are the same version, or at least, compatible. > > wouldn't it make sense to have a single ExtJs library that could be > shared by each of our component libraries? > > A library with just Ext might look something like this: > > public class ExtModule { > > public static void > contributeFactoryDefaults(MappedConfiguration<String, String> > configuration) { > > configuration.add("tapestry.ext2", "classpath:$ > {tapestry.ext2.path}"); > configuration.add("tapestry.ext2.path", "net/sourceforge/mtc/ > ext_2_0"); > } > > } > > > And could then be used in each of our libraries in the following way > (after adding the dependency in maven): > > @Inject > @Path("${tapestry.ext2}/resources/css/ext-all.css") > private Asset _extAllStyle; > > > > Does this make sense? are there things to look out for in the > licenses? What's the future in this? > > -mike > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]