Am I supposed to write my web
applications with extjs like that?One page that should never be refreshed, and everything getting done by AJAX?
You don't have to write your applications like the ExtJS documentation. If you look at the example pages for ExtJS you'll see a lot of HTML mixed in with Ext widgets on individual pages. In my work I have two different apps that I'm using ExtJS on, one is a legacy site where I use the widgets to spruce up the pages, and the other is a full blown web application using nothing but ExtJS for the front end. I definitely prefer the latter once I got a hang of it, but the learning curve is pretty steep.
How do you debug such applications if
getting to the right place may take a
lot of 'clicking' and working with it.
They key here is to modularize your application. Build each component individually and test it in a vacuum. Don't get caught up into thinking this has to be some giant JavaScript file
that contains the entire application. In most web apps the source had dozens or more JavaScript files which are only combined for deployment purposes.
A must have for testing and debugging is firebug. It allows you to inspect Ajax requests, debug the JavaScript live and much much more.
Here's a series of articles about composing large Apps using ExtJS, it a pretty decent read with a lot of good info.
Part1
Part2
Part3
I think it's ok to use ExtJS in either way, if you're just getting started it might make more sense to do what you're most comfortable with and add some ExtJS 'spice' along the way. That said, once you start using it to create single page apps and you have your back-end outputting nothing but JSON you'll probably never look back at the old way you did web apps.