Web design: For those in the know.

speakeasy

Master Don Juan
Joined
Jun 4, 2006
Messages
2,780
Reaction score
77
mixmasterbert said:
do u really thinks its a waste to go to school for web design?
Not necessarily. If a major part of the curriculum is developing you artistically, then by no means it is a waste.
 

Señor Fingers

Master Don Juan
Joined
Sep 4, 2003
Messages
760
Reaction score
61
Location
Wherever I am.
@legolas, PM box is clear :)

speakeasy said:
Can you tell me why these are better than php and mysql? I'm just learning php and mysql and haven't only briefly heard about ruby on rails and I've never heard of PostgreSQL.
Not so much a question of which is better. Both PHP and Ruby are very capable languages. It just turns out that Ruby was a better fit for my brain - it reads like plain english and has more object-oriented goodness baked in.

Consider the following code snippets which do exactly same thing:

PHP said:
class String {
var $str;
protected static $counter = 0;

public function set_value($str) {
$this->str = $str;
}

public function __construct($str) {
$this->set_value($str);
}

public function __toString() {
return $this->str;
}

public function testfunc2() {
$array = split(' ', $this);
$str = "";
foreach ($array as $word) {
if (!(empty($word) || self::$counter < 0)) {
$str .= $word;
}
self::$counter++;
}
return $array;
}

public function testfunc() {
$this->set_value($this . "abc ");
implode($this->testfunc2(), "-");
}
}

$str = new String("initial string");
$i = 5000;
do {
$str->testfunc();
} while (--$i !== 0);
:crazy:

I can hardly read that with so many brackets, dollar signs and semi-colons littered throughout the code. It's also ridiculously long.

Check out the Ruby version:

Ruby said:
class String
@@counter = 0

def testfunc2
array = self.split
str = ""
array.each do |word|
str << word unless word.empty? or @@counter < 0
@@counter += 1
end
end

def testfunc!
self << "abc "
testfunc2.join("-")
end
end

str = "initial string"
5000.times { str.testfunc! }
Note: I lifted these examples from a great article

In the web programming world, frameworks are hot topic right now, thanks mainly to Ruby on Rails. A lot of imitations have been spawned since...CakePHP is a direct clone of Rails and others (Zend, CodeIgniter, etc) follow the same MVC (Model View Controller) philosophy. IMHO, none of them hold a candle to Rails.

The only downside for Ruby is that its not as widespread as PHP, but this is changing rapidly as more web hosts provide support for RoR and Ruby wins more converts from PHP and Java-land.

As for PostgreSQL vs MySQL, that is also preference. PostgreSQL is a little harder to get your head around since it has more features, but for the type of stuff I'm doing I really do need them (especially security features)

At the end of the day it's really just a question of personal choice. You pick whatever tool best suits your way of thinking, and the job at hand.
 

legolas

Master Don Juan
Joined
Feb 2, 2003
Messages
952
Reaction score
14
Location
Red Sox Nation
mixmasterbert said:
do u really thinks its a waste to go to school for web design?
In the real world what matters is experience not schooling. However if you need a structured way to learn web design, as opposed to learning it yourself, then go to school. At the end of the day, a prospective employer will ask for your portfolio and not your grades. I would suggest learning web design in the context of a specific project, you can come up with yourself. Books help out too, but I've found most books are best used as reference.
 
Top