Slashdot Mirror


Part 2 of Ruby on Rails Tutorial Online

An anonymous reader writes "Curt Hibbs has released Part 2 of his tutorial Rolling with Ruby on Rails to the O'Reilly ONLamp site. The first part was published in January. Topics covered are database transactions, callbacks, unit testing and caching." From the article: "In Rolling with Ruby on Rails, I barely scratched the surface of what you can do with Ruby on Rails. I didn't talk about data validation or database transactions, and I did not mention callbacks, unit testing, or caching. There was hardly a mention of the many helpers that Rails includes to make your life easier. I can't really do justice to all of these topics in the space of this article, but I will go into details on some of them and present a brief overview of the rest, with links to more detailed information."

44 of 187 comments (clear)

  1. Python Version of RoR by grayrest · · Score: 4, Interesting

    http://subway.python-hosting.com

    It's rough, but it's coming along.

    1. Re:Python Version of RoR by jellomizer · · Score: 3, Insightful

      It is always good to have two closly competing languages. Ruby and Python are so close in design it helps keep both on their toes. Some people consider Python and Perl to be competive but the language syntax is much more different, and often lead to more of a holy war debate on what is better. While I don't find this type of argument for Python vs. Ruby But I could just be looking in the wrong spots.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    2. Re:Python Version of RoR by Colonel+Panic · · Score: 4, Insightful

      Wouldn't that be PoR?

      Seriously, though, I really think that Ruby the language is part of what makes RoR so great. I'm not sure you can do a lot of the same stuff in Python as you can with Ruby. Being able to define natural looking domain-specific languages using Ruby's code blocks seems like something that would be very difficult in Python. But as they say, imiation is the sincerest form of flattery...

    3. Re:Python Version of RoR by Colonel+Panic · · Score: 3, Funny

      Sorry...
      That should be 'immolation is the sincerest form of flattery'.

    4. Re:Python Version of RoR by Simon · · Score: 3, Insightful
      Being able to define natural looking domain-specific languages using Ruby's code blocks seems like something that would be very difficult in Python.

      Do you any examples of this in action? I mean a non-trivial example showing a Ruby block based solution for a problem that is clearly better than the more tradional (messy?) solution.

      Impress me. :-)

      --
      Simon

    5. Re:Python Version of RoR by Paradox · · Score: 4, Informative
      I can't impress you, sorry. But I can say that Ruby blocks are a powerful tool that are very flexible and useful. Ruby iterators are the showcase of this tool, and they're something you use every day in ruby. For example:
      ary = [1,2,3,4,5] # Example Array
      ary.each do |val| # Begin a block
      puts val.to_s + " was here!"
      end
      Blocks can be used inline as above, or turned into true closure-bearing functors like so:
      my_block = lambda { |x| puts x.to_s was here }
      my_block.call "Kilroy"
      ary = [1,2,3,4,5]
      ary.each &my_block
      You can write higher order functions that accept lexical blocks trivially. For example:
      def my_hof( &block )
      yield # Calls the associated block within scope
      block.call #Calls the associated block as a function
      end
      Also, ruby's blocks are used to do neat things like ensure things happen at the end of an operation. File I/O is the classic example. Check out how Ruby's library ensures your file closes:
      File.open( "somefile.txt", "w" ) do |handle|
      handle.puts "This is text in the file."
      end # File is ensured to be closed now
      This is just a small sample of what Ruby's standard lib does with blocks. They're really quite useful. They're like Lisp's lambdas but with a cleaner syntax when used inline.
      --
      Slashdot. It's Not For Common Sense
    6. Re:Python Version of RoR by thraxil · · Score: 2, Informative

      list comprehensions are fun.

      off the top of my head,

      [1,3,7].collect { |x| x + 1}

      would be written in python as:

      [x + 1 for x in [1,3,7]]

      (which i personally find much more readable) and

      [3,4,12,76,2].find { |x| x > 4 and x.modulo(2) == 0 }

      would be written in python as:

      [x for x in [3,4,12,76,2] if x > 4 and (x % 2) == 0][0]

      and the find_all version just wouldn't have '[0]' at the end.

      and the weird sort would be something like:

      [3,4,2,6,7,8,1,12,5].sort(lambda x,y: ((x >= 5 and y >= 5) and cmp(y,x)) or (cmp(x,y)))

      except that python's sort is in-place, so you'd really want to have that list in a variable if you intended to do anything with the results:

      l = [3,4,...]
      l.sort(lambda:...)

      most python programmers would shun that use of lambda though and do things in a slightly longer but more obvious fashion.

      --
      Smokey the Bear says, "Strip mining prevents forest fires!"
  2. What is this? by Lovesquid · · Score: 3, Insightful

    Hmmm... nowhere in the summary does it tell what "Ruby on Rails" is, or why I should care about it, and with the server getting hammered, I can't RTFA to find out. How about including a 1-sentence summary of what the topic of any story IS before posting it, for those of us who don't already know everything there is to know about everything.

    1. Re:What is this? by JamesOfTheDesert · · Score: 5, Insightful
      It's a collection of Java Best Practices rewritten in a 'cool' geeky language. Nothing new....

      Quite true. For example, Java Best Practice #1 is to avoid using long, detailed XML files for configuration, and instead use the programming languge itself, which is dynamically loaded and interpreted when needed.

      Another Java Best Practice is to let the framework write the tedious boilerplate code for you. For example, in Struts, you just run

      % struts myAppName
      and you're halfway done writing your Web application.

      Here's one more Java Best Practice: Avoid expensive , complex application server software, and do rapid development using the Web server that is built into the standard library. Then deploy to the Web server of choice with no code changes or quirky vendor-specific API hacks.

      --

      Java is the blue pill
      Choose the red pill
    2. Re:What is this? by coldtone · · Score: 3, Insightful

      Halfway done?! You must be kidding!

      Being a java web developer, and using struts to build 3 different applications I have to say that enough is enough.

      Struts is a very simple web framework, which will do several things for you.
      Dramatically increase the size of your app.
      Limit the functionality of your app.
      Makes the code hard to read and follow. Just about everything runs though the struts config file.

      The only benefit I see with struts is that is provides some clean definitions for code. (A place for display, a place for validation, a place for the work to be done) And gives you some tags to help with internationalization. (Just help mind you, if you need to have a totally different layout for a different language then, well you're screwed.)

      I would only use struts again if I was writing an application that was to be localized and translated, and was working on a large team. Otherwise a well written set of JSP's will get the job done faster and will be easier to read.

    3. Re:What is this? by swimmar132 · · Score: 2, Informative

      RoR replaces maintaining long detailed XML configuration files with maintaing long, detailed database specific sql files.

      No, RoR's models don't come from maintained SQL files. I believe it uses reflection to dynamically build the models.

      Using RoR, you create a table and let Ruby dynamically determine a bunch of information about relationships and data types and then you access various properties of this data.

      Yes.

      You are also forced to use RoR's Object model (You have to extend ActiveRecord, correct?)

      No. You can use the other components of Rails (ActionPack and the Web Service portion) without using ActiveRecord.

      Using something like Hibernate, you write an object, then do something do describe it (Java Annotations, XDoclet markup, tedious XML configuration file) and It can create the DDL/alter tables on the fly for you, and you are not forced to extend any object.

      That's probably true, I haven't worked with Hibernate. But with Rails, you make a change to the DB table, and the model instantly reflects that change.

    4. Re:What is this? by arkanes · · Score: 2, Informative
      My point is merely that the database schema does not magically appear from nowhere.

      It is magically pulled from the database. Lots of existing OR mapping tools can do this, including Java ones, but lacking Ruby's dynamic nature it's done as an extra pre-compilation step. Rails can do it at runtime.

  3. Any interesting projects? by elh_inny · · Score: 4, Interesting

    Has anyone actually done some interesting stuff that now works in a productive environment?

    1. Re:Any interesting projects? by Nik13 · · Score: 2, Informative

      Last time when Pt1 of the the article came out, in the discussions on /. some sites were pointed out (seemed like decent sites too).

      I've been meaning to get around to add RoR to my apache (XAMPP) setup to try it out. Most of what I do at work is ASP/ASP.Net and I've been looking for something else (not to fully replace them, but perhaps as a complement). I'm not big on php, but it has it's uses and followers (I use it on some small websities with cheap hosting). J2EE isn't my definition of fun (although it's robust and all).

      From what I had seen, RoR seemed pretty promising (and it keeps getting better they say), but I'll have to dig deeper to see it's full power. The only problem I can see now is finding some decent hosting for that, preferably cheap (RoR *with postgresql* to make things worse).

      --
      ///<sig />
    2. Re:Any interesting projects? by elmartinos · · Score: 5, Informative
      Shure! Even though Ruby on Rails is really very young, there are a few commercial sites that use it already. Here are a few links: Although, the first 3 links are somewhat related.
  4. Sounds exciting... by szlevente · · Score: 4, Interesting

    "A Rails web application can run under virtually any web server"
    Now that really made me curious. Is that really true, tried, and tested? If so, we need another bunch of tutorials about how to use Rails under Tomcat, Apache, etc. There is no way this framework will replace existing Java frameworks, but using it for prototyping is promising.

    1. Re:Sounds exciting... by zimba-tm · · Score: 3, Informative

      Some answers for those who are lazy

      == ROR runs and was tested under :
      Apache + CGI
      Apache + FCGI
      Apache + mod_ruby
      Lighttpd + FCGI
      WebRick (ruby server)

      OS : Linux / Window / OSX / *BSD

      == Real-life examples :
      www.basecamphq.com
      www.tadalist.com
      www.43thi ngs.com
      www.snowdevil.ca
      www.bellybutton.de

    2. Re:Sounds exciting... by rubycodez · · Score: 5, Informative

      No way this framework will replace existing java frameworks

      There is actually a chance it may become a mainstream way of building an enterprise framework. There is a very cool new bytecode Ruby virtual machine and just-in-time compiler (YARV), and the next generation of Ruby, Ruby 2, will support native OS threading. Unlike Java, the source for Ruby is and will be completely open & transparent. Ruby can run on platforms where java can't, like BeOS and MS-DOS.

    3. Re:Sounds exciting... by drew · · Score: 3, Funny

      yeah, 'cause BeOS and MS-DOS are crucial platforms to support when you're developing an enterprise framework.

      --
      If I don't put anything here, will anyone recognize me anymore?
  5. Rails and other Rails tutorials by teidou · · Score: 5, Informative

    To explain Ruby on Rails, I could say it is a highly integrated model-view-controller type web application framework. That would be like saying a Ferrari is a 4 wheeled internal combustion vehicle: true, but misses the point.

    For more info, see RubyOnRails.com. An good alternative tutorial is at http://rails.homelinux.org/.

    There are even better introductory materials coming. Dave Thomas (of Pragmatic Programmers) is working on a Rails book, chapters are being reviewed presently.

    Rails is powerful an flexible. More importnatly, it's a lot of fun. If you are a programmer who want to enjoy web-based application development, please do take a look at Rails.

    1. Re:Rails and other Rails tutorials by pamri · · Score: 3, Informative

      Another great resource is the Ruby on rails weblog which has links to more tutorials, job postings about rails, updates, etc., There's also an updated video tutorial on building a weblog.

  6. One thing has changed... by WWWWolf · · Score: 4, Informative

    When the part one was published, I had severe problems getting Rails to work in Debian. There was a lot of really odd tools that needed to be installed and all that. Rails web page had tons of Ruby packages that I was pretty sure I didn't need...

    But one thing has changed since then: Rails is now in Debian unstable!

    1. Re:One thing has changed... by pamri · · Score: 2, Informative

      Actually, rails/any ruby library/app/whatever is quite easy to install if it is available on ruby gems and you have installed ruby gems. ruby gems is sort of like apt for ruby. Once you install gems, to install rails, all you have to do is, gem install rails and gem uninstall rails to uninstall rails. Although you are unlikely to need it. :-D

    2. Re:One thing has changed... by Tobias+Luetke · · Score: 4, Informative

      Please don't make this sound like an rails or ruby issue. Debian really blew it on packaging ruby. Most of the system related problems which come up in #rubyonrails are related to debian linux installations.

      How did they come up with the brilliant idea to split the standard library into 34 different packages? I just can't see how something moronic like this can even get started considering that a standard library is all about raising the status quo of the language by providing some shoulders to stand on so people can reach for higher goals.

      Keep in mind that ruby has no dependencies at all. All dependencies are optional and the libraries using them (tk,x11, readline) fail gracefully with exceptions when the parts are not installed. Not so if the entire library is missing, this will cause a runtime exception with cryptic error message which rails will never be able to handle. Also ruby is tiny the entire package is 3mb!

      I heard they are talking about improving the situation by adding a "virtual package" for ruby which contains all 34 seperate packages

      Future in Debian terminology is traditionally not soon and thats a fix feeble fix considering all they need to do is to put all 3mb of ruby in one package

      Anyways the point is fairly moot now since debian doesn't have ruby 1.8.2 anyways which is required for the latest rails

      Luckily its easy to install ruby by hand. And I heard gentoo and freebsd install pretty easily too...

    3. Re:One thing has changed... by cortana · · Score: 2, Informative

      $ cat /var/lib/apt/lists/ftp.uk.debian.org_debian_dists_ sarge_main_binary-i386_Packages | grep-dctrl -n --field=Package ruby --show=Size

      Summing the output, yeilds 31806976 bytes or 30 MB.

      $ aptitude show rails
      Package: rails ...
      Depends: ruby (> 1.8), ruby ( 0.10.7),
      libyaml-ruby (> 1.8.2), rdoc (> 1.8.2), libtest-unit-ruby (> 1.8.2),
      libdrb-ruby1.8, libsoap-ruby1.8, libxmlrpc-ruby (> 1.8)
      Recommends: libwebrick-ruby1.8, irb (> 1.8)
      Suggests: libapache-mod-ruby
      Description: MVC ruby based framework geared for web application development ...

      If you see a dependancy missing from that list, please file a bug.

  7. ROR rocks! by Pfhreakaz0id · · Score: 5, Interesting

    As a guy who has written db-driven web apps in ASP, asp.net ( alittle), perl CGI, plain JSP/Servlet and j2ee app server with EJB's (both with and without a persistence framerwork/Object-relational bridge), I can tell you ROR is my favorite. I've only been using it for two weeks on a part-time project. It's ... beautiful. I can't think of any way to describe it. It. Just. Works.

    And ruby is a really nice scripting language. You should check it out.

    1. Re:ROR rocks! by pepicek · · Score: 3, Interesting

      The best way to describe ruby and rails for me it's that you are writting programs for you to understand them, not for computer. It's really changing the way you think when you are programing. You have time to focus on bussiness problem rather than computer's. Even if you have Mac OSX and really love it :-).

  8. Agile Web Development With Rails by Ridgelift · · Score: 4, Informative

    Dave Thomas' new book "Agile Web Development With Rails" is due out in July. It's really, really good so far (I'm one of the lucky ones who is helping review it). My perspective is a person who knows very little about databases, web application development and no previous knowledge of Ruby, the language that Rails is built on.

    One of the big problems with Ruby on Rails is that it is well documented, but a lot of it is API's and reference documentation. Dave's new book has an excellent tutorial which is the best thing I've seen written so far about RoR for newbies, and promises to go into the depth and detail similar to his Pickaxe book.

    If you've previously looked at RoR and were disillusioned because you just weren't "getting it " or didn't want to slug through the technical documentation, I encourage you to keep an open mind and wait until Dave's book is released. I'm finally getting over the hump with RoR and I now see what all the fervour is about.

    (Oh, don't ask me to post or send copies of his drafts, 'cause I ain't gonna!)

    1. Re:Agile Web Development With Rails by Ridgelift · · Score: 3, Informative

      Am I the only one concerned that the reviewer for a book on web development using ruby admits he knows next to nothing about web development, databases, or ruby?
      I'm one reviewer amongst 22. I would say all the rest of the reviewers are much further along than I am, including DHH who wrote Rails.

      Dave Thomas is looking to write a book that will help people learn Rails. My big contribution other than grammatical and spelling errors is "Hey Dave, I don't understand this section you say is easy".

      To me, it's smart to let the uninitiated in so he can see if he's reaching part of his target audience: the ignorant :-)

  9. Comparing RoR with Java solutions by MarkWatson · · Score: 4, Interesting

    I have worked through the RoR tutorial and re-implemented a simple admin web app that I originally wrote for a customer using JSPs and Tomcat. I must say that what took me 4 hours to write using JSPs and JDBC took about 30 minutes using RoR.

    A big advantage that Ruby and Python have over Java is that they are dynamic languages that makes it not too difficult to write a database wrapper class that dynamically looks at database/tables meta data and generates access methods on the fly. Java Tails (using XDoclet market tags) can't really compete.

    I really love the full J2EE stack for developing large scalable web applications but I am now looking at alternatives for creating smaller systems much more quickly.

    BTW, I really like RoR's templating scheme: much like JSPs in syntax (JSP non-XML syntax, that is) but do to Ruby's much terser notation for enumerating collections, the the templates tend to look a little cleaner.

    For Python, I really like the light weight CherryPy web application framework. I plan on checking out Python Subway also when I have some time.

    -Mark

    1. Re:Comparing RoR with Java solutions by dDrum · · Score: 4, Interesting

      There is a version of rails in java.
      It's called Trails and it uses spring, hibernate and tapestry.

      Site - http://trails.dev.java.net
      Tutorial - https://trails.dev.java.net/tutorial/"
      Trails in action - https://trails.dev.java.net/media/trails_withnarra tion.mov

      It's still beta but you can try it.

    2. Re:Comparing RoR with Java solutions by jimm · · Score: 2, Informative

      When you watch the "Trails in action" movie be aware that each time he does a redeploy, the ant task takes about 37 seconds. With Rails, it's about one second.

      --
      Transcript show: self sigs atRandom.
    3. Re:Comparing RoR with Java solutions by Paradox · · Score: 2, Interesting

      Compare the Trails video with any of the Rails videos. It's kind of sad really. The trails video does less than what the Rails video does, and it takes much longer, is more complex, and relies on an IDE. Bummer for Java.

      I'm not sure that Java can be used to replicate Rails. It might be possible, but it would probably mean abandoning a lot of existing infrastructure. Ruby does a lot of very clever/strange things, like dynamically adding methods to classes based off database schemas. The best we've seen Java do thus far is do this kind of thing statically via code generation and hints garnered from the source file comments.

      Trails is a neat idea and it does bring some great things to the table when it comes to Rapid Web Application Development, but it isn't fair (for Trails) to compare it to Rails... at least as of yet, anyways.

      --
      Slashdot. It's Not For Common Sense
  10. Rails got me curious about Ruby by MSBob · · Score: 2, Interesting

    The Rails is such a great showcase of Ruby it really got me interested in the langauge itself. In particular looking at their Object Relational mapping tool it's very impressive how easy it is express your mappings with very little effort. Have a look at this example and compare it to a typical set of java classes with Hibernate tags. Then in case of Hibernate you have the extra build steps with Ant to generate the hbm files and so on. Don't get me wrong I like Hibernate and use it every day but Hibernate must operate within Java's syntactic limitations. With Ruby there is so much more flexibility that helps Rails achieve much more simplicity and expresiveness.

    --
    Your pizza just the way you ought to have it.
  11. 34 different packages by metamatic · · Score: 2, Interesting

    Debian does the same thing to Perl, except there are substantially more than 34 packages. I'm not sure what the point is, as Perl has its own package management via the CPAN module. I wish Debian would let Perl do its own package management, like Gentoo does.

    The entire Ruby system isn't 3MB, either, if you're calling those 34 packages the system. The log4r package alone is 1.1MB, libqt-ruby is another 1.3MB, and libxmlparser-ruby is 0.8MB.

    And Debian does have Ruby 1.8.2, I run Debian unstable and I've been using 1.8.2 for a while now.

    --
    GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
  12. This is an amazing technology by badboy_tw2002 · · Score: 2, Informative

    I don't normally write cheerleading testimonials, but its also rare I find something this cool that I want to gush about it.

    The first tutorial (I saw it right here on Slashdot!) got me curious about RoR. I went home and installed it that night. A couple weeks later (total of maybe 10 hours invested) I had completely converted my community website over to rails (from a servlets site), and am launching it fairly soon. The funny thing is, the actual code to drive this thing is really small. No boring, repetative database code, automatic validation, lots of helpful classes (authentication is downloading a new package and running a make script). Things in the tutorial make it look like you're limited to standard naming conventions, but I assure you that you can override everything if you've got an existing database that doesn't match the RoR naming scheme.

    I've found the community very helpful. Hosting is a bit limited now, but I'm getting a textdrive.com account soon to get my new site up and running.

    This is definately worth an install and the 20 minutes it takes to do the tutorial, check it out!

  13. Frameworks closely tied to languages, WHY by Tablizer · · Score: 2, Insightful

    Anyone who wants to post reasons for why I need to learn yet another language?

    Indeed. Why can't somebody make a fairly language-neutral framework? Why are all the UI frameworks so tightly bound to specific languages and why do people accept that?

    Things like data/field dictionaries, screen descriptions, UI widget attributes, and event handling frameworks don't need to be closely tied to specific languages because they are mostly declarative in nature, so why are they in practice?

    It just does not seem very efficient to reinvent the wheel for each and every language. There about 100 languages in popular use. If we reinvent a web/ui/gui framework for each and every one, then we have spent 100 times the effort than need be. (Well, adaptors and sharing for similar langs may make it more like 50.) It would seem wiser to make one standard and do that one really well instead of do it 50 times poorly for each lang. We managed to divorce database usage from being language-specific. Time for UI also.

  14. Shortcomings of Rails by sean23007 · · Score: 3, Insightful

    I considered using Ruby on Rails for a large project I was doing, and found that though it was extremely easy to get started and do simple applications, it fails on more complicated databases. It does everything for you automatically, and you can easily write functions in Ruby that do the work of the database, but this is best only when the database isn't doing a whole lot itself except for holding data.

    My database is in PostgreSQL, and uses a lot of dynamically named tables and schemas, as well as many trigger functions written in pl/pgsql. In order to get RoR to work, I found that I was going to have to edit the framework itself extensively, and would still be hampered by the slowness of Rails, which I found to be unforgivable.

    I ended up having to design my own framework in Python, which can handle the most complicated databases without any more trouble than the simplest. The construction of the pages now takes a little more time than it did in Rails, but pages that used to take over a second to load are now instantaneous.

    That said, I translated a small web app from Rails to my own framework, and the translation took less time than it did to write it in Rails in the first place and ran a lot faster, but that's because the design was done in Rails. I'd say that Rails is really good for prototyping small applications and getting them working really quickly, and then translating them to another framework for production becomes quite simple.

    For non-trivial web applications, Rails has the problem of being optimized for ease of use, not for complete control. Note that I'm not trolling, or saying Rails has no use. Just that I found that it wasn't sufficiently capable for what I was trying to do with it.

    --

    Lack of eloquence does not denote lack of intelligence, though they often coincide.
    1. Re:Shortcomings of Rails by swimmar132 · · Score: 2, Interesting

      The part of Rails that deals with the database and does the ORM is called ActiveRecord. You don't have to use AR with the other components of Rails.

      Also, AR has gone through some extensive changes in the last release, it may better suit your purposes now.

      Keep in mind that it's still a fairly new framework. It will only get better!

    2. Re:Shortcomings of Rails by sean23007 · · Score: 2, Informative

      I don't mean to say that Rails has no uses. It definitely seemed to be wonderful for a certain subset of applications. However, the amount of work it would have taken to rewrite ActiveRecord such that it would be compatible with my database was roughly equivalent to the amount of work it would take to completely implement my own solution. I simply decided to do the latter. Perhaps I should have written an AR replacement that would have been enough for my database, because that certainly would have advanced Rails greatly. If someone else does that, my biggest complaint about Rails simply disappears.

      Bear in mind, however, that it feels really good to implement an entire framework yourself. While developing my application, I feel like DHH must have while he was writing Basecamp. It's a great feeling.

      --

      Lack of eloquence does not denote lack of intelligence, though they often coincide.
    3. Re:Shortcomings of Rails by sean23007 · · Score: 2, Interesting

      Yes, most of the data in the database is held in tables that are dynamically created based on the data entered into the database. This kind of architecture was basically required for the size and speed requirements we were under during the design phase. And before you demonstrate your lack of knowledge on the subject, not only is the database design rated Type 3 Normal, it's been lauded by many people responsible for the design and implementation of the largest databases used in hospitals and other mission-critical fields across the country.

      Your DBA just realized he should read the Postgres manual a few more times.

      --

      Lack of eloquence does not denote lack of intelligence, though they often coincide.
    4. Re:Shortcomings of Rails by arkanes · · Score: 2, Interesting
      I'm going to sound like someone I know and really dislike here, but...

      If you're regularly dynamically creating and nameing tables, that sounds like you're abusing SQL to create trees and other arbitrarily nested hierarchies. Assuming Oracle and it's tree extensions isn't an option, maybe you should reconsider using an RDBMS for a tree-based back end? Or maybe you're doing something totally different, in which case just ignore me.

    5. Re:Shortcomings of Rails by sean23007 · · Score: 2, Interesting

      Basically Oracle isn't an option because we're trying to maximize cost-effectiveness, and thus are sticking with free, open source solutions. We chose Postgresql as the backend, and in a production setting it is competitive with Oracle, in features, stability, and speed. We used pl/pgsql to create the functions and triggers which create the tables. pl/pgsql is a clone of an Oracle language, and can basically be used in Oracle databases to achieve the same functionality.

      The design of the database drew high praise from the inhabitants of the Postgres listhost, and it was their advice that led me to the decision to write my own framework to handle it. The information we got from them says that only the most advanced databases out there are using these techniques this extensively (yet), and most frontends that they've heard of can't handle it.

      Performance-wise, the thing absolutely flies.

      --

      Lack of eloquence does not denote lack of intelligence, though they often coincide.
    6. Re:Shortcomings of Rails by ErikZ · · Score: 2, Interesting

      Considering how many eyebrows you're raising, maybe it would be a good idea to write up an article on it?

      Unless you enjoy having to explain yourself over and over. :)

      --
      Democrats or Republicans. They are both taking us to the same place and they are not afraid of us anymore.