Join Books.org — it's free

Jython Essentials: Rapid Scripting in Java by Samuele Pedroni โ€” book cover
Network Programming, Scripting Languages, Java (Programming Language)

Jython Essentials: Rapid Scripting in Java

by Samuele Pedroni, Noel Rappin
Available on Bookshop Write a review

Books.org participates in affiliate programs including Bookshop.org and the Amazon Services LLC Associates Program. We may earn a commission from qualifying purchases made through links on this page, at no additional cost to you.

Log in to track your reading progress.

Overview

Jython is an implementation of the Python programming language written in 100% pure Java, so it runs under any compliant Java Virtual Machine. The secret to Jython's popularity lies in the combination of Java's libraries and tools with Python's rapid development capabilities. With Jython, you can write Python programs that integrate seamlessly with any Java code. And like Python, Jython can be used interactively, so you can get immediate results as you are programming.

Jython Essentials provides a solid introduction to the Python language, offering a brief but thorough tour of the Python concepts you'll need to understand to use Jython effectively. The book makes frequent comparisons between Python and Java, with special emphasis on the different object-oriented semantics of the two languages, so Java programmers can quickly get up to speed with Jython.

Jython Essentials also covers the various ways in which Jython and Java can interact. For example, Jython code can create instances of pre-existing Java classes and call methods in those instances. You can write Jython classes that are direct subclasses of existing Java classes and use introspection to discern the capabilities of JavaBeans components. This book provides examples of using Jython with existing Java libraries, including the Swing GUI toolkit, the JDBC database API, the Servlet API, and various XML tools. And finally, the book shows how Jython can be used as a scripting language within a Java program.

With Jython Essentials, you have everything you need to start creating applications that mix the best of Python's interactivity and Java's robust libraries.

"Jython Essentials" provides a solid introduction to the language, with valuable reference material and examples. Pedroni and Rappin show programmers Jython's advantages in writing tests, playing with Java libraries, and adding scripting to applications. The book has been reviewed by the people behind the language.

Synopsis

"Jython Essentials" provides a solid introduction to the language, with valuable reference material and examples. Pedroni and Rappin show programmers Jython's advantages in writing tests, playing with Java libraries, and adding scripting to applications. The book has been reviewed by the people behind the language.

About the Author, Samuele Pedroni

Samuele Pedroni is one of the main Jython developers. He holds a CS flavored diploma in mathematics from the ETH Zurich (Swiss institute of technology in Zurich). He is now a teacher and research assistant at the Institute of Theoretical CS. He plans to come to the US for a PhD in the field of dynamic languages and dynamic compilation. He came to Jython with the interest in improving it with respect to Java importing and reloading. He has developed several important patches related to java integration, classloaders, and the reworking of java/python importing rules and design.

Noel Rappin is a Senior Consultant at Obtiva. A Rails developer for five years, Noel has spoken at RailsConf and Windy City Rails, and is the author of Professional Ruby on Rails from Wrox Press. A blog relating to this book can be found at http://www.railsrx.com.

Reviews

There are no reviews yet. Log in to write one.

Editorials

From Barnes & Noble

The Barnes & Noble Review
What if you could leverage Java's wide reach and powerful enterprise-quality tools for GUI, database, and XML development -- while writing up to 50 percent less code and gaining the productivity and simplicity of scripting? That's what Jython promises and Jython Essentials delivers.

Jython is a complete Python implementation written in 100 percent pure Java and seamlessly integrated with the Java platform. While occasionally a bit slow, it lets Python go just about anywhere Java can go -- into client-side applets that run in browser JVMs; into servlets that run on Java servlet or J2EE servers; into .jar files that can be deployed to multiple platforms. It also gives developers a simple and powerful tool for extending their Java programs and accomplishing tasks that require just too much overhead in Java.

Jython Essentials begins by comparing Python types, structures, and object-oriented features with the nearest Java equivalents; showing how to combine Python statements into functions; explaining how to create reusable Python modules; and introducing good Python programming style. Next, the authors demonstrate the diverse ways Java and Jython can work together. Jython's goal is to make those interactions as transparent as possible; still, there's much to learn.

Coverage includes using existing Java objects and classes from within Jython; automatic type conversions between Java and Python types; creating Jython classes that are direct subclasses of existing Java classes; and introspection shortcuts that evade Java's getSomething and setSomething methods. You'll learn how to use Jython with key Java libraries such as Swing and JDBC; with key Python system, file, and serialization modules, and with Python's PyUnit unit testing framework. The authors conclude by showing how to use Jython as a scripting language within a Java program (very handy for preference/properties files); and how to compile Jython code for distribution.

Jython is a terrific tool, and this book introduces it extremely well. (Bill Camarda)

Bill Camarda is a consultant, writer, and web/multimedia content developer with nearly 20 years' experience in helping technology companies deploy and market advanced software, computing, and networking products and services. His 15 books include Special Edition Using Word 2000 and Upgrading & Fixing Networks For Dummiesยฎ, Second Edition.

Book Details

Published
March 1, 2002
Publisher
O'Reilly Media, Incorporated
Pages
302
Format
Paperback
ISBN
9780596002473

Similar books