Ruby ORM

On 11/18/2010 09:11 AM, Mike S. wrote:

Robby on Rails (Robby R.) was briefly a fan of the reverse side of
the coin - sticking half your app inside the database with PL/Ruby:

http://robbyonrails.com/articles/2005/8

He’s now gone all quiet on that front so I guess he’s swallowed the ORM
shilling.

There is nothing wrong with using an ORM. The problem is that some
people have the insane idea that the application layer should be
responsible for maintaining referential integrity. Thee only other
thing that bothers me about ORMs in Ruby is that they don’t have very
good support for stored procedures. They all seem to expect you to use
dynamic SQL for everything, which would be fine if I did not already
have stored procedures that did everything in my database.

Writing your own pseudo-ORM is really not the best use of your time even
if it results in cleaner code in your application as opposed to manually
setting everything up. I wrote a bunch of classes to map my database’s
stored procedures in VB.net (This was for a .NET 2.0 application so no
Linq or Entity Framework.) while interesting because it provided me an
opprotunity to learn more about reflection in the language I am most
comfortable in, I recognize that using an ORM like Entity Framework
would have been more appropriate. Especially since Entity Framework
supports stored procedures at least if you are using MS SQL Server.

I also don’t see the big benefit of using instead of triggers to update
views that would otherwise not be updatable over an ORM.

On Fri, Nov 12, 2010 at 9:47 AM, Mike S. [email protected]
wrote:

Databases have a wealth of logic, elegance and functionality. Slapping
them in the crude harness of ORMs is a most unfortunate and regressive
trend.

On the contrary, ORMs let people utilize this wealth of domain knowledge
in
SQL databases without having to touch the abysmal puddle of vomit that
is
SQL, and using familiar object interfaces through metalinguistic
abstraction.

ORMs rock, and they’re a stepping stone towards a future where
distributed
“NoSQL” data stores will be a satisfactory replacement for the dinosaurs
that are SQL databases.

That said, I still use MySQL as our only database.

On 12/02/2010 07:22 PM, Tony A. wrote:

ORMs rock, and they’re a stepping stone towards a future where distributed
“NoSQL” data stores will be a satisfactory replacement for the dinosaurs
that are SQL databases.

That said, I still use MySQL as our only database.

SQL isn’t necessarily abysmal it just does not lend itself to the kinds
of things application developers need to do in the application layer.
SQL is very nice as long as you don’t try to do things it was not made
for. Not that SQL as a language is not in need of improvements. The
way some queries don’t work like one would expect when you apply a
range is one such thing.

Robby on Rails (Robby R.) was briefly a fan of the reverse side of
the coin - sticking half your app inside the database with PL/Ruby:

http://robbyonrails.com/articles/2005/8

He’s now gone all quiet on that front so I guess he’s swallowed the ORM
shilling.

On Thu, Dec 2, 2010 at 5:41 PM, Kevin [email protected] wrote:

SQL isn’t necessarily abysmal… SQL is very nice as long as you don’t try
to do things it was not made for.

Strongly disagree… as far as a declarative query language goes,
something
like LINQ is really what SQL should’ve been. SQL might as well be
FLOW-MATIC

I was thinking about this last night and it’s part of a belief I have
that you reuse powerful facilities available to you rather than imitate
them or bodge them into Ruby. That’s how scripting languages started -
simple programming interfaces to applications, operating systems etc.

I am pretty sure that’s not how Ruby started.

If you want to script a web site then don’t struggle with Ruby-like
libraries, run Internet Explorer and script its model.

What does it even mean?

Nothing you can
download from rubyforge is ever going to be as big, sophisticated and
tested.

As buggy? IE is least capable. We have open source mozilla, open
source Webkit, why IE?

Similarly with spreadsheets - Excel is on your computer, why

mess with anything less? Fire up win32ole and the World is your oyster.

Excel is not on my computer. And neither it is on my server. And
win32ole
won’t fire, because I am on OS X.

Regards,
Rimantas

