Title: Datadriven web sites
1Data-driven web sites
2Lesson Plan
- The reason for database driven websites
- Common set ups
- Examples of database driven websites
3Why Database?
- HTML is the language of the world wide web.
- Traditionally designers would code each page by
hand using HTML - As web pages got more complex WYSIWYG editors
like Dreamweaver became popular - The pages are still created individually using
this approach.
4Problems with this Approach
- Think about Amazon
- Could they create a separate page for each book?
- Now think of Ebay
- Does someone create a page every time someone
auctions a new item - Now think of google
- It would be impossible to create a new page for
every possible search combination
5The Solution - Databases
- Very common to use a database combined with a
website - Information is taken from the database and
displayed in the website - The content of the database can be displayed in
many different ways - Many sites give users power to add to database
-Forums, Ebay, Facebook
6Strengths of databases
- Databases offer efficient storage and retrieval
of information - Easy and quick to search through large quantities
of info to find specific records - Find all the customers who bought both computer
and philosophy books - Let the database do the work
- Databases sort data more efficiently than internt
programming langauges
7What is a Database
- Tempting to think of a database as simply tables
of information - Many people find it easier to use Excel to hold
tabular data - They can still sort and filter information
- WRONG!
- Spreadsheets ares designed for calculations
- Databases are designed to store data
8Database features
- Excellent for searching for data contained in the
database - We can be very specific about what we search for
- The database can automatically sort search
results - It can calculate totals and averages of the data
retrieved - They save us from a lot of web programming
9Common Setups
10Microsoft Solutions
- Active Server Pages (ASP)?
- Now being replaced by ASP.NET
- Traditional ASP uses VBScript
- The .Net framework uses the VB or C languages
- ASP Pages can store and retrieve data using
ActiveX Data Objects (ADO)?
11Microsoft Databases
- MS SQL Server is the Microsoft business Database
Management System (DBMS)? - It is not cheap but is a user-friendly DBMS
- SQL Server is often used with ASP and ASP.NET
- Home users and beginners sometimes use Access as
cheap alternative
12Open Source Solutions
- Theses products are free to use under licence
- LAMP
- Linux operating system
- Apache web server
- MySQL database
- PHP/Perl/Python programming language
- Ruby on Rails
- The new kid on the block
13Other Solutions
- Sun's alternative to ASP is called JSP
- Java Server Pages use Java as the programming
language - Aimed at the business market
- Most DBMS's can be linked to most programming
languages - E.G. Oracle, DB2, Postgres
14Examples of Database Driven Websites
15Form Filling
- The user enters information in a web form that
interacts with the database - Can be used to make decisions
- e.g. Insurance Quotes. The DBMS searches for the
relevant info and displays it on the web page - Sometimes user input is stored and displayed
- Web forums and online petitions are examples of
this
16eCommerce
- The catalogue of items for sale is stored in the
database - Product info is retrieved from DB and displayed
on the website - Users can fill in a web form selecting the
product they want and entering their payment
details - This information goes into DB ready for the
companies sales team.
17Tracking Behaviour
- Many sites track your behaviour without overtly
using form filling or accounts - Flickr tracks photos which are popular or ignored
to develop interestingness rating - Amazon matches your browsing history with similar
users to make recommendations
18Content Management Systems (CMS)?
- Web site is designed so non-developers can add
and update content on their website - The administrator fills in a web form that
populates the database - When a user visits, content is pulled from DB and
placed into templates - Wikis and Blogs both work in very similar ways
19Web 2.0
- Buzzword - often used for sites where the users
create the content - Examples include Ebay, Facebook, Fickr, YouTube
- The user fills in a web form
- This information get stored in DB
- This information gets displayed in the website
20Search Engines
- Google, Yahoo, Ask etc
- Very technical and specialised database
application - Search Engines collect information about web
sites and store them in a DB - Use complex algorithms to get a seach engine
ranking