By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,491 Members | 1,169 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,491 IT Pros & Developers. It's quick & easy.

Need a compelling argument to use Django instead of Rails

P: n/a
Ray
I just moved to another company that's mainly a Java/.NET shop. I was
happy to find out that there's a movement from the grassroot to try to
convince the boss to use a dynamic language for our development!

Two of the senior developers, however, are already rooting for Ruby on
Rails--although they haven't tried RoR themselves. When I suggested
Django, they went like, "what's that?".

I said, "It's like the Python counterpart of RoR".

"Nah, we're not interested in Python."

I think they are already predisposed to RoR simply because of RoR's
visibility (i.e.: at my workplace everybody knows RoR but nobody knows
about Django unless they've used Python as well). So far the arguments
I can think of:

1. The investment of learning Python will be a good investment because
it transfer to platforms that we've already supported, i.e.: JVM and
..NET CLR (using Jython and IronPython). Ruby's availability on this
platform is not as mature--JRuby is still at 0.9 and I don't think
IronRuby is coming out anytime soon :)

2. Python is a much more mature language than Ruby--it's been around
since ages ago and as such has a lot more tools, articles, and other
resources than Ruby. It is also the language being used by
high-visibility company like Google, with the creator of the language
himself working there.

3. Python emphasizes readability instead of cleverness/conciseness.

4. What else? I haven't tried RoR so I can't argue meaningfully on
whether using Django will put us at an advantage.

Can you help me with my argument? Meanwhile I think I'll give RoR a try
as well.

Thank you,
Ray

Jul 24 '06 #1
Share this Question
Share on Google+
92 Replies


P: n/a
Ray wrote:
I just moved to another company that's mainly a Java/.NET shop. I was
happy to find out that there's a movement from the grassroot to try to
convince the boss to use a dynamic language for our development!

Two of the senior developers, however, are already rooting for Ruby on
Rails--although they haven't tried RoR themselves. When I suggested
Django, they went like, "what's that?".

I said, "It's like the Python counterpart of RoR".

"Nah, we're not interested in Python."

I think they are already predisposed to RoR simply because of RoR's
visibility (i.e.: at my workplace everybody knows RoR but nobody knows
about Django unless they've used Python as well). So far the arguments
I can think of:

1. The investment of learning Python will be a good investment because
it transfer to platforms that we've already supported, i.e.: JVM and
..NET CLR (using Jython and IronPython). Ruby's availability on this
platform is not as mature--JRuby is still at 0.9 and I don't think
IronRuby is coming out anytime soon :)

2. Python is a much more mature language than Ruby--it's been around
since ages ago and as such has a lot more tools, articles, and other
resources than Ruby. It is also the language being used by
high-visibility company like Google, with the creator of the language
himself working there.

3. Python emphasizes readability instead of cleverness/conciseness.

4. What else? I haven't tried RoR so I can't argue meaningfully on
whether using Django will put us at an advantage.

Can you help me with my argument? Meanwhile I think I'll give RoR a try
as well.
I wouldn't waste your time. "A man convinced against his will is of the
same opinion still", and they already know they aren't interested in
Python. There are probably many other matters about which they are
uninformed and equally determined.

http://sethgodin.typepad.com/seths_b...ged_my_mi.html

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Jul 24 '06 #2

P: n/a
Ray
Steve Holden wrote:
I wouldn't waste your time. "A man convinced against his will is of the
same opinion still", and they already know they aren't interested in
Python. There are probably many other matters about which they are
uninformed and equally determined.
Well the thing is that I have to admit I have some stake in this. If
we're using Rails then everybody's starting from 0. Whereas if we're
using Python I already know it so I'll have an easier time :)

Also, those are just two developers. Convincing the big guy, the
decision maker, is a separate matter isn't it?

Do you know of any other arguments, or you do think that for somebody
who really, really doesn't care about which language, either RoR/Ruby
or Django/Python will do just fine?

Cheers
Ray
>
http://sethgodin.typepad.com/seths_b...ged_my_mi.html

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden
Jul 24 '06 #3

P: n/a
Ray
BTW the link below is good reading! Thanks Steve!

Steve Holden wrote:
http://sethgodin.typepad.com/seths_b...ged_my_mi.html
Jul 24 '06 #4

P: n/a
"Ray" <ra********@yahoo.comwrites:
>
Can you help me with my argument?
Well, there is this study suggesting Django outperforms Ruby on Rails

http://wiki.rubyonrails.com/rails/pa...rk+Performance
Meanwhile I think I'll give RoR a try as well.
Good idea. I think Ruby on Rails is terrific. Perhaps you'll think so
too. If not, at least you'll have a better idea of why you don't.

Tim
Jul 24 '06 #5

P: n/a
Ray

Tim Heaney wrote:
"Ray" <ra********@yahoo.comwrites:

Can you help me with my argument?

Well, there is this study suggesting Django outperforms Ruby on Rails

http://wiki.rubyonrails.com/rails/pa...rk+Performance
Meanwhile I think I'll give RoR a try as well.

Good idea. I think Ruby on Rails is terrific. Perhaps you'll think so
too. If not, at least you'll have a better idea of why you don't.
Thanks Tim!!

Cheers
Ray
>
Tim
Jul 24 '06 #6

P: n/a
Ray wrote:
Steve Holden wrote:
>>I wouldn't waste your time. "A man convinced against his will is of the
same opinion still", and they already know they aren't interested in
Python. There are probably many other matters about which they are
uninformed and equally determined.


