by Andres Baravalle
This module will provide students the core theoretical and practical background necessary for multi-tier web applications development.
At the end of this module, students will be able to:
Your module handbook is on your Virtual Learning Environment (VLE) and contains general information on this module and the module team.
Please familiarise yourself with the handbook.
The core textbook for this module is:
By the end of the semester you should have studied all the sections in the book outlined in the module handbook.
Week 1 | Building n-tier web applications |
Appendix A |
---|---|---|
Week 2 | Starting with PHP |
Chapter 1 |
Week 3 | Including files and using arrays |
Chapter 2 (self study) |
Week 4 | Interacting with strings |
Chapter 4 |
Week 5 | Reusing code and writing functions |
Chapter 5 |
Week 6 | Revision |
|
Week 7 | OO PHP | Chapter 6 |
---|---|---|
Week 8 | Interacting with remote resources |
Chapter 19 |
Week 9 | Sessions and advanced PHP |
Chapter 22 (self study) |
Week 10 | PHP & NoSQL |
On-line documentation |
Week 11 | Agile software development | On-line documentation |
Week 12 | Deploying web applications |
Chapter 16 |
You should have already some good experience in web development, and you should be able to:
In this module we build on the learning outcomes that you achieved during IM1024: Web Development and Management, trying to move one step further.
Castro, E. (2007) HTML, XHTML & CSS: visual quickstart guide. 6th ed. London: Pearson Education.
Meyer, E.A. (2007) CSS: the definitive guide. Farnham: O'Reilly.
Musciano, C. and Kennedy, B. (2006) HTML and XHTML: the definitive guide. Beijing; Cambridge, Mass.: O'Reilly.
If this module is an option, remove this module - now.
You are going to be doing web applications programming for 12 weeks.
Since the advent of the World Wide Web (WWW) much of the focus in computing has been on technologies that work with, or on, the World Wide Web. This includes W3C technologies as HTML, CSS and XML (that work on the web) but also programming languages as Java, Python, Ruby - the allow to build applications that rely on - or use - the World Wide Web.
These technologies can be grouped (by function) into three main layers: languages for structuring content (such as HTML 5 or XML), languages to manage the presentation layer of information (such as CSS) and languages to manage the interaction of the user with the structure and with the presentation (such as JavaScript or PHP).
At this point, it would be useful to summarise the more important WWW technologies, and in which layers they operate.
Please note that any technology can be used in different ways; we are now focusing on the more common uses of the technologies.
Some of the technologies focus on just one of the layers that we have identified:
Some of the technologies focus on two groups of function (typically, structuring content and managing the presentation layer):
A number of languages implement features of all three layers:
An architecture relates to the design of a complete system:
Client–server-based architectures represent the mainstream conceptual framework underlying the design of most web applications. Understanding the basic principles and range of possibilities is fundamental to designing any new application.
The simplest ‘client–server’architecture consists of just two components: a client and a server.
An example of a client server architecture is a database application with clients that can access the data. For example, you can store your data (e.g. customer addresses) in a MySQL server and use a desktop application to perform operations on the data - e.g. input, extract or manipulate the data.
Modern web architectures are typically based on 3 tiers:
In a three-tier architecture, there will still be an application, but it will not be responsible for the business logic nor for the storage of data, which will be addressed in the other layers.
Presentation tier | The presentation tier "displays information related to such services as browsing merchandise, purchasing and shopping cart contents. It communicates with other tiers by outputting results to the browser/client tier and all other tiers in the network. (In simple terms it's a layer which users can access directly such as a web page, or an operating systems GUI)". |
---|
Application tier | The application tier "is pulled out from the presentation tier and, as its own layer, it controls an application’s functionality by performing detailed processing". |
---|---|
Data tier | The data tier is where "information is stored and retrieved. This tier keeps data neutral and independent from application servers or business logic. Giving data its own tier also improves scalability and performance". |
N-tier architectures are build by breaking up an application into further tiers.
This allows both to re-use existing software and components, and improves maintainability by allowing to modify specific tiers only (e.g. replacing a Oracle database with a MySQL database would require just rewriting the "Data Access" tier)
This course will enable you to build dynamic web sites and web applications based on (part of) the LAMP/WAMP stacks (a n-tier architecture).
We will start with an introduction to the main elements of the software stack that we will be using:
Web servers are in charge of delivering static HTML pages and any additional content needed in the page to the clients.
When a web server receives a request for an URL (uniform resource locator), the web server will try to locate the request on the file system and send it to the client.
Here is what a simple HTTP request looks like (short screencast here):
telnet mastodon.uel.ac.uk 80
Trying 161.76.74.2...
Connected to mastodon.uel.ac.uk.
Escape character is '^]'.
GET / HTTP1.0
The web server - as we can see from the previous example - listens on port 80.
This simple request is asking the web server to return the default index page in the root of the web server mastodon.uel.ac.uk. The web server will look in the default folder (/var/www/html
) for the default index page (index.html
) and return its content using TCP/IP.
MySQL is one of the world's most widely used databases, and the most popular Open Source database server.
MySQL supports a broad subset of ANSI SQL 99, as well as extensions. By default, it ships with no GUI, and is normally administered either from the command line or with third-party tools as phpMyAdmin.
In reality you will not be using MySQL. Most of you are going to learn to use databases in your next semester - so during this semester you'll be focusing on web applications with PHP.
After you learn databases during the next semester, you'll then be able to go back to PHP and learn how to build applications using the full extent of the LAMP/WAMP stack.
PHP is a Open Source server-side scripting language; you will be using PHP to develop web scripts and applications.
Apache, MySQL and PHP are all examples of free and open source software.
Free and open source software is software released under a license that guarantees to its users the:
Software that does not give you those rights is usually called proprietary. Free Software and Open Source, when used to denote software, are synonyms used by different groups.
Free to use means that Open Source software can be used without restrictions.
It does not mean “free as in free beer”. Free is as in the French and Spanish libre (and Portuguese livre). It means that there are no discriminations on different types of use.
The most popular Open Source licenses are:
We will be using PHP, running on Apache, to program web applications - working on the interaction layer.
We will explore the main language constructs in PHP and you will learn how to use PHP to build web applications.
These are some resources you can use for a more in-depth study:
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License