Ian Bicking: the old part of his blog

Bandwagon leaving from lot C

So Tim Bray (at Sun) has been considering the Beyond Java book. I hear that book quotes this post of mine, but that's an aside.

He thinks the JVM is important. And the web is important. I don't really care about the JVM myself, but I'm all for the second one. If Sun got rid of their stupid licensing I suspect I might even grow to care about the JVM; but because Sun is stupid, Java related tools are a pain to deal with on open source platforms. Open source developers are good at making things less painful, but Sun is too caught up in its self-importance to let us. But that's an aside.

But my point: here is a bandwagon we can jump on! So you want the JVM for you web app, but you don't want to write it in Java and J2EE? Python is right on the cusp of being highly usable there.

What needs to be done? Not that much. Jython of course needs to be updated to match Python 2.4. Luckily after a dormant period I hear Jython development has picked up some, and it's pretty close already. Then we need web frameworks. But we already have those in spades. So we need a WSGI adapter -- which we have in modjy. Every WSGI-enabled web framework won't magically work when that happens, but we'll be really close. There will be stuff to tweak, new database drivers to test (I thought there was a JDBC DBAPI driver, but I can't find it), and installation processes to figure out. But there's no huge leaps that have to occur.

I personally remain indifferent to the JVM (and frankly indifferent to the corporate culture it represents), but there's real opportunity here for someone to take up.

Created 02 Dec '05

Comments:

Re: I thought there was a JDBC DBAPI driver, but I can't find it.

zxJDBC is included in Jython itself. http://www.jython.org/docs/zxjdbc.html. Once upon a time it was at http://www.ziclix.com/zxjdbc/. I had no problem using it with MySQL and PostgreSQL JDBC drivers.

# Seo Sanghyeon

I can't say I disagree. There seems to be a certain mindset that comes with the Java/JVM bandwagon that kind of turns me off to the entire thing. Let's not even talk about the J2EE aspect of things, blech.

# Jesse

I'd be a bit puzzled about a guy who would like to use the JVM without using Java. But hey World is wide enough for all kind of people :)

# S.

The JVM is a platform of sorts. Though from what I see, it's not a particularly popular platform for the open source community; I feel like the open source development that occurs on it is disassociated from the rest of the open source community. Nevertheless, there's a lot of disaffected programmers on that platform, some of who may be a benefit to the open source community. And most of who may not be any benefit at all. It's a testiment to a certain disfunction there that Jython isn't a more active project, as it seems to get a signficant amount of use, but not contributions.

I go back and forth on this sort of thing. I recognize some people need the JVM. A lot of people, really, for legacy reasons. I don't have any particular problem with the JVM -- except that the most common implementations are proprietary. But I also think most people on that platform aren't choosing to get off it, and if they aren't willing to make that choice, it doesn't necessarily help us to bring people a choice they don't really care about.

# Ian Bicking

I develop a Open Source app with Jython/Java and I use Sun's VM on Linux. Guess what I don't have one problem with it! Not only does the combo work well together the Sun folks are extremely easy to work with when I have problems/suggestions. So I guess I don't get the "Sun is Dumb" appelation. The folks over there seem pretty sharp to me. :)

Licensing is Licensing. Edward had to rip out the Leo usage of a Python module because this standard module didn't have an open enough License for Ubuntu! :D

leouser

# leouser

By "Sun is dumb" I only mean Sun-the-company and their Java licensing. The Java policy seems to put a lot of importance in compatibility and certification and whatnot, which would be fine for people who care about that stuff (a rapidly diminishing number of people), except Sun keeps people from fixing their packaging and distribution as a result. If you are serious about Java you figure these things out -- you run their installers, set up your CLASSPATH, etc. If you aren't serious (like myself) you don't figure these things out, and you ignore Java as a platform. If it was easy for me to run test suites on Jython I would. There's lots of other platforms that I'm not serious about that I use regardless, because they are easy and well integrated into whatever OS I'm on (since that OS is often Debian-related all the more reason this licensing causes problems). Java is not one of them.

Sun's concern about the cross-platform compatibility of their platform is outdated. The only real malicious forker (MS) has dropped Java for .NET. And I don't think Sun every really delivered in a practical way on the write-once-run-anywhere promise anyway. Maybe their accomplishments would mean something to someone coming from a proprietary C background, but it's thoroughly unimpressive to anyone using Python, and not even very impressive compared to open source C projects (where compatibility is achievable through feedback, not restrictions). It's created a situation where Java seems hostile to the host platform, hostile to packaging systems of all kinds, and ultimately hostile towards users. But every system has flaws; the problem with Java is that Sun won't let other people fix those flaws.

