On Tue, Sep 10, 2013 at 12:08 PM, Lenny Primak <lpri...@hope.nyc.ny.us>wrote:
> Hi guys, > > I've been recently trying to convert some of our client apps to tapestry > 5.4 > I am using alpha-17 as of this report. > > All of these depend on the FlowLogix library so one of the first tasks is > to migrate the library. > Here are some first impressions so far: > > Goals: > - Migrate to T5.4 > - Migrate everything to jquery and dump prototype > > - Compatibility > For the amount of changes that happened in 5.4, the compatibility actually > exceeded my personal expectations. > All TML files were 100% compatible. > Since Tapestry-IOC only had minor, if any changes, all IOC-related code > was also 100% compatible. > All JavaScript basically had to be rewritten nearly from scratch (see > below) > Assets in any library were moved into META-INF/assets, assets in the apps > themselves can be left alone in the context where they usually are. > Tapestry's client-side support was a "house built on a bad foundation"; not just Prototype, but on the layers of JavaScript mostly hacked by me. The new infrastructure is much cleaner ... hopefully, ready to truly stand the test of time. > CSS styles are now handled by bootstrap. Since tapestry.css is no longer > there, anything that depends on those styles is broken. Also all bean > editor based forms are broken due to these styles (see below). Right now > this isn't fixed by core tapestry. > The "core" stack isn't included by default, so unless you have t:alert > component on your page, most styles won't be included and most assets will > be missing from the web page. > > This is worth discussing; perhaps the "core" stack should be auto-magically added to all pages. This would just be another contribution to the MarkupRenderer pipeline. This might be reasonable; it is highly unlikely that *any* page of *any* application at this point would not need some JavaScript. > Saying all that, the amount of changes really deserve at least a bump in > the major version number. I would call it tapestry 7.0. > > - JavaScript > Since there is completely new tapestry infrastructure and lack of > prototype et all, > None of the JavaScript remains compatible. JavaScript is now organized > into modules and managed by requireJS. This isolates all JS modules and > unless modules have exports, they are completely isolated from each other. > Tapestry namespace is gone, as well as addScript interface, ZoneManager, > pretty much everything. > I now have to use Dom, zone, and Ajax modules for most things. These > modules can be used so there is no direct dependency on jquery or prototype. > There is no equivalent of ZomeManager that I can see quite yet. > Pretty much everything that used to be handled by a manager-type object is now handled in terms of events; default behavior is document-level event handlers; these can be "overridden" by adding event handlers to the specific element, or a container, right up to the body. > Currently I am still having trouble converting AjaxThrobber to 5.4 due to > the ZoneManager issue. I did not work thus for with multiple zone updates. > I did convert DisableAfterSubmit and most other javascript components to > 5.4 without too much hassle. > > Good to hear. > - assets > Class path assets now have to be moved to META-INF/assets directory. > Right now, there is a bug that if tapestry doesn't find an asset and its > in the new directory, it's error message will show the old class path asset > path. This is very confusing. > Also, this has complicated the GWT integration. GWT assets have to talk to > each other, and the new locations have to be communicated, causing problems > I wasn't able to solve as of right now. > I'm considering adding an additional virtual folder, something like "asset-redirect" that would analyze the request (to see if GZip was supported) and redirect to the correct /assets or /assets.gz URL. The difference would be that with /asset-redirect/ you would not be expect to provide the correct content checksum. However, this is somewhat "dangerous" as long as classpath assets can be anywhere, rather than just under META-INF/assets. Man, I wish I could talk to myself in 2005 about what I've learned in the meantime. > > - bootstrap > Bootstrap styling replaces tapestry.css now. All styles that depended on > it are broken and need to be fixed one by one. There is no simple way as of > now to override the bootstrap CSS location alone. > All bean editor and related styles are broken by default as of now. > Could you expand on this? > > - compression > The compression modules in tapestry were completely re-written. There is > no longer a dependency on YUIcompressor. There are other dependencies added > but overall situation with compression has been improved drastically. > Yes, it is much better now. > > > Summary: > T5.4 is a good step forward. Compatibility isn't too bad if you don't > have javascript or integration with other components or software. If you > do, there is a lot of work to be done to convert, > But it's worth it in my opinion. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com