Ruby MVC

Hi Everybody,

I’m working on a data mining application, and MVC seems like the right
approach. However, I’m having trouble finding a good MVC framework
outside of Rails. I’m not particularly interested in running a web
server to do data mining.

Even if there isn’t a suitable MVC framework, I’d like my models to be
completely database agnostic. Is there a library comparable to Perl’s
DBIx::Class? I do NOT want to have to implement something like that.
ActiveRecord seems like it might work for my needs, but I’m not sure
if it’s intimately tied to Rails.

Thanks!
Alex

From: [email protected] [mailto:[email protected]]
Sent: Wednesday, June 20, 2007 3:20 AM

ActiveRecord seems like it might work for my needs, but I’m not sure
if it’s intimately tied to Rails.

I’ve never worked with DBIx::Class, but its documents says it’s an ORM
(object-relational mapper). There are several options available for Ruby
(in
fact, google “orm ruby” would show up the way). ActiveRecord plays good
with
or without Rails, but sometimes may seem a bit overkill.

Personally I like Sequel[1], as a much lighter solution, though not as
well-documented and slightly buggy. For using ActiveRecord stand-alone,
you’ll need AR itself[2] and ActiveSupport[3] libraries.

As for MVC framework, I suppose, the question would be in V (View)
letter.
What “View engine” do you want to use? Web, GUI, TUI (text-based user
interface), command-line, or something abstract? The framework selection
should depend on this, though I can’t recall any non-web MVC framework
(I
has one concerned Windows GUI, but it’s still far from release).

Hope this slightly helps.

V.

1: http://sequel.rubyforge.org/
2: http://rubyforge.org/projects/activerecord/
3: http://rubyforge.org/projects/activesupport/

On Jun 19, 5:38 pm, “Victor “Zverok” Shepelev” >

As for MVC framework, I suppose, the question would be in V (View) letter.
What “View engine” do you want to use? Web, GUI, TUI (text-based user
interface), command-line, or something abstract? The framework selection
should depend on this, though I can’t recall any non-web MVC framework (I
has one concerned Windows GUI, but it’s still far from release).

I’m not really sure what kind of Views I’d like just yet. I’m looking
into using RubyCocoa for an OS X GUI, but other than that, I’m not
sure.

On the other hand, I’m being careful about defining my APIs between
components, so I can be flexible.

Hope this slightly helps.

Yes! Thank you.
Alex

On Jun 19, 6:15 pm, [email protected] wrote:

ActiveRecord seems like it might work for my needs, but I’m not sure
if it’s intimately tied to Rails.

Thanks!
Alex

I don’t know of any MVC frameworks in Ruby that are not for Web work
but I can tell you of a really good one: Merb [1]. It is basically a
very lightweight Rails that uses Mongrel as the web server. And even
if you don’t end up doing a web front end Merb could work as a REST
API backend to any GUI/Console/whatever frontend. BTW, Merb uses AR
and I even heard of people using DataMapper [2] (or trying to). You
can use any Ruby ORM in Merb or Rails for that matter.

Hope it helps,

Adrian M.

[1] http://merb.devjavu.com/
[2] http://rubyforge.org/projects/datamapper

[email protected] wrote:

Hi Everybody,

I’m working on a data mining application, and MVC seems like the right
approach. However, I’m having trouble finding a good MVC framework
outside of Rails. I’m not particularly interested in running a web
server to do data mining.

Well, Nitro is an MVC framework, but a Web MVC framework. (Nitro is
quite good for non-MVC as well; it gets out of your way.)

The M part is Og (Object graph) which generates the database from your
model code; it’s fairly transparent.

See http://www.nitroproject.com

You can use Og outside of Nitro. Since the ORM code is your model code,
hooking into conventional Ruby MVC-style code should be straightforward.


James B.

“You harmonize; then you customize.”

  • Wilson Pickett

James B. wrote:

As an aside, while the concepts of Og are quite exciting, about the only
documentation I’ve been able to find is a couple of discussions in Hal
Fulton’s “The Ruby Way, Second Edition.” I’ve gone to their web site and
they are certainly aware that it needs to be done, but busy users with
problems to solve aren’t going to document their stuff for them.

Is there a market for an Og/Nitro book, or is the popularity of Rails so
overwhelming that nobody will take the risk?

M. Edward (Ed) Borasky wrote:

