By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,156 Members | 1,022 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,156 IT Pros & Developers. It's quick & easy.

Is Ruby is better than PHP ...

P: n/a
or perhaps Java for developing web application?

I've develop a few applications using PHP/MySQL/Apache and its growing in
size. After reading the Ruby tutorial, and do a simple script, I kind of
like this ease of use and a much cleaner language.

But I have reservation about its viability as a dominant web programming
language/tools. As with PHP, everywhere you look its PHP, perhaps it has
extensive bell and whistles for web programmers to write cool and
sophisticate commercials grade web application. How about its security? Is
it better/worse than PHP? Is Ruby thread-safe?

So, what's the drawback of leaving PHP and embrace Ruby as web programming
tools?

Thanks
Jul 17 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Ruby and PHP are two differents thing. Ruby is used for command line
program supporting user input and run just as batch file or linux shell
script do. PHP run embedded on a webpage and it main purpose is for website
development.

Savut

"Useko Netsumi" <us*****************@earthlink.net> wrote in message
news:c6************@ID-205437.news.uni-berlin.de...
or perhaps Java for developing web application?

I've develop a few applications using PHP/MySQL/Apache and its growing in
size. After reading the Ruby tutorial, and do a simple script, I kind of
like this ease of use and a much cleaner language.

But I have reservation about its viability as a dominant web programming
language/tools. As with PHP, everywhere you look its PHP, perhaps it has
extensive bell and whistles for web programmers to write cool and
sophisticate commercials grade web application. How about its security? Is
it better/worse than PHP? Is Ruby thread-safe?

So, what's the drawback of leaving PHP and embrace Ruby as web programming
tools?

Thanks


Jul 17 '05 #2

P: n/a
"Savut" <we***@hotmail.com> wrote:
Ruby and PHP are two differents thing. Ruby is used for command line
program supporting user input and run just as batch file or linux
shell script do. PHP run embedded on a webpage and it main purpose is
for website development.


Well I use PHP nearly only on command line as a neat Perl replacement and just saw that ruby is of course also available as embedded Apache
scripting language (mod_ruby) so you guys should better focus to the language itself instead on their original purpose :)
(but IMHO ruby looks ugly => use php *g*)

-christian-

Jul 17 '05 #3

P: n/a
With total disregard for any kind of safety measures "Savut"
<we***@hotmail.com> leapt forth and uttered:
Ruby and PHP are two differents thing. Ruby is used for command
line program supporting user input and run just as batch file or
linux shell script do. PHP run embedded on a webpage and it
main purpose is for website development.


Hardly.

Ruby can be used for shell scripting, GUI application programming
(there are 3 GUI toolkits available that I know of) and Web CGI
scripting. It's a very flexible language with a very nice syntax.

The only reason I can think of for choosing Ruby over PHP is the
Syntax however. It's a lot more object-oriented than PHP4 and very
easy to learn. But the language is still quite young in terms of
available libraries. Plus it's a lot easier debugging web apps
written in PHP.

Basically it all comes down to the fact that PHP is aimed, first
and foremost, at web applications. And most of it's features are
tailored with this in mind.

--
Phil Roberts | Dork Pretending To Be Hard | http://www.flatnet.net/
Jul 17 '05 #4

P: n/a
It is very unfortunate that this nice young language does not consider the
web development in mind. I even think that if and only if Ruby creator ever
think this thru by including web design in mind, Ruby can easily gain its
popularity against PHP and Java because of its ease of use features, its
consistency, its OO paradigm, and many.

Is there any work being done to cater specifically for web development?
Thanks
"Phil Roberts" <ph*****@HOLYflatnetSHIT.net> wrote in message
news:Xn*************************@216.196.97.132...
With total disregard for any kind of safety measures "Savut"
<we***@hotmail.com> leapt forth and uttered:
Ruby and PHP are two differents thing. Ruby is used for command
line program supporting user input and run just as batch file or
linux shell script do. PHP run embedded on a webpage and it
main purpose is for website development.


Hardly.