# Ian Bicking

I don't have any of these problems your talking about so I guess were on different pages of the universe. :) Ive been using Java on my Linux Suse distro for 4-5 years and Ive never had a problem installing the software. For someone who develops with Java it is important to me that my app(s) will run on Windows as it runs on Linux, and they do. So the cross platform compatibility is a plus for me. I don't know if you pay much attention to what goes on in the Java world but there definately is work going on to provide better integration with the native platforms. You can look at the JDIC project for example.

gotta run! leouser


The JVM give me a few key features:

I know that a good sysadmin can manager a python app as well, and the ability to make a python wrapper around c/c++ takes us a long way as well, but the JVM is important.

I've been thinking about the JVM to support a ESB (http://mule.codehaus.org/). Do the Java bits in java, and the agile parts in python, and link them up with clean API's. Unless the overhead of the extra socket call is too much I like this better then running Jython in the JVM.

Once you have the overhead of a J2EE server I don't think scripting langs buy you that much. And I feel that you would lose a lot by trying to run a java app server in a non-J2EE environment. J2EE is complex because it helps solve complex problems, its just that not all web apps are all that complex......

# Aaron

the only place I can see scripting saving you anythin is in a JSP, but really you shouldn't have that much code in those things anyway. A Jython instance is not that hard to embed and work with, in fact its quite simple. I have a custom shell for Jython fairly well developed and it not that hard to manipulate the PythonInterperter via its api. Im going to assume that it will be much simpler to work with the interpreter in the runtime than playing with a socket connection, even if it is hidden behind a good API.

leouser

# leouser

With respect to Python Web framework technologies and the Java platform, WebStack has supported the Java Servlet API for some time. Of course, even with your Web application code running in Jython, you still need to be able to access all those convenient libraries that are available for CPython. Consequently, it takes a bit of work to have things like libxslt, rdflib and the other interesting stuff switched out with capable equivalents using the same API - more work than I'd be willing to put in right now, anyway.

# Paul Boddie

I can't understand what people have against Java or Sun.

Java is the best language for some jobs - it has great tools, great documentation and a great speed. It has also some bad parts as swing, but Overall it's really great. Ok, the web frameworks suck compared to Python frameworks, but that is not so much because of Java, but because of stupid framework designs.

Now I have read a lot of people bashing Java (especially the Rails folks), and frankly their bashing is groundless.

I code a lot in Python and I love that language. But I have also had experience with Java, and Java is also pretty neat for some applications. Now, Python and Java combined could produce some great results! Python because of the very nice syntax, nice design and Java because of speed, documentation and "tools"...

I share you thoughts on Sun freeing Java, BUT it's a very bad argument to hate Sun. Sun does a GREAT deal for free software - - like OpenOffice and Solaris! And I can't understand that people don't credit them for that...

Go Sun, Go Java and Go Python ;-)

# Amir Salihefendic

I can't believe it would be that terrible of a chore to develop a Jython based Web framework for j2ee. The web side is primitive because you are supposed to build a framework up from it, the freedom is yours to decide. Sun acknowledges this and its considered a good practice to use a web framework. Ill have to check some of the links on this page out, maybe one alread exists.

In my experience in developing both in Java and Jython at the same time, its been enjoyable. Both are simple languages, so its not hard to reason about the code in either case. It also isn't that hard to translate between the two. The biggest headache Ive encountered is reasoning about how a python truth can be mapped to a java truth. Python: if something: ..do something

java: if ??????

since something can be true in many cases, not like the good ol simple if(true){

}

I had the choice of buying "Beyond Java" or "Swing Hacks" this last weekend. I perused "Beyond Java" and saw that it seemed to dismiss Python as a language because it relies too much on whitespace and the community isn't friendly and too academic. At that juncture I didn't care what the author had to say anymore and put the book back up on the shelf. Ive read one of his other books and really didn't get anything out of it. Not sure why I would need to read another of his "I Dont Like Java Books", you'd think one would be enough. :D I would think people could be able to decide if they like a technology or not by just using it. Then I perused "Swing Hacks" and after reading a couple of pages thought that it looked like a lot of fun, and it is! If your a Swing user who likes to play with the internals of the widgets and make cool stuff, it probably would be a book you'd like. If your a Swing user who just likes to plop widgets together, well it might be for you to! It might just inspire you to dig into the Swing source and make magic happen.

leouser

# leouser