Skip to Content
Beginning Lua Programming
book

Beginning Lua Programming

by Kurt Jung, Aaron Brown
February 2007
Beginner
672 pages
15h 34m
English
Wrox
Content preview from Beginning Lua Programming

Chapter 15. Programming for the Web

Although the Internet is the infrastructure for a myriad of protocols, e-mail and the Web are the two services most people associate with it. In this chapter, you'll learn how nicely Lua fits into the Web part of the equation. In this chapter, you learn about the following:

  • The basic operation of web servers

  • Generating web content dynamically with Lua

  • Issues with serving dynamic content

  • Handling input from users by means of forms

  • The basics of the Lua-based Kepler web server environment

Along the way, you'll see how Lua can make use of community libraries to dynamically generate attractive, informative web pages.

A Web Server Primer

To generate web pages using Lua, you should have a comfortable grasp on how web servers operate. This understanding will let you develop Lua programs that focus on the Web's strengths and deal with the Web's limitations in as graceful a manner as possible. As you'll see in this chapter, a successful web application draws on many different tools, with the web server itself playing the central role.

Conceptually, a web server is pretty simple. It's an application that runs on a host and listens for inbound connections. It has access to resources, generally web pages, that are handed out in response to requests made by other applications, usually web browsers. These requests and responses conform to a standard known as hypertext transfer protocol, or HTTP. Unlike many other protocols that define how two applications can have an ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Lua Quick Start Guide

Lua Quick Start Guide

Gabor Szauer
The Go Programming Language

The Go Programming Language

Alan A. A. Donovan, Brian W. Kernighan

Publisher Resources

ISBN: 9780470069172Purchase book