Free Programming Books
Free download ebooks on computer and programming | |||
Free Java Ebook "Foundations of AOP for J2EE Development" Sample Chapter
Foundations of AOP for J2EE Dev
Download chapter
Free Chapter 3 : The basic concepts of AOP that are implemented in AspectJ Foundations of AOP for J2EE Development covers a relatively new programming paradigm: aspect-oriented programming, or AOP. Presented are the core concepts of AOP: AspectJ 5, JBoss AOP, Spring AOP, and JAC. Specific features of these tools are compared. The book also explores the potential uses of AOP in everyday programming life, such as design patterns implementation, program testing, and application management. In the latter part of the book, the authors show how AOP can ease the task of J2EE application development. (J2EE is known for being a rich and somewhat complicated framework.) THE HISTORY OF ASPECTJThe histories of AspectJ and AOP are closely related. AspectJ has always been considered by Gregor Kiczales as the project that would illustrate the concepts of AOP. Although the notion of the aspect dates back to 1996, and the first versions of AspectJ were released in 1998, the ideas and research that culminated in AOP date back to before this time. Research in reflection in the 1980s and work on open implementations in the 1990s served as background for the development of AOP. Invented in 1984 by Brian Smith, and studied and popularized by Patricia Maes in 1997, reflection is a programming technique that introduces a two-level architecture. The first level, called the base level, consists of the application. The second level, called the meta level, controls and supervises the base level. Although the notions of the aspect and the meta level differ, they share a common goal: to separate business functionalities from technical concerns. This separation aims to result in better modularization of programs. Prior to inventing the concept of the aspect, Kiczales spent time conducting research in the domain of reflection. In 1991, he was coauthor of The Art of the Metaobject Protocol (MIT Press, 1991). The founding document of AOP was published and presented in 1997 by Kiczales during the European Conference on Object-Oriented Programming (ECOOP). Presentations had been held previously, in 1996, but the 1997 article is considered seminal. Simultaneously, the first prototypes of AOP languages appeared in 1996-97. Christina Lopez, a member of Kiczales's team at the time and an important contributor, developed the D language and its implementation, DJava. The D language contained two types of aspects: distribution and concurrency-management. Soon after, Lopez and Kiczales realized that this new approach could be generalized and applied to other aspects. A general-purpose language that could implement any kind of aspect was needed. In 1998, Kiczales and his team made the decision to switch from D to AspectJ. Soon after, the first implementations of AspectJ were released. At almost the same time, Aspect-Oriented Tcl Object System (A-TOS), which was the first prototype of Java Aspect Components (JAC), was implemented. Since then, several versions of AspectJ have been released, and each one has included new features and/or bug fixes. The first major version of AspectJ, designated version 1.0, was released in November 2001. This was also the year during which AOP was fully recognized by the international computer-science community. A special edition of the leading journal, Communications of the ACM, was devoted to AOP. In December 2002, the AspectJ project left PARC and joined the open-source Eclipse community. Since then, the AspectJ Development Tools (AJDT) plug-in has been developed. It enables you to write, compile, and run an aspect-oriented program within the IBM Eclipse IDE. | |||