SitePoint Sponsor

User Tag List

Results 1 to 17 of 17
  1. #1
    SitePoint Member
    Join Date
    Aug 2004
    Location
    CA
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Non-programmer trying to decide on ROR

    Hi all,

    I have been to the ROR website and am trying to decide if I should learn ROR, or if I am taking a simple task and making it very complicated.

    All I am trying to accomplish now is writing a basic script that will take a form (4 fields), send it to a database, but also populate the actual web page. As an example, I would like the user to enter their favorite song and artist. This would populate a database as well as show all entries from previous visitors on the actual web page (I don't even need it saved to a database, I just figure that is what needs to happen; if there is a way to just have a user add info and it saves to the .html file that would be great).

    I have NO programming experience. I would like to start learning, and I am intrigued by ROR over PHP. I'm not even sure why (maybe it has to do with the talking foxes guide!). Am I taking on way too much? I figure I got to start somewhere, so why not Ruby?

    Further - I just completed my first website (yep, I really am new to all this). It is my wedding site that I am using as a tool to learn as much about web design, coding, etc. as I can while providing my guests as much useful info as possible.

    Thanks,
    Josh

  2. #2
    SitePoint Zealot daveporter's Avatar
    Join Date
    Mar 2002
    Location
    Perth, Western Australia
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Josh,

    Just from reading your post, it sounds to me like you are not a programmer.

    RoR ( or PHP ) is more for someone who works with web sites a lot. I don't think that it is something you would use casually. If your aspirations are to learn this stuff, then yes I would say work through some of the many on-line beginner tutorials and see how you go.

    There is also the deployment issues - RoR requires a hosting company that supports it.

    Basically a Database driven page, 'creates' the html on the fly. So some content that has previously been entered has to be stored somewhere ( mySQL would be the most common option ). Then that information is retrieved and displayed based on a users action ( e.g. search for all books with 'css' in the title and display them - then a page is created that displays those books).

    Hope this helps & please post back if you have any other questions.

    regards, Dave Porter

  3. #3
    SitePoint Addict
    Join Date
    May 2004
    Location
    USA
    Posts
    342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Josh,

    What your describing isn't complicated and learning a whole framework and deployment process is going to drive you nuts for something that small.

    I'd say PHP is a great place to start - read a few tutorials and learn just enough to be dangerous - Then when you read up on ROR some of it might make some sense. I know the "EVERYTHING IS AN OBJECT" still gets to me - I'm an old fart though, so we get rigid in our ways.

    Honestly something like what your suggesting is just a small job, and could be outsourced REAL easy to someone who would take a small amount of time compared to your days of learning (if not more).

  4. #4
    SitePoint Enthusiast
    Join Date
    May 2001
    Location
    Kaysville, UT
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I actually work with quite a few designers, and a bunch of them have started learning RoR to do some simple apps for themselves. I don't know why, but right now it appears to be a popular setup for designers I think it is pretty accessible for non-programmers. You can certainly do what you want very quickly with RoR, but how long it will take you to figure out exactly *what* you are doing and how to fix it if you break it is another matter

    Even though I like working with RoR a lot, I do agree that PHP would be a lot easier to get started with, and is also easier to deploy. If you are thinking long-term marketability of skills, RoR is probably better.
    Spencer Uresk
    Rails App Hosting
    Cheap Hosting - Directory of hosting plans under $10/month!
    My blog: Tech and Java Articles

  5. #5
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by stma View Post
    .....compared to your days of learning (if not more).
    For me, this answers the question. The truth is that with Rails (unlike many other systems), learning to do what you want to do won't take you days. An hour or so working through one of the on-line tutorials will get you to the point where you can have a form inputting data into a database.

    Another reason I would suggest that Rails and Ruby are good starting points for programming is that they encourage good practice. They don't prevent bad coding, but in my experience it is easier to follow good practice with Ruby than not. Therefore, I think you tend to code better.

    Ruby is simple and straight-forward to use, and that makes it a pleasure to code. That's almost good enough reason to choose it on its own!

    Have a go at one of the tutorials (for example the one linked to below). An hour or so one evening working through a tutorial will answer the question for you. If you don't like it, fine. Then try PHP as that might suit you better.

    http://www.onlamp.com/pub/a/onlamp/2...revisited.html

  6. #6
    SitePoint Member
    Join Date
    Aug 2004
    Location
    CA
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thank you!

    Thank you very much for the thoughtful suggestions. DavePorter - you are correct in that I am not a programmer. I can also see myself spending days learning to create a script that will ultimately take 5 minutes to write!

    Based on everyones responses, I will do a few short tutorials and see how it progresses. I am currently using Dreamhost so I will be able to deploy php and ruby.

    I will let you all know how it goes and assuming I come up with something that works will share.

    Mostly, I am interested in learning some basic scripts and how to write them correctly (if I am going to do something, I don't want to be sloppy with it!).

    Well, thanks again everyone. I really appreciate everyone's responses.

    - Josh

    ps - ReggieB, thanks for the tutorial link!
    Last edited by mrjersh; Aug 22, 2007 at 09:04. Reason: add ps statement

  7. #7
    SitePoint Evangelist ikeo's Avatar
    Join Date
    Oct 2004
    Location
    Austin Texas
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Save yourself the headaches ... unless you're exceptionally bright Ruby on Rails is going to frustrate you if you have no prior programming experience.
    Go with PHP.

  8. #8
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nonsense. PHP has a dozen naming conventions. PHP's semantics are strange and stupid. You need to be bright to learn an illogical language.

    PHP has only one advantage: marginally easier deployment.

    Honestly, if you're going to program more than one script, ditch PHP.

  9. #9
    SitePoint Guru Skyblaze's Avatar
    Join Date
    Jul 2005
    Location
    Italy
    Posts
    734
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    read my post "conclusions on rails"
    For my experience i found more convenient php for several reasons (in order of importance):
    1) The market here in italy wants php developers;
    2) php doesn't hide to me some complexities as rails does and thanks to this i learn more and i understand better all the tecnologies involed in building a web application;
    3)The deplyment is really easy
    4) You can use php easily to build some dynamic web pages (using vanilla php) or more complex web apps with any php frameworks outhere;
    5) I don't know why but i feel i like more php as a language

  10. #10
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Skyblaze View Post
    2) php doesn't hide to me some complexities as rails does and thanks to this i learn more and i understand better all the tecnologies involed in building a web application;
    If you consider abstraction of complexity to be in the "con" side of the list, Rails is definitely not for you.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  11. #11
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    > 5) I don't know why but i feel i like more php as a language

    Could you elaborate anyway?

  12. #12
    SitePoint Guru Skyblaze's Avatar
    Join Date
    Jul 2005
    Location
    Italy
    Posts
    734
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Fenrir2 View Post
    > 5) I don't know why but i feel i like more php as a language

    Could you elaborate anyway?
    for example i like more the fact that i can use php as a procedural language for simple scripts and with OOP for more complex project or within a framework....then i love its standard library and its related documentation at php.net

  13. #13
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Skyblaze View Post
    for example i like more the fact that i can use php as a procedural language for simple scripts and with OOP for more complex project or within a framework....then i love its standard library and its related documentation at php.net
    1. You can do the procedural thing with Ruby too, most of my non-rails scripts run exactly like that.
    2. Ruby's standard library is just as good and imo better designed than PHP's (or just plain "designed" period).
    3. PHP.net's documentation is fine...if you can read all the comments that explain each function, and then the comments that correct those first comments, and then the comments that correct those second comments, and the comments that tell you to use a new function because the one you're looking at is insecure... the PHP manual was great a few years ago but nowadays it really needs an overhaul (and a comment rating system) to be usable.

  14. #14
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just look at the sorting functions PHP has. Ruby only has sort(), and sort_by(). These two methods can do more than PHP's dozen-or-so functions-with-cryptic-and-inconsistent-names. This is possible because Ruby has blocks.

  15. #15
    SitePoint Enthusiast
    Join Date
    May 2001
    Location
    Kaysville, UT
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Skyblaze View Post
    read my post "conclusions on rails"
    For my experience i found more convenient php for several reasons (in order of importance):
    2) php doesn't hide to me some complexities as rails does and thanks to this i learn more and i understand better all the tecnologies involed in building a web application;

    I kind of thought abstraction was a good thing. PHP itself is an abstraction of C. If you really don't want the complexities of writing applications to be hidden, you should be writing your web apps in x86 assembly.

    While languages or frameworks that make it impossible for you to go down to more basic levels when you need to are bad, abstraction is generally good. For example, I remember writing code in the mid-to-late 90's for dealing with simple input forms that had to directly grab the request variables, match them up to stuff in the model, do basic validation, etc.. Now pretty much every language has libraries that make writing all that code unnecessary.

    Why would you want to continue writing all that code yourself? It is unnecessarily time-consuming, makes it harder to modify your app, and can be error-prone. When you are building an application, whether for the web, desktop, or wherever, you should be as focused on the actual business part of the app as much as possible - not dealing with trivial tasks that can be easily abstracted away.

    In the end though, both Ruby and PHP allow you to be as basic or abstract as you'd like. There are Rails-like libraries for PHP (PHP on Trax, Symfony - to name a few) and you can build web applications in Ruby without using Rails if you really want to.
    Spencer Uresk
    Rails App Hosting
    Cheap Hosting - Directory of hosting plans under $10/month!
    My blog: Tech and Java Articles

  16. #16
    SitePoint Guru Skyblaze's Avatar
    Join Date
    Jul 2005
    Location
    Italy
    Posts
    734
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by suresk View Post
    I kind of thought abstraction was a good thing. PHP itself is an abstraction of C. If you really don't want the complexities of writing applications to be hidden, you should be writing your web apps in x86 assembly.

    While languages or frameworks that make it impossible for you to go down to more basic levels when you need to are bad, abstraction is generally good. For example, I remember writing code in the mid-to-late 90's for dealing with simple input forms that had to directly grab the request variables, match them up to stuff in the model, do basic validation, etc.. Now pretty much every language has libraries that make writing all that code unnecessary.

    Why would you want to continue writing all that code yourself? It is unnecessarily time-consuming, makes it harder to modify your app, and can be error-prone. When you are building an application, whether for the web, desktop, or wherever, you should be as focused on the actual business part of the app as much as possible - not dealing with trivial tasks that can be easily abstracted away.

    In the end though, both Ruby and PHP allow you to be as basic or abstract as you'd like. There are Rails-like libraries for PHP (PHP on Trax, Symfony - to name a few) and you can build web applications in Ruby without using Rails if you really want to.
    The fact is that for me you can't learn a framework such as rails as for example your first web development experience. You will not understand many things such as for example sql, database design, table relationship, ajax, javascript etc. You should first learn all this thing by hand and in general i fell i have much control when i use directely databases, sql, ajax, javascript etc.

  17. #17
    SitePoint Enthusiast
    Join Date
    May 2001
    Location
    Kaysville, UT
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Skyblaze View Post
    The fact is that for me you can't learn a framework such as rails as for example your first web development experience. You will not understand many things such as for example sql, database design, table relationship, ajax, javascript etc. .
    I disagree. PHP doesn't enforce or even encourage good sql, table design, etc.. Some of the most poorly designed SQL and table design I have seen has been in PHP apps. There isn't really any benefit to being at a less abstracted level in that case. IMO, Rails encourages good practices like using a domain model, using ORM, using an MVC architecture, doing validation, etc..

    To be a good developer, yes, you will have to learn the things you mentioned (and more), but that doesn't mean you need to learn them all at once or all upfront. With Rails, you can get an app working, and then venture into other skills (ie, sql, javascript, or general data design) as needed.

    You should first learn all this thing by hand and in general i fell i have much control when i use directely databases, sql, ajax, javascript etc
    I still don't understand the need for greater "control" in general. Control = more work. Unless you need the control, why do extra work? Take, for example, ORM tools like ActiveRecord (for Ruby) or Hibernate (for Java). Use of these tools takes control away from you in some ways, but greatly reduces the amount of code you write. If you need to write some custom SQL (say, for performance reasons in some corner cases) both of these tools allow for it, but in most cases you just let them do their job.
    Spencer Uresk
    Rails App Hosting
    Cheap Hosting - Directory of hosting plans under $10/month!
    My blog: Tech and Java Articles


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
  •