I was thinking about this last night and it’s part of a belief I have
that you reuse powerful facilities available to you rather than imitate
them or bodge them into Ruby. That’s how scripting languages started -
simple programming interfaces to applications, operating systems etc.

If you want to script a web site then don’t struggle with Ruby-like
libraries, run Internet Explorer and script its model. Nothing you can
download from rubyforge is ever going to be as big, sophisticated and
tested. Similarly with spreadsheets - Excel is on your computer, why
mess with anything less? Fire up win32ole and the World is your oyster.

On Fri, Dec 3, 2010 at 12:49 AM, Mike S. [email protected]
wrote:

I was thinking about this last night and it’s part of a belief I have
that you reuse powerful facilities available to you rather than imitate
them or bodge them into Ruby. That’s how scripting languages started -
simple programming interfaces to applications, operating systems etc.

I understand that you might not be capable or want to rewrite things,
but where in this whole message is anything powerful referenced?

If you want to script a web site then don’t struggle with Ruby-like
libraries, run Internet Explorer and script its model. Nothing you can
download from rubyforge is ever going to be as big, sophisticated and
tested. Similarly with spreadsheets - Excel is on your computer, why
mess with anything less? Fire up win32ole and the World is your oyster.

This didn’t exactly make sense to me, but you’re welcome to develop
for IE using whatever languages you’d like.

As for me and my house, we will serve the rubies.

~Johnneylee

Rimantas L. wrote in post #965923:
And

win32ole
won’t fire, because I am on OS X.

I think we all understand that if you’re on different platforms you have
to translate what I said. It would be quite pointless for me to start
listing all software on all platforms. Normally people know this.

On Fri, Dec 3, 2010 at 9:40 AM, Mike S. [email protected]
wrote:

Rimantas L. wrote in post #965923:
And

win32ole
won’t fire, because I am on OS X.

I think we all understand that if you’re on different platforms you have
to translate what I said. It would be quite pointless for me to start
listing all software on all platforms. Normally people know this.

Hi I use Ubuntu, can you tell me where to find the IE script interpreter
for
Ubuntu? I looked for it on the Microsoft site, but all I found were
references to a web browser.

If you want to script a web site then don’t struggle with Ruby-like
libraries, run Internet Explorer and script its model. Nothing you can
download from rubyforge is ever going to be as big, sophisticated and
tested. Similarly with spreadsheets - Excel is on your computer, why
mess with anything less? Fire up win32ole and the World is your
oyster.

Thanks!

I’m really excited about scripting Excel with Ruby, because I
currently use a legacy system which involves injuring myself with a
hammer :slight_smile:

Johnny

Richard C. wrote in post #965936:

Hi I use Ubuntu, can you tell me where to find the IE script interpreter
for
Ubuntu? I looked for it on the Microsoft site, but all I found were
references to a web browser.

I guess you must be new to computing. Microsoft is a big company in
Redmond. Their stuff is the most widely used by far but has limited
cross compatibility. Ubuntu is made by another company not based in
Redmond. You have to use other applications on it, so ignore any remarks
about Excel and as regards a browser, with eg WATIR I suggest you use
Firefox - http://www.mozilla-europe.org/en/firefox/

On Fri, Dec 3, 2010 at 10:47 AM, Mike S. [email protected]
wrote:

Redmond. You have to use other applications on it, so ignore any remarks
about Excel and as regards a browser, with eg WATIR I suggest you use
Firefox - http://www.mozilla-europe.org/en/firefox/

So where do I get the IE script interpreter for Ubuntu? Do I have to
compile
it form source? Its confusing that they named a browser the same name.
It
makes it very hard to search for.

So where do I get the IE script interpreter for Ubuntu? Do I have to
compile it form source? Its confusing that they named a browser the
same name. It makes it very hard to search for.

Use Wine to run Windows programs on Ubuntu.

This bickering is tiresome to read. I feel like an bitter nova-monkey.

Scripting Excel fills me with existential dread; but Mike is
trying to help, by dispensing Windows tips. Why must we drive him
away?

Johnny

P.S. Ubuntu sucks! Where is /etc/make.conf?

If you do use Windows I really recommend reading

