Pro JPA 2 introduces, explains, and demonstrates how to use the Java Persistence API (JPA). JPA provides Java developers with both the knowledge and insight needed to write Java applications that access relational databases through JPA. Authors Mike Keith and Merrick Schincariol take a hands–on approach to teaching by giving examples to illustrate each concept of the API and showing how it is used in practice. All of the examples use a common model from an overriding sample application, giving readers a context from which to start and helping them to understand the examples within an already familiar domain. After completing the book, you will have a full understanding and be able to successfully code applications using JPA. The book also serves as a reference guide during initial and later JPA application experiences. - Hands-on examples for all the aspects of the JPA specification, based on the reference implementation of this specification - A special section on migration to JPA - Expert insight about various aspects of the API and when they are useful - Portability hints to provide increased awareness of the potential for non–portable JPA code What you’ll learn - Get started with enterprise applications using JPA 2 - Get up to speed with object–relational mapping and Entity Manager - Learn and use queries and the query language (JP QL) - Employ advanced object–relational mapping techniques - Use XML mapping files and learn other advanced techniques - Package and deploy your Java persistence applications - Test your Java persistence applications - Migrate your Java persistence applications Who this book is for The book generally targets enterprise and persistence developers who fall in one of three categories: - Those who are new to persistence, we will present some background information and introduce these readers to the basic persistence concepts to bring them up to speed. - Those who know and/or use existing ORM persistence products such as Hibernate or TopLink. - Those who have already used JPA and want to learn about newer features introduced by JPA 2, or have a good reference book to consult when they develop JPA applications. In general, we assume that the reader is knowledgeable with Java, SQL, and JDBC, and has a little knowledge of J2EE
Beginning Java 7 guides you through version 7 of the Java language and a wide assortment of platform APIs. New Java 7 language features that are discussed include switch-on-string and try-with-resources. APIs that are discussed include Threading, the Collections Framework, the Concurrency Utilities, Swing, Java 2D, networking, JDBC, SAX, DOM, StAX, XPath, JAX-WS, and SAAJ. This book also presents an introduction to Android app development so that you can apply some of its knowledge to the exciting world of Android app development. This book presents the following table of contents: Chapter 1 introduces you to Java and begins to cover the Java language by focusing on fundamental concepts such as comments, identifiers, variables, expressions, and statements. Chapter 2 continues to explore this language by presenting all of its features for working with classes and objects. You learn about features related to class declaration and object creation, encapsulation, information hiding, inheritance, polymorphism, interfaces, and garbage collection. Chapter 3 focuses on the more advanced language features related to nested classes, packages, static imports, exceptions, assertions, annotations, generics, and enums. Additional chapters introduce you to the few features not covered in Chapters 1 through 3. Chapter 4 largely moves away from covering language features (although it does introduce class literals and strictfp) while focusing on language-oriented APIs. You learn about Math, StrictMath, Package, Primitive Type Wrapper Classes, Reference, Reflection, String, StringBuffer and StringBuilder, Threading, BigDecimal, and BigInteger in this chapter. Chapter 5 begins to explore Java's utility APIs by focusing largely on the Collections Framework. However, it also discusses legacy collection-oriented APIs and how to create your own collections. Chapter 6 continues to focus on utility APIs by presenting the concurrency utilities along with the Objects and Random classes. Chapter 7 moves you away from the command-line user interfaces that appear in previous chapters and toward graphical user interfaces. You first learn about the Abstract Window Toolkit foundation, and then explore the Java Foundation Classes in terms of Swing and Java 2D. Appendix C explores Accessibility and Drag and Drop. Chapter 8 explores filesystem-oriented I/O in terms of the File, RandomAccessFile, stream, and writer/reader classes. Chapter 9 introduces you to Java's network APIs (e.g., sockets). It also introduces you to the JDBC API for interacting with databases along with the Java DB database product. Chapter 10 dives into Java's XML support by first presenting an introduction to XML (including DTDs and schemas). It next explores the SAX, DOM, StAX, XPath, and XSLT APIs. It even briefly touches on the Validation API. While exploring XPath, you encounter namespace contexts, extension functions and function resolvers, and variables and variable resolvers. Chapter 11 introduces you to Java's support for SOAP-based and RESTful web services. As well as providing you with the basics of these web service categories, Chapter 11 presents some advanced topics, such as working with the SAAJ API to communicate with a SOAP-based web service without having to rely on JAX-WS. You will appreciate having learned about XML in Chapter 10 before diving into this chapter. Chapter 12 helps you put to use some of the knowledge you've gathered in previous chapters by showing you how to use Java to write an Android app's source code. This chapter introduces you to Android, discusses its architecture, shows you how to install necessary tools, and develops a simple app. Appendix A presents the solutions to the programming exercises that appear near the end of Chapters 1 through 12. Appendix B introduces you to Java's Scripting API along with Java 7's support for dynamically typed languages. Appendix C introduces you to additional APIs and architecture topics. Examples include Accessibility, classloaders, Console, Drag and Drop, Java Native Interface, and System Tray. Appendix D presents a gallery of significant applications that demonstrate various aspects of Java. Unfortunately, there are limits to how much
Learn to use the Java Persistence API (JPA) and other related APIs as found in the Java EE 8 platform from the perspective of one of the specification creators. A one-of-a-kind resource, this in-depth book provides both theoretical and practical coverage of JPA usage for experienced Java developers. Authors Mike Keith, Merrick Schincariol and Massimo Nardone take a hands-on approach, based on their wealth of experience and expertise, by giving examples to illustrate each concept of the API and showing how it is used in practice. The examples use a common model from an overarching sample application, giving you a context from which to start and helping you to understand the examples within an already familiar domain. After completing Pro JPA 2 in Java EE 8, you will have a full understanding of JPA and be able to successfully code applications using its annotations and APIs. The book also serves as an excellent reference guide. What You Will Learn Use the JPA in the context of enterprise applications Work with object relational mappings (ORMs), collection mappings and more Build complex enterprise Java applications that persist data long after the process terminates Connect to and persist data with a variety of databases, file formats, and more Use queries, including the Java Persistence Query Language (JPQL) Carry out advanced ORM, queries and XML mappings Package, deploy and test your Java persistence-enabled enterprise applications Who This Book Is For Experienced Java programmers and developers with at least some prior experience with J2EE or Java EE platform APIs.
Expert WSS 3.0 and MOSS 2007 Programming Providing you with in-depth coverage of the WSS 3.0 and MOSS 2007 development framework, this book shares step-by-step recipes and real-world examples to help you develop the skills you need to become a proficient WSS 3.0 and MOSS 2007 developer. Code-walkthroughs and in-depth technical discussions explore implementing features, list and field types, actions, site columns and site content types,application pages, and site definitions and site provisioning providers. Get detailed coverage of field-rendering server controls, web configuration modification via SharePoint(r) object model, extending the STSADM command line utility, feature receivers, custom timer jobs, feature dependency, and feature stapling. The book also covers event receivers (including list, item, and web event receivers), and reviews code access security and SharePoint Web parts. Plus, you'll learn how to package your SharePoint solution in a single deployment package and deploy it as a single unit. What you will learn from this book * How to implement custom features, actions, application pages, list and field types, site columns and site content types, and site definitions and site provisioning providers * Techniques for modifying web configuration files via SharePoint object model, extending the STSADM command line utility, and implementing custom timer jobs * How to develop feature receivers, feature dependencies, and feature stapling * Ways to implement list, item, and web event receivers * How to implement SharePoint solution packages * Techniques for developing custom SharePoint Web parts * How to use the Business Data Catalog XML markup language to implement BDC application definition files Who this book is for This book is for SharePoint developers who are interested in exploring the programming capabilities of WSS 3.0 and MOSS 2007. Wrox Expert books present the wisdom accumulated by an experienced author team who is recognized as experts by the programming community. These experts challenge professional developers to examine their current practices in pursuit of better results.
Slash is the open source software system that drives the hugely popular Slashdot web site and many others. Slash implements the kind of web site that has come to be called a 'weblog': a moderated list, in reverse chronological order, of timely items with links to further discussion on-site, or to further information off-site. Essentially, a weblog is a cooperatively authored daily newspaper for some defined community on the net. Slash has spawned several imitators. The existence of so many different systems for operating a weblog site demonstrates that there are many people and groups on the net who want to run their own online community newspapers. Slash is based on open source technologies (Perl, Apache, and MySQL), and it makes use of open protocols (XML and RDF) for exchanging headlines with other sites. Anyone who wants to get a weblog site up and running will want to read this book, particularly system administrators who may not have the time or the background to learn all about Slash by reading the source code. Content managers of Slash sites who want to be able to use the system more effectively will also benefit from this book, which organizes the knowledge currently distributed throughout the Slash source code, Slashcode web site, and mailing lists, and provides it in an organized package.
Want to understand a certain PHP programming technique? Or learn how to accomplish a particular task? This cookbook is the first place to look. With more than 350 code-rich recipes revised for PHP 5.4 and 5.5, this third edition provides updated solutions for generating dynamic web content&#8212;everything from using basic data types to querying databases, and from calling RESTful APIs to testing and securing your site. Each recipe includes code solutions that you can freely use, along with a discussion of how and why they work. Whether you&#8217;re an experienced PHP programmer or coming to PHP from another language, this book is an ideal on-the-job resource. You&#8217;ll find recipes to help you with: * Basic data types: strings, numbers, arrays, and dates and times * Program building blocks: variables, functions, classes, and objects * Web programming: cookies, forms, sessions, and authentication * Database access using PDO, SQLite, and other extensions * RESTful API clients and servers, including HTTP, XML, and OAuth * Key concepts: email, regular expressions, and graphics creation * Designing robust applications: security and encryption, error handling, debugging and testing, and performance tuning * Files, directories, and PHP&#8217;s Command Line Interface * Libraries and package managers such as Composer and PECL
XML and PHP is designed to introduce PHP developers to the synergies that become visible when their favorite web-scripting language is combined with one of the most talked about technologies of recent times, XML. XML and PHP teaches PHP developers how to use PHP's XML functions to develop and maintain XML-based web applications and sites, and it demonstrates the power inherent in the XML/PHP combination. This book provides information on all hte major XML technologies supported in PHP, demonstrating how the XML/PHP combination can be used to deliver cutting-edge web applications through practical examples and real-world case studies. XML and PHP serves as both an implementation guide to the topic and a handy desktop reference for quick lookups-combining all the information that developers need into a single, focused package.
The most widely used build tool for Java projects, Ant is cross-platform, extensible, simple, and fast. It scales from small personal projects to large, multi-team J2EE projects. And, most importantly, it's easy to learn. Java Development with Ant systematically explores what Ant can do and how to apply it to your project. Whether you are new to Ant or an experienced user, this book will show you powerful and creative uses for Ant. The book emphasizes basic concepts you need to know to effectively use Ant starting with Ant's XML-driven build process. It leads you step-by-step through everything you need to know to compile, test, package, and deploy an application. It then guides you through the maze of more complex situations common in larger projects such as enterprise Java applications and Web Services. With this book you will gain access to a powerful tool to automatically build, test and deploy your Java software, no matter how simple or complexit might be.
From Adobe InDesign CS2 to InDesign CS5, the ability to work with XML content has been built into every version of InDesign. Some of the useful applications are importing database content into InDesign to create catalog pages, exporting XML that will be useful for subsequent publishing processes, and building chunks of content that can be reused in multiple publications.In this Short Cut, well play with the contents of a college course catalog and see how we can use XML for course descriptions, tables, and other content. Underlying principles of XML structure, DTDs, and the InDesign namespace will help you develop your own XML processes. Well touch briefly on using InDesign to skin XML content, exporting as XHTML, InCopy, and the IDML package. The Advanced Topics section gives tips on using XSLT to manipulate XML in conjunction with InDesign.