CS 4720 Anatomy of a Web Application CS 4720 – Web & Mobile Systems.

12
CS 4720 Anatomy of a Web Application CS 4720 – Web & Mobile Systems

Transcript of CS 4720 Anatomy of a Web Application CS 4720 – Web & Mobile Systems.

Page 1: CS 4720 Anatomy of a Web Application CS 4720 – Web & Mobile Systems.

CS 4720

Anatomy of a Web Application

CS 4720 – Web & Mobile Systems

Page 2: CS 4720 Anatomy of a Web Application CS 4720 – Web & Mobile Systems.

CS 4720

Client/Server Architecture• Okay, so that was the “blueprint,” what are the

actual pieces to the puzzle?

2

Page 3: CS 4720 Anatomy of a Web Application CS 4720 – Web & Mobile Systems.

CS 4720

LAMP

3

• We start with LAMP– Linux– Apache– MySQL– PHP/Python

• WAMP and MAMP also exist

Page 4: CS 4720 Anatomy of a Web Application CS 4720 – Web & Mobile Systems.

CS 4720

Apache• Apache is one of the “simplest” and most

prevalent web servers available• In the very simplest case, Apache is a particular

type of file server– You ask for a particular file (something.html) and it

sends that file right back to you– Nothing fancy here

4

Page 5: CS 4720 Anatomy of a Web Application CS 4720 – Web & Mobile Systems.

CS 4720

Apache• How does network traffic work with Apache?• Let’s go back to 201/2110 and the network

discussions we had – (or perhaps the networking class you’ve had…)

5

Page 6: CS 4720 Anatomy of a Web Application CS 4720 – Web & Mobile Systems.

CS 4720

Apache Group Discussion• What is circuit vs. packet switching?• What is in a packet?• How does the handshake work in TCP?• How does a packet get to the server from the

client?• What’s a port and how does that apply to this

discussion?

6

Page 7: CS 4720 Anatomy of a Web Application CS 4720 – Web & Mobile Systems.

CS 4720

Managing Apache 2.0• Quick Demo Time

– Basic configuration of Apache– Setting up directories and permissions– How Netbadge ties into Apache

• What you need to know strictly as a web developer

• Even though you may never have to setup a web server, you should know the basics!

7

Page 8: CS 4720 Anatomy of a Web Application CS 4720 – Web & Mobile Systems.

CS 4720

So… how does PHP work in here?• Adding modules to Apache allows it to handle

specific types of files differently• By adding in the PHP module, Apache hands

any file with a .php extension to the PHP interpreter first and then returns the “result” as the “file” the user requested

• JSP (Java Server Pages), Ruby, ASP.NET, Python, etc. all work similarly

• (But that’s another lecture)

8

Page 9: CS 4720 Anatomy of a Web Application CS 4720 – Web & Mobile Systems.

CS 4720

L? M?• Linux and MySQL• Linux can be intimidating for some• So can a database system• LAMP installs are intended to be as

easy/streamlined as possible• But, if you want to run locally on your non-

Linux laptop…

9

Page 10: CS 4720 Anatomy of a Web Application CS 4720 – Web & Mobile Systems.

CS 4720

WAMP and MAMP• WAMP - http://www.wampserver.com/en/• MAMP - http://www.mamp.info/en/index.html

10

Page 11: CS 4720 Anatomy of a Web Application CS 4720 – Web & Mobile Systems.

CS 4720

The Other Side of the Equation• Okay, Apache is waiting on the server side• So what’s going on on the client side?

11

Page 12: CS 4720 Anatomy of a Web Application CS 4720 – Web & Mobile Systems.

CS 4720

The Other Side of the Equation• The web browser is a very odd creature

– Different versions– Different manufacturers– Different platforms / OSs– Different levels of compliance with standards– Different standards that they made up just to

infuriate web developers– Different standards that they made up because

they thought they owned the Internet

12