As an aside, while the concepts of Og are quite exciting, about the only
documentation I’ve been able to find is a couple of discussions in Hal
Fulton’s “The Ruby Way, Second Edition.”

Yes, I know. :slight_smile:

And, sadly, it’s falling out of date. :frowning:

I’ve gone to their web site and
they are certainly aware that it needs to be done, but busy users with
problems to solve aren’t going to document their stuff for them.

True. Recent discussion on the nitro list suggests this will be getting
more attention. The issue for me has been that, even when trying to
help provide docs, the code has been evolving out from under them. I
think the changes have been for the better, but it makes it hard to stay
on top of.

Is there a market for an Og/Nitro book, or is the popularity of Rails so
overwhelming that nobody will take the risk?

I’ve heard some interest from publishers, at least in the idea of the
broader topic of Web development in Ruby outside of a single, fairly
focused, framework. There is considerable variety in the numerous Ruby
Web tools.

It may be chicken and egg; more documentation on Nitro would drive more
usage, driving more demand for documentation.


James B.

“I must create a system, or be enslaved by another man’s;
I will not reason and compare; my business is to create.”

  • William Blake

Reid T. wrote:

The nitro/og mailing list and irc channel are quite active and
responsive with regard to questions.

Yes. One upside to its relative obscurity is that you can post to the
mailing list and actually get answers.


James B.

http://www.ruby-doc.org - Ruby Help & Documentation
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys

James B. wrote:

It may be chicken and egg; more documentation on Nitro would drive more
usage, driving more demand for documentation.

Actually, I am on the Nitro mailing list (and I’m not on the Rails list)
;). But Og/Nitro appeal to me because the application I have in mind is
starting from a bunch of compressed CSV files and building objects and a
database from them. It’s not a conventional business application, and my
thinking is, or at least has been, ground up from the data to an MVC
application, rather than top down from business requirements to an
application.

So I am planning to start with a “bake-off” between Og and ActiveRecord
and see where that leads me. Are there other Ruby ORM tools I should be
looking at as well? The target database is PostgreSQL running on Linux
(CentOS 5 and whatever web servers and databases it has).

On 6/21/07, M. Edward (Ed) Borasky [email protected] wrote:

And, sadly, it’s falling out of date. :frowning:
on top of.

application.

So I am planning to start with a “bake-off” between Og and ActiveRecord
and see where that leads me. Are there other Ruby ORM tools I should be
looking at as well? The target database is PostgreSQL running on Linux
(CentOS 5 and whatever web servers and databases it has).

Maybe Kansas? Uses DBI + DBD::pg for the PostgreSQL access.

http://enigo.com/projects/kansas/index.html

-A

On Wed, 2007-06-20 at 22:45 +0900, M. Edward (Ed) Borasky wrote:

quite good for non-MVC as well; it gets out of your way.)

As an aside, while the concepts of Og are quite exciting, about the only
documentation I’ve been able to find is a couple of discussions in Hal
Fulton’s “The Ruby Way, Second Edition.” I’ve gone to their web site and
they are certainly aware that it needs to be done, but busy users with
problems to solve aren’t going to document their stuff for them.

Is there a market for an Og/Nitro book, or is the popularity of Rails so
overwhelming that nobody will take the risk?

The nitro/og mailing list and irc channel are quite active and
responsive with regard to questions.

On Thu, 2007-06-21 at 23:04 +0900, M. Edward (Ed) Borasky wrote:

and see where that leads me. Are there other Ruby ORM tools I should be
looking at as well? The target database is PostgreSQL running on Linux
(CentOS 5 and whatever web servers and databases it has).

I’ve used Og a good bit loading data from formatted flat files into
PostgreSQL; it works well.

If you’re not already doing so, you might want to consider using the
darc’s repository version.

Maybe Kansas? Uses DBI + DBD::pg for the PostgreSQL access.

http://enigo.com/projects/kansas/index.html

Feel free to give me a shout if you have questions or issues.

Kirk H.

Alex LeDonne wrote:

Yes, I know. :slight_smile:
more attention. The issue for me has been that, even when trying to

;). But Og/Nitro appeal to me because the application I have in mind is

Maybe Kansas? Uses DBI + DBD::pg for the PostgreSQL access.

http://enigo.com/projects/kansas/index.html

-A

Thanks!! I took a brief pass at the tutorial. It looks like a three-way
bake-off now. :wink:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs