Re: [Zope] Re: Java vs Zope

2006-01-07 Thread bruno modulix

[EMAIL PROTECTED] a écrit :
(snip)



All said and done, I prefer to use Java over Python 
for large applications 



Good for you; there are others that share your tastes, but that's all it is:
preference.  A good coder could create an equally powerful suitably large
application in either language in the same amount of time.


My guess is that it will take much less time with Python. And that the 
large Java application will end up as a medium-sized app in Python 
(the average ratio must be along the line of 5 lines of Java for 1 line 
of Python).


(snip)


simply because it's cleaner and has 
mechanisms in place that support reusability of components 
and extensibility. 



Huh?  You can do pretty much the same designs, patterns, etc in Python.  Why
does language make a difference here in re-usability.  


It does make a difference - but the other way round !-)

Almost any (if not all) Java pattern can be translated to Python, but 
the opposite is not true.



Perhaps you are
arguing for single-inheritance as a constraint (which you can self-impose in
design in Python).


But why would you ?-) Python's duck typing makes inheritence much less 
important than it is in Java, but still, multiple inheritence is handy 
for mixins (let's talk about componants and reusability...).


Also, Python offers a pretty good support for composition/delegation, 
which allows for better decoupling (than inheritence), which in turns 
makes reusability easier.



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Java vs Zope

2006-01-06 Thread bruno desthuilliers
Rocky Burt wrote:
 David H wrote:
 
Python is also object oriented.  In python, x = 10 creates an object not
a simple type - if I recall the same is true in Java.
 
 
 In fact this is not quite right.  In java, int x = 10 produces a
 primitive type.  Not a class instance at all.  In this case x has no
 methods which can be invoked whatsoever.  This is something I always
 despised about Java.  Java does have an Integer class but that is
 generally only used when an object is absolutely required (which is not
 often).  Java 1.5 did introduce autoboxing on primitive types so that
 int's and Integer instances could be interchanged without knowing in
 method calls, etc ... but x is still not an object with methods.
 
 In fact I'd go as far as to say that Python seems *more* object-oriented
 than Java.

s/seems/is/

Java is more class-oriented than object-oriented. It forces you to use
classes for everything, but not everything is an object. Python let you
use the paradigm that seems appropriate for the task at hand, but still
everything is an object (really everything : functions, classes and
modules too...)


-- 
bruno desthuilliers
développeur
[EMAIL PROTECTED]
http://www.modulix.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Java vs Zope

2006-01-06 Thread Asad Habib
Well, the class is simply a construct that Java uses to define an object. 
Also, the concept of object is well defined in Java which makes it easier 
for the programmer to know what can and cannot be done. In Python, it is 
not as explicit. Java is a programming language and hence cannot be 
compared directly to a scripting language such as Python or PHP. These 2 
types are designed for different purposes.


- Asad


On Fri, 6 Jan 2006, bruno desthuilliers wrote:


Rocky Burt wrote:

David H wrote:


Python is also object oriented.  In python, x = 10 creates an object not
a simple type - if I recall the same is true in Java.



In fact this is not quite right.  In java, int x = 10 produces a
primitive type.  Not a class instance at all.  In this case x has no
methods which can be invoked whatsoever.  This is something I always
despised about Java.  Java does have an Integer class but that is
generally only used when an object is absolutely required (which is not
often).  Java 1.5 did introduce autoboxing on primitive types so that
int's and Integer instances could be interchanged without knowing in
method calls, etc ... but x is still not an object with methods.

In fact I'd go as far as to say that Python seems *more* object-oriented
than Java.


s/seems/is/

Java is more class-oriented than object-oriented. It forces you to use
classes for everything, but not everything is an object. Python let you
use the paradigm that seems appropriate for the task at hand, but still
everything is an object (really everything : functions, classes and
modules too...)


--
bruno desthuilliers
développeur
[EMAIL PROTECTED]
http://www.modulix.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Java vs Zope

2006-01-06 Thread Andreas Jung



--On 6. Januar 2006 10:06:55 -0500 Asad Habib [EMAIL PROTECTED] 
wrote:



Well, the class is simply a construct that Java uses to define an object.
Also, the concept of object is well defined in Java which makes it easier
for the programmer to know what can and cannot be done. In Python, it is
not as explicit. Java is a programming language and hence cannot be
compared directly to a scripting language such as Python or PHP. These 2
types are designed for different purposes.




Python is not a programming language??? huh..the difference is that
Java is compiled and Python is interpreted. I agree that PHP is not a 
programming language but just a weird mixture of HTML and _something_ 
programming-language-like :-)


