IronRuby (Without MVC ) and ActiveRecord... Is it Possible

Hi,

I wa just reading a book called " Beginning Rails " and i found this
information in it.

Here it is…

The fact is an Active Record subclass,isn’t much different from a
regular Ruby class. Active Record models are regular Ruby objects that
can be augmented, modified, played with, poked, and turned inside out
with sufficient Ruby-fu.

Knowing this will be extremely helpful in being able to pull back the
curtain and understand the advanced features of Active Record.


Ok… This brings a question to my mind.

Since IronRuby will offer Rails… So Active Record will be present in
IronRuby Right…?

Is it possible to use that Active Record ( ORM ) without Rails in
IronRuby…?

I mean if i am using Asp>net webforms with IronRuby as a language rather
than C# or Vb.Net, will I be able to use Active Record.

I am not talking about any MVC here. I am talking about plain IronRuby
as a language and ActiveRecord as an ORM, rather than LINQ or
NHibernate…

Thanks

SoftMind

Well, note that you can do this today with the Castle project:
http://www.castleproject.org/activerecord/index.html

And the fact that ActiveRecord is actually separate from Rails:
https://rubyforge.org/projects/activerecord/

Would mean, yes. I should think.

On Jan 30, 2008 10:39 AM, Softmind T. [email protected]
wrote:

with sufficient Ruby-fu.
Is it possible to use that Active Record ( ORM ) without Rails in

SoftMind

Posted via http://www.ruby-forum.com/.


Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core


Michael L.
[Polymath Programmer]
http://michaeldotnet.blogspot.com

Michael L. wrote:

Well, note that you can do this today with the Castle project:
http://www.castleproject.org/activerecord/index.html

And the fact that ActiveRecord is actually separate from Rails:
https://rubyforge.org/projects/activerecord/

Would mean, yes. I should think.

If Ironruby can fully implement Matz’s ruby, then yes. Where it MAY trip
up is the driver support. For example, the most commonly used driver for
MySQL is actually C based (there is a pure Ruby one, but it is dead
slow). This would mean porting the MySQL driver (which really should be
doable). Upshot is if you can port the MySQL driver, you could implement
a natvie MSQL driver too…

Myles E.
Mobile: +61-409-293-183

MadPilot Productions - Created to be Different
URL: http://www.madpilot.com.au
Phone: +618-6424-8234

Softmind T. wrote:

Since IronRuby will offer Rails… So Active Record will be present in
IronRuby Right…?

That’s the idea =) We don’t run Rails today though, and therefore don’t
run ActiveRecord today.

Is it possible to use that Active Record ( ORM ) without Rails in
IronRuby…?

Yep, you can use ActiveRecord in a standard (non-Rails) Ruby app. Here’s
the info on how to do that:
http://wiki.rubyonrails.org/rails/pages/HowToUseActiveRecordOutsideRails

On Jan 30, 2008 3:23 PM, Myles E. [email protected] wrote:

If Ironruby can fully implement Matz’s ruby, then yes. Where it MAY trip
up is the driver support. For example, the most commonly used driver for
MySQL is actually C based (there is a pure Ruby one, but it is dead
slow). This would mean porting the MySQL driver (which really should be
doable). Upshot is if you can port the MySQL driver, you could implement
a natvie MSQL driver too…

Unless the driver semantics are horribly incompatible, wouldn’t it
make more sense to target a driver at ADO.NET?


Curt H.
[email protected]

It wouldn’t take too long to create a DBI interface for ADO.NET.
I looked at it this weekend and it didn’t look that hard at all.

didn’t know about the rubyclr one thanks for the heads up.

Unless the driver semantics are horribly incompatible,
wouldn’t it make more sense to target a driver at ADO.NET?

Yeah good point!


Myles E.
Mobile: +61-409-293-183

MadPilot Productions
URL: http://www.madpilot.com.au
Phone: +618-9467-7651
Fax: +618-9467-6289

Try our time tracking system: 88 Miles!

Hi,

I just visted…

I think DataMapper is in strong competition with ActiveRecord, written
in Pure Ruby code.

Merb an another framework like Rails shall be offering this ORM support
along with Active Record.

Prado is an another framework based PHP with Asp.Net like webform
features, is also offering Active Record support and its available on
their website as a tutorial.

I think IronRuby should also think of offering this both ORM support.

Thanks

I believe the end goal of IronRuby (and someone correct me if I’m
wrong), is to fully support the Ruby language, meaning things like
DataMapper, ActiveRecord, Rails, et. al. will “just work” Of course
some of the C components may need to be ported, but that would be
outside of the scope of the IronRuby project.

On Sat, Feb 2, 2008 at 4:49 AM, Softmind T.
[email protected] wrote:
along with Active Record.
Posted via http://www.ruby-forum.com/.


Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core


Michael L.
[Polymath Programmer]
http://michaeldotnet.blogspot.com

On Jan 30, 2008 4:39 PM, Curt H. [email protected] wrote:

make more sense to target a driver at ADO.NET?

I think someone implemented a DBI driver for MS SQL using ADO.NET
through
RubyCLR. I suspect it is doable to implement DBI drivers in C# using
and
ADO.NET.

Not sure if this was the one I remember or not:

http://ca.utio.us/articles/2006/07/28/rails-rubyclr-sqlclientadapter

Hi,

Can some one from IronRuby team, focus more on this.

BTW… Did Ruby.Net in the past had implemented this Active Record to
work with any .Net languages on CLR.

Which ORM was supported by Ruby.Net

Thanks

Yes, that is the goal. And the plan is for all the C components in the
standard library to be ported as well.

Softmind T. wrote:

Can some one from IronRuby team, focus more on this.

I don’t mean to be difficult but why?
I think you need to give some kind of justification for your requests.
Otherwise how can the people working on IronRuby prioritize their work?

Of course, since IR is open source you could get involved and develop
Active
Record yourself if you wanted. By the way, I suspect that ActiveRecord
itself is written in Ruby and so should just work straight out in IR but
of
course what you actually want is someone to get the various database
drivers
up and running, which is what Wayne was talking about in an earlier post
today.

Regards,
Pete