Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old...

68
Content Management Systems LIS 9720

Transcript of Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old...

Page 1: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Content Management Systems

LIS 9720

Page 2: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Today’s Forecast

Cloudy and dark with chance of teenagers

Page 3: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Static Web Sites

• Use HTML and browser-based Javascript• Use old httpd model of page requests• Tend to be information based not task

based

Page 4: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Static Web Sites - Problems

• Pages are read-only• Limited interactivity and feedback• No decision-making logic or program flow

orbranching

• No saveddata orsaved userpreferences

• Costs rise aspages areadded

Page 5: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Dynamic Web Sites are more Usable

• Respond to different parameters (ie, the time of day, a username or a user’s ‘role’)

• Have a "memory," allowing for user registration and login, preferences, etc

• Stored data can be used to provide feedback, make decisions or offer choices

• Users can manage their own content• Easier to maintain as there are no

pages

Page 6: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Dynamic Web Sites

Page 7: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

LAMP (linux, apache, mysql, php)• Includes:

• A web server• A database• A server-based

programming language like php• Used to build dynamic web pages

• Data and variables are stored in the database• Logic is contained in the php pages (scripts) • Presentation is handled by the web server

using HTML for structure and CSS for formatting

<link href = "jobweb.css" rel = "stylesheet" type = "text/css">

Page 8: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

LAMP Architecture

PHP scripting language (http://www.php.net/)• PHP is a server-side language (index.php)• Can communicate with databases using the

structured query language (SQL)• Over 20 million+ Internet sites use PHP

• Facebook• Wordpress• Wikipedia• Yahoo, etc

mysql_connect ("localhost", "root", $mypasswd); echo "<h2> CD Collection </h2>"; mysql_select_db("cdcol"); Echo "Welcome to the CD collection";

Page 9: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

How Dynamic Web Pages Work

• We want to display a list of course modules

• Server reads PHP code and processes it• Apache send the appropriate HTML to the

browser, which treats the received code as it was static HTML page

mysql_connect("localhost", "root", "fims");mysql_select_db("course_data");result = mysql_query("SELECT * FROM modules")while ($row = mysql_fetch_array($result))echo "<td>" . $row['id'] . "</td>";echo "<td>" . $row['module_name'] . "</td>";echo "<td>" . $row['module_abbr'] . "</td>";

Connect to msyql server at localhost with username of root and password of fimsOpen the course_data database and retrieve all the records

Display the records

Page 10: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Simple HTML form for data

Page 11: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

The form allows users to add data which is saved in a mySQL database. We can then write ‘pages’ to use the data – to invite patrons who are regular voters to political events, to alert patrons over 55 about new acquisitions about retirement or cures for arthritis etc.

The cold fusion program that processes the form data: http://instruct.fims.uwo.ca/nickerson/559/gnickers/Session11/view_surveys.cfm creates a page on the fly and fills it with the current data in the database. The page did not really exist before it was requested.

Page 12: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Cold Fusion code to process the data sent by the HTML form

Dynamic pages can be used to develop apps

Page 13: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

A more complex dynamic web site

Prototype library system project…

Page 14: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Add Record reads values from the database to use in pull-down menu

Page 15: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Server-based error checking

Page 16: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

The form uses a simple control but the code required to process a ‘wide-open’ text box is lengthy and difficult

Page 17: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Advanced search function

Page 18: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Data presented in a tableColumns should be sortable

Page 19: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Grabs overdue data from the circ database, patrons name/email from the patrons database and notice text from the circ database

The whole thing could be automated based on Date comparisons

Page 20: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.
Page 21: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

While CF or PHP are more powerful than a static web site you still have to build it by hand…

Page 22: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

CF had a limited number of widgetsOlder widgets were Java appletsNewer Ajax widgets are better

Having pre-built widgets saves developer time and can increase usability by using the right widget for the function

Page 23: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.
Page 24: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Content Management Systems

• An LAMP application written in php that is designed for building web sites

• Removes technical barriers to web publishing• No need to learn HTML, CSS, PHP, Cold Fusion

• Solves the maintenance problem of static web pages, users can maintain their own content

• Flexible – can easily integrate web 2.0 apps like Google maps, Flickr, Facebook etc

• Separates content from presentation

Page 25: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

• An APP to design/create/manage web sites

• There are proprietary CMS such as:• Microsoft Sharepoint (used at FIMS)• Cascade (used by UWO ITS)

• The most popular CMS are open source:

• Drupal http://drupal.org/• Joomla http://www.joomla.org/• Wordpress http://wordpress.org/• Mambo http://mambo-foundation.org/

Content Management Systems

Page 26: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Defined Roles

IT staff maintain/install systemDesigners create themesDocument owners contribute contentManagers approve contentManagers assign roles and access

Page 27: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

User Roles• guest: anonymous visitor can view

unrestricted parts of the site• registered: can log in and view parts of

the site assigned to registered users only• author: can contribute to existing content

but cannot add new content• editor: can contribute to existing content

and edit content contributed by authors • publisher: can contribute to existing

content, edit content and add new contentSeparate the user roles from the IT staff functions such as install etc

Page 28: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

IT would set up and install the CMS system

Page 29: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Lamp apps (each has a folder under the web root) such as wordpress, joomla, drupal etc

Windows Version

Page 30: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

1 – create database for the CMS app

2 – create database admin acc’t

3 – edit app config settings

Page 31: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Setting up admin accounts for a CMS app can be done in text mode or by using a web browser interface

Database server only accepts commands for the joomla database from the joomla user on localhost for good security

Page 32: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Adding account using a mysql GUI client

Granting accounts privileges to a database (and only to that database)

Security is increased as each app’s account only has access to its database

Page 33: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

4 – run the setup page in a web browser

5 – login to the admin control panel

Page 34: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Errors from trying to run a CMS install before setting up the database and modifying the configuration

Page 35: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

IT staff have to do upgrades to the components and the app and make sure they are all in sync and fix bugsAnd ensure system is backed up!

Page 36: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

A problem with the LAMP architecture is that it relies on many pieces

A CMS app like Joomla is written in php and mySQL for the current version.

When a new version of PHP or mySQL is released some functions may no longer work so both the web app and the MAMP or WAMP architecture have to be constantly updated in sync

New versions of Joomla may not work will older versions of WAMP or MAMP, and older versions of Joomla may not work with newer versions of WAMP or MAMP

Page 37: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Old app has to be updated for latest version of PHP as the ereg_replace function is now obsolete

Page 38: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

You may need a Bigger ServerAs a test I ran a SQL file to do the following:

DROP TABLE IF EXISTS `test_searchdb`;CREATE TABLE `test_searchdb` ( `id` int(11) NOT NULL AUTO_INCREMENT, `anonid` int(11) NOT NULL, `metatags` varchar(255) NOT NULL, `qrytime` int(11) NOT NULL, `itemrank` smallint(6) NOT NULL, `clickurl` varchar(255) NOT NULL, PRIMARY KEY (`id`));

and then inserted 1,235,215 records into the database table

This took 27 hours on a PC

Page 39: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

The admin ‘backend’ control panel

Page 40: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Admin backend control panel for Joomla CMS

Public Site: http://localhost/joomla/index.phpAdmin Control Panel: http://localhost/joomla/administrator

Page 41: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Wordpress CMS public ‘front-end’. The default WordPress template theme is a blog ‘view’…

Page 42: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Default Joomla Template Theme

Page 43: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Joomla Default Template ThemeSite Banner includes the logo and banner graphics along with the tagline. This is controlled by the template.

Main Menu and other menus go here

login

Regular content. Articles are organized into sections and categories and are assigned to user ‘roles’ with display and expiry dates.

Articles also follow a most recent first display hierarchy

Articles may be published or not

Temporary or ephemeral content like notices or adverts

Metadata (bottom menu), adverts, ephemeral content

Page 44: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Themes keep the presentation separate from the content

Themes can be changed

Page 45: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

How a CMS Works - Content

• Sections are the top level• A section can contain many categories

• Categories are the next level• A category contains articles• All content items are

considered an ‘article’• Articles are the actual

content in the web site• Site managers create sections

and categories and users add,edit, and delete articles

Page 46: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

An article written by a user

Articles are created using the online HTML editor in the CMS. This is a plugin or extension…

Page 47: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Articles in the Staff category are organized by most recent date (a ‘blog’ type classification)

Page 48: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Note the breadcrumbs which are automatically generated with the content. A CMS removes a lot of the maintenance overhead…

Page 49: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

See: http://gordnickerson.blogspot.com/2009/03/pasting-text-from-word.html

Can the default editor handle all text?

Page 50: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

How a CMS Works – Plug-ins• Used to extend the core functionality • Offer integration with other services, for

example:• To add advertisements from Google AdSense

you could install a plug-in to interface with AdSense and build a module on top of it

• Here is a extension orplug-in for Google maps…

Called plugin or extensions or modules

Page 51: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

How a CMS Works - Plugins

• Plugins are linked your template to extend the functionality of your web site

• Most can be positioned anywhere on the website to display information such as Polls, user logins, advertisements, etc.

• For example how abouta staff directory?

Page 52: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Plugin adds a staff directory feature

Users can edit their own data

Page 53: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Click Staff Directory menu item in public view

Page 54: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

See http://gordnickerson.blogspot.com/2009/04/adding-google-maps-to-joomla.html

Problem: Where is the branch library?

Page 55: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.
Page 56: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Wordpress = 21,944 plugins

Page 57: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Joomla = 10,083 extensions

Page 58: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Drupal = 11,296 modules

Page 59: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Useful Joomla Extensions

• com_jopac – Z39.50 extension for OPACs

• com_google_maps – Google maps extension

• com_virtuallib – like a real library but virtual

• amazonbooks – extension links to Amazon

• bookcat – users share book experiences

• booklibrary – organizes a library + Amazon

• jkids – makes joomla into a kid’s website

• openbroadcast - component for a local station

• obiblioopac4j – uses OpenBiblio as backend

Page 60: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

You can create a web site in an hour

Page 61: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Prototype for local GG unit

Page 62: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Online resume web site

Page 63: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Student council type web site…

Page 64: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.
Page 65: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.
Page 66: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Is a CMS the Answer?• Not all theme templates are usable,

some are poorly designed• You can buy or build you own template

theme• Not all widgets are usable or well

designed• You can buy or build your own widgets

• Updates can break third-party extensions• php, mySQL or CMS updates can cause

problems• You can buy or build your own extensions

• You still have to usability test functionsMany if not most web sites are now built using a CMS

Page 67: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

Which CMS? – Hands-on TestsEvaluative measures such as features are ok

But that depends on the product’s usability – it is suitable for what you want to use it for?

Thus you have to do hands-on testing in your environment with your data and users

Good new is you can easily test drive LAMP applications on a PC or laptop

Page 68: Content Management Systems LIS 9720. Static Web Sites Use HTML and browser-based Javascript Use old httpd model of page requests Tend to be information.

NEXT WEEK

Summary & course feedbackAssignment Due in class unless you want to increase your workload by doing in on the 11th