Covering the fundamental theory together with the state of the art in research and development, this practical guide provides the techniques needed to design, analyze, and optimize device-to-device (D2D) communications in wireless networking. With an ever-increasing demand for higher data rate wireless access, D2D communication is set to become a key feature supported by next generation cellular networks. This book introduces D2D-based wireless communications from the physical, MAC, network, and application layer perspectives, providing all the key background information before moving on to discuss real-world applications as well as potential future developments. Key topics are discussed in detail, such as dynamic resource sharing (for example of spectrum and power) between cellular and ad hoc D2D communications to accommodate larger volumes of traffic and provide better service to users. Readers will understand the practical challenges of resource management, optimization, security, standardization, and network topology, and learn how the design principles are applied in practice.