Web development with Lua Programming Language

Similar documents
BEST WEB PROGRAMMING LANGUAGES TO LEARN ON YOUR OWN TIME

lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder

How to Re-Direct Mobile Visitors to Your Library s Mobile App

RED HAT SOFTWARE COLLECTIONS BRIDGING DEVELOPMENT AGILITY AND PRODUCTION STABILITY

Kollaborate Server Installation Guide!! 1. Kollaborate Server! Installation Guide!

skype ID: store.belvg US phone number:

End User Guide The guide for /ftp account owner

Linux VPS with cpanel. Getting Started Guide

Magento Search Extension TECHNICAL DOCUMENTATION

BASICS OF SCALING: LOAD BALANCERS

What is a stack? Do I need to know?

Stackato PaaS Architecture: How it works and why.

VOL. 2, NO. 1, January 2012 ISSN ARPN Journal of Science and Technology ARPN Journals. All rights reserved

Installation of PHP, MariaDB, and Apache

Building native mobile apps for Digital Factory

LIBRARY ACCESS SYSTEM SMARTPHONE APPLICATION USING ANDROID

Security Products Development. Leon Juranic

Assignment # 1 (Cloud Computing Security)

VOC Documentation. Release 0.1. Russell Keith-Magee

Web Application Development and Frameworks

Large-Scale Web Applications

COURSE CONTENT FOR WINTER TRAINING ON Web Development using PHP & MySql

NaviCell Data Visualization Python API

ICON UK 2015 node.js for Domino developers. Presenter: Matt White Company: LDC Via

Installing an open source version of MateCat

SIG-NOC Meeting - Stuttgart 04/08/2015 Icinga - Open Source Monitoring

CS396A UGP Presentation. Dr. Prabhakar T.V

The Windows Web Platform. Michael Epprecht Microsoft Switzerland twitter: fastflame

FormAPI, AJAX and Node.js

Livezilla How to Install on Shared Hosting By: Jon Manning

Design and Functional Specification

DreamFactory & Modus Create Case Study

Enter Here -> Directory Submitter Software For One > Visit Here <

Penetration Testing Scope Factors

Modern Web Development From Angle Brackets to Web Sockets

Using Ruby on Rails for Web Development. Introduction Guide to Ruby on Rails: An extensive roundup of 100 Ultimate Resources

Expresso Quick Install

Protect, License and Sell Xojo Apps

Choosing a Content Management System (CMS)

1 (11) Paperiton DMS Document Management System System Requirements Release: 2012/

Performance Testing Crash Course

Drupal to WordPress migration worksheet

Server-Side Scripting and Web Development. By Susan L. Miertschin

MAGENTO Migration Tools

Binary Vibes Information Technologies Pvt. Ltd. Driving The Web Everywhere. Corporate Profile

Mobile development with Apache OFBiz. Ean Schuessler, Brainfood

Building Library Website using Drupal

White Paper Server. SUSE Linux Enterprise Server 12 Modules

Web Application Frameworks. Robert M. Dondero, Ph.D. Princeton University

Modern Web Application Framework Python, SQL Alchemy, Jinja2 & Flask

(An) Optimal Drupal 7 Module Configuration for Site Performance JOE PRICE

A detailed walk through a CAS authentication

Workshop on Android and Applications Development

Big Bad Moodle Guide By Mike Tupker Version 1

Linux and the Internet, Servers, Ports, Firewalls

HOSTING PYTHON WEB APPLICATIONS. Graham Dumpleton PyCon Australia Sydney 2011

KEYSTONE JS FOR DRUPAL DEVELOPERS

Getting started with PrestaShop 1.4

Ruby On Rails. CSCI 5449 Submitted by: Bhaskar Vaish

CloudLinux is a proven solution for shared hosting providers that:

Symfony2 and Drupal. Why to talk about Symfony2 framework?

Implementation Overview. Digital Rights Management (DRM) Solution

FileMaker Server 15. Getting Started Guide

APACHE. Presentation by: Lilian Thairu

STABLE & SECURE BANK lab writeup. Page 1 of 21

EOP ASSIST: A Software Application for K 12 Schools and School Districts Installation Manual

Citrix XenApp-7.6 Administration Training. Course

ZABBIX. An Enterprise-Class Open Source Distributed Monitoring Solution. Takanori Suzuki MIRACLE LINUX CORPORATION October 22, 2009

Net 2. NetApp Electronic Library. User Guide for Net 2 Client Version 6.0a

mod_auth_pubtkt a pragmatic Web Single Sign-On solution by Manuel Kasper, Monzoon Networks AG mkasper@monzoon.net

Simple Tips to Improve Drupal Performance: No Coding Required. By Erik Webb, Senior Technical Consultant, Acquia

Avaya Inventory Management System

7 Why Use Perl for CGI?

Additional information >>> HERE <<<

Power Tools for Pivotal Tracker

Open Source Content Management System for content development: a comparative study

Akita International University Online Application System. Usage Manual

inforouter V8.0 Server & Client Requirements

ipad Classroom Installation & Deployment Important information

PHP web serving study Performance report

Apache 2.0 Installation Guide

HGC SUPERHUB HOSTED EXCHANGE

Ansible. Configuration management tool and ad hoc solution. Marcel Nijenhof

Modelling with R and MySQL. - Manual - Gesine Bökenkamp, Frauke Wiese, Clemens Wingenbach

