Newbie Ajax | theoretical question
Posted: Mon Jan 30, 2006 12:14 pm
Hello everybody!
I'm a PHP web developer, as all of you, but haven't messed up with AJAX before. I've got a (may be) simple question on designing an applicatin, based on AJAX. For example consider an administrative system. I use prototype library for the JS functionality and plan to include Behaviour library also. On the page start I load them and on every request by AJAX I include some inline JS to be executed.
1. The first question is - is it a good approach to load all the JS as inline <SCRIPT> code or should I include external file with all the code inside to separate JS from HTML and PHP (and how to include dynamically an external JS file).
2. Second: When several pages use inserted JS code to work, isn't it possible to "flood" the browser with JS code and make it slowlier? If so I would appreciate any solution.
Written material on any of the problems will be grealty appreciated.
TIA,
MadMaster
I'm a PHP web developer, as all of you, but haven't messed up with AJAX before. I've got a (may be) simple question on designing an applicatin, based on AJAX. For example consider an administrative system. I use prototype library for the JS functionality and plan to include Behaviour library also. On the page start I load them and on every request by AJAX I include some inline JS to be executed.
1. The first question is - is it a good approach to load all the JS as inline <SCRIPT> code or should I include external file with all the code inside to separate JS from HTML and PHP (and how to include dynamically an external JS file).
2. Second: When several pages use inserted JS code to work, isn't it possible to "flood" the browser with JS code and make it slowlier? If so I would appreciate any solution.
Written material on any of the problems will be grealty appreciated.
TIA,
MadMaster