By Fabian Vogelsteller
Approximately This Book
Understand how internet 2.0 is made through robust browser-based applications
Step-by-step instructional that may convey you the way quickly, advanced internet functions could be built
Who This booklet Is For
This e-book is predicated on Meteor 1.0.
Read or Download Building Single-page Web Apps with Meteor PDF
Approximately This Book
Understand how net 2. zero is made through strong browser-based applications
Step-by-step instructional that may express you ways quick, complicated internet functions may be built
Who This e-book Is For
This e-book is predicated on Meteor 1. zero.
- Instant Node.js Starter
- Learn iOS 8 App Development (2nd Edition)
Additional info for Building Single-page Web Apps with Meteor
Date representation. NET that excels in functional and object-oriented programming tasks. NET (mentioned in Chapter 1, Reading and Writing JSON on the Client) to convert between JSON and CLR objects. However, there's a better way: the open source library F# Data, which creates native data type providers to process data in a number of different structured formats, including JSON. Data. cmd build batch file that comes with the distribution (for details, see the F# Data website). Alternatively, you can find the same package on NuGet, by choosing Manage NuGet Packages from the Projects menu and searching for F# Data.
In the preceding example, we invoke that method for each of the events, passing the function that we wrote to handle the event. Each of our functions just logs the fact that the event was received in the debug div in our HTML content. There's more... The XMLHttpResult object defines an attribute, onreadystatechange, to which you can assign a function that the object will invoke periodically as the request runs. The next recipe, Parsing the returned JSON, describes how to use this to monitor the status of a request.
If you don't have one installed on your system, you can install the pure Ruby implementation of the gem using the following command: gem install json_pure Regardless of whether you need to install the gem or not, you'll need to include it in your code. To do this, include both rubygems and json or json/pure, depending on which gem you installed; do this using require, like this: require 'rubygems' require 'json' The preceding code handles the former case, while the following code handles the latter: require 'rubygems' require 'json/pure' How to do it...