SitePoint Sponsor

User Tag List

Results 1 to 16 of 16
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2005
    Location
    Franz Josef Land
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Rails isn't the only one...

    There is more to Ruby than Rails!

    Personally I prefer Nitro architecture over Rails; check it out here: http://www.nitrohq.com/view
    I code therefore I am.

  2. #2
    throw me a bone ... now bonefry's Avatar
    Join Date
    Nov 2004
    Location
    Romania
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why do you prefer Nitro over Rails ?

  3. #3
    Resident Java Hater
    Join Date
    Jul 2004
    Location
    Gerodieville Central, UK
    Posts
    446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wonder how many people have had a stab at Nitro. I've been keen to look at it one day... and I've heard some people speak highly of it. However it hasn't have the media attention and doesn't have the documentation / community supporting it.

    If I remember rightly, it sort of is like the Apache Cocoon architecture of "modal" programming.

    Are there any good examples you could highlight, and any good sites that use it?

  4. #4
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd be interested in specifics too. Is there a Nitro equivalent to the "install Rails and build a cookbook in an hour" tutorial?

    I read a little and found Why might I use Nitro instead of Rails. Filled with a lot of jargon, but a few interesting points managed to seep through. The "Programmatic xhtml rendering" on that page looked particularly interesting to me.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  5. #5
    SitePoint Zealot ChrisCarter's Avatar
    Join Date
    May 2004
    Location
    Wenatchee, WA
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds like they're trying to recreate J2EE with Ruby...no thanks.

  6. #6
    SitePoint Addict Brak's Avatar
    Join Date
    Jul 2004
    Location
    Central Coast, CA
    Posts
    321
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by samsm
    The "Programmatic xhtml rendering" on that page looked particularly interesting to me.

    Just curious, have you had a stab at Ruby's XML builder (that's available in rails). It's pretty much the same thing they're talking about.

    IMO, I would rather die now than convert all of my <p> into &lt;p&gt; Pieces of example code like this scare the hell out of me:

    Code:
      &lt;?xml version="1.0"?&gt;
    
      &lt;!-- example page --&gt;
      &lt;html&gt;
    
      &lt;?r  
        title = 'Example'
        version = params['version']
      ?&gt;
    
      &lt;h1&gt;#{title}&lt;/h1&gt;
    
      &lt;?r if version &gt; 1 ?&gt;
        &lt;b&gt;Version:&lt;/b&gt; #{version}
      &lt;?r  end ?&gt;
    
      &lt;/html&gt;
    It sounds a lot like Nitro is aimed at revamping legacy systems with horrid database schemas and obtuse requirements, rather than starting with new applications.
    Studio Rockstar's Blog - A journey to quitting the dayjob.

  7. #7
    throw me a bone ... now bonefry's Avatar
    Join Date
    Nov 2004
    Location
    Romania
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think the encoding you mention (&lt;&gt; and stuff) is an error in their HTML.
    Nobody in their right mind would edit html or xml like that

    And I don't think it tries to mimic Cocoon from what I see here.
    But rather it is a framework that supports multiple paradigms, as their own page states:
    "Multiparadigm web applications"

    Anything that comes out of Ruby is great, and I also heard good things about Nitro.
    Maybe I will take a closer look when I have the time.

    Maybe JCdev can share with us the advantages of Nitro.

  8. #8
    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 Brak
    Just curious, have you had a stab at Ruby's XML builder (that's available in rails). It's pretty much the same thing they're talking about.
    No, but I'm interested by that too. All on my list.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  9. #9
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by samsm
    No, but I'm interested by that too. All on my list.
    Here's a sample code to output mapping:
    Code:
     xm.instruct!                   # <?xml version="1.0" encoding="UTF-8"?>
      xm.html {                      # <html>
        xm.head {                    #   <head>
          xm.title("History")        #     <title>History</title>
        }                            #   </head>
        xm.body {                    #   <body>
          xm.comment! "HI"           #     <!-- HI -->
          xm.h1("Header")            #     <h1>Header</h1>
          xm.p("paragraph")          #     <p>paragraph</p>
        }                            #   </body>
      }                              # </html>

  10. #10
    SitePoint Zealot ChrisCarter's Avatar
    Join Date
    May 2004
    Location
    Wenatchee, WA
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code snippets like that make me want to weep with delight!

  11. #11
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I understand the mechanics of it, I just haven't tried it and have no sense of whether it pragmatically works better than a template-based approach.

    Any opinions on that point?
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  12. #12
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think normal .rhtml is better for html, but builder is better for xml. This is especially true if there is one designer and one programmer.

  13. #13
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by samsm
    I understand the mechanics of it, I just haven't tried it and have no sense of whether it pragmatically works better than a template-based approach.
    I think it's just a matter of preference and need. For example, if you were building a Ruby class to output XML that wasn't tied to the web for anything in particular (just a general-use class that could go anywhere), then the XML Builder is probably the way to go. Otherwise it's what you're more comfortable with.

  14. #14
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    Yakima WA.
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nitro is a very nice web framework. The documentation is lacking but it lets you start simpler than rails and get as complex as you want. The main difference is in the OR Mapper. Rails has ActiveRecord which creates ruby accessors in your model classes based on the structure of the database table. While Og( the nitro ORM) goes the other way. In Nitro you define the columns in your ruby classes and they are automatically persisted to the db. You don't ever touch SQL unless you want to optimize a query. Kind of like ActiveRecord's migrations, og classes look similar. Og makes it easy to write plain ruby objects and then add persistence later with a few lines of code. Its a fundementaly different way of doing ORM than the way rails does it but each has their advantages. Og is well worth looking into but in the end I prefer rails to nitro. The lack of documentation is my main peeve with nitro. Nitro is a very capable framework though and the ruby programming that makes up the framework is very nice and has a lot to be learned from.

    Cheers-
    -Ezra

  15. #15
    SitePoint Guru silver trophy Luke Redpath's Avatar
    Join Date
    Mar 2003
    Location
    London
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Presumably you could swap out ActiveRecord for Og in a Rails app? Does anybody know how you'd go about this?

  16. #16
    SitePoint Addict Brak's Avatar
    Join Date
    Jul 2004
    Location
    Central Coast, CA
    Posts
    321
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Luke Redpath
    Presumably you could swap out ActiveRecord for Og in a Rails app? Does anybody know how you'd go about this?

    Require og, then base your models off Og's base instead of ActiveRecord::Base.
    Studio Rockstar's Blog - A journey to quitting the dayjob.


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
  •