-aj

pgpoE7bogTbXV.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Java vs Zope

2006-01-06 Thread Martijn Pieters
On 1/6/06, Andreas Jung [EMAIL PROTECTED] wrote:
 Python is not a programming language??? huh..the difference is that
 Java is compiled and Python is interpreted

*Bt* Wrong again. :)

Both Java and Python compile to bytecode, which a virtual machine then
interprets. In Java this step is explicit, Python does the compilation
on the fly on first import.

The distinction between 'scripting' and 'programming' language is
arbitrary and a marketing, what-can-you-use-the-language-for label.
Java is hardly suited for scripting tasks, while Python scales from
scripting all the way up to enterprise applications (another
marketing label). I prefer the term 'Agile language'.

This is going to deteriorate into a language flamewar soon, so let's
look at a good Monty Python film instead. I recommend Life of Brian.

--
Martijn Pieters
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Java vs Zope

2006-01-06 Thread Andreas Jung



--On 6. Januar 2006 16:39:18 +0100 Martijn Pieters [EMAIL PROTECTED] wrote:


On 1/6/06, Andreas Jung [EMAIL PROTECTED] wrote:

Python is not a programming language??? huh..the difference is that
Java is compiled and Python is interpreted


*Bt* Wrong again. :)


Hairsplitter :-)

-aj

pgpkOhBnORLeQ.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Java vs Zope

2006-01-06 Thread Martijn Pieters
On 1/6/06, Andreas Jung [EMAIL PROTECTED] wrote:
 Hairsplitter :-)

That's *Mr* __Pedant__ to you, capiche? :P

--
Martijn Pieters
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Java vs Zope

2006-01-06 Thread Lennart Regebro
On 1/6/06, Asad Habib [EMAIL PROTECTED] wrote:
 Well, the class is simply a construct that Java uses to define an object.
 Also, the concept of object is well defined in Java which makes it easier
 for the programmer to know what can and cannot be done. In Python, it is
 not as explicit. Java is a programming language and hence cannot be
 compared directly to a scripting language such as Python or PHP. These 2
 types are designed for different purposes.

The difference between scripting languages and programming languages
are an illusion. :)

Python is intepreted while Java is compiled. That makes Python
superiour in many ways. ;-)

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Java vs Zope

2006-01-06 Thread bruno desthuilliers
Andreas Jung wrote:
 
 
 --On 6. Januar 2006 10:06:55 -0500 Asad Habib [EMAIL PROTECTED]
 wrote:
 
 Well, the class is simply a construct that Java uses to define an object.
 Also, the concept of object is well defined in Java which makes it easier
 for the programmer to know what can and cannot be done. In Python, it is
 not as explicit. Java is a programming language and hence cannot be
 compared directly to a scripting language such as Python or PHP. These 2
 types are designed for different purposes.


 
 Python is not a programming language??? huh..the difference is that
 Java is compiled and Python is interpreted.

Not even - Python is byte-compiled too. The difference is that the
Python interpreter (call it 'VM' if you think that 'interpreter' isn't
buzzword-compliant enough) is smart enough to take care of the
compilation phase by itself.


-- 
bruno desthuilliers
développeur
[EMAIL PROTECTED]
http://www.modulix.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Java vs Zope

2006-01-06 Thread Martijn Pieters
On 1/6/06, Lennart Regebro [EMAIL PROTECTED] wrote:
 Python is intepreted while Java is compiled. That makes Python
 superiour in many ways. ;-)

pedant mode=ranting
Python is compiled, then interpreted. Java is compiled, then
interpreted. Java compilation is explicit, Python compilation
implicit.

The differences that make Python vastly superiour lie elsewhere.
Educate yerselves, fer Chris'' sake!
/pedant

We now return you to our regelar program.

--
Martijn Pieters
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Java vs Zope

