Book Image

Opa Application Development

By : Li Wenbo
Book Image

Opa Application Development

By: Li Wenbo

Overview of this book

Opa is a full-stack Open Source web development framework for JavaScript that lets you write secure and scalable web applications. It generates standard Node.js/MongoDB applications, natively supports HTML5 and CSS and automates many aspects of modern web application programming. It handles all aspects of web programming written in one consistent language and compiled to web standards.Opa Application Development is a practical,hands-on guide that provides you with a number of step-by-step exercises. It covers almost all aspects of developing a web application with Opa, which will help you take advantage of the real power of Opa, as well as building a secure, powerful web application rapidly.Opa Application Development dives into all concepts and components required to build a web application with Opa. The first half of this book shows you all of the basic building blocks that you will need to develop an Opa application, including the syntax of Opa, web development aspects, client and server communication and slicing, plugin, database, and so on. By the end of the book you will have yourself created a complete web application along with a game: Pacman!
Table of Contents (18 chapters)
Opa Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Opa Application Development dives into all the concepts and components required to build a web application with Opa. The first half of this book shows the basic building blocks that you will need to develop an Opa application, including the syntax of Opa, web development aspects, client and server communication, as well as slicing, plugins, databases, and so on.

Opa is a full-stack open source web development framework for JavaScript that lets you write secure and scalable web applications. It generates the standard Node.js and MongoDB applications, natively supports HTML5 and CSS, and automates many aspects of modern web application programming. It handles all aspects of web programming written in one consistent language and is compiled to web standards.

This book is a practical, hands-on guide that provides you with a number of step-by-step exercises. It covers almost all the aspects of developing a web application with Opa, which will help you take advantage of the real power of Opa to build secure and powerful web applications rapidly.

What this book covers

Chapter 1, Getting Started with Opa, introduces how to install and set up an Opa development environment.

Chapter 2, Basic Syntax, covers the basic syntax of Opa.

Chapter 3, Developing Web Applications, introduces the fundamental knowledge about developing a web application with Opa.

Chapter 4, Using Bootstrap, introduces how to use Bootstrap in Opa when developing a web application.

Chapter 5, Communicating Between Client and Server, covers client and server slicing and communicating.

Chapter 6, Binding with Other Languages, explains how to bind JavaScript and Node.js to Opa.

Chapter 7, Working with Databases, explains everything about storing, updating, and querying data in a database with MongoDB as a backend.

Chapter 8, Internationalization, introduces the internationalization approach of Opa.

Chapter 9, Building a Chat Application, explains how to build a web chat application with Opa.

Chapter 10, Building a Game – Pacman, explains how to handle image and audio using a canvas when building a Pacman game.

Chapter 11, Building a Social Mobile Application – LiveRoom, explains how to build a social mobile application with Opa.

What you need for this book

Required knowledge for this book is as follows:

  • Basic knowledge about HTML and CSS

  • Basic knowledge about JavaScript

  • Some programming experience

Software required for this book is as follows:

Who this book is for

This book is written for web developers who want to get started with the Opa framework and who want to build web applications with it. Web development experience is assumed and would be helpful for understanding this book.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "We can include other contexts through the use of the include directive."

A block of code is set as follows:

type Student = {string name, int age, float score}
Student stu = { name:"li", age:28, score:80.0}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

type Student = {string name, int age, float score}
Student stu = { name:"li", age:28, score:80.0}

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Clicking on the Next button moves you to the next screen".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.