Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Opa: Up and Running
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
I. Coding a Mini Wikipedia
1. First Steps: Getting to Know Opa
Installing Opa
Installing Node.js
Auto-Installing MongoDB
Our First Program
Writing and Running the Code
What localhost:8080 Means
What the Code Means
What Happens When We Run Your Application
Details About the Opa Runtime
Toward Real Programs
Battle Plan
Summary
2. Opa Fundamentals
Primitive Values
Dynamic Content
Records
Introduction to Types, and More About Records
A Brief Introduction to Variants
Functions: Building Blocks
Functional Programming
Functional + Typed
Summary
3. Servers, Resources, and URLs
Web Resources
Embedding (Static) Resources
Serving Resources
Constructing (Dynamic) Resources
URL Dispatching
Summary
4. Data Storage
CRUD (Create, Read, Update, and Delete)
Maps (Dictionaries)
Summary
5. Building the UI in HTML and CSS
HTML Markup
Tags and Attributes
Inserts
Event Handlers
DOM Manipulation
Example: A Guessing Game
The Wiki Interface (HTML)
HTML Plumbing
Markdown
Dynamically Updating the Page
Adding Style (CSS)
Explicit Style Attributes
Opa-Powered Style
External CSS
Wiki with Style
Bootstrap: Nice, Out-of-the-Box Styling
Working with Designers
How Should I Use the DOM Structure?
Can You Describe Your Development Environment?
How Should I Write CSS with Opa?
Which Tools Should I Use to Write CSS?
How Do I Improve the CSS Workflow in Opa?
How Often Should Developers and Designers Interact?
What Should Developers Know About CSS?
What Should Designers Know About Opa?
Can You Provide Some Tips for Quickly Customizing Your App’s Bootstrap-Based UI?
Summary
II. Coding a Mini-Twitter
6. The Web Chat App
Starting a New Project
View: Building User Interface
Model: Application Logic
Connecting the Model and the View
Showing New Messages
Broadcasting the Current User’s Messages
Connecting Everything
Understanding Networks
Exercises
Customizing the Display
Saying “Hello”
Distinguishing Messages Between Users
User Customization
And Beyond
7. More Advanced Features of Opa
Learning More About Types
Variant Types
Pattern Matching
Polymorphic Types
Recursive Types
Recursive Functions
What About Loops?
Bigger Projects
Packages
Summary
8. User Management
Setting Up the View
Bootstrap Widgets: Modal Windows
Form Handling in Opa: Registration Form
Alerts
Modeling and Adding Users
Account Creation Notification: Sending Emails
Activating a User Account Without an Activation Email
Account Activation: URL Data Handling
Keeping Track of Logged-In User: Handling User Associated Data
The User’s Top-Bar Menu
Exercise
Summary
9. Building Reactive UIs: New Messages with a Real-Time Preview
Parsing
Parsing Expressions
Modeling Messages
Rendering Messages
Reactive UI: Live Preview
Summary
10. Data Storage and Querying: Storing and Fetching Relevant Messages
Collections in Opa: Lists, Sets, and Maps
Declaring Data
Inserting/Updating Data
Reading (and Querying) Data
Projections
Data Manipulations in Birdy
Database Declaration
Storing New Messages
Fetching Relevant Messages
User and Topic Pages
Following Users and Topics
Following Users
Following Topics
Follow Button
Exercise
Summary
About the Authors
Colophon
Copyright
← Prev
Back
Next →
← Prev
Back
Next →