or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
Sell Back Your Copy
For a $0.96 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Jython for Java Programmers
 
See larger image
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Jython for Java Programmers [Paperback]

Robert Bill (Author)
4.6 out of 5 stars  See all reviews (9 customer reviews)

List Price: $49.99
Price: $34.21 & this item ships for FREE with Super Saver Shipping. Details
You Save: $15.78 (32%)
  Special Offers Available
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
Only 2 left in stock--order soon (more on the way).
Want it delivered Wednesday, February 1? Choose One-Day Shipping at checkout. Details
Textbook Student FREE Two-Day Shipping for Students. Learn more


Book Description

0735711119 978-0735711112 December 28, 2001 1

This book will help Java developers to increase application development and deployment, thus optimizing their overall efficiency.

A brief introduction is provided that shows the differences between Java and Jython, important to include so that the reader will have a better understanding of why their union is beneficial.

The remainder of the book teaches, through examples, how to use Jython. Intended for an experienced Java developer, this book assumes you understand the fundamentals to programming (i.e. loop statements, if.then, etc.). So, page space is focused on utilizing Jython with Java by covering the following: extending Python with java classes, modules, compiling, interpreters, design integration, etc.

www.newriders.com contains all code and applications developed in the book.


Special Offers and Product Promotions

  • Buy $50 in qualifying physical textbooks, get $5 in Amazon MP3 Credit. Here's how (restrictions apply)

Frequently Bought Together

