Showing posts with label reference. Show all posts
Showing posts with label reference. Show all posts
Friday, March 25, 2016
Mastering Concurrency Programming with Java 8
Master the principles and techniques of multithreaded programming with the Java 8 Concurrency API
Mastering Concurrency Programming with Java 8
About This Book
If you are a competent Java developer with a good understanding of concurrency but have no knowledge of how to effectively implement concurrent programs or use streams to make processes more efficient, then this book is for you.
What You Will Learn
Concurrency programming allows several large tasks to be divided into smaller sub-tasks, which are further processed as individual tasks that run in parallel. All the sub-tasks are combined together once the required results are achieved; they are then merged to get the final output. The whole process is very complex. This process goes from the design of concurrent algorithms to the testing phase where concurrent applications need extra attention. Java includes a comprehensive API with a lot of ready-to-use components to implement powerful concurrency applications in an easy way, but with a high flexibility to adapt these components to your needs.
The book starts with a full description of design principles of concurrent applications and how to parallelize a sequential algorithm. We'll show you how to use all the components of the Java Concurrency API from basics to the most advanced techniques to implement them in powerful concurrency applications in Java.
You will be using real-world examples of complex algorithms related to machine learning, data mining, natural language processing, image processing in client / server environments. Next, you will learn how to use the most important components of the Java 8 Concurrency API: the Executor framework to execute multiple tasks in your applications, the phaser class to implement concurrent tasks divided into phases, and the Fork/Join framework to implement concurrent tasks that can be split into smaller problems (using the divide and conquer technique). Toward the end, we will cover the new inclusions in Java 8 API, the Map and Reduce model, and the Map and Collect model. The book will also teach you about the data structures and synchronization utilities to avoid data-race conditions and other critical problems. Finally, the book ends with a detailed description of the tools and techniques that you can use to test a Java concurrent application.
Style and approach
A complete guide implementing real-world examples with algorithms related to machine learning, data mining, and natural language processing in client/server environments. All the examples are explained in a step-by-step approach.
Mastering Concurrency Programming with Java 8
About This Book
- Implement concurrent applications using the Java 8 Concurrency API and its new components
- Improve the performance of your applications or process more data at the same time, taking advantage of all of your resources.
- Construct real-world examples related to machine learning, data mining, image processing, and client/server environments
If you are a competent Java developer with a good understanding of concurrency but have no knowledge of how to effectively implement concurrent programs or use streams to make processes more efficient, then this book is for you.
What You Will Learn
- Design concurrent applications by converting a sequential algorithm into a concurrent one
- Discover how to avoid all the possible problems you can get in concurrent algorithms
- Use the Executor framework to manage concurrent tasks without creating threads
- Extend and modify Executors to adapt their behavior to your needs
- Solve problems using the divide and conquer technique and the Fork/Join framework
- Process massive data sets with parallel streams and Map/Reduce implementation
- Control data-race conditions using concurrent data structures and synchronization mechanisms
- Test and monitor concurrent applications
Concurrency programming allows several large tasks to be divided into smaller sub-tasks, which are further processed as individual tasks that run in parallel. All the sub-tasks are combined together once the required results are achieved; they are then merged to get the final output. The whole process is very complex. This process goes from the design of concurrent algorithms to the testing phase where concurrent applications need extra attention. Java includes a comprehensive API with a lot of ready-to-use components to implement powerful concurrency applications in an easy way, but with a high flexibility to adapt these components to your needs.
The book starts with a full description of design principles of concurrent applications and how to parallelize a sequential algorithm. We'll show you how to use all the components of the Java Concurrency API from basics to the most advanced techniques to implement them in powerful concurrency applications in Java.
You will be using real-world examples of complex algorithms related to machine learning, data mining, natural language processing, image processing in client / server environments. Next, you will learn how to use the most important components of the Java 8 Concurrency API: the Executor framework to execute multiple tasks in your applications, the phaser class to implement concurrent tasks divided into phases, and the Fork/Join framework to implement concurrent tasks that can be split into smaller problems (using the divide and conquer technique). Toward the end, we will cover the new inclusions in Java 8 API, the Map and Reduce model, and the Map and Collect model. The book will also teach you about the data structures and synchronization utilities to avoid data-race conditions and other critical problems. Finally, the book ends with a detailed description of the tools and techniques that you can use to test a Java concurrent application.
Style and approach
A complete guide implementing real-world examples with algorithms related to machine learning, data mining, and natural language processing in client/server environments. All the examples are explained in a step-by-step approach.
Java I/O, NIO and NIO.2
Java I/O, NIO, and NIO.2 is a power-packed book that accelerates your mastery of Java's various I/O APIs. In this book, you'll learn about classic I/O APIs (File, RandomAccessFile, the stream classes and related types, and the reader/writer classes). Next, you'll learn about NIO's buffer, channel, selector, regular expression, charset, and formatter APIs. Finally, you'll discover NIO.2's offerings in terms of an improved file system interface, asynchronous I/O, and the completion of socket channel functionality.
After reading and using thi book, you'll gain the accelerated knowledge and skill level to really build applications with efficient data access, especially for today's cloud computing streaming data needs.
What you’ll learn
- How to set permissions and more with the classic File class
- How to build a flat file database with RandomAccessFile
- Get to know the byte array, file, filter, and other kinds of streams
- Master serialization and externalization
- Discover character streams and their associated writers/readers
- Tour the buffer APIs
- Work with channels to transfer buffers to and from I/O services
- Find out about selectors and readiness selection
- Master regular expressions
- Discover charsets and their association with Java's String< class
- Take advantage of the formatter API to create formatted output
- How to customize the formatter API
- Explore the improved file system interface
- Discover asynchronous I/O and its association with futures and completion handlers
- Encounter socket channel improvements, including multicasting
This book is for those experienced with Java, beyond the fundamentals.
Table of Contents
Part 1: Getting Started with I/O
Chapter 1: I/O Basics and APIs
Part 2: Classic I/O APIs
Chapter 2: File
Chapter 3: RandomAccessFile
Chapter 4: Streams
Chapter 5: Writers and Readers
Part 3: New I/O APIs
Chapter 6: Buffers
Chapter 7: Channels
Chapter 8: Selectors
Chapter 9: Regular Expressions
Chapter 10: Charsets
Chapter 11: Formatter and Scanner
Part 4: More New I/O APIs
Chapter 12: File System APIs
Chapter 13: Asynchronous I/O
Chapter 14: Additional NIO.2 APIs
Appendix A: Answers to Review Exercises
About This Book
- Set up Java API for OpenCV to create popular Swing-based Graphical User Interfaces (GUIs)
- Process videos and images in real-time with closer to native performance
- Make use of rock solid Java web application development practices to create engaging augmented reality experience and work with depth images from a Kinect device
If you are a Java developer, student, researcher, or hobbyist wanting to create computer vision applications in Java then this book is for you. If you are an experienced C/C++ developer who is used to working with OpenCV, you will also find this book very useful for migrating your applications to Java.
All you need is basic knowledge of Java, with no prior understanding of computer vision required, as this book will give you clear explanations and examples of the basics.
What You Will Learn
- Create powerful GUIs for computer vision applications with panels, scroll panes, radio buttons, sliders, windows, and mouse interaction using the popular Swing GUI widget toolkit
- Stretch, shrink, warp, and rotate images, as well as apply image transforms to find edges, lines, and circles, and even use Discrete Fourier Transforms (DFT)
- Detect foreground or background regions and work with depth images with a Kinect device
- Learn how to add computer vision capabilities to rock solid Java web applications allowing you to upload photos and create astonishing effects
- Track faces and apply mixed reality effects such as adding virtual hats to uploaded photos
- Filter noisy images, work with morphological operators, use flood fill, and threshold the important regions of an image
- Open and process video streams from webcams or video files
OpenCV 3.0 Computer Vision with Java is a practical tutorial guide that explains fundamental tasks from computer vision while focusing on Java development. This book will teach you how to set up OpenCV for Java and handle matrices using the basic operations of image processing such as filtering and image transforms. It will also help you learn how to use Haar cascades for tracking faces and to detect foreground and background regions with the help of a Kinect device. It will even give you insights into server-side OpenCV. Each chapter is presented with several projects that are ready to use. The functionality of these projects is found in many classes that allow developers to understand computer vision principles and rapidly extend or customize the projects for their needs.
About This Book
- Explore the most popular TDD tools and frameworks and become more proficient in building applications
- Create applications with better code design, fewer bugs, and higher test coverage, enabling you to get them to market quickly
- Implement test-driven programming methods into your development workflows
If you're an experienced Java developer and want to implement more effective methods of programming systems and applications, then this book is for you.
What You Will Learn
- Explore the tools and frameworks required for effective TDD development
- Perform the Red-Green-Refactor process efficiently, the pillar around which all other TDD procedures are based
- Master effective unit testing in isolation from the rest of your code
- Design simple and easily maintainable codes by implementing different techniques
- Use mocking frameworks and techniques to easily write and quickly execute tests
- Develop an application to implement behaviour-driven development in conjunction with unit testing
- Enable and disable features using Feature Toggles
Test-driven development (TDD) is a development approach that relies on a test-first procedure that emphasises writing a test before writing the necessary code, and then refactoring the code to optimize it.
The value of performing TDD with Java, one of the most established programming languages, is to improve the productivity of programmers, the maintainability and performance of code, and develop a deeper understanding of the language and how to employ it effectively.
Starting with the basics of TDD and reasons why its adoption is beneficial, this book will take you from the first steps of TDD with Java until you are confident enough to embrace the practice in your day-to-day routine.
You'll be guided through setting up tools, frameworks, and the environment you need, and will dive right in to hands-on exercises with the goal of mastering one practice, tool, or framework at a time. You'll learn about the Red-Green-Refactor procedure, how to write unit tests, and how to use them as executable documentation.
With this book you'll also discover how to design simple and easily maintainable code, work with mocks, utilise behaviour-driven development, refactor old legacy code, and release a half-finished feature to production with feature toggles.
You will finish this book with a deep understanding of the test-driven development methodology and the confidence to apply it to application programming with Java.
Style and approach
An easy-to-follow, hands-on guide to building applications through effective coding practices. This book covers practical examples by introducing different problems, each one designed as a learning exercise to help you understand each aspect of TDD.
About This Book
- Customize NetBeans to fit your unique needs
- Excel in NetBeans IDE, learning the shortcuts and hidden features to become more productive
- A comprehensive guide to become more productive at application development using NetBeans IDE
If you are a competent developer who wants to fast-track your application development with NetBeans IDE, then this book is for you. Reasonable knowledge and an understanding of Java programming and NetBeans IDE is assumed.
What You Will Learn
- Install NetBeans either from a distribution package or from source code
- Test, debug, and run production code using the NetBeans IDE
- Use external services such as PaaS environments and web services
- Create desktop applications using Swing tools
- Manage and configure relational databases
- Build a Java business model and web tiers using Java EE and Spring technologies
- Explore web services both with XML and RESTful approaches
- Handle external services such as databases , Maven repositories, and cloud providers
- Extend NetBeans for those situations where you require more from your IDE
With the increasing complexity of software development and the abundance of tools available, learning your IDE in-depth will instantly increase your developer productivity. NetBeans is the only IDE that can be downloaded with Java itself and provides you with many cutting edge features not readily available with many IDEs. The IDE also provides a great set of tools for PHP and C/C++ developers. It is free and open source and has a large community of users and developers around the world.
This book will teach you to ace NetBeans IDE and make use of it in creating Java business and web services. It will help you to become a proficient developer and use NetBeans for software development. You will learn effective third-party interaction and enable yourself for productive database development.
Moving on, you will see how to create EJB projects and write effective and efficient web applications. Then you will learn how to use Swing and manage and configure a relational database. By the end of the book, you will be able to handle external services such as databases, Maven repositories, and cloud providers, and extend your NetBeans when you require more from your IDE.
Style and approach
An easy-to-follow yet comprehensive guide to help you master the exhaustive range of NetBeans features in order to become more efficient at Java programing. More advanced topics are covered in each chapter, with subjects grouped according to their complexity as well as their utility.
Learn the Fundamentals of JavaFX 8 from Programming Guru Herb Schildt
Introducing JavaFX 8 Programming provides a fast-paced, practical introduction to JavaFX, Java’s next-generation GUI programming framework. In this easy-to-read guide, best-selling author Herb Schildt presents the key topics and concepts you’ll need to start developing modern, dynamic JavaFX GUI applications. The book begins with the fundamentals, including the general form of a JavaFX program. You then advance to event handling, controls, images, fonts, layouts, effects, transforms, animations (including 3-D animations), menus, and more. Numerous complete examples are included that put key topics and techniques into action. Designed for Java programmers, the book’s focus is on the JavaFX API and all examples are written entirely in Java. Best of all, the book is written in the clear, crisp, uncompromising style that has made Herb Schildt the choice of millions worldwide.
- Learn the general form of a JavaFX program
- Work with scenes and stages
- Understand the fundamentals of JavaFX event handling
- Explore several controls, such as buttons, list views, sliders, trees, tables, scroll panes, and more
- Work with images, fonts, and layouts
- Explore the JavaFX menu system
- Use visual effects and transforms
- Incorporate 2-D and 3-D animation
- Present data in JavaFX charts
- Display Web-based content using WebView and WebEngine
Pro Java 8 Programming covers the core Java development kit and the finer points of the core standard edition (SE) and development kit version 8. You'll discover the particulars of working with the Java language and APIs to develop applications in many different contexts.
You will also delve into more advanced topics like lambda expressions, closures, new i/o (NIO.2), enums, generics, XML, metadata and the Swing APIs for GUI design and development. By the end of the book, you’ll be fully prepared to take advantage of Java's ease of development, and able to create powerful, sophisticated Java applications.
What you’ll learn
- How to use and design your own libraries, classes and methods
- How to use the new lambda expressions, closures, stream API and more
- How to use the new thread and I/O APIs for today's Java applications that must perform at enterprise and parallel scales
- How to use the improved collections APIs
- How to build a better Java UI/UX using layout managers, Swing's JTable and JTree APIs, cut-and-paste, and drag-and-drop
- How to use Java Database Connectivity (JDBC) to connect and integrate with various MySQL, Oracle, and NoSQL databases
- How to work with internationalization, localization and more
- How to effectively use XML and add annotations to your Java applications and more
This book is for experienced Java programmers or developers looking to further refine or add to their skills and knowledge base.
Table of Contents
1. Going Inside Java 8
2. Designing Libraries, Classes, and Methods
3. Lambda Expressions and Closures
4. Using Threads in Your Applications
5. Using Stream APIs and Collections
6. Using Layout Managers
7. Using Swing’s JTable
8. Using Swing’s JTree
9. Adding Cut-and-Paste Functionality
10. Adding Drag-and-Drop Functionality
11. Printing
12. Introducing Java Database Connectivity (JDBC)
13. Internationalizing Your Applications
14. Using XML
15. Adding Annotations