Jump to content
Larry Ullman's Book Forums

Recommended Posts

Hi all,

Having read the post from Chop on a complex form it's raised a couple of questions that I've been mulling over.

 

Javascript and PHP. I know that Javascript is client side and PHP is server side. I know that Javascript is used for manipulating various aspects of the browser. However aside from this there appears, to my amateur eyes, to be a vast degree of similarity. I guess my question is:

 

1. What 'bits' of Javascript need to be learnt in order to make dynamic websites, without spending time duplicating knowledge already learnt with PHP? I have a very large, 'learn Javascript from scratch' book that is about as intersting as watching paint dry. It would be good to skip to the interesting bits!

 

2. This sort of leads into the next question. Currently I'm comfortable with producing static websites using XHTML and CSS. I want to produce dynamic websites so I'm learning PHP (using Larry's PHP6 & MySQL5 book) but where should I go from here to extend my knowledge. Should Javascript be the next port-of-call or more advanced PHP or Ajax or......? What would be the most beneficial learning curve?

 

I appreciate that the answer may well be a subjective one, but would be very interested in some opinions.

 

Thanks once again everyone. I aspire, one distant day, to actually contribute to this forum as opposed to just keep asking!

 

Cheers

Paul

Link to comment
Share on other sites

Hello Paul,

 

Your question is good. In my opinion you could learn how to add in AJAX into your websites, that will make sure sites interactive and allow for a smooth dynamic experience.

 

By learning some JavaScript you will be able to implement AJAX (Asynchronous JavaScript and XML) into your site and modify your HTML on the fly or on certain events such as onMouseOver. But I wouldn't say you need to learn JavaScript from scratch, but the better you understand a language the more you can do with it. Its a case of weighing up time with knowledge and mainly productivity. What's the point of knowing 99% of the JavaScript language (If anyone actually does) If you only ever use 2%??

 

Larry's book your reading is good I enjoyed it found it great for my learning, I also read PHP 5 advanced that was also good and introduced me into some things I just wouldn't have found or come across on the web unless someone else told me. It also has a good section on AJAX.

 

I think that a good book on AJAX could be the next logical step, in my eyes that is. But I think making sure you pick a book that works for you is important.

 

If you need some JavaScript knowledge to read it and you don't have any then it may be tough.

 

Anyway just my thoughts

 

:)

  • Upvote 1
Link to comment
Share on other sites

Wow, Paul, that's a great question! It also brought a bit of a tear to my eye, in the sense that I used to be in the exact same boat as you. While I'm no expert at JS, and I am always studying to learn more, I do feel like I have finally gotten to a point where I understand it pretty well, and honestly, it's been a painful journey at times.

 

I have to admit that one of my great frustrations recently has been that there seem to be no great, all-encompassing, one-stop JS resources out there. Perhaps the closest thing would be ordering a book off of Amazon. Perhaps read customer reviews, and pick the one that best fits what you want. I did buy the O'Reilly book off of Amazon, and while admittedly the ultimate JS reference resource, it is not for beginners, I think. I had to skip over a lot, and then come back to it later, after finally increasing my understanding through other means.

 

And on the Internet side of things, the same thing seems to be the issue; no great one-stop shops. I personally have had to piece together my knowledge from various resources and thinking about things a lot. It's quite frustrating too, in the sense that JS is quite possibly the most important webpage language today, but no one seems to explain it well. That's partially why I have hoped so long for a JS book from Larry. I have no doubt that Larry would explain it as well as he does PHP, etc.

 

With all that said, I think the best approach is to ask yourself what you want to do, and then go out there and try to learn how to do it. In doing so, you'll slowly pick up different pieces of JS, and also learn more about what exactly JS is even used for.

 

I personally started with Larry's Ajax book, as the ability to add dynamic content was very appealing to me. As I went through the book, if there was something I didn't understand, I would either ask on these forums, or research it like a madman until I found an answer. Perhaps that's the best advice I can give.

 

Certainly, I think this forum is a great resource, and I urge you to continue to ask questions whenever you're stuck. There's also a board just for Larry's Ajax book. Well, could talk about this for hours, but gotta get ready for work. Hope that helps.

  • Upvote 1
Link to comment
Share on other sites

Thanks for your opinions.

 

Piecing togethor both of your replies it would seem that the consensus seems to be learn Ajax, whilst at the same time picking up relevant pieces of JS along the way.

 

I do think that it's interesting and a touch ironic that with all this technology when we want to learn something we always turn to a good old fashioned book!

 

Cheers

Paul

Link to comment
Share on other sites

Yeah, it's as good a place as any, I think. And as you probably know, Ajax is not a language, per se, but a technique of using JavaScript and a server-side language (generally PHP) together to dynamically load content.

 

And yeah, I suppose it is a bit ironic that we still turn to books, but there is something nice about being able to actually hold something in your hand. Also, while things like Amazon's Kindle are nice, I still prefer text on a page, as opposed to text on a screen.

  • Upvote 1
Link to comment
Share on other sites

I agree, I really enjoy a book I can scribble on etc whilst things pop into my head.

 

I forgot to mention that I also brought Larry's Ajax book which was a really nice intro into ajax. Especially when you've read the section in PHP 5 advanced.

 

But I also read about a year ago o'reilly's js missing manual book. I found it good but I found it a bit hard work in places. To be honest I don't think I was ready for it then and should perhaps go back and read it again.

 

I actually meant to message HartleySan the other day and ask him about his experiences with learning js because I can see his knowledge around the topic is a lot better than mine.

 

But it is a tough question, because there's just so much to learn about the web. It expands at such a pace I sometimes find it hard to keep up. That being said, sometimes you bite of more than you can chew. And in retrospect I think at that time it was too much for me to fully understand to be useful to me. Obviously parts of it were, they tended to be things based around jquery.

 

Which brings me to my next point. Sometimes you don't neccessarily need to know how every tiny thing works. I want to know because I just do. But if something does what you want it to do but you don't understand how, then is that 'bad'? I would say no.

 

So on that basis you could look into the jquery framework, they have lots and lots of well documented plugins for a mass of functions. They are generally pretty easy to install and use too!! Many of them involve jquery ajax so they look really smart and the degrade well in lesser (ie 6) browsers.

  • Upvote 1
Link to comment
Share on other sites

Jonathon makes a lot of good points. The web is constantly changing at such a pace, it's hard to keep up. I do think that Ajax is here to stay for a while though. The only alternatives to Ajax for dynamic content are things like Java and Flash, which require completely separate APIs (which are generally expensive), and are not natively supported by all browsers. I'm not putting those languages down, but for websites, I still think Ajax is the best option to go with, and the most important one to know. I mean, the entire Google empire was built on mad JavaScript/Ajax and regex skills.

 

And yeah, similar to Jonathon, I went from Larry's PHP 6 & MySQL 5 book to the Ajax book, and it wasn't too bad. When he got into certain parts of JavaScript and creating XML data, it was a bit confusing at times, but you can always come to this forum and ask, or find other resources on the web. Also, I really don't think that O'Reilly books are for beginners. I consider myself of an intermediate skill level in JS, PHP, etc., and still, I can't understand some of the things they talk about.

 

Also, I'm not a mind reader, but another thing I think that is hear to stay for a while is jQuery. I avoided it for a while, because while it does admittedly make a lot of JS techniques a lot easier, I'm not big on external libraries, and also, you still have to learn it, easy or not; you still have to memorize new syntax, function names, etc. It can be tricky, especially if you JavaScript-fu is weak.

 

In the end, I think that picking up Larry's Ajax book and just studying the basics of JavaScript would be your best bet for now.

  • Upvote 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...