Book Image

Ext JS Application Development Blueprints

Book Image

Ext JS Application Development Blueprints

Overview of this book

Table of Contents (18 chapters)
Ext JS Application Development Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Data structure


We will make an assumption in this chapter, that is, we have a friendly backend developer on our team who's able to provide us data in the format we need. Let's flesh out our requirements for the data that will power our application.

Another assumption is that we're looking for trends and statistics here, so we're going to be basically aggregating logs into something more suitable for user consumption.

Live charts

We planned to have two "live" charts on the dashboard (one to show SQL queries as they come in, and one to show web requests). In order for this to work, we need a URL we can poll every second or so. This will provide us with data on the last second of activity. Something like this:

GET /logStream
Accepts: n/a
Returns: [
    {
        "type":"web",
        "subType":"request",
        "time":"2014-11-04T12:10:14.465Z",
        "ms":10,
        "count":5
    },
    {
        "type":"sql",
        "subType":"query",
        "time":"2014-11-04T12:10:14.466Z",
        "ms...