Well the thing is that I have to admit I have some stake in this. If
we're using Rails then everybody's starting from 0. Whereas if we're
using Python I already know it so I'll have an easier time :)

Also, those are just two developers. Convincing the big guy, the
decision maker, is a separate matter isn't it?

Do you know of any other arguments, or you do think that for somebody
who really, really doesn't care about which language, either RoR/Ruby
or Django/Python will do just fine?
Well, my view is that both are frameworks, and so you will inevitably
"run out of steam" at some point if your implementation plans become too
ambitious. The impression I get is that Rails is relatively inflexible
on database schemas, and once you get "off the beaten track" it gets
difficult to cope with complex existing databases.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Jul 24 '06 #7

P: n/a
Ray
Thanks Sybren for the reply! Regarding this point:
The form handling is also excellent.
Is it excellent in a way that's "better" than RoR in certain ways?

Regards,
Ray

Sybren Stuvel wrote:
Ray enlightened us with:
Two of the senior developers, however, are already rooting for Ruby on
Rails--although they haven't tried RoR themselves. When I suggested
Django, they went like, "what's that?".

I said, "It's like the Python counterpart of RoR".

Bad answer. Now they think they'll get the same thing they already
have with RoR, but that they'll have to put more effort into it.
"Nah, we're not interested in Python."

Ask them why.
I think they are already predisposed to RoR simply because of RoR's
visibility (i.e.: at my workplace everybody knows RoR but nobody
knows about Django unless they've used Python as well).

Which means most of the people saying "we're not interested in Python"
do so without proper reason, since they don't know the language.
1. The investment of learning Python will be a good investment
because it transfer to platforms that we've already supported, i.e.:
JVM and .NET CLR (using Jython and IronPython). Ruby's availability
on this platform is not as mature--JRuby is still at 0.9 and I don't
think IronRuby is coming out anytime soon :)

Jython isn't up to par with current Python versions either.
2. Python is a much more mature language than Ruby--it's been around
since ages ago and as such has a lot more tools, articles, and other
resources than Ruby. It is also the language being used by
high-visibility company like Google, with the creator of the
language himself working there.

That is _definitely_ true. The behaviour of Ruby hasn't even properly
been defined.
4. What else? I haven't tried RoR so I can't argue meaningfully on
whether using Django will put us at an advantage.

Check out the admin you get for free with Django. Add/edit/delete
controls are easily done with RoR, but Django comes with a mature,
easy to use, on-the-fly generated, customizable admin. The form
handling is also excellent.

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Frank Zappa
Jul 24 '06 #8

P: n/a
Ray
Steve Holden wrote:
Well, my view is that both are frameworks, and so you will inevitably
"run out of steam" at some point if your implementation plans become too
ambitious. The impression I get is that Rails is relatively inflexible
on database schemas, and once you get "off the beaten track" it gets
difficult to cope with complex existing databases.
Hi Steve,

Thanks for the reply! Regarding "running out of steam", well... we've
been using Struts + Spring + Hibernate on the Java side, so yeah, we're
quite used to molding our code to fit frameworks :)

Cheers
Ray
>
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden
Jul 24 '06 #9

P: n/a
On 2006-07-24, Sybren Stuvel <sy*******@YOURthirdtower.com.imaginationwrote:
Jython isn't up to par with current Python versions either.
But the last release is up to the level of C-Python 2.2 or so. I don't
really feel like I'm missing that much with it.

Dave Cook
Jul 24 '06 #10

P: n/a
Ray

David Cook wrote:
On 2006-07-24, Sybren Stuvel <sy*******@YOURthirdtower.com.imaginationwrote:
Jython isn't up to par with current Python versions either.

But the last release is up to the level of C-Python 2.2 or so. I don't
really feel like I'm missing that much with it.
You mean the alpha? They're rushing for a beta now that'll bring Jython
to 2.2, I hope it'll come out soon. But yeah, compared to IronPython
(2.4 compliant, halfway to 2.5 even), it's pretty behind. But things
are changing the development seems to be picking up speed again!

Cheers
Ray
>
Dave Cook
Jul 24 '06 #11

P: n/a

Ray wrote:
I just moved to another company that's mainly a Java/.NET shop. I was
happy to find out that there's a movement from the grassroot to try to
convince the boss to use a dynamic language for our development!

Two of the senior developers, however, are already rooting for Ruby on
Rails--although they haven't tried RoR themselves. When I suggested
Django, they went like, "what's that?".

I said, "It's like the Python counterpart of RoR".

"Nah, we're not interested in Python."

I think they are already predisposed to RoR simply because of RoR's
visibility (i.e.: at my workplace everybody knows RoR but nobody knows
about Django unless they've used Python as well). So far the arguments
I can think of:

1. The investment of learning Python will be a good investment because
it transfer to platforms that we've already supported, i.e.: JVM and
.NET CLR (using Jython and IronPython). Ruby's availability on this
platform is not as mature--JRuby is still at 0.9 and I don't think
IronRuby is coming out anytime soon :)

2. Python is a much more mature language than Ruby--it's been around
since ages ago and as such has a lot more tools, articles, and other
resources than Ruby. It is also the language being used by
high-visibility company like Google, with the creator of the language
himself working there.

3. Python emphasizes readability instead of cleverness/conciseness.

4. What else? I haven't tried RoR so I can't argue meaningfully on
whether using Django will put us at an advantage.

Can you help me with my argument? Meanwhile I think I'll give RoR a try
as well.

Thank you,
Ray
Ruby does not have doctest :-)

- Paddy.

Jul 24 '06 #12

P: n/a
Steve Holden wrote:
....
I wouldn't waste your time. "A man convinced against his will is of the
same opinion still", and they already know they aren't interested in
Python. There are probably many other matters about which they are
uninformed and equally determined....
This is too true. Fortunately progress proceeds
slowly nonetheless. For example C++ is much
less used these days where it is totally and
catastrophically inappropriate than in years past
-- maybe because the true C++ boneheads have
been promoted or are retiring... Nevertheless I was
recently told by a new grad that I should translate
one of my (working, no problems) python apps to
C++ because C++ is "a higher level language."
But I'm sure he'll fall in line with the next stream
of lemmings rather than sink into the tarpit with the
dinosaurs.

-- Aaron Watters

===
Paradigms shift when the old guys retire. -- Kuhn (?)

Jul 24 '06 #13

P: n/a
Sybren Stuvel <sy*******@YOURthirdtower.com.imaginationwrites:
[...]
- What I was told from a professor in formal languages, which is
that there is no formal definition of the Ruby language. That's
enough for me to not use it.
[...]

So you're not using Python either?

Probably I don't understand what you're getting at, but the Python
language reference had big gaps in it last time I looked (though
Fredrik Lundh has been working on updated documentation -- I'm sure
he'll do a great job). Lots of features were just not in there.
Certainly lots of details e.g. regarding the various special method
protocols (especially when it comes to builtin types) are not
documented. ISTR the core maintainers of CPython aren't even that
worried about the grammar productions listed in the reference manual
being 100% accurate. CPython and Jython (ignoring the fact that
Jython's still on 2.1) have some fairly significant differences in
various details of the language. No doubt IronPython will too. Of
course, this is not something unique to Python, and I guess Python
does very well in comparison, when it comes to actual practice.
The fact that "open classes" are apparently thought to be a good thing
in Ruby puzzles (and worries) me.
John

Jul 25 '06 #14

P: n/a
Steve Holden <st***@holdenweb.comwrites:
[...]
Well, my view is that both are frameworks, and so you will inevitably
"run out of steam" at some point if your implementation plans become too
ambitious. The impression I get is that Rails is relatively inflexible
on database schemas, and once you get "off the beaten track" it gets
difficult to cope with complex existing databases.
I get that overall impression of Django too (as being more tightly
coupled to itself, hence less flexible, when compared with TurboGears
in particular). I haven't done much with it yet, though (and
presumably the 'magic-removal' branch landing did some good).

What do you make of the rest of Django (aside from the DB stuff)?

It's a shame TurboGears doesn't yet have a solid "out of the box" CRUD
admin interface as Django.
John

Jul 25 '06 #15

P: n/a
"Ray" <ra********@yahoo.comwrites:
I just moved to another company that's mainly a Java/.NET shop. I was
happy to find out that there's a movement from the grassroot to try to
convince the boss to use a dynamic language for our development!

Two of the senior developers, however, are already rooting for Ruby on
Rails--although they haven't tried RoR themselves. When I suggested
Django, they went like, "what's that?".

I said, "It's like the Python counterpart of RoR".

"Nah, we're not interested in Python."
[...]

It's the herding instinct. Hard to argue with that mindset.
John

Jul 25 '06 #16

P: n/a
Hi,

A few months ago I had to choose between RoR and a Python framework
(TurboGears in that case). I picked TurboGears because of the language
maturity and all the third party libs. i.e. I can do PDF reporting with
reportLab, control OpenOffice with Python..
Ruby has still a "cool factor" going with it, but give it 2-3 years to
become mainstream and another language will be the new cool thing to
program with..
Ray wrote:
I just moved to another company that's mainly a Java/.NET shop. I was
happy to find out that there's a movement from the grassroot to try to
convince the boss to use a dynamic language for our development!

Two of the senior developers, however, are already rooting for Ruby on
Rails--although they haven't tried RoR themselves. When I suggested
Django, they went like, "what's that?".

I said, "It's like the Python counterpart of RoR".

"Nah, we're not interested in Python."

I think they are already predisposed to RoR simply because of RoR's
visibility (i.e.: at my workplace everybody knows RoR but nobody knows
about Django unless they've used Python as well). So far the arguments
I can think of:

1. The investment of learning Python will be a good investment because
it transfer to platforms that we've already supported, i.e.: JVM and
.NET CLR (using Jython and IronPython). Ruby's availability on this
platform is not as mature--JRuby is still at 0.9 and I don't think
IronRuby is coming out anytime soon :)

2. Python is a much more mature language than Ruby--it's been around
since ages ago and as such has a lot more tools, articles, and other
resources than Ruby. It is also the language being used by
high-visibility company like Google, with the creator of the language
himself working there.

3. Python emphasizes readability instead of cleverness/conciseness.

4. What else? I haven't tried RoR so I can't argue meaningfully on
whether using Django will put us at an advantage.

Can you help me with my argument? Meanwhile I think I'll give RoR a try
as well.

Thank you,
Ray
Jul 25 '06 #17

P: n/a
John J. Lee wrote:
The fact that "open classes" are apparently thought to be a good thing
in Ruby puzzles (and worries) me.
This objection strikes me as having the same
nature as, "Python's lack of strong protection for
class members puzzles (and worries) me". The Pythonic
answer to that objection is usually that this is a
feature: it lets people who know what they're doing
solve problems more easily than if they had to work
around a bunch of "helpful" protection.

Classes are effectively open in Python, too, at least
where methods are concerned, since one can do
klass.__dict__["myMethod"]=myMethod.
Though admittedly, it isn't widely advertised as a
feature of Python.

It makes sense to me to think of open classes as being
open for extension, not modification. After all, methods
added by clients are unlikely to depend on
implementation details (though I suppose they could, to
which I would say, "Don't do that").

Steve Yegge's "Opinionated Elf" is an example of a problem
that is very easy and elegant to solve with open classes,
and painful to solve when classes are closed:
http://www.cabochon.com/~stevey/blog...ism-fails.html

Cheers,

-- JK
Jul 25 '06 #18

P: n/a
A few months ago I had to choose between RoR and a Python framework
(TurboGears in that case). I picked TurboGears because of the language
maturity and all the third party libs. i.e. I can do PDF reporting with
reportLab, control OpenOffice with Python..
This is a good argument, you should make a list of all the greatest python
libraries that you could use for your projects, for ex. reportlab, PIL,
doctools, elementtree, sqlalchemy etc etc and try to "sell" that.

BTW I'd choose TurboGears for it's flexibility, but I guess Django could be
nice when more rapid results are needed (and the problem doesn't fall too
far from the Django sweet spot).
>"Nah, we're not interested in Python."
This is a hard attitude, but I have the same feeling about Ruby, I like
Python and just don't see a reason to invest any time in Ruby (Rails or
not).. and from that little I've seen from it.. I didn't like it.
OTOH Ruby surelly is not that bad either.

