Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

monke

macrumors 65816
Original poster
May 30, 2005
1,437
3
Other than XHTML and CSS, what it the most valuable/important language to learn for websites?

I was thinking Javascript or PHP, thoughts? :)
 
I would say PHP. Javascript is useful for Ajax.

Ruby on Rails is new and was used to develop 37signals web apps.

I would like to learn Ajax, but im having trouble with Javascript.
 
PHP is a server side language.

JavaScript is a client side language.

Javascript can be switched off by the user.

Conceptually that is impossible with php.

So for example if you a validating inputs into a field you always have to check client side, because javascript validation can easily be overridden.
 
anyone else here think that ruby on rails is more hype than real world worth? I just made the decision to keep learning php based on this.
 
How about XML + Javascript + Ajax + CSS:

http://soundtransit.org/x134.xml

Code:
<html xmlns:calendar="urn:calendarlib" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:xalan="http://xml.apache.org/xalan"><video_list player_name=""></video_list><head>
<META http-equiv="Content-Type" content="text/html">
<title>Sound Transit</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="prebuilt/style.css"><script language="javascript" src="prebuilt/prototype.js"></script><script language="javascript" src="prebuilt/topnav.js"></script><script language="javascript"> 
					function loadSchedule()
					{
						var url = "x246.xml";
						params = "id=x134";
						
						var ajax = new Ajax.Request(
							url,
							{
								method:'get',
								parameters: params,
								onComplete: paintScheduleDropDown
							});						
					}
					
					function paintScheduleDropDown(resp)
					{
						var r = resp.responseText;
					
						var dropDownDiv = $("ScheduleDropDown");
					
						if (dropDownDiv != null)
							dropDownDiv.innerHTML = r;
					}
					
					function loadScheduleSC()
					{
						var url = "x3315.xml";
						params = "id=x134";
						
						var ajax = new Ajax.Request(
							url,
							{
								method:'get',
								parameters: params,
								onComplete: paintScheduleDropDownSC
							});						
					}
					
					function paintScheduleDropDownSC(resp)
					{
						var r = resp.responseText;
					
						var dropDownDiv = $("ScheduleDropDown");
					
						if (dropDownDiv != null)
							dropDownDiv.innerHTML = r;
					}
					
					
					function gotoBusSchedule()
					{
						window.location.href = $("scheduleListing").value;
					}					
					 </script><script language="javascript"> 
					function loadRouteMaps()
					{
						var url = "x426.xml";
						params = "id=x134";
						
						var ajax = new Ajax.Request(
							url,
							{
								method:'get',
								parameters: params,
								onComplete: paintRouteMapsDropDown
							});						
					}
					
					function paintRouteMapsDropDown(resp)
					{
						var r = resp.responseText;
					
						var dropDownDiv = $("RouteMapsDropDown");
					
						if (dropDownDiv != null)
							dropDownDiv.innerHTML = r;
					}
					
					function loadRouteMapsSC()
					{
						var url = "x3316.xml";
						params = "id=x134";
						
						var ajax = new Ajax.Request(
							url,
							{
								method:'get',
								parameters: params,
								onComplete: paintRouteMapsDropDownSC
							});						
					}
					
					function paintRouteMapsDropDownSC(resp)
					{
						var r = resp.responseText;
					
						var dropDownDiv = $("RouteMapsDropDown");
					
						if (dropDownDiv != null)
							dropDownDiv.innerHTML = r;
					}
					
					function gotoRouteMap()
					{
						window.location.href = $("routeMapsListing").value;
					}					
					 </script></head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="images/band.gif">
<table cellpadding="0" cellspacing="0" border="0" width="794" align="center" valign="top">
<tr>
<td height="60" width="12" valign="top"><img src="images/spacer.gif" height="60" width="12"></td>
<td colspan="3" height="60" align="left" valign="top">
<div id="logo"><a href="x19.xml"><img src="images/logo.gif" border="0" width="216" height="60" align="left"></a></div>
<div id="print_tag">Sound Transit's regional network of express buses,
								commuter rail, light rail and transit facilities connects
								communities in King, Pierce and Snohomish counties. </div>

</td>
<td colspan="2" height="60" align="right" valign="top">
<div id="searchform">
<table height="60" width="200">
<tr>
<td align="right">
<p class="small"><a href="x134.xml?t3xt">Text mode</a></p>
<form name="search" method="GET" action="x2611.xml"><script language="javascript"> 
														function verifySearch()
														{
															var qu = document.search.qu;
															if ( qu != null ) {	if ( ( qu.value != "" ) && ( qu.value != '-- Search --' ) ) { search.submit(); return false; }
																else { alert( "The Search query may not be blank." ); return false; } }
															else { alert( "The Search form could not be found." ); return false; }
														}
														 </script><input name="qu" type="text" size="15" value="" onclick="this.value = '';"><input name="qs" type="hidden" value="1"><input name="ps" type="hidden" value="40">
												  <input src="images/search_btn.gif" type="image" height="21" width="54"></form>
