Let’s Wub Wub tutorial What is Wub? HTTP 1.1 Webserver Written by Colin McCormack 100% Tcl Web application framework Domain based.

Slides:



Advertisements
Similar presentations
Presenter: James Huang Date: Sept. 29,  HTTP and WWW  Bottle Web Framework  Request Routing  Sending Static Files  Handling HTML  HTTP Errors.
Advertisements

Copyright © 2012 Certification Partners, LLC -- All Rights Reserved Lesson 4: Web Browsing.
Lesson 4: Web Browsing.
B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
Apache Configuration Setting up a web server. Basic Server Facts Runs on port 80 Server application -> httpd Richly configurable Many defaults will let.
CP476 Internet Computing Browser and Web Server 1 Web Browsers A client software program that allows you to access and view Web pages on the Internet –Examples.
Topics in this presentation: The Web and how it works Difference between Web pages and web sites Web browsers and Web servers HTML purpose and structure.
 What is it ? What is it ?  URI,URN,URL URI,URN,URL  HTTP – methods HTTP – methods  HTTP Request Packets HTTP Request Packets  HTTP Request Headers.
SQL Reporting Services Overview SSRS includes all the development and management pieces necessary to publish end user reports in  HTML  PDF 
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Linux Operations and Administration
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
Web Server Configuration Alokes Chattopadhyay Computer & Informatics Centre IIT Kharagpur.
IT 210 The Internet & World Wide Web introduction.
Computer Concepts 2014 Chapter 7 The Web and .
Drupal Training Syllabus Chaitanya Lakshmi
Web Servers1-1 Web Servers Xingquan (Hill) Zhu
1 Web Server Concepts Dr. Awad Khalil Computer Science Department AUC.
Server-side Scripting Powering the webs favourite services.
1 John Magee 9 November 2012 CS120 Lecture 17a: Publishing Web pages.
Web application architecture
Chapter 6 The World Wide Web. Web Pages Each page is an interactive multimedia publication It can include: text, graphics, music and videos Pages are.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
COMP 321 Week 7. Overview HTML and HTTP Basics Dynamic Web Content ServletsMVC Tomcat in Eclipse Demonstration Lab 7-1 Introduction.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 21 - Web Servers (IIS, PWS and Apache) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3.
1 In the good old days... Years ago… the WWW was made up of (mostly) static documents. –Each URL corresponded to a single file stored on some hard disk.
1 Apache. 2 Module - Apache ♦ Overview This module focuses on configuring and customizing Apache web server. Apache is a commonly used Hypertext Transfer.
Introduction to ASP.NET MVC Information for this presentation was taken from Pluralsight Building Applications with ASP.NET MVC 4.
Database-Driven Web Sites, Second Edition1 Chapter 5 WEB SERVERS.
Chapter 8 Cookies And Security JavaScript, Third Edition.
10/13/2015 ©2006 Scott Miller, University of Victoria 1 Content Serving Static vs. Dynamic Content Web Servers Server Flow Control Rev. 2.0.
Hour 7 The Application Layer 1. What Is the Application Layer? The Application layer is the top layer in TCP/IP's protocol suite Some of the components.
How to upload files to Altervista Overview:
Chapter 6 Server-side Programming: Java Servlets
Web Design (1) Terminology. Coding ‘languages’ (1) HTML - Hypertext Markup Language - describes the content of a web page CSS - Cascading Style Sheets.
Let’s Wub Wub tutorial What is Wub? HTTP 1.1 Webserver Written by Colin McCormack Successor of tclhttpd 100% Tcl Web application.
WWW: an Internet application Bill Chu. © Bei-Tseng Chu Aug 2000 WWW Web and HTTP WWW web is an interconnected information servers each server maintains.
Server-side Programming The combination of –HTML –JavaScript –DOM is sometimes referred to as Dynamic HTML (DHTML) Web pages that include scripting are.
Murach's HTML5 and CSS3, C1© 2012, Mike Murach & Associates, Inc. Slide 1.
HOW THE WEB WORKS Reference: Learning Web Design (4 th edition) by Robbins 2012 – Chapter 2 (pp. 21 – 32)
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
Let’s Wub Wub tutorial What is Wub? HTTP 1.1 Webserver Written by Colin McCormack 100% Tcl Web application framework Domain based.
Free Powerpoint Templates Page 1 Free Powerpoint Templates Users and Documents.
Web Server.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
HTTP protocol Java Servlets. HTTP protocol Web system communicates with end-user via HTTP protocol HTTP protocol methods: GET, POST, HEAD, PUT, OPTIONS,
Channel Archiver Overview Jan Channel Archiver Channel Access client Stores samples in disk files Design target: handle values/sec Documentation,
CIS 228 The Internet Day 4, 9/8/11 Getting on the Internet.
CITA 310 Section 4 Apache Configuration (Selected Topics from Textbook Chapter 6)
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
JavaScript and Ajax (JavaScript Environment) Week 6 Web site:
Web Page Design The Basics. The Web Page A document (file) created using the HTML scripting language. A document (file) created using the HTML scripting.
L.A.M.P. İlker Korkmaz & Kaya Oğuz CS 350. Why cover a lecture on LAMP? ● Job Opportunities – There are many hosting companies offering LAMP as a web.
Finally getting to html and CSS… Tim Berners-Lee, the writer of the software program that makes him the inventor of the WWW, defines the Internet as a.
4.01 How Web Pages Work.
4.01 How Web Pages Work.
Distributed Control and Measurement via the Internet
Tiny http client and server
Node.js Express Web Applications
Warm Handshake with Websites, Servers and Web Servers:
Play Framework: Introduction
Unix System Administration
Unix System Administration
Chapter 6 Server-side Programming: Java Servlets
MapServer In its most basic form, MapServer is a CGI program that sits inactive on your Web server. When a request is sent to MapServer, it uses.
Chapter 27 WWW and HTTP.
PHP and Forms.
4.01 How Web Pages Work.
Q/ Compare between HTTP & HTTPS? HTTP HTTPS
Presentation transcript:

Let’s Wub Wub tutorial

What is Wub? HTTP 1.1 Webserver Written by Colin McCormack 100% Tcl Web application framework Domain based Heavy user of recent Tcl features: – dicts – coroutines – tclOO – zlib Successor of tclhttpd

Wub in action Tcler’s wiki runs on Wub since Wubchain (web interface to Tcler’s chat) Intranet application to manage tool releases

Requirements Tcl 8.6 (dicts, coroutines, tclOO, zlib) Tcllib 1.11 Unix or Windows

Getting Wub Wub’s hosted at Google Checkout via SVN: svn checkout Wub Available together with required Tcllib modules as part of WubWikit

Documentation Wub’s wiki page: Wub documentation:

Tutorial goals Overview different parts of Wub Step-by-step introduction of File, Mason, Direct, Nub, Init and jQuery domains Wub API: utilities to generate HTML, cache, handle queries, convert response types

Wub’s architecture

Wub’s dataflow Httpd module converts HTTP client request into request dicts. Caching and blocking based on request dict Request dicts are transformed into response dicts by the web application using Wub utilities and domains. Response dicts are send back to the client by the Httpd module (protocol / non-protocol fields in dict)

Example 1: Wub out-of-the-box Running the default setup, start the webserver with these lines: package require Site Site start home. What’s being served? – Files from html, images, css and scripts subdirectories of./docroot

Example 1 (continued) On serverOn clientExpires./docroot/html/file.htmlhttp://myurl:8080/html/file.htmltomorrow./docroot/images/file.gifhttp://myurl:8080/images/file.gifnext week./docroot/css/file.csshttp://myurl:8080/css/file.csstomorrow./docroot/scripts/file.jshttp://myurl:8080/scripts/file.jstomorrow How are these file served: – On port 8080 – Using caching – The html, images, css and scripts subdirectories are served as root in the URL

Example 1a: adding some Nub Nub is a configuration utility for Wub Specify redirect from root URL to./docroot/html/ex.html in ex.nub: redirect / /html/ex.html Start Wub with these lines: package require Site Site start home. nubs ex.nub

Example 1a: Nub redirect syntax redirect ArgumentDescription from url URL for which to send a redirect. to url URL to redirect to

Example 2: the File domain Making File domains explicit in ex.nub: domain /css/ {File css} root [file join. docroot css] expires tomorrow nodir 1 domain /images/ {File images} root [file join. docroot images] expires "next week" nodir 1 domain /scripts/ {File scripts} root [file join. docroot scripts] expires tomorrow nodir 1 domain /html/ {File html} root [file join. docroot html] expires tomorrow nodir 1 Add new File domain: domain /disk/ {File disk} \ root / \ indexfile index.* \ hide {^([.].*)|(.*~)|(\#.*)$} \ redirdir 1 \ expires tomorrow \ dateformat "%Y %b %d %T" \ nodir 0 Add Rewrite to ex.nub: rewrite {/[^/]+[.]html} {/html/[file tail [dict get $r -path]]}

Example 2: Nub domain syntax domain Argument Description url Url to be processed with the specified domain domain_name name of domain to use (File, Mason, Direct, jQ, …) name Name of this domain usage args Domain specific arguments

Example 2: File domain arguments Argument nameDescription root File-system root directory of File domain. indexfile Name of the file which stands for a directory, such as index.html. The contents of that file will be returned in stead of the directory listing. hide A regular expression to hide temp and other uninteresting files (default hides.* *~ and #*). redirdir Should references to directories be required to have a trailing /? expires A tcl clock expression indicating when contents expires. dateformat A tcl clock format for displaying dates in directory listings. nodir Don't allow the browsing of directories (default: 0 - browsing allowed).

Example 2: Nub rewrite syntax rewrite ArgumentDescription regexp Regular expression to select an URL to be transformed script Script to be called to transform the URL (evaluated in Nub namespace)

Example 3: Mason domain

Example 4: Direct domain