ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

No kind way to ask this, so. . .

October 17, 2007 12:11am

Subscribe [0]
  • #1 / Oct 17, 2007 12:11am

    gberz3

    31 posts

    Hi All,

    I’m having trouble understanding CodeIgniter’s place in the world.  After viewing the videos and DLing it, I’m still no more convinced.  I have used RoR now for the better part of two years, and, while CodeIgniter is young (granted), it doesn’t come close to the features, or readability of RoR.  And having to think in terms of:

    $this->load->view('my_view')

    is nothing short of mind boggling.  Perhaps CI will surprise me in the future, but the very fact that it uses PHP as its basis seems its first flaw.  Not so much that PHP is incapable, it’s just far less capable by default.  I mean, I can’t think of a single thing that Ruby can do that PHP can’t eventually;  it’s just that PHP involves a great deal more work to do some of the things that are basic in Ruby.

    And that “Create a Blog in 20 minutes”?  Why don’t you guys go have a look at Blog in 15 minutes.  Granted, that’s not a huge difference, but once you look at what’s involved you’ll appreciate it more.

    One thing I will say in defense of PHP is that at this point is that it does seem by default (meaning ‘without any tweaks or cheats’) to cause a great deal less server load than RoR.  Even so, I still find it hard to answer the “why"s of CI.

    As I said, there’s no kind way to bring this up.  Hopefully some of the community and/or devs can enlighten us.

  • #2 / Oct 17, 2007 12:27am

    sophistry

    906 posts

    i believe in this forum it *might* be your job to enlighten us about ruby and why it’s so comfortable for you. you’re not preaching to the choir here.

    i’ve read your post a few times and while you sound as if you have some experience with ruby, i’m not sure i actually learned anything about ruby or it’s specific strengths in comparison to PHP from your post (other than the billy goat gruff stuff).

    do go on.

  • #3 / Oct 17, 2007 1:12am

    CI Lee

    343 posts

    A lot less “Whoops” in our tutorials….


    In all seriousness there many reasons why I have chosen CI over Ruby and the main one is I can deploy it on any server for my client without wasting hours instructing them on what I am in need of to launch their site.

    -Lee

  • #4 / Oct 17, 2007 7:43am

    gberz3

    31 posts

    i believe in this forum it *might* be your job to enlighten us about ruby and why it’s so comfortable for you. you’re not preaching to the choir here.
    ...
    do go on.

    First and foremost, there’s really no way for me to help you appreciate the 100% of the beauty of Ruby and really do justice to it.  For that I’d recommend reading the pickaxe.  That said, Ruby has a lot of amazing features.  For instance, everything in Ruby, is an object.  I can say things like:

    3.times { puts "Hello!" }

    . . .instead of

    for ($num=1; $num <= 3; $num++ ) 
    { 
    print  "Hello"; 
    }

    Also, ruby has namespaces; PHP5 still doesn’t.  I hear PHP6 is supposed to be getting them, but still. . .

    In the end, obviously no language is a true “end all”, and if *anyone* feels that way, then I pity their development career.  In this case, however, I must say that RoR (using Ruby as its foundation) is far superior to CodeIgniter (with PHP as its foundation).

  • #5 / Oct 17, 2007 7:48am

    gberz3

    31 posts

    A lot less “Whoops” in our tutorials….


    In all seriousness there many reasons why I have chosen CI over Ruby and the main one is I can deploy it on any server for my client without wasting hours instructing them on what I am in need of to launch their site.

    -Lee


    YES!  I’ll give you the “whoops!”  That was annoying, no?  Haha!  While I understand your deployment concerns, that’s not something I fear.  Especially after the client sees the results in 3/4 to 1/2 the time—with cleaner code (subject to interpretation), cleaner URLS (RESTful even), and all the bells and whistles.

  • #6 / Oct 17, 2007 11:44am

    Michael Wales

    2070 posts

    echo repeater('Hello', 3);

    I’m pretty proficient in Ruby, and I used RoR for a year. Although RoR is great for prototyping and getting an application out the door, it’s deployment process is a pain in the ass. After that, scaling is a massive undertaking - one that has been documented numerous times by the folks at Twitter and CDBaby.

    In the end, obviously no language is a true “end all”, and if *anyone* feels that way, then I pity their development career.  In this case, however, I must say that RoR (using Ruby as its foundation) is far superior to CodeIgniter (with PHP as its foundation).

    Opinion is not fact. Personally, I hate all of the whizz-bang magic RoR offers. Most RoR developers have never pushed a product out the door that has proved marginally successful and they would have no idea where to turn once they really needed to start scaling to handle a decent traffic level. The RoR community’s fix-action (to throw more mongrel servers at it) is flawed in itself.

    The only way to truly deploy a scalable RoR application is to get into the core libraries and do some massive rewriting - something very few RoR developers will ever do.

  • #7 / Oct 17, 2007 2:25pm

    thurting

    213 posts

    So use Ruby and don’t use PHP.  I don’t think anyone needs to justify the use of PHP to you.  The technology is proven and has a huge community supporting it.  It has and continues to push the web in new directions.  In the end it’s your preference.  Enjoy your choice.

  • #8 / Oct 17, 2007 3:55pm

    Neovive

    57 posts

    The RoR vs. PHP debate seems to be a never-ending.  I agree that the Ruby language is quite elegant, but achieving that elegance requires a relatively high learning curve.  Since PHP is a C-based language, most traditionally-trained programmers do not have to think twice about writing various constructs such as a simple for loop.  Although “3.times” reads nicely, very little is gained for the average user—it all gets converted to 0’s and 1’s anyway.  Whereas, the cost of deployment and scalability concerns are real issues for everyone.

    From what I’ve read about RoR, it seems very comprehensive and well designed.  However, the same could be said of CodeIgniter, Zend Framework, CakePHP, Django, Spring, etc.  Each framework addresses a specific need and all are free to use (including RoR).  So choose what works for you and your project.  That’s the beauty of open source.

  • #9 / Oct 17, 2007 4:37pm

    gberz3

    31 posts

    Opinion is not fact.

    Which is exactly what I was saying in that no programming language can truly be called an “end all”.  Different ones have different capabilities.  I was simply saying that in this case, for this particular set of requirements, I am curious as to why so much effort was placed behind a PHP solution instead of using RoR.  Learning curve aside, I am simply looking for true pros and cons.  Not “because I like it”.  I believe PHP is an extremely capable language, and as I said, I frankly can’t think of anything Ruby can do that it can’t;  it just takes much more effort. . .hence, my severe curiosity.

    Personally, I hate all of the whizz-bang magic RoR offers. Most RoR developers have never pushed a product out the door that has proved marginally successful and they would have no idea where to turn once they really needed to start scaling to handle a decent traffic level. The RoR community’s fix-action (to throw more mongrel servers at it) is flawed in itself.
    The only way to truly deploy a scalable RoR application is to get into the core libraries and do some massive rewriting - something very few RoR developers will ever do.


    Actually, that’s untrue.  There are a great deal of highly scalable, and “better-than-marginally” successful applications out there.  You have but to go to the RoR site and see direct links to the various “successful” apps.  As for the server issue, that is also untrue, there are many solutions (other than throwing mongrel servers at RoR) for speeding things up; and ones that scale easily.  You are correct, however, in stating that (at least originally) they are a pain to set up.

    . . .but again, preference aside, what are the functional/practical benefits of CI as opposed to say RoR or even Django?

  • #10 / Oct 17, 2007 4:44pm

    gberz3

    31 posts

    So use Ruby and don’t use PHP.  I don’t think anyone needs to justify the use of PHP to you.  The technology is proven and has a huge community supporting it.  It has and continues to push the web in new directions.  In the end it’s your preference.  Enjoy your choice.

    Actually I do use PHP.  Quite extensively.  From my frame of reference, and in my programming paradigm it absolutely has it’s place.  However, in this case, as I’ve said, I’m curious as to why some tried to make a fork out of a knife, for lack of a better analogy.  Again, this is from my frame of reference.  You’ll have to excuse me, but the only way I know to get the input of others is asking them.  I’m not asking you to *defend* anything, only to explain what I may be missing in this case.

    And just a side note, the fact that a lot of people do something in no way justifies it.  Aside from attracting attention, all it means is that a lot of people do it.  That said, of the 6+ billion people on this planet, I’m pretty sure about 5,999,999,998 (give or take) of those them are smarter than me in many areas.  So, I figured I’d ask what the hubbub is about.  Like I said, given my FoR, “there’s no kind way to ask this. . .” 😉

  • #11 / Oct 17, 2007 5:11pm

    sophistry

    906 posts

    Ruby sucks for your application - you should have chosen a better tool (even though I know nothing about your particular application) - and you are stupid for using it.

    Do I need to elaborate or did I succesfully mirror your “argument” replacing PHP with Ruby?

    You seem like an intelligent person… why go on carping; set up some tests between the two and post your report, give us some real life examples (with details) about how Ruby was far superior, tell us success stories (not just claims) about why PHP is going to rot like the stinking pus sore that it is and why Ruby will rise ascendant to the throne as the best programming language of 2005.

    C’mon, at this point, this discussion is only notable because you chose to open it here on the CI forums.

  • #12 / Oct 17, 2007 5:32pm

    gberz3

    31 posts

    Ruby sucks for your application - you should have chosen a better tool (even though I know nothing about your particular application) - and you are stupid for using it.

    Do I need to elaborate or did I succesfully mirror your “argument” replacing PHP with Ruby?

    Wow. . .I’m not sure where to begin with that   *RESET*. . .

    I’m not sure if I need to be more PC or what.  I’m not asking for a defense.  I’m really sorry I caught you in such a sensitive state.  I am *ABSOLUTELY*, *GENUINELY*, *100%* interested in why PHP was chosen for this task.  I mean, you guys didn’t go building one for C, or Ada, or LISP, so I’m guessing there is something that PHP has over other languages that made you choose it.  I personally *believe* RoR is better;  I make no apologies for that.  I want to know why you *believe* PHP to be worth this effort.  And I don’t mean that derogatorily.  There has really been a great deal of *effort* involved in getting this.  Someone believed it was worth it.  Why?  I’m experienced with PHP, not necessarily CI.  I mean, should I go ask on a non CI board why people choose CI, or will you CIers simply help me out?

    I know what my opinion is, I’m interested in yours.

  • #13 / Oct 17, 2007 5:57pm

    pickledegg2

    157 posts

    I chose CI because it makes your manhood a little longer every time you use it. Bet you didn’t know that did you? Also, I heard that using Ruby makes your hair curl…

  • #14 / Oct 17, 2007 6:00pm

    Neovive

    57 posts

    I was simply saying that in this case, for this particular set of requirements, I am curious as to why so much effort was placed behind a PHP solution instead of using RoR.

    Practically speaking, CodeIgniter came into existence by leveraging source code and methodologies that previously existed in the ExpressionEngine product.  In my opinion, CodeIgniter’s value is in its simplicity when compared to other PHP frameworks.  For PHP coders, it also provides a nice structure (but not too much) and an excellent set of libraries that can reused on many projects.  Just as Rails makes it much easier to code web applications pages in Ruby, CodeIgniter does the same for PHP.  If PHP is part of your development tookit, then CodeIgniter is a nice addition.

    Would you consider building a web application in Ruby without using the Rails framework?

  • #15 / Oct 17, 2007 6:07pm

    stevepaperjam

    34 posts

    PHP = generally low barrier to entry, widely used, and therefore lots of community, plenty of documentation/books/tutorials, easy to get something up and running quick. It’s been around a while, and a lot of the community (me included) may have been using (and investing serious time) in PHP for a while before CI (...and RoR) was born. For me it wasn’t so much choosing CI over RoR as CI over CakePHP or Symfony.

    If you’re really keen on mixing Rails with PHP there are other PHP frameworks that follow the RoR model more closely, but you might miss out on the excellent documentation that I personally found so beneficial when first learning CI. Alternatively, there’s nothing stopping you from taking inspiration and writing your own - but why bother when there are so many PHP frameworks out there?

    I thought about learning RoR: got half way through installing it, had some difficulty and then thought, actually, I could just spend the time getting on with the job in PHP. Bit limp I know, but then there’s only so many hours in the day. I’m not averse to trying it again - if anything to improve my coding skills generally.

    But that’s me, I’m intrigued to know why you would want to persevere with CI if RoR sorts you out.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases