On Thu, September 20, 2007 5:55 am, Adam Hardy wrote: > I too found that DWR and Spring is a parallel architecture to Struts > rather than > integrated. The current project I am working on is the first time where we > have > 3 separate front-ends that use the business layer (or 'facade'): > web-services, > an Ajax app and a thin-client HTML Struts2 app.
We have a similar situation with the big app I've been working on for the past year or so in that we have the business layer implemented mostly in EJBs... we have the main Struts 1.2.7-based app that uses them, and we then have web services written against the EJBs (we are, unfortunately, an IBM shop, so we use RAD to gen the services off the EJBs, which is nice when it actually works, but that's a rare thing). We then have newer portions of the webapp using DWR calling POJOs that then call the EJBs where appropriate. We started with Struts to have some level of familiarity for our developers, but we're finding that the portions that use DWR (and Spring) are much cleaner and simpler, and in retrospect it probably would have been *easier* for the less experienced developers to pick it up. There's less layers of abstraction to get through, less configuration to get through, etc. If only we weren't stuck on Wsbsphere 5.1 and could use annotations for Spring and DWR, it would be that much better (and I'm not a huge proponent of annotations in general, but they certainly make sense in some cases). > The Ajax app is actually DWR so it's Json rather than XML, and the amount > of > javascript wrapped around it is considerable - that's a warning really but > it's > not a fault of DWR, it's the nature of Ajax. I think that can be true if you aren't careful, yes. We certainly have a good deal of Javascript in our app, whether DWR is involved or not. Still, if you structure things well, it's very manageable and I don't find really any worse than a complex plain webapp. > The same cannot be said of an Ajax app, where the development and test > cycle and > the coding and automation tools are just not available to you. If I could > start > this project again, I would write the Ajax part as a Java GUI in an applet > - > seriously! If I knew it was going to stay small, then maybe, but for > complex > stuff, Web2 takes programmers back to the dark ages. I think that *can* be true if you aren't careful. The thing that I've found people tend to mess up when doing RIA development is that they think they need to do things differently than they would if it was a plain webapp. We put in place some relatively simple standards early on and they helped immensely. Things like commenting in the same style as Java, always doing everything in an object-oriented way, i.e., create Javascript classes for everything and no global-scoped Javascript except where truly necessary, develop in Firefox and test in IE (and we gave our developers a couple of Firefox tools, Firebug chief among them, to use), and so on. We wound up with, overall, decent code. Not perfect, but not nearly as bad as some other heavily client-based webapps I've seen, and not nearly as bad as it could have been given the complexity of the app and the relative inexperience in the new technologies of the team. I don't think it takes you back to the dark ages necessarily, but I'd agree it opens up new ways to shoot yourself in the foot if you aren't careful :) Frank --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]