Orchestrating all these rich and hugely powerful applications (eg
putting all your Itunes items in formatted spreadsheets) just seems such
an exciting way to use Ruby, generally speaking with not many lines of
code, because you are leveraging (I’m English really) all the work of
many other programmers.

I’m assuming that for every Windows thing I mention there is an exact
analogue in the Linux and Mac worlds. I’m not supporting Windows itself,
just the principle of reusing software.

On Fri, Dec 3, 2010 at 11:55 AM, John M. [email protected]
wrote:

This bickering is tiresome to read. I feel like an bitter nova-monkey.

Scripting Excel fills me with existential dread; but Mike is
trying to help, by dispensing Windows tips. Why must we drive him
away?

Nah, he is trolling. Hence I am baiting him. But I am too busy to keep
this
up.

On Fri, Dec 3, 2010 at 9:49 AM, Mike S. [email protected]
wrote:

I was thinking about this last night and it’s part of a belief I have
that you reuse powerful facilities available to you rather than imitate
them or bodge them into Ruby. That’s how scripting languages started -
simple programming interfaces to applications, operating systems etc.

While Ruby is a scripting language, too, it does not follow that it
has the same origin as the first scripting language that evolved
(which would that be, anyway? sh? Something even older?).

If you want to script a web site then don’t struggle with Ruby-like
libraries, run Internet Explorer and script its model.

I want, nay, need, a Ruby-like interface to IE, though. Nothing is as
annoying as mixing a dozen paradigms across the board.

Also: I’d script WebKit with V8 support. It’s fast, and cross-platform.

Nothing you can
download from rubyforge is ever going to be as big, sophisticated and
tested.

There is one good thing about the UNIX culture: “Programs should do
one thing, and do it well.” The Ruby community soaked that up, and
applied it to libraries.

And with TDD/BDD/testing in general, your point about testing becomes
moot. Not to mention that, if a gem is open source, I can always fork
it and keep it going, instead of being beholden to one single entity.
Ain’t that right, Oracle?

Similarly with spreadsheets - Excel is on your computer, why
mess with anything less? Fire up win32ole and the World is your oyster.

You are serious, I’m afraid. So: Excel is good, for a spreadsheet
program. But can it solve linear equations? Inverse a matrix (for the
curious: It can, but boy it ain’t pretty)?

Not to mention that you have to rely on Excel being correct when, say,
importing CSV, or exporting TSV. Which you can’t.

Also: Excel isn’t necessarily installed on a computer, just like IE.

Last but not least: Excel only was possible because VisiCalc was
first, and because Lotus 1-2-3 kept the competition going. IOW:
Applying your “DRM” “principle” to Excel: Don’t Repeat VisiCorp.

Wake up, and smell the world beyond what Dell sold you, Mike.


Phillip G.

Though the folk I have met,
(Ah, how soon!) they forget
When I’ve moved on to some other place,
There may be one or two,
When I’ve played and passed through,
Who’ll remember my song or my face.

Steve Ballmer? Is that you? Hows that monoculture working out?

On Dec 3, 2010, at 00:49 , Mike S. wrote:

I was thinking about this last night and it’s part of a belief I have
that you reuse powerful facilities available to you rather than imitate
them or bodge them into Ruby.

What does this have to do with the “ORM’s Don’t Do It” thread?

Don’t thread hijack. Man up and hit “new message”.

On Fri, Dec 03, 2010 at 05:49:54PM +0900, Mike S. wrote:

I was thinking about this last night and it’s part of a belief I have
that you reuse powerful facilities available to you rather than imitate
them or bodge them into Ruby. That’s how scripting languages started -
simple programming interfaces to applications, operating systems etc.

If you want to script a web site then don’t struggle with Ruby-like
libraries, run Internet Explorer and script its model. Nothing you can
download from rubyforge is ever going to be as big, sophisticated and
tested. Similarly with spreadsheets - Excel is on your computer, why
mess with anything less? Fire up win32ole and the World is your oyster.

I take it you aren’t a fan of portability – and prefer rewriting one
thing for eight different platforms.