Ruby can be used for shell scripting, GUI application programming
(there are 3 GUI toolkits available that I know of) and Web CGI
scripting. It's a very flexible language with a very nice syntax.

The only reason I can think of for choosing Ruby over PHP is the
Syntax however. It's a lot more object-oriented than PHP4 and very
easy to learn. But the language is still quite young in terms of
available libraries. Plus it's a lot easier debugging web apps
written in PHP.

Basically it all comes down to the fact that PHP is aimed, first
and foremost, at web applications. And most of it's features are
tailored with this in mind.

--
Phil Roberts | Dork Pretending To Be Hard | http://www.flatnet.net/

Jul 17 '05 #5

P: n/a
In article <c6************@ID-205437.news.uni-berlin.de>,
Useko Netsumi <us*****************@earthlink.net> wrote:
It is very unfortunate that this nice young language does not consider the
web development in mind.
Well, you know how it is with these young languages. They're just too
carefree to consider the serious stuff. They just want to have fun ;-)

Seriously, there is a lot of web development work being done in ruby and
some very nice frameworks have been and are being developed.
I even think that if and only if Ruby creator ever
think this thru by including web design in mind, Ruby can easily gain its
popularity against PHP and Java because of its ease of use features, its
consistency, its OO paradigm, and many.

Is there any work being done to cater specifically for web development?


I'm not an expert in Web development by any stretch, but here are a few
pointers:

cgikit http://www.spice-of-life.net/cgikit/index_en.html
CGIKit is a web application framework like Apple Computer's WebObjects.
This framework services Model-View-Controller architecture programming by
component based on a HTML file, a definition file and a Ruby source.

arrow http://rubycrafters.com/projects/Arrow/
Arrow is a framework for building web applications using Apache and
mod_ruby.

borges http://borges.rubyforge.org
Borges is a modal web application framework that keeps track of
state, so you can go back and undo or redo operations.

rails http://www.rubyonrails.org/show/HomePage
Rails is a soon-to-be-released web-application framework for Ruby. It’s
built upon well-understood patterns which should make the seasoned web
developer feel right at home and the new comer welcome.
Full-stack framework: Model, View, and Control
Rails is a composition of three sub-projects that make up the Model, View,
and Control tiers. This means that most web applications shouldn’t need
to assemble anything else to get off the ground.

....there are more like Amrita, but this should be enough to get you
started.

Phil
Jul 17 '05 #6

P: n/a

There are projects supporting MVC pattern:
http://www.starware.one.pl/software/sws/index.html
http://outerbody.com/ruby/roach/

as well as some other cgi/mod-ruby templating systems
(including eruby which uses the well known <% %> markers):

comparison is given at:
http://www.kuwata-lab.com/ruby/kwarts/benchmark.html

Marcin
Jul 17 '05 #7

P: n/a
Useko Netsumi wrote:
So, what's the drawback of leaving PHP and embrace Ruby as web
programming tools?


All the code already written in PHP...

If you want to write everything from scratch, use whatever turns you on.

Matt O.
Jul 17 '05 #8

P: n/a
Phil Roberts <ph*****@HOLYflatnetSHIT.net> wrote in message news:<Xn*************************@216.196.97.132>. ..
With total disregard for any kind of safety measures "Savut"
<we***@hotmail.com> leapt forth and uttered:
Ruby and PHP are two differents thing. Ruby is used for command
line program supporting user input and run just as batch file or
linux shell script do. PHP run embedded on a webpage and it
main purpose is for website development.


Hardly.

Ruby can be used for shell scripting, GUI application programming
(there are 3 GUI toolkits available that I know of) and Web CGI
scripting. It's a very flexible language with a very nice syntax.


Arachno Ruby IDE and Distribution at http://www.ruby-ide.com comes
bundeled with out of the box working FOX,TK,FLTK,WXRuby and the
standart Win32 GUI Toolkit.

Its also the easiest way to develop CGI Scripts with Ruby because it
automatically starts an apache that is correctly configured and let
you debug your CGI's.
Jul 17 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.