2006-01-06 Thread Asad Habib
Actually, that's not true. Languages such as Perl and Python were designed 
to write scripts, not to code entire applications. Python is an exception 
because it can be successfully used to code large applications, unlike 
some other scripting languages. So it's best to call Python a scripting 
programming language because it has this dual nature. All said and done, 
I prefer to use Java over Python for large applications simply because 
it's cleaner and has mechanisms in place that support reusability of 
components and extensibility. Also, OO concepts such as abstraction and 
inheritance are well defined in Java.


Also, both compiled and interpreted languages have their advantages and 
disadvantages.


- Asad


On Fri, 6 Jan 2006, Lennart Regebro wrote:


On 1/6/06, Asad Habib [EMAIL PROTECTED] wrote:

Well, the class is simply a construct that Java uses to define an object.
Also, the concept of object is well defined in Java which makes it easier
for the programmer to know what can and cannot be done. In Python, it is
not as explicit. Java is a programming language and hence cannot be
compared directly to a scripting language such as Python or PHP. These 2
types are designed for different purposes.


The difference between scripting languages and programming languages
are an illusion. :)

Python is intepreted while Java is compiled. That makes Python
superiour in many ways. ;-)

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Java vs Zope

2006-01-06 Thread Jean-Marc Orliaguet


Here is a document that explains why scripting languages are better than 
system programming languages (like C, C++, Java) for creating large 
scale applications, for gluing components together,  thanks to weak typing:


http://home.pacbell.net/ouster/scripting.html

this too might be interesting to look at.
http://www.ferg.org/projects/python_java_side-by-side.html

PS: there's nothing negative in the term scripting language.

/JM
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Java vs Zope

2006-01-06 Thread bruno desthuilliers
Asad Habib wrote:
(top-post corrected)

 
 On Fri, 6 Jan 2006, bruno desthuilliers wrote:
 
 Asad Habib wrote:
 (top-post corrected)

 On Fri, 6 Jan 2006, bruno desthuilliers wrote:
 Rocky Burt wrote:

 (snip)


 In fact I'd go as far as to say that Python seems *more*
 object-oriented
 than Java.



 s/seems/is/

 Java is more class-oriented than object-oriented. It forces you to use
 classes for everything, but not everything is an object. Python let you
 use the paradigm that seems appropriate for the task at hand, but still
 everything is an object (really everything : functions, classes and
 modules too...)

 Well, the class is simply a construct that Java uses to define an
 object. Also, the concept of object is well defined in Java which makes
 it easier for the programmer to know what can and cannot be done. In
 Python, it is not as explicit.


 Ho, really ? Chapter and verse, please ?

 Java is a programming language and hence
 cannot be compared directly to a scripting language such as Python


 Lol.

 or
 PHP. These 2 types are designed for different purposes.


 Learn Python, learn about it's object model, learn about it's execution
 model, and stop talking like a clueless newbie.


 Bruno, it's evident to me that you cannot distinguish between opinion
 and fact.

opinions :
- Java is a programming language, Python is a scripting language,
- Zope is like PHP,

facts :
- the two main differences between Python and Java are the type system
(declarative static in Java, dynamic in Python) and the fact that in
Python, everything is an object (which is not true in Java)
- Python is successfully used for large-scale applications
- Zope is a web application server written in Python


 My advice to you, try thinking outside your box! Python is one
 of several languages being used for software development in the world
 today 

I use, did use, and will still use other languages too (including Java,
which I really liked - before I discovered Python and Smalltalk).

 and just because I don't think it's optimal for large-scale
 applications (the keywork here is I, not everyone) does not mean that
 you have to insult me.

As I said elsewhere, you have the absolute right to think what you want,
prefer whichever language you prefer etc.

The problem here is not that you prefer Java, it is that you present a
mix of unbacked opinions and erroneous beliefs as facts. Hence my
advice. BTW, please re-read it carefully: I do not say you *are* a
clueless newbie - just that you actually talk like one. But you're of
course free to feel insulted if you prefer...


-- 
bruno desthuilliers
développeur
[EMAIL PROTECTED]
http://www.modulix.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Java vs Zope

2006-01-06 Thread bruno desthuilliers
Lennart Regebro wrote:
 On 1/6/06, bruno desthuilliers [EMAIL PROTECTED] wrote:
 
Not even - Python is byte-compiled too. The difference is that the
Python interpreter (call it 'VM' if you think that 'interpreter' isn't
buzzword-compliant enough) is smart enough to take care of the
compilation phase by itself.
 
 
 Ah, but that's not the only difference. 