--
damjan
Jul 26 '06 #19

P: n/a
Joe Knapka ha scritto:
Classes are effectively open in Python, too, at least
where methods are concerned, since one can do
klass.__dict__["myMethod"]=myMethod.
Yes, but builtin classes in Python are closed and this is the relevant
point.
Michele Simionato

Jul 26 '06 #20

P: n/a
Ray wrote:
David Cook wrote:
On 2006-07-24, Sybren Stuvel <sy*******@YOURthirdtower.com.imaginationwrote:
Jython isn't up to par with current Python versions either.
But the last release is up to the level of C-Python 2.2 or so. I don't
really feel like I'm missing that much with it.

You mean the alpha? They're rushing for a beta now that'll bring Jython
to 2.2, I hope it'll come out soon.
Aren't they "rushing" for years? The last update of the Jython news
page is from march 2005. This is not very encouraging even if there is
a secret life of Jython. But maybe we shouldn't worry because we can
still read:

"Jython, lest you do not know of it, is the most compelling weapon the
Java platform has for its survival into the 21st century:-)"

I would eventually forget Jython completely and select a bridge like
JPype and ask for use cases and expected interaction between both
languages.
But yeah, compared to IronPython
(2.4 compliant, halfway to 2.5 even), it's pretty behind. But things
are changing the development seems to be picking up speed again!
But you can't compile a Python module into a dotNet library that is
used from C# which is the very essence of the CLR. IronPython is not
more usefull than PythonNet.

Jul 26 '06 #21

P: n/a
Joe Knapka wrote:
(snip)
Classes are effectively open in Python, too, at least
where methods are concerned, since one can do
klass.__dict__["myMethod"]=myMethod.
actually, klass.myMethod = myMethod is enough...
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Jul 26 '06 #22

P: n/a
Joe Knapka wrote:
>
Steve Yegge's "Opinionated Elf" is an example of a problem
that is very easy and elegant to solve with open classes,
and painful to solve when classes are closed:
http://www.cabochon.com/~stevey/blog...ism-fails.html
For some value of "elegant", I suppose:

"But the real problem, the one that really gets me, is that your code
is going in and distributing itself across all the classes in the
system. It feels like a violation of encapsulation."

Paul

Jul 26 '06 #23

P: n/a
Ray
Kay Schluehr wrote:
Aren't they "rushing" for years? The last update of the Jython news
page is from march 2005. This is not very encouraging even if there is
a secret life of Jython.
Yeah I know... but I've been subscribing to jython-dev for quite
sometime, and the activity there is surely picking up compared to, say,
early 2006. Jython has new committers on board as well so that's
encouraging.
But maybe we shouldn't worry because we can
still read:

"Jython, lest you do not know of it, is the most compelling weapon the
Java platform has for its survival into the 21st century:-)"
:(
But yeah, compared to IronPython
(2.4 compliant, halfway to 2.5 even), it's pretty behind. But things
are changing the development seems to be picking up speed again!

But you can't compile a Python module into a dotNet library that is
used from C# which is the very essence of the CLR. IronPython is not
more usefull than PythonNet.
At least for my case I will use IronPython for higher level task, and
perhaps calls libraries written in C# instead of the other way around,
plus you can leave your module as scripts anyway. If what you want from
C# is accessing Python's power then you can always host the IronPython
engine can't you?

Jul 26 '06 #24

P: n/a
Ray

Damjan wrote:
BTW I'd choose TurboGears for it's flexibility, but I guess Django could be
nice when more rapid results are needed (and the problem doesn't fall too
far from the Django sweet spot).
Well actually I was thinking of exaclty the same thing, because our
apps are mostly CRUD apps anyway. However I just learned of one very
big killer--lack of support for Oracle and MS SQL Server. That pretty
much shoots Django down from the list, and with it Python.
"Nah, we're not interested in Python."

This is a hard attitude, but I have the same feeling about Ruby, I like
Python and just don't see a reason to invest any time in Ruby (Rails or
not).. and from that little I've seen from it.. I didn't like it.
OTOH Ruby surelly is not that bad either.
Yeah, I know... in fact I have the same attitude towards Ruby too.
People have been telling me it's cool left and right and I go to see
some Ruby code, I go "UGH!", and refuse to continue. Maybe because Perl
is #1 on my Most Hated Language list. *shrugs*

