View Review Details


Book:   Jython Essentials
Subject:   Jython Essentials Review
Date:   2003-11-24 18:10:14
From:   Orlin Melstrand
Rating:  StarStarStarStarStar


This book is similar to the other O'Reilly books that have become popular for their conciseness and content--no fluff here. This is the type of book most useful to someone who wants or needs to concentrate on the subject and learn the technology. (It is not a classroom textbook, with exercises, tests, and so forth, though it does have short examples, which are better for learning than long ones, in my opinion.) The book will probably be most accessible to readers who are familiar with core Java. Familiarity with Python would be helpful, but should not be necessary--a three-chapter introduction to Python is included. It should be of interest to Java and Python programmers, and others interested in scripting applications.


Appendices are included on Jython installation, and comparisons between Jython and Python and between Jython and Java. A nice little surprise is a section on the use of PyUnit, the Python counterpart to JUnit, for unit testing, which also includes a discussion on compiling Jython.


The authors explain how to use Java from Jython, including type conversions, and how to subclass Java classes from Jython code. One chapter is devoted to a discussion of Java reflection and working with JavaBeans, and the use of Python reflection. Another includes examples illustrating how to construct an HTML browser and an HTML source browser, using Swing.


Another chapter includes a short discussion on each of JDBC (actually zxJDBC, the Python version), servlets, and parsing XML, with illustrative examples. The parsing examples use SAX, DOM, and JDOM, respectively; the zxJDBC example uses MySQL. The book also includes a brief discussion


of regular expressions, with a couple of short examples.


Finally, there is a chapter explaining how to use Jython from Java, which allows the embedding of a Jython interpreter in a Java program.


Notes: Examples run on Jython 2.0 or higher and jdk1.2 or higher.


The book has a web site with code samples for download, and errata.