Hi guys, I'm looking for comments and suggestions regarding the use and place of jquery/ajax in site development.
If I have something like a dropdown box for a selection and I use jquery/ajax to perform functions based on the selection, I can't save that page so it's bookmarkable in the sense that a user can go back to the page with the selection already there, not without a whole bunch of jscript wackiness.
If I DO put something in the URL then now I have to duplicate code, one set of code for PHP to handle the GET urls and display something like a table, and then another set of jquery functions to handle the same table if an on-page element is used instead. For example there is a page where a user can populate a table based on either a drop-down(parsed by jquery/ajax) or by typing a search term and submitting (handled by PHP). But when they use the drop-down box, the URL doesn't change, if they search, the URL has the search term included. So say they search for something, but then use the drop-down to change it, if they refresh the page it goes back to the search term and not the drop-down!
It really can't be this difficult can it? Websites used to be some markup+content with styles. Now they are turning into these conflated multi-language programs with a crap load of dependancies and backwards compatability testing and graceful degredation and feature-checking forked functionality branches and "markup" is now hidden inside ajax calls, loops and echos an .append() and content is now split in various kinds of static files, templates, database calls and array-parsing loops.....I'm getting tired of this! Building a website is not so much about "proper markup" and elegant styles, it's now about programming, error handling, callbacks, code stacks, data logic and program flow etc...
Thanks for listening to my rant, now back to programming...