By more complex, are you referring to more dynamic pages? Why would I use Ruby over PHP/HTML/CSS/JS? Does Ruby essentially combine what I listed before into one language?
In fact going further, there are projects written in ruby that help with the authoring of HTML, CSS and JS, sometimes with the help of other languages and tools. These can make life very easy when properly configured. For instance, instead of writing HTML, I could write slim and then have a ruby script translate that into HTML. Or I could write Sass and have ruby send my file to the sass parser in order to generate valid CSS without me having to do anything extra. Or even CoffeeScript instead of JS.
So in some respects, ruby can, if not directly replace, at least give you the option to hand off your code to other authoring tools.
To be fair, you can do exactly the same with PHP although it isn't as prevalent as with Ruby because as PHP applications are just deployed directly into a public web server directory it isn't easy to hide files that the user doesn't need to access.
3
u/hak8or Feb 24 '13
By more complex, are you referring to more dynamic pages? Why would I use Ruby over PHP/HTML/CSS/JS? Does Ruby essentially combine what I listed before into one language?