Of course not !-)
This was only about the 'compiled-vs-interpreted' thing.



-- 
bruno desthuilliers
développeur
[EMAIL PROTECTED]
http://www.modulix.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Java vs Zope

2006-01-06 Thread Lennart Regebro
On 1/6/06, bruno desthuilliers [EMAIL PROTECTED] wrote:
 Lennart Regebro wrote:
  On 1/6/06, bruno desthuilliers [EMAIL PROTECTED] wrote:
 
 Not even - Python is byte-compiled too. The difference is that the
 Python interpreter (call it 'VM' if you think that 'interpreter' isn't
 buzzword-compliant enough) is smart enough to take care of the
 compilation phase by itself.
 
 
  Ah, but that's not the only difference.

 Of course not !-)
 This was only about the 'compiled-vs-interpreted' thing.

Yeah, yeah, I was trying to be pedagogical and failed. Compiled =
fixed, interpreted = not fixed. If you see what I mean. Of course,
thats an oversimplification bordering on the incorrect, and there are
better ways to describe it, so as usual, I should be ignored.

It is indeed the dynamic typing, and the fact that everything is
handled by reference (more than that everything is an object, although
that's true as well) that I was aiming at. This means that you can
just replace the reference to one method with the reference to another
method, and do the same with everything else. Careful use of this
seriously cuts down development time, by for example letting you fix
Zope bugs without waiting for a new release.

I think it is these things people tend to see as scripting or
interpreted language features as opposed to compiled or real
languages.

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Java vs Zope

2006-01-06 Thread Dieter Maurer
Asad Habib wrote at 2006-1-6 11:27 -0500:
Actually, that's not true. Languages such as Perl and Python were designed 
to write scripts, not to code entire applications. Python is an exception 
because it can be successfully used to code large applications, unlike 
some other scripting languages.

Tcl and Perl, too, have been used to build large applications.

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] RE: Java vs Zope

2006-01-03 Thread J Cameron Cooper

Sam Stainsby wrote:


One thing is static type checking: developers detecting type errors at
compile time, rather than some hapless user running into it at run time
(i.e. after release to the public). I see many of those types of errors
in Zope and Plone products, particularly as the API of one product
changes and another product tries to use it. With Java, such
problems are likely to be detected at compile time. Runtime errors produce a 
negative public
perception of software products, as well as being dangerous in critical
systems. Pervasive use of unit testing will help avoid such problems, but
that level of discipline is hard to find in Zope/Plone projects (but well
done those who do it!). On the downside, static type checking makes Java
less flexible, and requires more programming effort, and of course there
is that tedious compilation step.


I worked in Java for web apps (as well as a few halting tries at 
GUIs--ick!) before Zope. I expected type problems because of the lack of 
static checking; however, I have not found it to be a problem. I don't 
think programs are quite as wild and wooly as static typed languages 
assume. I think it's quite acceptable to put the burden of use on the 
programmer instead of the compiler, considering the benefits; that's 
what he's thinking about anyway, no?


My main problem with Java is that it's a high-friction environment. It 
takes a lot of work to do most things, often because interfaces have 
been abstracted so far (or sometimes because of compiler hoops, but not 
that often.) This is both in code and framework.


For code, go take a look at what it takes to make an XML-RPC call in 
Python and in Java. I had to look this up for writing my book, and it's 
quite disgusting. It all depends on the functionality, of course, but I 
can't think of anything that writes quicker in Java than in Python.


Framework-wise, I found that it took at least three separate helper 
programs to set up an reasonably productive, understandable, and 
maintainable development environment for J2EE, and that's not even 
counting an IDE.


Zope 2 development generally has a lot less friction, and is usually a 
lot higher-level. As a result, I think it's several times faster than 
Java development. Possibly even many times faster. It does seem to make 
up for this by being more mysterious, but you can learn those things in 
time. You can't get rid of all the Java crap. (It's like the Churchill 
joke.)


Zope 3, though I admit I've only played with it glancingly, seems to be 
more J2EE-like in certain respects: there seem to be a lot of things I 
have to touch to get things going. To a certain point, I can deal with 
this, but if there's ever a ZDoclet...


--jcc
--
Building Websites with Plone
http://plonebook.packtpub.com/
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )