Book Image

Kivy Blueprints

Book Image

Kivy Blueprints

Overview of this book

Table of Contents (17 chapters)
Kivy Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
The Python Ecosystem
Index

JavaScript client


In this section, we will briefly cover the development of a JavaScript remote desktop client mockup, which is feasible mostly because we use the HTTP protocol. This uncomplicated client will run in the browser and serve as a prototype of the Kivy remote desktop application that we're going to build next.

If you aren't familiar with JavaScript, don't worry; the language is very easy to get into and may even look similar to Python, depending on code style. We are also going to use jQuery for heavy lifting, such as DOM operations and AJAX calls.

Tip

In a production setting, jQuery usage may be frowned upon (and rightfully so), especially when aiming for a lean, high-performance codebase. However, for quick prototyping or vanity web apps, jQuery shines because it facilitates writing functioning, albeit suboptimal, code very quickly.

For a web app, we need to serve a complete HTML page instead of just Hello, Flask. To do this, let's create the index.html file that resides in a...