Jython for Java Programmers + Jython Essentials (O'Reilly Scripting) + The Definitive Guide to Jython
Price For All Three: $106.41

Show availability and shipping details

Buy the selected items together
  • In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Jython Essentials (O'Reilly Scripting) $31.20

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • The Definitive Guide to Jython $41.00

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details



Editorial Reviews

Amazon.com Review

Robert Bill's Jython for Java Programmers from New Riders is an essential introduction to the complexities of the merger between two popular object-oriented languages, Python and Java. It is directed toward Java programmers who want to incorporate Python rather than vice versa, but the utter symmetry of merging two object-oriented languages creates an Escheresque problem in perspective. It is like two snakes gobbling each other up.

Let's sort this out historically. When Sun Microsystems' virtual machine (VM) paradigm emerged in the mid-1990s, the high-level programming language Java became the idiom for the new "soft" computer. Java's object-oriented architecture allowed it to scope from the lowest-level OS tasks (reads, writes to disk and screen), but much of the mid- and high-level tools were missing--e.g., common GUI features, text parsing, list sorting. The missing functionality is implemented gradually with nuts-and-bolts Java functions and by porting libraries to Java (GL4Java).

The cascade of "100 percent pure Java" ports has finally led to the gobbling up of the elegant Python scripting language, which is also object-oriented. But that is only half of the story. As Java devours Python, Python also devours Java. In one manifestation, Jython is Python written in Java rather than C. It has its own interpreter "jython" and compiler "jythonc," both of which can draw on all of Java's classes. Conversely, jythonc will create a Java class which can be imported by the Java interpreter "java" and compiler "javac." Java programmers will have the luxury of importing and using succinct Jython classes rather than writing the lines of verbose native Java code.

The bewildering complexities are elucidated by Bill in Jython for Java Programmers, which presents Jython both as a standalone, Java-equipped language and as the class implementation within Java. Its three parts are dedicated to Jython's basics (very similar to a Python tutorial), Jython's internals, and Jython's incorporation into GUI, database, and Web applications. The book follows in the New Riders tradition of exhaustive, implementation-centered publishing. Jython is not a Java foundation class, but Bill's book is a cornerstone in its own right. We also recommend Jython.org to help sort out Jython's big picture. --Peter Leopold

From the Back Cover

This book will help Java developers to increase application development and deployment, thus optimizing their overall efficiency. A brief introduction is provided that shows the differences between Java and Jython, important to include so that the reader will have a better understanding of why their union is beneficial. The remainder of the book teaches, through examples, how to use Jython. Intended for an experienced Java developer, this book assumes you understand the fundamentals to programming (i.e. loop statements, if.then, etc.). So, page space is focused on utilizing Jython with Java by covering the following: extending Python with java classes, modules, compiling, interpreters, design integration, etc. newriders contains all code and applications developed in the book.

Product Details

  • Paperback: 496 pages
  • Publisher: Sams; 1 edition (December 28, 2001)
  • Language: English
  • ISBN-10: 0735711119
  • ISBN-13: 978-0735711112
  • Product Dimensions: 8.9 x 7.1 x 1 inches
  • Shipping Weight: 1.7 pounds (View shipping rates and policies)
  • Average Customer Review: 4.6 out of 5 stars  See all reviews (9 customer reviews)
  • Amazon Best Sellers Rank: #230,882 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

9 Reviews
5 star:
 (5)
4 star:
 (4)
3 star:    (0)
2 star:    (0)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.6 out of 5 stars (9 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

8 of 9 people found the following review helpful:
4.0 out of 5 stars Jython for Java Programmers, February 25, 2002
By A Customer
This review is from: Jython for Java Programmers (Paperback)
Robert W. Bill did an excellent job in introducing Jython which is the combination of two programming languages. The merging of Java and Python. Although intended for programmers with sufficient background in Java programming, this book can be a great tool for learning another high-level language. This book includes topics on: seamless access to Java classes, efficiency,dynamic types, introspection and dynamic execution, first-class functions and functional programming, Java security, and code clarity.

Jython for Java Programmers is like a book for beginners trying to lear a new programming language. Each chapter has sufficient samples of codes with a corresponding syntax for a particular example. At the end of each chapter, the author was able to clearly compare Jython to Java. Such comparisons include: statements, typecodes, types, and classes, errors and exceptions, synchronization, packages, GUI development, as well as instances and inheritance. The last two chapters provided topics on database programming and server-side web programming. The Jython programmer is given sample codes on how to make use MySQL, PostgreSQL, and JDBC in their Jython program. The book focused on Servlets and JSP in its last chapter. Although it is equally effective with all the Java technologies on developing web applications.

Jython can be an added high-level language for Java programmers. But the book assumes its audience has previous Java knowledge. So that discussions on class, instance, encapsulation, polymorphism, and inheritance were briefly mentioned. Thus, cannot be sufficient as an introduction to programming. Jython-related Internet resources were listed in the Introduction section. An educational advantage of this book is that it supports functional programming as well as object-oriented programming.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


5 of 5 people found the following review helpful:
4.0 out of 5 stars Excellent book, February 25, 2002
By 
akempo "akempo" (Lexington, SC United States) - See all my reviews
This review is from: Jython for Java Programmers (Paperback)
An excellent book overall, this book accomplishes what it sets out to do: teach Jython to Java Programmers. Like many who were unfamiliar it, I was under the impression that Jython was simply a Java version of Python, which it is not. Jython is a language in its own right, and this book serves not only as an introduction to Jython, but to Python as well, and a very good one at that.
Although I did not do every example in the book, as that would have taken some time, I did most of the examples from the first 6 chapters, and with one exception they all worked. I have enough confidence in the author that I believe most, if not all the following examples will work as written also. Another thing I appreciate was the author's notes regarding versions scheduled to come out, so that if my Jython version behaved differently, I knew why.
From an organizational standpoint, the book follows the standard teaching conventions of showing syntax and data types and moving up from there until classes have been discussed. The middle part of the book is spent talking about how to combine Java and Jython, a much simpler process than any other two languages I've seen, and then he discusses practical applications of Jython and Java. Although the examples are too simplistic for a real world scenario, they convey enough information to provide a model from which to develop.
My only real complaint with the book was the number of grammatical errors, which distracted me from time to time as I puzzled out what the author was trying to say. A good book, and one which the publisher should re-edit to make it even better.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


3 of 3 people found the following review helpful:
5.0 out of 5 stars Great book on Jython if you already know Java, December 13, 2006
This review is from: Jython for Java Programmers (Paperback)
This book is designed for those who know Java or are learning Java. The Java-specific meaning of terms such as classpath, garbage collection, and interface appear without explanation, but no more than rudimentary Java knowledge is required. Specifically, Java developers desiring accelerated development, embedded interpreters, and increased flexibility will most appreciate this book. Although Jython is a complete programming language, it is unique in its ability to complement Java development rather than appear as an alternative to Java.

Chapter 1, "Jython Syntax, Statements, and Comments," introduces syntax and statements. Python's syntax is an essential part of what constitutes the coined word pythonic, an important descriptor of those details that make Python and Jython code clear, simple, and distinct. Python's use of indentation to delimit code blocks and newlines to delimit statements is new to most programmers, and Chapter 1 details the rules that apply to indentation, newlines, and statements. Additionally, Chapter 1 introduces the interactive interpreter, a Jython mode that immediately evaluates statements as you enter them. This chapter applies to Python in general with no references to material unique to Jython.

Chapter 2, "Operators, Types, and Built-In Functions," covers Jython's data object, operators, and built-in functions. Data objects, or types, are especially interesting because of Jython's ability to use both Python and Java objects. The Python language specification defines Python's, and therefore Jython's types, but types are where Jython-specific details emerge. One such detail is the conversion between Jython and Java types. Chapter 2 also defines Jython's built-in functions, which are those functions that are available without any import statements and that account for a sizable portion of Jython's functionality.

Jython's errors, exceptions, and warnings appear in Chapter 3, "Errors and Exceptions." Chapter 3 contains the definitions of Jython's built-in exceptions as well as a detailed look at the try/except and try/finally statements used to handle exceptions. Working with exceptions is of course important to Jython, but it is also an important step to working with Java classes and the exceptions they may raise.

Java does not have functions, but they are an important part of Jython. Chapter 4, "User-Defined Functions and Variable Scoping," shows how to define and use Jython functions and how to use Jython's functional programming tools. Functions are callable objects not defined within a class, but functional programming has a less succinct definition. Functional programming revolves around finding the results of an expression. Jython supplies all the tools required to learn and use functional programming, and these tools appear in Chapter 2.

Jython has modules, another unit that Java does not have, and Chapter 5, "Modules and Packages," describes Jython's modules. Jython also has packages, as does Java, but Jython packages differ from the Java counterpart as Chapter 5 explains. With Jython packages, modules, and classes as well as Java packages and classes, the details of the import statement quickly become important. Chapter 5 clarifies the import statement along with modules and packages.

Chapter 6, "Classes, Instances, and Inheritance," introduces the definition and use of Jython classes. This includes the subclassing of Java classes, the use of Java interfaces and Java abstract classes, and the implications of Java's access modifiers such as public, private, and protected. Jython classes do differ from Java classes, however, and Chapter 6 clarifies these differences.

Chapter 7, "Advanced Classes," extends the information on Jython classes to include Jython's special class attributes. Special attributes in Jython are those that follow a special naming convention and provide specific functionality. These special attributes let you customize a class's behavior and makes creating advanced classes relatively easy.

Chapter 8, "Compiling Jython with jythonc jythonc," details Jython's complicated jythonc tool. jythonc compiles Jython code to Java byte-code. jythonc lets you use classes written in Jython within Java frameworks, and even lets you create class files that you can import and use from within Java.

Chapter 9, "Embedding and Extending Jython in Java," describes how to embed a Jython interpreter. Compiling Jython to Java byte-code is extremely useful, but embedding a Jython interpreter within Java applications has many advantages. Embedding gives you total control over Jython's system state and allows you to use all of Jython's features and modules within a Java application. The amazing part is how simple it is to embed a Jython interpreter. A basic embedded interpreter requires only two lines of Java code, and adding additional configuration to an embedded interpreter is equally easy. An embedded interpreter allows you to write Jython modules to extend or implement features of Java applications without having to compile modules with jythonc. It is my impression that embedding Jython is the foremost advantage of Jython. It allows multi-level language development, leverages all that is good in Java and Python within a single application, and allows rapid development and extensibility. There is already a number of projects that embed Jython, and the trend to do so will likely continue.

Chapter 10, "GUI Development," describes how to develop graphical applications with Jython. The focus is on Java's Abstract Windowing Toolkit (AWT) and Swing application programmer's interface. Jython allows rapid development of graphical applications because of its addition of automatic bean properties and events. Chapter 10 covers the details of automatic bean properties and events, but the basic idea is that Jython automatically searches a component for these features and adds shortcuts to establishing properties and event handlers. The shortcuts leverage Jython syntax features to simplify and accelerate development. Chapter 10 also includes information on creating Java applets with Jython.

Java has become very prominent in database programming, and Jython is able to leverage all of Java's success in this area while adding its own advantages. Chapter 11, "Database Programming," introduces the use of Jython in database programming. Chapter 11 includes information on hashed database files as well as the MySQL and PostgreSQL relation database management systems (object-relation for PostgreSQL). Jython also has the advantage of being able to use Java's JDBC database connectivity or the Python database application programmer's interface implemented with zxJDBC. Chapter 11 discusses both of these APIs.

Chapter 12, "Server-Side Web Programming," describes web programming with Jython. For Jython, this means servlets, Java Server Pages (JSP), and taglibs. In other words, server-side web development with Jython coincides with the popular (standard) Java web development paradigm. Chapter 12 addresses using jythonc -compiled classes as servlets as well as an embedded Jython Servlet mapping and IBM's bean scripting framework (BSF).

Java programmers wishing to add a high-level language as a tool in their existing arsenal is the primary audience for this book, but is equally applicable to those seeking an alternative to Java, yet bound to an organization dedicated to Java-based technology. A secondary audience is those beginning Python programmers wishing to extent their Python facility within Java frameworks. Because this book assumes some knowledge of Java basics, this secondary audience may require an additional source for Java fundamentals. If you have no interest in Java, or you are already an advanced Python programmer, then this book is probably not for you.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews







Only search this product's reviews



What Other Items Do Customers Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(1)

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums



So You'd Like to...


Create a guide


Look for Similar Items by Category


Look for Similar Items by Subject