Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 552 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
552
Dung lượng
3,07 MB
Nội dung
[...]... applications and swing user interfaces, using the scripting- specific features in Groovy covered in Chapter 4 ■ Chapter 6, “Bean Scripting Framework” In this chapter, I describe the general Java scripting framework In addition to explaining how to implement general support in your project for any compliant scripting language, I also discuss some basic abstractions implemented in the Bean Scripting Framework... on the use of scripting languages in real Java projects: PREFACE XIX ■ Chapter 7, “Practical Scriptingin Java”—Here I cover topics related to the use of scripting for everyday programming tasks, such as unit testing, interactive debugging, and project building, among others ■ Chapter 8, Scripting Patterns” In this chapter, I discuss Java application design patterns that involve scripting languages... make them suitable for certain roles in development 4 SCRIPTINGIN JAVA Background The definition of a scripting language is fuzzy and sometimes inconsistent with how scripting languages are used in the real world, so it is a good idea to summarize some of the basic concepts about programming and computing in general This summary provides a foundation necessary to define scripting languages and discuss... “Introduction to Scripting —Here I define the basic characteristics of scripting languages and compare them to system programming languages XVIII ■ PREFACE Chapter 2, “Appropriate Applications for Scripting Languages” In this chapter, I explain the role of traditional (native) scripting languages in the overall information technology infrastructure I also discuss tasks for which scripting languages have... personal computers increase in speed, more desktop applications are being written in Java This trend only continues One of the basic requirements of a scripting language is to have an interpreter or some kind of virtual machine The Java platform comes with the Java Virtual Machine (JVM), which enables it to be a host to various scripting languages There is a growing interest in this area today in the Java... concepts they introduce In this chapter, we discuss all the characteristics defining a scripting language In Chapter 2, we categorize scripting languages based on their role in the development process Compilers Versus Interpreters Strictly speaking, an interpreter is a computer program that executes other high-level programs line by line Languages executed only by interpreters are called interpreted... make scripting useful T Before I start to discuss the application of scriptingin the Java world, I summarize some of the theory behind scriptingin general and its use in information technology infrastructure This is the topic of the first two chapters of the book, and it gives us a better perspective of scripting technology as well as how this technology can be useful within the Java platform To begin,... (Java SE 6) ■ Chapter 10, “Web Scripting Framework” In this chapter, I discuss the Web Scripting Framework, a framework built on top of the Scripting API and created to enable scripting languages to generate Web content inside a servlet container I explain how native scripting languages, such as PHP, can be synergized with the Java platform to bring more flexibility in Web application development Part... two APIs defined by the specification: ■ Chapter 9, Scripting API”—Here I cover the Scripting API, the standardized general scripting framework for the Java platform The purpose of this framework is the same as that of the Bean Scripting Framework, but the Scripting API brings many new features that the modern scripting framework needs The Scripting API is a standard part of the Java platform with... trying to provide Java developers with the same power developers of traditional scripting languages have Also, there is a way to execute your existing application written in a dynamic language such as Python inside the JVM and integrate it with another Java application or module 7 8 SCRIPTINGIN JAVA This is what we discuss in this book We take a scripting approach to programming, while discussing . applications
and swing user interfaces, using the scripting- specific features in Groovy
covered in Chapter 4.
■ Chapter 6, “Bean Scripting Framework” In this chapter,. that describe scripting languages
in general:
■ Chapter 1, “Introduction to Scripting —Here I define the basic character-
istics of scripting languages