120 likes | 231 Views
Anatomy of a Web Application. CS 4720 – Web & Mobile Systems. Client/Server Architecture. Okay, so that was the “ blueprint, ” what are the actual pieces to the puzzle?. LAMP. We start with LAMP Linux Apache MySQL PHP/Python WAMP and MAMP also exist. Apache.
E N D
Anatomy of a Web Application CS 4720 – Web & Mobile Systems
Client/Server Architecture • Okay, so that was the “blueprint,” what are the actual pieces to the puzzle? 2
LAMP • We start with LAMP • Linux • Apache • MySQL • PHP/Python • WAMP and MAMP also exist 3
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
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
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
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
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
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
WAMP and MAMP • WAMP - http://www.wampserver.com/en/ • MAMP - http://www.mamp.info/en/index.html 10
The Other Side of the Equation • Okay, Apache is waiting on the server side • So what’s going on on the client side? 11
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