Just that it's a big, huge, humongous pity to see Python keeps missing
the big thing over and over again. Last time when biotechnology was
hot, which language became The Language? Perl. Now simple web app is
hot? It's Ruby. Of course Python is used by Google and it's something,
but I guess a lot of people do not know that, even those making a
living in the IT industry. OTOH everybody knows about Rails and and
everybody raves about it, even those who haven't touched it!
--
damjan
Jul 26 '06 #25

P: n/a
Ray
John J. Lee wrote:
I get that overall impression of Django too (as being more tightly
coupled to itself, hence less flexible, when compared with TurboGears
in particular). I haven't done much with it yet, though (and
presumably the 'magic-removal' branch landing did some good).

What do you make of the rest of Django (aside from the DB stuff)?

It's a shame TurboGears doesn't yet have a solid "out of the box" CRUD
admin interface as Django.
And it's a shame that: Python doesn't have The Anointed Web Framework.
Things may have been different if there can be only one, who knows.

The lack of support for Oracle and SQL Server by Django is also a
killer that'll prevent Django from being picked up by a LOT of
companies (sadly, including mine :( ).
>

John
Jul 26 '06 #26

P: n/a
I would suggest trying to pick up Ruby. Knowing both Python and Ruby
has helped me in that I can choose whichever tool is the best fit.
There are certain cases where I have to abandon Ruby for a certain
project because the library isn't mature enough or cross platform
enough for my requirements. So coding in Python is my option. Then
again there are other things where I am able to choose Ruby as the best
fit because of other concerns. The languages are different, but not
_that_ different. If you can get past the initial Perlishness (is that
a word?) of Ruby you will find that going from one language to the
other isn't that huge of a jump.

Damjan wrote:
"Nah, we're not interested in Python."

This is a hard attitude, but I have the same feeling about Ruby, I like
Python and just don't see a reason to invest any time in Ruby (Rails or
not).. and from that little I've seen from it.. I didn't like it.
OTOH Ruby surelly is not that bad either.

--
damjan
Jul 26 '06 #27

P: n/a
On Mon, 24 Jul 2006 12:23:12 +0100, Steve Holden wrote:

