https://www.oreilly.com/library/view/cgi-programming-on/9781565921689/07_chapter-04.html
* Common Gateway Interface
#!/usr/bin/perl -w
use strict;
print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<TITLE>Simple Web Form</TITLE>\n";
print "<BODY>\n";
print "<b>Simple Web Form</b><p>\n";
print "<FORM ACTION=\"/cgi-bin/program.pl\">\n";
print "Name: <INPUT TYPE=\"text\" NAME=\"user\" SIZE=40><BR>\n";
print "Age: <INPUT TYPE=\"text\" NAME=\"age\" SIZE=3 MAXLENGTH=3><BR>\n";
print "Password: <INPUT TYPE=\"password\" NAME=\"pass\" SIZE=10><BR>\n";
print "<INPUT TYPE=\"SUBMIT\" NAME=\"Submit\" VALUE=\"Submit\">\n";
print "</FORM>\n";
print "</BODY>\n";
print "</HTML>";
* Common Gateway Interface
<HTML>
<TITLE>Simple Web Form</TITLE>
<BODY>
<b>Simple Web Form</b><p>
<FORM ACTION="/cgi-bin/program.pl">
Name: <INPUT TYPE="text" NAME="user" SIZE=40><BR>
Age: <INPUT TYPE="text" NAME="age" SIZE=3 MAXLENGTH=3><BR>
Password: <INPUT TYPE="password" NAME="pass" SIZE=10><BR>
<INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Submit">
</FORM>
</BODY>
</HTML>
* Common Gateway Interface
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Output of form:<P>\n";
while(<STDIN>)
{
chomp($_);
print "$_<br>\n";
}
print "<P>\n";
* Common Gateway Interface
Web Browser
UI
HTTP request
HTTP Response
CGI*
* Common Gateway Interface
https://www.webdesignerdepot.com/2009/09/25-examples-of-web-2-0-and-traditional-design-rules-coming-together/
Web Browser
AJAX
UI
XML HTTP Request (XHR)
XML/JSON/etc...
API Server
database
Single Page Application
Web Browser
UI
HTTP request
HTTP Response
Web Server
database
Traditional Web Site
https://semantic-web.com/2018/08/23/knowledge-graphs-connecting-dots-increasingly-complex-world/
Microsoft
Sr. Developer Advocate (JavaScript)
Wassim Chegham
Web Browser
AJAX
UI
HTTP request
Static HTML/CSS/JS
XHR2/fetch
XML/JSON/Buffer/etc...
Serverless API
Database
Static Content
https://wassim.dev/.auth/login/aad
https://wassim.dev/.auth/login/twitter
https://wassim.dev/.auth/login/github
Azure Function
Static content
Authn / Authz
Push Pull request
https://wassim.dev
@manekinekko
GitHub Workflow
Azure Pipelines
Web Browser
AJAX
UI
Static HTML/CSS/JS
XML/JSON/Buffer...
Serverless API
Database
https://wassim.dev
Static Content
Auth
GitHub
...
* Preview available at https://aka.ms/swa-cli
VS Code ext.
Azure Portal
Azure CLI
SWA CLI*