Quote:
Originally Posted by broncozr
kizza and rnd,
Thanks for the replies. I am an AJAX newbie, but from what I've read, the security risks for using AJAX can be heavy.
|
i don't think there's any extra security issues associated with ajax that aren't normally present. your page should work without javascript enabled after all...
all you are doing with ajax is loading user available urls that could, in theory, be typed into an address bar anyway.
more imposrtantly, don't think that ajax somehow increase the security of your site because the user "sees" fewer urls and actions.
Quote:
Originally Posted by broncozr
btw, is navigating the child nodes in XML more dependable than in the document's DOM. How about JSON? I know that it can be done and that there is considerable debate between using, for example, .innerHTML vs. navigating the DOM tree. It seems that for different browsers the DOM has to be navigated in different ways. I'm sure there is cross-browser code for that though.
Thanks again for your help!!!
|
there is a lot of code and material that answers all your questions in great detail.
it sounds like you are kinda just starting out.
some advice:
if i were you, i would consider playing around with a library like jQuery for a while.
i historically have sneered at frameworks.
after all, i make my own libraries and try to personally write all the code i use.
i am beginning to come around a little however.
i think of frameworks like a calculator.
when calculators got cheap, scholars worried that no-one would know how to do long division by hand. i think that were mostly right.
when you use a framework, you aren't exactly learning javascript, you are learning the framework.
as you learn you can mix in more and more "regular javascript", so frameworks can be good "training wheels" in some respects.
in analogy: you won't become a mathematician with a framework, but you might become an accountant.
here why i think they can be useful to newcomers to web development:
1. good documentation.
jQuery and prototype both have great documentation, examples of everything, and lots of places to find cut-and-paste workable code. Microsoft and Mozilla have good documentation as well, but that just leads up to point 2:
2.they are well supported in all browsers.
it takes at least 6 months to learn the nooks and crannies of both IE's and firefox's DOM. There are very few people who could name every method and property of every object in both.
Then you start throwing in iphone and wii browsers, and well, you get the idea. it's honestly very tedious and harder to keep up, and test, than it used to be...
using a framework means learning how to do something once, and having it work everywhere you want it to once it gets up and running. you don't need to worry about nearly as many bugs and snags, significantly reducing the amount of custom code required for a project.
3. managing complexity.
a good programmer knows that they can never know every detail of a complicated system. they know what they need to know, and also know what they don't need to worry about. you have a lot less code to worry about with a framework or library.
4. shoulders of giants.
you can often cut and paste then customize tons of widgets, styles, fx, etc. i'e met design students who are not good programmers, but they know about css.
they can pull of some pretty clean, professional, and compatible pages with stuff they cut and paste and modify the css selectors on.
it kind of annoyed me because this stuff is supposed to be more complicated.
it's not fair that it works so well.
5. not mutually exclusive.
the most frustrating part of webdev is probably the DOM. a framework spares you a lot of headaches. if you use the resulting "free time" to really concentrate on javascript the language, you can get the best bang for your buck.
the core language is probably the most consistent piece of the webdev puzzle. it can be learned in a day or two. that said, chess could be learned in an hour or two, but that doesn't mean you'll be a chess master the next day.
hopefully, in the not-too-distant future, the DOM and surrounding technologies will be fairly consistent and powerful.
you would have a lot less need for a framework at that point, and by that time you could be pretty skilled at javascript.
there's lots of room to expand in javascript itself; computer science is a big field.
you can get into constructors, templates, prototypes, functional programming, closures, object-oriented javascript, inheritance patterns, lambda, performance tuning, the list goes on and on...
your javascript knowledge would allow you to code widgets, photoshop plugins, flash apps, home-automation systems, etc. you would need to rewire the ins and outs to the new environment, but your logic and data manipulation can remain essentially unchanged.
I would consider a hybrid approach if i had to do it all over again...
using a framework for the ins and outs of the browser while refining Jedi abilities on javascript.
- my two or three cents -