</td>
</tr>
</table>
</div>

</td>
<td height="60" width="12" valign="top"><img src="images/spacer.gif" height="60" width="12"></td>
</tr>
<tr>
<td valign="top" width="12" height="18"><img src="images/band_l1.gif" height="18" width="12"></td>
<td colspan="5" width="770" height="18"><img src="images/tagline.gif" width="770" height="18" border="0"></td>
<td valign="top" width="12" height="18"><img src="images/band_r1.gif" height="18" width="12"></td>
</tr>
<tr>
<td width="12" height="20"><img src="images/band_l2.gif" height="20" width="12"></td>
<td width="160px" align="center" id="top_x16" onmouseover="showDrop('x16', 'block', 'topnavselect', this); this.style.cursor='hand';" onclick="document.location='x16.xml';" onmouseout="showDrop('x16', 'none'); this.style.cursor='pointer';" class="topnavselect"><input type="hidden" id="oClass_x16" value="topnavselect"><a href="x16.xml" style="display:block">Riding Sound Transit</a><div id="menu_x16" class="dropDiv"><a class="SndLevel" href="x21.xml" target="">How To Ride</a><a class="SndLevel" href="x73.xml" target="">Schedules & Facilities</a><a class="SndLevel" href="x131.xml" target="">Fares & Passes</a><a class="SndLevel" href="x72.xml" target="">Rider Alerts</a><a class="SndLevel" href="x132.xml" target="">Accessibility & ADA</a><a class="SndLevel" href="x133.xml" target="">Event Service & Promos</a><a class="SndLevel" href="x134.xml" target="">Puget Destinations</a></div>
</td>
 
I will say that ruby on rails is worth the hype. It does some very nice things for you like handling forms very well and doing all database calls for you. It truly feels like you are molding a site rather than starting from scratch each time by using scaffolding. Scaffolding will automatically generate create, list, edit and delete scripts for you based on the type of database field they are. This is quite handy as it lets you work on parts of the site when others aren't completed. Of course you can go back and replace all these generated pages when you get to them. These features are barely scratching the surface though.

As a first language I would probably recommend php though, as ruby on rails almost does too much for you to really understand whats happening behind the scenes and let you troubleshoot effectively.
 
Javascript can be switched off by the user.

I know this is theoretically true, but it's really getting old and dumb when I hear this (no offense to the poster). This is really old-school thinking that just doesn't exist anymore. The same people who think this way are the people who still insist on designing for 800x600, or who believe that horizontally scalable design is the way to go. (Both, as you may have picked up in my tone, are silly and outdated philosophies.)

I have been designing websites for a long, long time, and have not one single time come across an issue where a user couldn't use a site because they turned off Javascript.

The thing to remember about Javascript (and other such items that can be toggled on and off) is that the only people who actually know what it is, or even how to turn it on and off, are very web savvy. In the case of this small minority who actually choose to do so, they also know that they risk sites not functioning and will be aware of how to turn it on when necessary.

Your average user is never going to turn off Javascript because (a) they don't even know what it is, and (b) they wouldn't know how to turn it off in the first place. This is completely off-topic from your question, but it needed to be said just the same.

Now, in response to your original post, it really does depend on your client-base and what you hope to achieve/specialize in with your design and development. However, here's my two cents on the best order to move forward in, both conceputally and technically:
1) HTML/XHTML
2) CSS
3) Javascript
4) Flash Actionscript
5) PHP

Now, number 4 raises a lot of eyebrows in the design community from anti-Flash folks, but again that's that same antiquiated thinker's mentality creeping up. There is study after study, blog after blog, and article after article, that points to Flash as the fastest growing and most widely-used media and interactive format on the web. It's a fact. So do yourself a favor and join the club. If you want to create rich media applications, anything that involves audio or video, and anything that involves interactivity that doesn't make you want to fall asleep at they keyboard, learn it! It's also truly invaluable for those times when the old-fashioned coding methods are really cumbersome. I can create a mail form in Flash with PHP in less than 10 minutes. Sure, you can do that in HTML too. But my mail form with have built-in error checks, instructions and messages, that don't require page re-loads, and my forms don't have to look like vomit on the page. Very worthwhile.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.