وبلاگ بلیان

MongoDB for Java developers : design, build, and deliver efficient Java applications using the most advanced NoSQL database

معرفی کتاب «MongoDB for Java developers : design, build, and deliver efficient Java applications using the most advanced NoSQL database» نوشتهٔ Francesco, Marchioni، منتشرشده توسط نشر Packt Publishing Limited در سال 2015. این کتاب در 5 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است. «MongoDB for Java developers : design, build, and deliver efficient Java applications using the most advanced NoSQL database» در دستهٔ بدون دسته‌بندی قرار دارد.

Design, build, and deliver efficient Java applications using the most advanced NoSQL database This book is for Java developers and architects who want to learn how to develop Java applications using the most popular NoSQL solution and the use cases of it. The NoSQL movement is growing in relevance, attracting more and more developers. The MongoDB database is a well-recognized rising star in the NoSQL world. It is a document database that allows data persistence and enables you to query data in a nested state without any schema constraints and complex joins between documents. This book provides all the knowledge you need to make MongoDB fit into your application schema. It starts with a basic introduction to the driver that can be used to perform some low-level interaction with the storage. Then it moves on to using different patterns to abstract the persistence layer into your applications, starting with the flexible Google JSON library to the Hibernate OGM framework and finally landing on the Spring Data framework. By the end of this book, you will know everything you need to integrate MongoDB in your Java applications. Cover......Page 1 Copyright......Page 3 Credits......Page 4 About the Author......Page 5 About the Reviewers......Page 6 www.PacktPub.com......Page 8 Table of Contents......Page 12 Preface......Page 16 Getting into the NoSQL movement......Page 20 Comparing RDBMS and NoSQL databases......Page 23 Living without transactions......Page 25 Managing read-write concurrency......Page 26 MongoDB core elements......Page 27 The heart of MongoDB – the document......Page 28 Understanding how MongoDB stores data......Page 29 Data types accepted in documents......Page 30 Installing MongoDB on Windows......Page 31 Installing MongoDB on Linux......Page 32 MongoDB start up options......Page 33 Troubleshooting MongoDB installation......Page 34 Mongo tools......Page 35 Introduction to the MongoDB shell......Page 37 Querying documents......Page 38 Choosing the keys to return......Page 39 Using ranges in your queries......Page 40 Updating documents......Page 41 Deleting data......Page 43 Arrays......Page 44 Embedded documents......Page 45 Some useful functions......Page 46 Securing database access......Page 47 Summary......Page 49 Getting the Mongo JDBC driver......Page 50 Creating a new Java project......Page 51 Handling authentication......Page 54 Inserting a document......Page 55 Inserting an array of data......Page 57 Using your own ID in documents......Page 59 Querying data......Page 60 Eager fetching of data using DBCursor......Page 62 Filtering through the records......Page 63 Updating documents......Page 64 Deleting documents......Page 65 Performing operations on collections......Page 66 Listing collections......Page 67 Using the MongoDB Java driver version 3......Page 68 Running the HelloWorld class with driver v.3......Page 69 Inserting data into the database......Page 70 Inserting embedded documents......Page 71 Querying documents......Page 72 Filtering through documents......Page 73 Updating documents......Page 74 Summary......Page 75 Seeing MongoDB through the Java lens......Page 76 Extending the MongoDB core classes......Page 77 Downloading the Gson API......Page 81 Using Gson to map a MongoDB document......Page 82 Inserting Java objects as a document......Page 84 Mapping embedded documents......Page 85 Custom field names in your Java classes......Page 87 Mapping complex BSON types......Page 88 Using indexes in your applications......Page 91 Defining an index in your Java classes......Page 94 Using compound indexes......Page 96 Using text indexes in your documents......Page 99 Coding bulk operations......Page 102 Comparing plain inserts with BulkWriteOperations......Page 103 Summary......Page 104 Entering into the Java EE land......Page 106 Downloading WildFly......Page 108 Designing our application......Page 109 Designing the schema......Page 110 Configuring WildFly on NetBeans......Page 111 Creating our project......Page 113 Adding Java classes......Page 118 Compiling and deploying from the shell......Page 126 Running the application......Page 127 Adding RESTful web services to our application......Page 128 Compiling and deploying the application......Page 131 Summary......Page 132 An overview of the Java Persistence API......Page 134 Entering Hibernate OGM......Page 136 Building a JPA project that uses Hibernate OGM......Page 138 Configuring the project dependencies......Page 140 Mapping the database collections......Page 141 Configuring persistence......Page 144 Coding the controller and EJB classes......Page 145 Hibernate OGM and JP-QL......Page 147 Coding a controller bean......Page 148 Coding the views......Page 150 The main view......Page 151 The newCustomer view......Page 152 The newOrder view......Page 153 Compiling and running the example......Page 154 A look into MongoDB......Page 156 Using native queries in your Hibernate OGM......Page 157 Summary......Page 158 Introducing Spring Boot......Page 160 Getting started with Spring Boot......Page 161 Getting started with Spring Data......Page 162 Using the Spring repository to access MongoDB......Page 163 Coding our Spring Boot application......Page 164 Serving MongoDB using Spring REST......Page 172 Building up the data access layer......Page 176 Adding the Application class......Page 179 Creating fine grained queries using Criteria......Page 180 Summary......Page 182 Index......Page 184

Design, build, and deliver efficient Java applications using the most advanced NoSQL database