The impression I get is that Rails is relatively inflexible
on database schemas,
Django has the same problem. E.g. both Django ORM and ActiveRecord cannot
work with complex primary keys. But for Rails there is a solution for even
very strange created databases: rBatis
(http://jutopia.tirsen.com/articles/tag/rbatis) it is Ruby port of java
Ibatis (http://ibatis.apache.org/)

--
Jarosław Zabiełło
http://blog.zabiello.com
Jul 26 '06 #28

P: n/a
On Mon, 24 Jul 2006 13:22:33 +0200, Sybren Stuvel wrote:
>"Nah, we're not interested in Python."

Ask them why.
I know why. In general Java guys can recognize Ruby as more friendly
language than Python, more secured (there is almost no security in Python).
There is also much more hype about Ruby on java blogs.
The behaviour of Ruby hasn't even properly been defined.
No. Ruby uses different paradigm. The language can be extended with its
open classes. There is many similarity between Ruby and Smalltak. No Perl
or Java, but Smalltalk. Philosophy and object model is very similiar. Ruby
is more dynamic than Python exactly like Smalltak is.

The main reason for using Rails is: Rails is complete framework, much
easier to learn and use than Django.

The main reason for using Python: Python is more productive. It is easier
to learn Python than Ruby. Python uses minimalistic approach. It contains
less methods, structures than Ruby. It is easier to memorize. Ruby has
messed namespace with many aliases to methods. And it has much more methods
to every object. It is difficult to remember them. There is no Ruby
docstrings as well. You have to read manual, book much more than in Python.

Also modules are easier to use in Python. When I am doing import blah i
know what was downloaded and I can see it by simply typing dir(blah).
But when you do "require blah" in Ruby you know *nothing*. You have to
look inside blah.rb file to see what was happened. "require" command can
execute code, add many namespaces etc. etc.
--
Jarosław Zabiełło
http://blog.zabiello.com
Jul 26 '06 #29

P: n/a
On Mon, 24 Jul 2006 14:23:21 +0200, Sybren Stuvel wrote:
Another reason for me not to use Ruby, is that there is no distinction
between those two lines of code:

x = somefunc
x = somefunc()
It has no meaning. Just use always () if you like. But sometimes it is
better to avoid them to have more beautifull code. E.g.

class Article < Activerecord::Base
belongs_to: author
has_many: comments
end

--
Jarosław Zabiełło
http://blog.zabiello.com
Jul 26 '06 #30

P: n/a
Jaroslaw Zabiello wrote:
On Mon, 24 Jul 2006 12:23:12 +0100, Steve Holden wrote:

The impression I get is that Rails is relatively inflexible
on database schemas,

Django has the same problem. E.g. both Django ORM and ActiveRecord cannot
work with complex primary keys. But for Rails there is a solution for even
very strange created databases: rBatis
(http://jutopia.tirsen.com/articles/tag/rbatis) it is Ruby port of java
Ibatis (http://ibatis.apache.org/)
The only commits to the rBatis svn repository happened on May 20.
Looks like it's going nowhere fast to me.

-Jonathan

Jul 26 '06 #31

P: n/a
Jaroslaw Zabiello wrote:
(snip)
Ruby is more dynamic than Python
Care to elaborate ? I played a bit with Ruby and failed to come to the
same conclusion... (the two main differences I noticed are 1/ Ruby is
expression-based and 2/ it has a more canonical object model - IOW, it
mostly cloned Smalltalk's one)

FWIW, Lisp-like macro-system apart, I have difficulty imagining how a
language could be more dynamic than Python...
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Jul 26 '06 #32

P: n/a

Ray wrote:
>
The lack of support for Oracle and SQL Server by Django is also a
killer that'll prevent Django from being picked up by a LOT of
companies (sadly, including mine :( ).
Uh, yeah. I was aware of Django but haven't had the time to delve into
it. If it doesn't support these larger scale database server types that
would indeed throw a red flag up in certain environments. What all
types doesn't it support? MySQL, PgSQL, SQL Lite, Pervasive SQL? I
know. I haven't made Google my friend and haven't STFW :-/

Jul 26 '06 #33

P: n/a
On Wed, 26 Jul 2006 16:25:48 +0200, Bruno Desthuilliers wrote:
I have difficulty imagining how a language could be more dynamic than
Python...
E.g. try to extends or redefine builtin Python classes on fly. Ruby is so
flexible that it can be used to create Domain-specific Programming
Languages.

--
Jarosław Zabiełło
http://blog.zabiello.com
Jul 26 '06 #34

P: n/a

Jaroslaw Zabiello wrote:
On Wed, 26 Jul 2006 16:25:48 +0200, Bruno Desthuilliers wrote:
I have difficulty imagining how a language could be more dynamic than
Python...

E.g. try to extends or redefine builtin Python classes on fly. Ruby is so
flexible that it can be used to create Domain-specific Programming
Languages.
This, of course, is really cool if you are working
all by yourself on a dissertation or something,
but can be completely disasterous if you are
actually working with other people who need to
know what the expressions of the programming
language mean and do. Back in the day every
good Common Lisp programmer wrote in a
dialect completely incomprehensible to any other
Common Lisp programmer. Kinda fun, but not
"best practice."
-- Aaron Watters

===

Writing about music is like
dancing about architecture.
-- Elvis Costello

Jul 26 '06 #35

P: n/a
On 26 Jul 2006 08:16:21 -0700, aa***************@yahoo.com wrote:
>E.g. try to extends or redefine builtin Python classes on fly. Ruby is so
flexible that it can be used to create Domain-specific Programming
Languages.

This, of course, is really cool if you are working
all by yourself on a dissertation or something,
but can be completely disasterous if you are
actually working with other people who need to
know what the expressions of the programming
language mean and do.
This should not be problem in real life. Look at Ruby on Rails. This is
excellent example of DSL in action. Rails uses customized Ruby to create
very friendly web framework. So there is no possible to create such simple
and friendly framework in other language than Ruby (and Smalltalk which has
the same feature)

Of course, I you like, you can freeze every object you want and nobody can
be able to open and change it. You can also trace all activity for changing
something to objects because Ruby has nice system hooks implemented. Ruby
has nice security system (private, protected, public scopes for methods and
attributes, objects freezing, system hooks). In past Python had Bastion
module (http://www.python.org/doc/lib/module-Bastion.html) but it was
rejected and now Python has nothing. Java guys can favor Ruby also because
of its security.

--
Jarosław Zabiełło
http://blog.zabiello.com
Jul 26 '06 #36

P: n/a
Ray wrote:
Just that it's a big, huge, humongous pity to see Python keeps missing
the big thing over and over again. Last time when biotechnology was
hot, which language became The Language? Perl. Now simple web app is
hot? It's Ruby.
The problem is that Python is the 2nd best language for everything. ;)
As a general purpose language I don't think it can be beaten, but for
almost any given project of non-trivial size, there seems to always be
one language that has better support for the subject. I frequently find
myself wanting to use Python but being unable to, often due to some
library being unavailable, as in your case.

--
Ben Sizer

Jul 26 '06 #37

P: n/a
Jaroslaw Zabiello wrote:
On Wed, 26 Jul 2006 16:25:48 +0200, Bruno Desthuilliers wrote:

>>I have difficulty imagining how a language could be more dynamic than
Python...


E.g. try to extends or redefine builtin Python classes on fly.
Ok, this is one of the few restrictions - builtin types. Yeah. Have
something more convincing ?
Ruby is so
flexible that it can be used to create Domain-specific Programming
Languages.
Yes, Ruby is not bad at *embedded* DSLs. Nor are Lisp and Python and
Smalltalk and a few others too. Now embedded DSLs all have the same
limitation: they are just a specialisation of an existing
general-purpose language - so you have to deal with the host language's
syntax. Care to write an external DSL in Ruby ?
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Jul 26 '06 #38

P: n/a
On Wed, 26 Jul 2006 18:01:50 +0200, Bruno Desthuilliers wrote:
>>>I have difficulty imagining how a language could be more dynamic than
Python...

E.g. try to extends or redefine builtin Python classes on fly.

Ok, this is one of the few restrictions - builtin types. Yeah. Have
something more convincing ?
Nope. Python has similiar dynamic. Or.. maybe real closures.
Care to write an external DSL in Ruby ?
?

--
Jarosław Zabiełło
http://blog.zabiello.com
Jul 26 '06 #39

P: n/a
Jaroslaw Zabiello wrote:
On 26 Jul 2006 08:16:21 -0700, aa***************@yahoo.com wrote:

>>>E.g. try to extends or redefine builtin Python classes on fly. Ruby is so
flexible that it can be used to create Domain-specific Programming
Languages.

This, of course, is really cool if you are working
all by yourself on a dissertation or something,
but can be completely disasterous if you are
actually working with other people who need to
know what the expressions of the programming
language mean and do.


This should not be problem in real life. Look at Ruby on Rails. This is
excellent example of DSL in action.
As Ben Bangert notices, if Rail's a DSL, then so are a lot of Python
frameworks and librairies:
http://www.groovie.org/articles/2005...ible-in-python

Rails uses customized Ruby to create
very friendly web framework. So there is no possible to create such simple
and friendly framework in other language than Ruby (and Smalltalk which has
the same feature)
May I suggest that you learn some Lisp dialect ?
Of course, I you like, you can freeze every object you want and nobody can
be able to open and change it. You can also trace all activity for changing
something to objects because Ruby has nice system hooks implemented.
__getattribute__ / __setattr__ / __delattr__

And of course import hooks.
Ruby
has nice security system (private, protected, public scopes for methods and
attributes,
This is not "security", this is data-hiding. And IIRC, Ruby's attributes
are always private - just like in Smalltalk FWIW.
objects freezing, system hooks). In past Python had Bastion
module (http://www.python.org/doc/lib/module-Bastion.html) but it was
rejected and now Python has nothing.
Seems like Zope is not doing so bad...
Java guys can favor Ruby also because
of its security.
s/security/orthodox object model/ IMHO.

Jaroslaw, don't take me wrong, I really think that Ruby is a really nice
language (while not as mature as Python when it comes to implementation
and libraries). But I'm afraid that all your arguments here are nothing
more than the usual Ruby/Rails hype.

--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Jul 26 '06 #40

P: n/a
Jaroslaw Zabiello wrote:
On Wed, 26 Jul 2006 18:01:50 +0200, Bruno Desthuilliers wrote:

>>>>I have difficulty imagining how a language could be more dynamic than
Python...

E.g. try to extends or redefine builtin Python classes on fly.

Ok, this is one of the few restrictions - builtin types. Yeah. Have
something more convincing ?


Nope. Python has similiar dynamic. Or.. maybe real closures.

>>Care to write an external DSL in Ruby ?


?
I mean : write a parser and interpreter for a DSL. In Ruby.

--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Jul 26 '06 #41

P: n/a
Bruno Desthuilliers <on***@xiludom.growrites:
Ruby has nice security system (private, protected, public scopes
for methods and attributes,

This is not "security", this is data-hiding. And IIRC, Ruby's attributes
are always private - just like in Smalltalk FWIW.
I don't know anything about Ruby, but if it's supposed to be like
Java, then it's real security. I'm not sure why a typical server side
app would care, though.
Jul 26 '06 #42

P: n/a
Paul Rubin wrote:
Bruno Desthuilliers <on***@xiludom.growrites:
>>>Ruby has nice security system (private, protected, public scopes
for methods and attributes,

This is not "security", this is data-hiding. And IIRC, Ruby's attributes
are always private - just like in Smalltalk FWIW.


I don't know anything about Ruby, but if it's supposed to be like
Java, then it's real security.
Hopefully it's more secure than Java wrt/ attributes/methods access
restriction. IIRC, accessing a 'private' attribute thru reflection is
quite possible in Java.
I'm not sure why a typical server side
app would care, though.
Noticed this too ?-)

--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Jul 26 '06 #43

P: n/a
Bruno Desthuilliers <on***@xiludom.growrites:
Hopefully it's more secure than Java wrt/ attributes/methods access
restriction. IIRC, accessing a 'private' attribute thru reflection is
quite possible in Java.
That's controlled by some flag you can set. Browser applet sandboxes
depend on the security and set the flag.
Jul 26 '06 #44

P: n/a
Ray wrote:
But you can't compile a Python module into a dotNet library that is
used from C# which is the very essence of the CLR. IronPython is not
more usefull than PythonNet.

At least for my case I will use IronPython for higher level task, and
perhaps calls libraries written in C# instead of the other way around,
plus you can leave your module as scripts anyway. If what you want from
C# is accessing Python's power then you can always host the IronPython
engine can't you?
Yes, it is a two-way scripting. But then you can also access the
CPython interpreter as a dll. Another promising approach is that of a
CLR backend for PyPy but it compiles only RPython directly and one
needs a separate interpreter for anything more advanced in Python.

O.K. Let me do a constructive suggestion here. In order to demonstrate
the usefullness of the Python + .NET bridge why not writing a nice
little application? I've once written a Python console using
CPython+Scintilla+PythonNet. It is still buggy but feature complete (
at least I implemented all requirements I had to make ). One can
replace PythonNet using IronPython and embedd the console in a little
IronPython application.

If you are interested in this stuff I would start reanimating my code.
You can mail me at ka*@fiber-space.de

Jul 26 '06 #45

P: n/a
On Wed, 26 Jul 2006 18:20:44 +0200, Bruno Desthuilliers wrote:
May I suggest that you learn some Lisp dialect ?
Nope. I hate Lisp syntax.
>Of course, I you like, you can freeze every object you want and nobody can
be able to open and change it. You can also trace all activity for changing
something to objects because Ruby has nice system hooks implemented.

__getattribute__ / __setattr__ / __delattr__
This is not the same. Ruby can also lock access to attributes. Freezing is
different. It can freeze any object so you will not be able to add or
delete any method. Once freezed object cannot be unfrozen. So you can be
sure that nobody will change you classes if you do not like.
And of course import hooks.
Python?? Where?
>Ruby
has nice security system (private, protected, public scopes for methods and
attributes,

This is not "security", this is data-hiding.
No. Data hiding are in Python. Ruby uses security similiar to Java. If the
class has method marked as private it cannot be used in children classes.
And IIRC, Ruby's attributes are always private
Yes and no. Yes, because you cannot read them directly without accessors.
And no, because you can read them if you set proper accessor.
>In past Python had Bastion module (http://www.python.org/doc/lib/module-Bastion.html)
but it was rejected and now Python has nothing.

Seems like Zope is not doing so bad...
Zope is only a great application. Invision Power Board or ezPublish are
also great application, but it does not mean that PHP is great language. :)

Python has no security at all. I has only convention and mangling. Of
course somebode can say, it is enough, and maybe it is. But I think, that
this might be another reason why Java guys prefer Ruby to Python.

--
Jaroslaw Zabiello
http://blog.zabiello.com
Jul 26 '06 #46

P: n/a
On Wed, 26 Jul 2006 18:23:22 +0200, Bruno Desthuilliers wrote:
>>>Care to write an external DSL in Ruby ?
?

I mean : write a parser and interpreter for a DSL. In Ruby.
I see. Nope. I do not like code generators. In this sense every template
system is DSL. E.g. Smarty Templates for PHP. You can create "external DSL"
even in C or assembler. This is not the point. The point is Ruby is much
better suited to create internal DSL than Python or PHP.

--
Jarosław Zabiełło
http://blog.zabiello.com
Jul 26 '06 #47

P: n/a
Joe Knapka <jk*******@kneuro.netwrites:
John J. Lee wrote:
The fact that "open classes" are apparently thought to be a good thing
in Ruby puzzles (and worries) me.

This objection strikes me as having the same
nature as, "Python's lack of strong protection for
class members puzzles (and worries) me".
No, it doesn't.

I didn't express myself clearly enough.

The Pythonic
answer to that objection is usually that this is a
feature: it lets people who know what they're doing
solve problems more easily than if they had to work
around a bunch of "helpful" protection.
Yes. Simplifying a bit: It is not considered a good thing to take
advantage of that. Rather, it is considered a good thing *to be able*
to take advantage of it.

In stark contrast, I'm told that some Ruby users claim that open
classes are a good thing for everyday cases, rather than as a last
resort with serious costs. Even for builtin types!! I don't know if
that's true, it's just what I've heard. Hmm, googled a bit and found
this:

http://www.artima.com/forums/flat.js...&thread=120400
That single datapoint seems to support what I've heard!

Classes are effectively open in Python, too, at least
[...]

Quite.
John
Jul 26 '06 #48

P: n/a
Jaroslaw Zabiello wrote:
On Wed, 26 Jul 2006 18:20:44 +0200, Bruno Desthuilliers wrote:
[Quoting JZ...]
Ruby
has nice security system (private, protected, public scopes for methods and
attributes,
This is not "security", this is data-hiding.

No. Data hiding are in Python. Ruby uses security similiar to Java. If the
class has method marked as private it cannot be used in children classes.
Can you please stop using the term security in a vague way whilst
pointing the finger at Java? Sure, Python doesn't really have the
"security" you refer to, apart from elementary protection using
name-mangling (which is mostly good enough) for double-underscore
attributes, but mentioning "Java" and "security" in the same sentence
whilst only really referring to private/protected/public/final is
misleading: Java has an entire spectrum of security features that are
found neither in Python nor Ruby.

[...]
Python has no security at all. I has only convention and mangling. Of
course somebode can say, it is enough, and maybe it is. But I think, that
this might be another reason why Java guys prefer Ruby to Python.
Whatever "no security" means, and I ask you to choose your terminology
more carefully, both Ruby and Python have some way to go before
supporting most of Java's more useful security features. Certainly, the
Java guys can't be flocking to Ruby specifically because it lacks
bytecode verification and a fairly mature sandboxing mechanism.

Paul

Jul 26 '06 #49

P: n/a
Jaroslaw Zabiello <hi**********@gmail.comwrites:
On Mon, 24 Jul 2006 14:23:21 +0200, Sybren Stuvel wrote:
Another reason for me not to use Ruby, is that there is no distinction
between those two lines of code:

x = somefunc
x = somefunc()

It has no meaning. Just use always () if you like. But sometimes it is
[...]

Well... has no meaning *in Ruby*, yes. You're begging the question!

(The implied question being "*Should* it have meaning?")

There is a reasonable argument for assigning different meanings to foo
and foo(), as I'm sure you know: regardless of syntax, there is a
distinction to be made between calling a function and referring to it
(e.g. to keep a reference to the function for later use as a
callback). I guess Ruby uses code blocks for that purpose? Seems
there are swings and roundabouts.

http://blog.ianbicking.org/ruby-pyth...ml#ruby-blocks
John
Jul 26 '06 #50

92 Replies

This discussion thread is closed

Replies have been disabled for this discussion.