Synopses & Reviews
- Learn fundamental concepts, including Opas functional programming style
- Construct HTML resources dynamically and embed static resources on an Opa server
- Use Opas method for performing CRUD operations and storing key-value pairs in MongoDB
- Build an Opa user interface with the Bootstrap toolkit from Twitter
- Learn variant types, pattern-matching, polymorphic types, recursive functions, and other advanced features
- Manage user accounts by building login forms, handling account activation, and tracking logged users
- Build a reactive UI—a real-time interface that continuously updates user events
Opa provides a complete stack for web application development based on a new programming language integrated with its web server, database engine and distribution libraries. This unique setup and tight coupling allows concise, secure and scalable web applications. Learning Opa gets readers started by building a set of simple applications for common reusable tasks, working through basic web application design through realtime updates, database interactions, and web service design.
About the Author
Henri Binsztok, is the creator of Opa and previously a researcher and teacher at the University of Paris, France.
Adam Koprowski is a software developer at Google. He has authored numerous articles on Opa. Adam was previously a researcher at Radboud University.
Ida Swarczewskaja graduated from Tallinn University of Technology. She is leading the work on the user experience and design of the Opa portal, tools, demos and applications.
Table of Contents
Preface; What Is Opa?; How Do I Work with Opa?; Conventions Used in This Book; Using Code Examples; Safari® Books Online; How to Contact Us; Acknowledgments; Coding a Mini Wikipedia; Chapter 1: First Steps: Getting to Know Opa; 1.1 Installing Opa; 1.2 Our First Program; 1.3 Toward Real Programs; 1.4 Battle Plan; 1.5 Summary; Chapter 2: Opa Fundamentals; 2.1 Primitive Values; 2.2 Dynamic Content; 2.3 Records; 2.4 Introduction to Types, and More About Records; 2.5 A Brief Introduction to Variants; 2.6 Functions: Building Blocks; 2.7 Functional Programming; 2.8 Functional + Typed; 2.9 Summary; Chapter 3: Servers, Resources, and URLs; 3.1 Web Resources; 3.2 Embedding (Static) Resources; 3.3 Serving Resources; 3.4 Constructing (Dynamic) Resources; 3.5 URL Dispatching; 3.6 Summary; Chapter 4: Data Storage; 4.1 CRUD (Create, Read, Update, and Delete); 4.2 Maps (Dictionaries); 4.3 Summary; Chapter 5: Building the UI in HTML and CSS; 5.1 HTML Markup; 5.2 The Wiki Interface (HTML); 5.3 Adding Style (CSS); 5.4 Bootstrap: Nice, Out-of-the-Box Styling; 5.5 Working with Designers; 5.6 Summary; Coding a Mini-Twitter; Chapter 6: The Web Chat App; 6.1 Starting a New Project; 6.2 View: Building User Interface; 6.3 Model: Application Logic; 6.4 Connecting the Model and the View; 6.5 Understanding Networks; 6.6 Exercises; Chapter 7: More Advanced Features of Opa; 7.1 Learning More About Types; 7.2 Recursive Functions; 7.3 What About Loops?; 7.4 Bigger Projects; 7.5 Packages; 7.6 Summary; Chapter 8: User Management; 8.1 Setting Up the View; 8.2 Bootstrap Widgets: Modal Windows; 8.3 Form Handling in Opa: Registration Form; 8.4 Modeling and Adding Users; 8.5 Account Creation Notification: Sending Emails; 8.6 Activating a User Account Without an Activation Email; 8.7 Account Activation: URL Data Handling; 8.8 Keeping Track of Logged-In User: Handling User Associated Data; 8.9 The User's Top-Bar Menu; 8.10 Exercise; 8.11 Summary; Chapter 9: Building Reactive UIs: New Messages with a Real-Time Preview; 9.1 Parsing; 9.2 Modeling Messages; 9.3 Rendering Messages; 9.4 Reactive UI: Live Preview; 9.5 Summary; Chapter 10: Data Storage and Querying: Storing and Fetching Relevant Messages; 10.1 Collections in Opa: Lists, Sets, and Maps; 10.2 Declaring Data; 10.3 Inserting/Updating Data; 10.4 Reading (and Querying) Data; 10.5 Data Manipulations in Birdy; 10.6 Exercise; 10.7 Summary; Colophon;