SitePoint Sponsor

User Tag List

Results 1 to 21 of 21
  1. #1
    SitePoint Evangelist
    Join Date
    Apr 2006
    Posts
    443
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Questions about Ruby

    Hi.

    1- Is Ruby faster than PHP?
    2- Is there an IDE for Ruby?
    3- Which server Ruby use to run its web applications?


    Cheers.

  2. #2
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    I wouldn't say any particular server-side language is faster or more effective than any other, it really depends on what you're trying to achieve as to whether the language will meet your requirements. As for an IDE, Netbeans can work the Ruby mojo so it might be worth looking at (as the environment has been around for years). Regarding the server, you can use Apache or IIS for Ruby (or rails, depending on what you use). There's plenty of options out there!

  3. #3
    SitePoint Evangelist
    Join Date
    Apr 2006
    Posts
    443
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks.


    I have another question about Ruby, does it provide flexiblity in changing the appearance of elements? as I have seen a video that explain how to use Ruby Framework to build quick forms, but the question is can I change the appearance of these quick solutions or just except them as they are?

  4. #4
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    What do you mean by change their appearance? Server-side scripting is not about changing how something visually looks, that's what CSS is for.

  5. #5
    SitePoint Evangelist
    Join Date
    Apr 2006
    Posts
    443
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I may misunderstand the idea behind framework! because I've seen a tutorial that explain how can you quickly implement contact form or something like that, I thought that the fields were built in the framework, and this means that we can't change theirs appearance and names for example!

  6. #6
    SitePoint Evangelist
    Join Date
    Apr 2006
    Posts
    443
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    By thw way, another question:


    - Is Ruby a secure language?

  7. #7
    SitePoint Evangelist
    Join Date
    Apr 2006
    Posts
    443
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll keep all my questions in this thread, so it can be a good reference for other new comers.

    Is it true that I can't depoy ruby web application on a small shared web hosting space?

  8. #8
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by CS Geek View Post
    I may misunderstand the idea behind framework!
    Ruby is NOT a framework, it's a programming language. Rails (as in Ruby on Rails) is a framework. There is a major difference. Regarding the styling of components, just like PHP or ASP, Ruby is not involved in the stylistic stuff of what ends up in the clients web browser, that's the job of CSS.

    Quote Originally Posted by CS Geek View Post
    Is Ruby a secure language?
    It's about as secure as any other language, but with all things, you need to be sensible in how you use and implement it.

    Quote Originally Posted by CS Geek View Post
    Is it true that I can't depoy ruby web application on a small shared web hosting space?
    No, if the host supports Ruby, you can deploy Ruby code, just like if the host supports PHP, you can deploy PHP scripts.

  9. #9
    SitePoint Evangelist
    Join Date
    Apr 2006
    Posts
    443
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've visited many websites built in Ruby, they are slower than other websites built in PHP or .NET, why?

  10. #10
    SitePoint Evangelist
    Join Date
    Apr 2006
    Posts
    443
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AlexDawson View Post
    What do you mean by change their appearance? Server-side scripting is not about changing how something visually looks, that's what CSS is for.
    I've just realised!

    I mean for example the validation for inputs are built in rails which shows black text with red background! is there possibility to change that in Ruby?

  11. #11
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    You could probably generate some CSS using Ruby, but CSS should be written in... CSS.

    PS: It's probably down to the servers rather than the language itself.

  12. #12
    SitePoint Evangelist
    Join Date
    Apr 2006
    Posts
    443
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AlexDawson View Post
    You could probably generate some CSS using Ruby, but CSS should be written in... CSS.

    PS: It's probably down to the servers rather than the language itself.
    What's the probelm with the server, is it not capable of running Ruby for example? I've visited many websites not one and all of them are slow comparing with .net and php websites.

  13. #13
    SitePoint Evangelist
    Join Date
    Apr 2006
    Posts
    443
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It seems to be OK now, Ruby Ruby

    Here is another question, does Ruby support languages which are based on Unicode?

  14. #14
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by CS Geek View Post
    What's the probelm with the server, is it not capable of running Ruby for example?
    It's probably just a slow server (like if they have a lot of people hosted on it). Slow servers are pretty common, especially on cheap hosting.

    PS: Not all Ruby sites are slow, Twitter for example was built on Ruby. There's absolutely no reason to say it's slower than other languages.

    Quote Originally Posted by CS Geek View Post
    Here is another question, does Ruby support languages which are based on Unicode?
    Ruby is a server-side language... it deals with processing scripts, building web applications and such, it's not a markup language (like HTML). It's no different to PHP or ASP or JSP or ColdFusion or Python or Perl or any of the others (just it's syntax and framework differ). I would advise you to do some research on the difference between language types (markup, client-side and server-side) and the difference between a language and a framework.

  15. #15
    SitePoint Evangelist
    Join Date
    Apr 2006
    Posts
    443
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, is it Ruby that makes you type less code than other languages or is it the Rails framework?

  16. #16
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    It's the rails framework... Rails is to Ruby as jQuery is to JavaScript.

    Frameworks are pre-built libraries of code which simplify the process.

  17. #17
    Team ********* Louis Simoneau's Avatar
    Join Date
    Sep 2009
    Location
    Melbourne, Australia
    Posts
    228
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    To be fair, Ruby itself does tend to be more concise than other languages. So even without using a framework, a given script will likely be shorter in Ruby than in PHP.

    But Alex is right, the biggest gains in productivity do come from Rails.

  18. #18
    SitePoint Zealot
    Join Date
    Sep 2010
    Location
    Brighton, UK
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by CS Geek View Post
    I've just realised!

    I mean for example the validation for inputs are built in rails which shows black text with red background! is there possibility to change that in Ruby?
    Rails generates a default stylesheet called scaffold.css that styles the forms when you run a particular script. That's probably what you saw. If you check the HTML you'll see it at the top. You don't have to keep it. Rails just makes ordinary, plain old XHTML and you can do all the things you would normally do with XHTML.

  19. #19
    SitePoint Evangelist
    Join Date
    Apr 2006
    Posts
    443
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by goldfidget View Post
    Rails generates a default stylesheet called scaffold.css that styles the forms when you run a particular script. That's probably what you saw. If you check the HTML you'll see it at the top. You don't have to keep it. Rails just makes ordinary, plain old XHTML and you can do all the things you would normally do with XHTML.
    Yes it is, and everytime I have to delete that stuff by myself to change it to what I want?

  20. #20
    SitePoint Zealot
    Join Date
    Sep 2010
    Location
    Brighton, UK
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by CS Geek View Post
    Yes it is, and everytime I have to delete that stuff by myself to change it to what I want?
    I'm sorry, are you talking about rails scaffold here? That's an automated way of making your site quickly for rapid prototyping, so yes, you do have to change it if you're not happy with the default. You can skip the scaffold if you want, most people do.

  21. #21
    SitePoint Zealot
    Join Date
    Sep 2010
    Location
    Brighton, UK
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you just want the results without doing the development work, you could always look at Wordpress, it's a perfectly valid way to go.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •