drupal create a website/web app quickly with this content management system jiaying xu...
Post on 20-Dec-2015
216 views
TRANSCRIPT
DrupalCreate a website/web app quickly with this Content Management System
Jiaying [email protected] 2011COMS E6125 Web-enHanced Information Management (WHIM)
Content Management Systems (CMS)
• What is a CMS?• A CMS allows for the management of website
content in a user friendly way• Extension of web application framework that has
additional functionality and is more user-friendly• CMS benefits• Clients can update content themselves• Separation of content and presentation• Easy to redesign website since content is stored in the
database and inserted using page templates• Develop websites/web applications quickly • Utilize built in features such as user management and
content management
• Popular CMSs• Drupal, Joomla, Wordpress
Content Management Systems
Web Application Frameworks
Programming Languages/Databases
Overview of Drupal• Open source• Maintained by many developers
• Community• There are over 400,000 Drupal
websites• DrupalCon yearly conference
• Documentation• Extensive documentation on
drupal.org written by Drupal community
• Developer friendly• Functionality can be easily extended
• Requirements• PHP, MySQL, web server (Apache)
Usage statistics of Drupal from drupal.org, which only shows sites with the Update Status module enabled [1]
Map showing the local Drupal groups around the world from drupal.org[1]
Sites That Use Drupal
• Large variety of organization use Drupal• Corporate, Education, Entertainment, Government, Newspaper, Non-
profit, Sports
Features of Drupal
• Administrative interface• Web interface that allows admins
to manage content, users, etc• Content Management• Allow users to create, edit,
manage content without detailed knowledge of HTML/CSS
• User Management• Built in user authentication• Management of adding, editing,
deleting users• Menus• Easy to add pages to menus• Easy to display menus on website
Content management admin page
WYSIWYG editor seen when editing pages
Features of Drupal
• Statistics• Tracks website usage - referrers,
page hits, visitors, etc• Performance• Tune website performance with
page caching and bandwidth optimizations of CSS and JavaScript files
• File Uploads• Allows users to easily upload files
• URL Aliases• Allows admins to define custom
URL aliases for pages
Recent log entries page
Performance page
Drupal is Extensible and Themable• Modules• Open source add-ons to Drupal that extends its functionality• Over 7000 modules available and you can contribute your own module• Example modules• Pathauto: Generates automatic URL aliases for pages based on a pattern such
as the page title• Content Construction Kit (CCK)• Views
• Themes• Allows you to apply a design to your website• Over 800 themes available and you can contribute
your own theme
Corolla theme[1]
Drupal Basics: Content• Nodes• All content are nodes
• Content types• Page• Story• Add your own
• Examples: Alumni Profile, Event, Lecture
• Content Construction Kit (CCK) Module• Allows you to add custom fields to
content types• Without using CCK, the only fields in a
content type are the title and body• Custom fields can have type: date,
email, file, image, integer, link, text
Custom Alumni Profile content type with custom fields defined using CCK
Creating an Alumni Profile node
Drupal Basics: Views
• Views Module• User interface that allows
you to select and display one or more pieces of content in a single view• Can create view from
content nodes or users• Builds SQL query to select
the content on the back end
Example view to display board members of an organization
Page rendered from view
Building a Job Database Web App
• Functionality• Allow any visitor to post
jobs• Jobs can be viewed and
searched for• Basic steps• 1. Define a custom content
type and CCK fields• 2. Create some sample job
nodes• 3. Create a view• 4. Modify permissions
Result of creating job database app in Drupal
1. Define a Content Type and CCK Fields
Define a content type called job Create custom fields for the job content type
2. Create Job NodesCreate some sample jobs for the job database
Page generated as a result of submitting the “Create Job” form shown on the left
3. Create a View• This generates the main job database
page that lists all the jobs in a table and allows for user searches and filtering
• Fields (SQL select)• Add all the job fields that will be shown in
the display• Filters (SQL where)
• By default, a view shows all nodes• Specify that the node type is job• Add exposed filters so users can filter and
search• Sort criteria (SQL order by)
• Sort all jobs in descending order according to when the job was submitted
• Style• Display the results in a table format
SELECT node.nid AS nid, node.created AS node_created, node.title AS node_title, node_data_field_job_employer_name.field_job_employer_name_value AS node_data_field_job_employer_name_field_job_employer_name_value, node.type AS node_type, node.vid AS node_vid, node_data_field_job_employer_name.field_job_position_type_value AS node_data_field_job_employer_name_field_job_position_type_value, node_data_field_job_employer_name.field_job_paid_value AS node_data_field_job_employer_name_field_job_paid_value, node_data_field_job_employer_name.field_job_category_value AS node_data_field_job_employer_name_field_job_category_value, node_data_field_job_employer_name.field_job_location_value AS node_data_field_job_employer_name_field_job_location_value FROM node node LEFT JOIN content_type_job node_data_field_job_employer_name ON node.vid = node_data_field_job_employer_name.vid WHERE node.type in ('job') ORDER BY node_created DESC
Job database view
Generated SQL query
SQL Select Statement ReviewSELECT – which table columns to retrieveWHERE – what to filter the results byORDER BY – sort results of query
4. Modify Permissions
• By default, anonymous users cannot create content• Modify permissions to
allow anonymous users to create job content Permissions page
Power of Drupal
• Drupal is not just a platform for creating web pages• Allow developers to create
both simple websites and powerful web applications
• Applications that Columbia created using Drupal• Student Affairs -
Student Groups Interactive Directory
• Columbia College: Fellowship Database
• Career Center: Internship Survey Database
Student Groups Directory – ACM page
Bibliography• [1] “Drupal – Open Source CMS.” Drupal. http://drupal.org.• [2] Harrison, Davd. “The advantages and disadvantages of
Content Management Systems.” http://daveharrison.net/articles/the-advantages-and-disadvantages-of-content-management-systems.
THANK YOU