JavaScript/AJAX isn’t always the best tool for the job. Over the last 2 years, I’ve been the principal developer on the CRM project at work. For most of that time, it has primarily been a Javscript, Web-enabled application.
Recently, we have realised that we’ve hit the wall with what is possible with JavaScript and HTML (especially when the target platform is IE6+). We are now moving to the Java-based RCP (Rich Client Platform), which is part of the Eclipse framework.
I believe that JavaScript frameworks have a place, but I do not think it is within enterprise-critical applications. When the environment is controlled and scalability and performance is a factor, you should carefully consider your options before joining the AJAX bandwagon.