Fullstack Development: LAMP
CSCI-331 Mid Semester Check-in: Take Inventory
Considering what we've learned in this course so far, we now have:
-
Front End (Browser)
-
HTML for structuring content (represented by the DOM).
-
CSS for styling and laying out that content.
-
JavaScript for interacting with content (handling events, manipulating the DOM, making asynchronous requests with Fetch).
-
-
Back End (Server)
-
PHP for server-side programming (handling requests, processing data, generating dynamic HTML or JSON).
-
MySQL for server-side data storage (using SQL for CRUD operations: Create, Read, Update, Delete).
- LAMP Web Server Software (Apachee) running on Linux OS on the school web server hardware. AND we have all these things running locally too, so we can develop and test code before publishing it.
-
-
JSON for exchanging structured data between servers and browsers.
Now, if we combine all of these technologies into a single project, a web application, we're working with the Full Stack: the front end, back end, database, and communication between them. Therefore...
I do hereby dub thee Full Stack Developers.
Rise! Thy hands wield the tools.
Go forth and deploy.
Let's build a web app.
REST, APIs, and Web Applications
"API" is a term that gets tossed around a lot in web development, sometimes pretty loosely. You'll hear people refer to a URL that returns JSON data as an "API," although technically the API is the interface provided by the server, not the JSON data itself.
You'll also hear these services called "REST APIs" or "RESTful web applications." REST stands for Representational State Transfer, an architectural style defined by Roy Fielding. The term has become something of a buzzword in the industry, and many applications described as RESTful don't actually follow all of its principles.
Simply exchanging JSON data over HTTP doesn't make an application RESTful. REST includes several architectural constraints, particularly the use of hypermedia to guide interactions between the client and server. JSON can be used in a RESTful system, but most conventional JSON APIs don't provide the hypermedia controls required by REST.
In CSCI 331, we're going to build LAMP and React web applications that exchange JSON data. Industry would commonly describe these as RESTful applications, although they may not satisfy the original REST constraints.
Technologies like HTMX take a more hypermedia-driven approach, closer to the original REST architecture. You can explore those ideas further in CSCI 431: Hypermedia Systems.
Preperation
You've got the skills and the tools. Let's put them together.
We're going to build a LAMP-based web application locally, then deploy it to the course server.
Before we begin, make sure you have AMPPS (or an equivalent local development environment) running, with Apache, PHP, and MySQL available.
In class:
- Get started on the homework for this week.
Check Your Understanding
- Why might you need an API key to use a third party API service?
