Book description
The ultimate guide to Crystal programming covering all its fundamental concepts such as OOP and concurrent programming to help you write readable and safe code and build fast applications
Key Features
- The book uses an example-based approach for a better demonstration of the underlying concepts
- Develop a thorough appreciation of the roles of the macro API and annotations
- Leverage supportive tools — spec, documentation, deployment, and automation
Book Description
Crystal is a programming language with a concise and user-friendly syntax, along with a seamless system and a performant core, reaching C-like speed. This book will help you gain a deep understanding of the fundamental concepts of Crystal and show you how to apply them to create various types of applications.
This book comes packed with step-by-step explanations of essential concepts and practical examples. You'll learn how to use Crystal's features to create complex and organized projects relying on OOP and its most common design patterns. As you progress, you'll gain a solid understanding of both the basic and advanced features of Crystal. This will enable you to build any application, including command-line interface (CLI) programs and web applications using IOs, concurrency and C bindings, HTTP servers, and the JSON API.
By the end of this programming book, you'll be equipped with the skills you need to use Crystal programming for building and understanding any application you come across.
What you will learn
- Explore how Crystal combines the merits of other languages
- Understand how to leverage existing C libraries without writing any C
- Focus on zero-cost abstractions with compile-time macros
- Use an example-based approach to demonstrate language features
- Develop a variety of Crystal applications, such as web and CLI apps
- Gain an understanding of the macro API and annotations
Who this book is for
Developers who want to learn Crystal programming or anyone looking to improve their ability to solve real-world problems using the language will find this book helpful. Experience in application development using any other programming language is expected. However, prior knowledge of Crystal is not required.
Table of contents
- Crystal Programming
- Contributors
- About the authors
- About the reviewer
- Preface
- Part 1: Getting Started
- Chapter 1: An Introduction to Crystal
- Chapter 2: Basic Semantics and Features of Crystal
- Chapter 3: Object-Oriented Programming
- Part 2: Learning by Doing – CLI
- Chapter 4: Exploring Crystal via Writing a Command-Line Interface
- Chapter 5: Input/Output Operations
- Chapter 6: Concurrency
- Chapter 7: C Interoperability
- Part 3: Learn by Doing – Web Application
- Chapter 8: Using External Libraries
- Chapter 9: Creating a Web Application with Athena
- Part 4: Metaprogramming
- Chapter 10: Working with Macros
- Chapter 11: Introducing Annotations
- Chapter 12: Leveraging Compile-Time Type Introspection
- Chapter 13: Advanced Macro Usages
- Part 5: Supporting Tools
- Chapter 14: Testing
- Chapter 15: Documenting Code
- Chapter 16: Deploying Code
- Chapter 17: Automation
- Appendix A: Tooling Setup
- Appendix B: The Future of Crystal
- Other Books You May Enjoy
Product information
- Title: Crystal Programming
- Author(s):
- Release date: May 2022
- Publisher(s): Packt Publishing
- ISBN: 9781801818674
You might also like
book
Programming Crystal
Crystal is for Ruby programmers who want more performance, or for developers who enjoy working in …
book
Getting Started with V Programming
Learn a new statically compiled programming language to build maintainable and fast software with the help …
book
The Makers Guide to Cricut
Take your Cricut crafts to the next level! The Cricut machine has made it easy for …
book
The Art of Computer Programming, Volume 4, Fascicle 5: Mathematical Preliminaries Redux; Introduction to Backtracking; Dancing Links
This multivolume work on the analysis of algorithms has long been recognized as the definitive description …