Upload
maryann-evans
View
216
Download
1
Tags:
Embed Size (px)
Citation preview
Content Management Systems
LIS 9720
Today’s Forecast
Cloudy and dark with chance of teenagers
Static Web Sites
• Use HTML and browser-based Javascript• Use old httpd model of page requests• Tend to be information based not task
based
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
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
Dynamic Web Sites
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">
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";
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
Simple HTML form for data
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.
Cold Fusion code to process the data sent by the HTML form
Dynamic pages can be used to develop apps
A more complex dynamic web site
Prototype library system project…
Add Record reads values from the database to use in pull-down menu
Server-based error checking
The form uses a simple control but the code required to process a ‘wide-open’ text box is lengthy and difficult
Advanced search function
Data presented in a tableColumns should be sortable
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
While CF or PHP are more powerful than a static web site you still have to build it by hand…
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
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
• 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
Defined Roles
IT staff maintain/install systemDesigners create themesDocument owners contribute contentManagers approve contentManagers assign roles and access
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
IT would set up and install the CMS system
Lamp apps (each has a folder under the web root) such as wordpress, joomla, drupal etc
Windows Version
1 – create database for the CMS app
2 – create database admin acc’t
3 – edit app config settings
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
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
4 – run the setup page in a web browser
5 – login to the admin control panel
Errors from trying to run a CMS install before setting up the database and modifying the configuration
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!
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
Old app has to be updated for latest version of PHP as the ereg_replace function is now obsolete
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
The admin ‘backend’ control panel
Admin backend control panel for Joomla CMS
Public Site: http://localhost/joomla/index.phpAdmin Control Panel: http://localhost/joomla/administrator
Wordpress CMS public ‘front-end’. The default WordPress template theme is a blog ‘view’…
Default Joomla Template Theme
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
Themes keep the presentation separate from the content
Themes can be changed
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
An article written by a user
Articles are created using the online HTML editor in the CMS. This is a plugin or extension…
Articles in the Staff category are organized by most recent date (a ‘blog’ type classification)
Note the breadcrumbs which are automatically generated with the content. A CMS removes a lot of the maintenance overhead…
See: http://gordnickerson.blogspot.com/2009/03/pasting-text-from-word.html
Can the default editor handle all text?
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
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?
Plugin adds a staff directory feature
Users can edit their own data
Click Staff Directory menu item in public view
See http://gordnickerson.blogspot.com/2009/04/adding-google-maps-to-joomla.html
Problem: Where is the branch library?
Wordpress = 21,944 plugins
Joomla = 10,083 extensions
Drupal = 11,296 modules
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
You can create a web site in an hour
Prototype for local GG unit
Online resume web site
Student council type web site…
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
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
NEXT WEEK
Summary & course feedbackAssignment Due in class unless you want to increase your workload by doing in on the 11th