Safewhere*Identify 3.4. Release Notes

Migrating from Linux to Mac OS X. David Wheeler Kineticode, Inc.

Syllabus INFO-GB Design and Development of Web and Mobile Applications (Especially for Start Ups)

Learning security through insecurity

SOA, case Google. Faculty of technology management Information Technology Service Oriented Communications CT30A8901.

10CS73:Web Programming

Transcription:

Web development with Lua Programming Language Introducing Sailor, a web MVC framework in Lua Etiene Dalcol @etiene_d

Web development with Lua Programming Language Introducing Sailor, a web MVC framework in Lua Etiene Dalcol @etiene_d

@etiene_d

Sailor! http://sailorproject.org

Lua Ladies http://lualadies.org

Google Summer of Code LabLua

Advantages

better reasons It looks cool (I heard you could make games with it)

better reasons It looks cool (I heard you could make games with it) It s made in my home country (In my university to be more precise)

better reasons It looks cool (I heard you could make games with it) It s made in my home country (In my university to be more precise) It s easy to learn

??????

Lua on the web Early stage cgilua ~ 1995 Kepler Project ~ 2003

I have myself developed Web sites with pure C++, Java, C#, PHP, and Python. The easiest way to go was definitely Python. If the libraries existed, Lua would be not quite as easy to use as Python, but probably quite a bit more efficient; I think it would become my first choice... if the libraries existed. Michael Gogins Recently there was some discussion about mod_lua on the Apache developers mailing list. I mentioned there that I feel Lua could replace PHP as the number one web scripting language if mod_lua were stable (i.e. not still in beta) and it were implemented well (not making some of PHP's mistakes such as putting everything in the global scope with no consistent naming or parameter schemes). I've wanted to use Lua for all the things I currently use PHP for ever since I discovered it. Rena

Why?

Servers Apache: mod_lua Nginx: OpenResty

Servers Apache: mod_lua Nginx: OpenResty

Servers Apache: mod_lua Nginx: OpenResty Xavante Others

Frameworks Orbit (2007) Least known No significant updates since 2010 MVC

Frameworks Orbit (2007) Least known No significant updates since 2010 MVC Luvit (2011) Most popular Intense development node.js port 2-4x faster

Frameworks Lapis (2012) Intense development Moonscript and Lua Very well documented Templater OpenResty only Not MVC

Frameworks Lapis (2012) Intense development Moonscript and Lua Very well documented Templater OpenResty only Not MVC Others Complicated, abandoned, poorly documented, license issues or I never heard about it...

Sailor!

Sailor!

Sailor!

Sailor! 0.1 (Venus) 0.2 (Mars)

What exactly is Sailor? It s an MVC web framework Completely written in Lua Compatible with Apache (mod_lua), Nginx (OpenResty), Mongoose, Xavante and Lwan Compatible with Linux, Windows and Mac Compatible with different databases MIT License Pre alpha v0.2 (Mars) 0.3 (Jupiter) will be released TODAY!

What (else) is cool about Sailor? Routing and friendly URLs Session, cookies, include, redirect Lua Pages parsing Mail sending Simple Object Relational-Mapping Validation (valua) Basic login and authentication modules Form generation Themes (Bootstrap integration out of the box) App generator (Linux and Mac only) Model and CRUD generator

What (else) is cool about Routing and friendly URLs Session, cookies, include, redirect Lua Pages parsing Mail sending Simple Object Relational-Mapping Validation (valua) Basic login and authentication modules Form generation Themes (Bootstrap integration out of the box) App generator (Linux and Mac only) Model and CRUD generator Lua at client Sailor?

Not so great things It s still in early development Things are changing fast It lacks features Documentation

How to get Sailor! $ luarocks install sailor $ sailor_create My App /var/www $ cd /var/www/my_app $ lua start-server.lua

How to get Sailor! $ luarocks install sailor $ sailor_create My App /var/www $ cd /var/www/my_app $ lua start-server.lua $ luarocks install luasql-mysql

/conf /controllers /models /pub /runtime /themes /views App structure

Example! -- /controllers/site.lua local site = {} function site.index(page) local msg = Hello World page:render( index, { msg = msg } ) end function site.notindex(page) page:write( I m different! ) end return site

Example! <!-- /views/site/index.lp --> <p> A message from the server: <?lua page:print(msg)?> <br/> The message again: <%= msg %> <!-- same thing as above > </p>

Example!

Example! <?lua@server -- Code here runs on the server?> <?lua -- Same as above?> <?lua@client -- Runs at the client?> <?lua@both -- Runs at the server and the client?> <?lua@both another_msg = Another message?> <?lua page:print(another_msg)?> <?lua@client js.window.alert(another_msg)?>

Example!

Example! local user = {} local v = require valua -- validation module user.attributes = { } { id = safe }, { name = v:new().not_empty() } user.db = { key = id, table = users } user.relations = { } posts = { -- u.posts } relation = HAS_MANY, model = post, attribute = author_id return user

Example! -- /controllers/site.lua local site = {} function site.index(page) local User = sailor.model( user ) local u = User:new() u.name = Arnold local msg if u:save() then msg = Success else msg = table.unpack(u.errors) end local users = User:find_all() page:render( index, { msg = msg, users = users } ) end return site

sailorproject.org github.com/etiene/sailor dalcol@etiene.net @etiene_d

Example!

sailorproject.org github.com/etiene/sailor dalcol@etiene.net @etiene_d