About This Book

  • Reuse the skills you have acquired through Hibernate or Spring to promote your applications to use NoSQL storage
  • Explore the list of libraries that are already available to assist you in developing Java EE applications with MongoDB
  • A step-by-step tutorial to create leaner and faster applications using MongoDB

Who This Book Is For

This book is for Java developers and architects that want to learn how to develop Java applications using the most popular NoSQL solution and the use cases of it.

What You Will Learn

  • Install MongoDB and its client tools
  • Set up a basic project that uses a MongoDB driver and perform CRUD operations with it
  • Explore simple strategies for mapping Mongo documents with Java classes
  • Use bulk operations to speed up the creation of massive document
  • Design and develop a Java Enterprise application that uses MongoDB as storage
  • Develop and deploy an application that uses Hibernate OGM as a persistence layer for your entities
  • Use Spring Data and Spring Boot to leverage micro-services using MongoDB as storage

In Detail

The NoSQL movement is growing in relevance, attracting more and more developers. The MongoDB database is a well-recognized rising star in the NoSQL world. It is a document database, which allows data persistence and enables you to query data in a nested state without any schema constraint and complex joins between documents.

This book provides all the knowledge you need to make MongoDB fit in your application schema, at the best of its capabilities. It starts from a basic introduction to the driver that can be used to perform some low-level interaction with the storage. Then it moves to use different patterns to abstract the persistence layer into your applications, starting from the flexible Google JSON library to the Hibernate OGM Framework and finally landing on the Spring data framework.

By the end of this book, you will know everything you need to use MongoDB in your Java applications.

Style and approach

A simple, tutorial-like approach is used to explain the concepts contained in the book in the simplest possible way. The chapters of this book are arranged so that complexity increases progressively as you gain more experience from the earlier chapters.

Design, build, and deliver efficient Java applications using the most advanced NoSQL database About This Book • Reuse the skills you have acquired through Hibernate or Spring to promote your applications to use NoSQL storage • Explore the list of libraries that are already available to assist you in developing Java EE applications with MongoDB • A step-by-step tutorial to create leaner and faster applications using MongoDB In Detail The NoSQL movement is growing in relevance, attracting more and more developers. The MongoDB database is a well-recognized rising star in the NoSQL world. It is a document database, which allows data persistence and enables you to query data in a nested state without any schema constraint and complex joins between documents. This book provides all the knowledge you need to make MongoDB fit in your application schema, at the best of its capabilities. It starts from a basic introduction to the driver that can be used to perform some low-level interaction with the storage. Then it moves to use different patterns to abstract the persistence layer into your applications, starting from the flexible Google JSON library to the Hibernate OGM Framework and finally landing on the Spring data framework. By the end of this book, you will know everything you need to use MongoDB in your Java applications. What You Will Learn • Install MongoDB and its client tools • Set up a basic project that uses a MongoDB driver and perform CRUD operations with it • Explore simple strategies for mapping Mongo documents with Java classes • Use bulk operations to speed up the creation of massive document • Design and develop a Java Enterprise application that uses MongoDB as storage • Develop and deploy an application that uses Hibernate OGM as a persistence layer for your entities • Use Spring Data and Spring Boot to leverage micro-services using MongoDB as storage Who This Book Is For This book is for Java developers and architects that want to learn how to develop Java applications using the most popular NoSQL solution and the use cases of it. Style and approach A simple, tutorial-like approach is used to explain the concepts contained in the book in the simplest possible way. The chapters of this book are arranged so that complexity increases progressively as you gain more experience from the earlier chapters. Design, build, and deliver efficient Java applications using the most advanced NoSQL databaseAbout This Book Reuse the skills you have acquired through Hibernate or Spring to promote your applications to use NoSQL storage Explore the list of libraries that are already available to assist you in developing Java EE applications with MongoDB A step-by-step tutorial to create leaner and faster applications using MongoDBWho This Book Is For This book is for Java developers and architects that want to learn how to develop Java applications using the most popular NoSQL solution and the use cases of it. What You Will Learn Install MongoDB and its client tools Set up a basic project that uses a MongoDB driver and perform CRUD operations with it Explore simple strategies for mapping Mongo documents with Java classes Use bulk operations to speed up the creation of massive document Design and develop a Java Enterprise application that uses MongoDB as storage Develop and deploy an application that uses Hibernate OGM as a persistence layer for your entities Use Spring Data and Spring Boot to leverage micro-services using MongoDB as storageIn Detail The NoSQL movement is growing in relevance, attracting more and more developers. The MongoDB database is a well-recognized rising star in the NoSQL world. It is a document database, which allows data persistence and enables you to query data in a nested state without any schema constraint and complex joins between documents. This book provides all the knowledge you need to make MongoDB fit in your application schema, at the best of its capabilities. It starts from a basic introduction to the driver that can be used to perform some low-level interaction with the storage. Then it moves to use different patterns to abstract the persistence layer into your applications, starting from the flexible Google JSON library to the Hibernate OGM Framework and finally landing on the Spring data framework. By the end of this book, you will know everything you need to use MongoDB in your Java applications. Style and approach A simple, tutorial-like approach is used to explain the concepts contained in the book in the simplest possible way. The chapters of this book are arranged so that complexity increases progressively as you gain more experience from the earlier chapters
دانلود کتاب MongoDB for Java developers : design, build, and deliver efficient Java applications using the most advanced NoSQL database