Forums

ForumsProgramming Forum

Question about Internet

Posted Oct 4, '12 at 7:50pm

jeol

jeol

3,565 posts

I'd learn PHP first. Javascript is more for each individual page, but PHP is more for networks and servers. Besides, if you do something like add a chatbox in through Javascript, your friend won't be able to access it if it isn't connected to a network. PHP allows you to connect pages to networks through code, which is phenomenally useful in further network and server building. After all, you wanted to set up your own "internet," and PHP is an awesome tool to do it with.

I went on W3schools (that's where I learned HTML) and in the introduction it suggested that I learn Javascript and HTML before starting PHP...so should I completely ignore that suggestion? Would Javascript make it easier to learn PHP?

@Sal: I sort of agree with you. There's some things to keep in mind.

PHP is mostly used for performing server-side scripts like connecting to a database and using scripts you don't want someone to see, which also prevents people from getting past security measures you might have set up if you do it correctly. That said, anything that actually happens with PHP is on the server side rather than in the Client's browser. This is nice, but can also be a pain when it comes to a few things.

JavaScript is nice for client side actions, but given that it can easily be viewed by the client it is not suggested for use as any security measures can be passed much easier. That said, JavaScript is much nicer for certain functions that mostly involve visual actions. This includes HTML5 elements (mostly the canvas tag, which is used to display HTML5 games) and is also what is behind jQuery and other functions to be called while the client is using the site (say, if you hover over or click a certain element that is supposed to play a sound or expand, et cetera). The nice thing about JavaScript that is a pain with PHP is that certain background functions, like time, interpret from the client's system and not the server. Thus, if the client is on the West Coast accessing a server on the East Coast, if you're using PHP to call the time, it will display the server's time which would be 3 hours fast. If you're using JavaScript, it will use the client's time, so there would be no worrying if the time displayed would be right or if you have to make a specific form just to make sure that the client can access the right time.

That said, another useful function in JavaScript would be Ajax. Ajax allows the JavaScript to communicate with the server whenever it's called. This is used on Facebook (how the news feed updates without having to refresh the page) and many other sites as well, and can be a useful tool on forums because the user can see when someone posts without refreshing the page and finding out he got ninja'd, or post and it automatically posting without having to refresh the page, etc. Google also uses this to check if the username you want has been taken or not.

Aside from all of that, I think you can learn one and pretty easily grasp the other. The only true difference would be the syntax, as well as how you use it - but most of how it's formed is similar. The way functions, operators, and variables work is pretty universal, though they may require a different way of formatting. I wouldn't worry too much about it. Learn whatever you think most applies what you want to learn, and the other should come easily enough.

 

Posted Oct 4, '12 at 8:09pm

jeol

jeol

3,565 posts

Werp, forgot to talk about this.

W3Schools isn't bad for HTML, as HTML is for beginning beginners, but it isn't great for CSS. It gives you the jist on how it works, but you'll never get to do anything with it that you couldn't already do with HTML. Then again, there are a lot of websites out there that don't do a justice for what CSS can do.

I suppose I agree with you there. Most of my learning was wondering how a certain site did it, looking at their code, going 'oohhhhh,' and trying to apply it to practice with it and understand how it works. Some sites (like AG2 is, I think) like to use pictures rather than coding. However, I like showing that I have the skill to code something and have it work the way I want it to.

That said, IE is possibly my biggest Achilles Heel since most of the earlier versions of IE - which it seems those who have somewhat obsolete computers have to use the earlier versions very often use (but they still won't get a browser that actually is advanced from the early IEs and function on those computers) - it makes it really hard to develop your website for a majority of the population to enjoy. I know AG has had some problems involving IE in the past.

IE8 and previous versions might have a little CSS3 and HTML5 support, but the lack of what they do support is a bit staggering. I couldn't even create rounded edges on tables before IE9, and probably many people still haven't upgraded to IE9 *cough*becausethey'reignorant*cough*. I haven't really attempted to make any websites that can be distributed for the whole World Wide Web to judge yet. I have looked a bit into support for it, but it still practically looks like crap in IE. *sigh*

That said, explore, take notes, and practice what you see. Perhaps look at a more organized site's code and see what sort of CSS options they use. (Google and AG are not really suggested, since most of the code is on one line, which looks pretty sloppy but is easier for adjustment and... Iduno. Most of what you may notice, though, are visually obvious, so it just looking for something that pops out at you would probably be enough.)

 

Posted Oct 4, '12 at 8:29pm

_Spaz_

_Spaz_

126 posts

Thanks! I will really look into this!

 
Reply to Question about Internet

You must be logged in to post a reply!