Web and Database Programming: Database Content Management - PowerPoint PPT Presentation

1 / 34
About This Presentation
Title:

Web and Database Programming: Database Content Management

Description:

Mechanical and Industrial Engineering. Objectives. To understand what constitutes a database driven web site. ... To analyze the preparatory steps necessary in ... – PowerPoint PPT presentation

Number of Views:256
Avg rating:3.0/5.0
Slides: 35
Provided by: Davi374
Category:

less

Transcript and Presenter's Notes

Title: Web and Database Programming: Database Content Management


1
Web and Database ProgrammingDatabase Content
Management
  • David Goldfeder
  • Web and Database Specialist
  • Mechanical and Industrial Engineering

2
Objectives
  • To understand what constitutes a database driven
    web site.
  • To understand the requirements of such a web
    site.
  • To analyze the preparatory steps necessary in
    designing such a site.
  • To discuss different content management
    techniques available to site administrators.
  • To analyze database driven content management.

3
What is a database driven site?
  • Definition a database driven site is one where
    some or all of the content of the site is stored
    within a database for retrieval when requested by
    the client.
  • Requirements
  • Web server
  • Server-side programming language
  • Database

1.1 (4)
4
Normal Site Operation
  • Client requests a page.
  • Server locates page.
  • Server processes server-side script.
  • Server returns requested page to client.
  • Page is displayed to client.

1.2 (4)
5
Database Driven Site Operation
  • Client requests a page.
  • Server locates page.
  • Server requests content from database.
  • Database returns content to server.
  • Server processes content.
  • Server processes server-side script.
  • Server returns requested page to client.
  • Page is displayed to the client.

1.3 (4)
6
Database Driven Site Operation
1.4 (4)
7
Requirements
  • Web Server
  • Server Side Programming Language
  • Database Technology

2.1 (4)
8
Requirements Server Side Programming Language
  • Language choice should be driven by the
    preference of the programmers.
  • Only real requirement is the ability of the
    language to communicate with the chosen database
    technologies.
  • Some communication can be performed via Open
    Database Connection Protocols (ODBC)
  • Other languages provide optimized libraries (i.e.
    PHP with the mysql and mysqli extensions).

2.2 (4)
9
Requirements Database
  • Like the programming language, database
    technology decisions are driven by the preference
    of the programmers.
  • Database should be compliant with SQL standards
    and provide the ability to set foreign keys
    within a table (a.k.a. relationships).
  • Stored procedures, triggers, views, etc. are
    nice, but not necessarily required for a site
    with lower throughput.

2.3 (4)
10
Requirements Database
  • Necessity of a separate data server determined by
    demand. There are arguments on both sides of
    this issue
  • Data server can be made more secure than a web
    server, thus protecting the data.
  • Database becomes more scalable on its own machine
    and receives a greater portion of processing
    power.
  • Transmission time between machines can impact
    response to client on pages with a large amount
    of queries.
  • Two machines to maintain rather than one.
  • Cost becomes a factor when purchasing more than
    one server-quality machine.

2.4 (4)
11
Database Driven Site Design
  • Database drives the content, not the layout.
  • Consider where the database hooks will be
    necessary during design process.
  • Ability to use programmatic server includes
    becomes helpful in separating content sections
  • Decide early the amount of database content that
    will be used to display that page.

3.1 (8)
12
Distributed Content Management
  • Definition a system which allows the content
    experts to create the data (content) for each
    page while the programmers focus on the display
    of these data.
  • Databases can provide the repository for the data
    that the experts create.
  • How do the experts put the data in the database?
  • How do the programmers retrieve said data for
    display?

3.2 (8)
13
Paradigm Shift
  • In a database driven content management system,
    there is only one file per type of layout.
  • For example, if you have a splash page and a
    content page, you might only need two files to
    run the whole site.
  • This does not include the administrative tools
    that are written to allow content experts access
    to the databases.

3.3 (8)
14
Layout Type Splash Page
3.4 (8)
15
Layout Type Content Page
3.5 (8)
16
Layout Type Content Page
3.6 (8)
17
Layout Type Content Page
3.7 (8)
18
Design Concerns
  • Dont do safe design just because the
    programming is complex. Let the programmer make
    it happen.
  • In other words, design first, then program.
    Otherwise, programming concerns could trump
    layout/interface design.
  • Programming concerns are only concerns for
    programmers.
  • Layout and interface directly influence the way
    people work and access your site. Theyre job
    should be easy, the programmer can drink more
    coffee!

3.8 (8)
19
Content Management Techniques
  • Apply dynamic template onto static pages
  • Include static content into dynamic template
    (a.k.a. Fusebox)
  • XML/XSL
  • Database Content Repository
  • Each of these can be a distributed content
    management system. The distributed part is
    determined by who controls the content, not the
    technique used to manage that content.

4.1 (5)
20
1. Apply dynamic template
  • One of the most common management techniques.
  • Allows anyone to create the static pages and then
    the programmers to apply the necessary look and
    feel to them.
  • Example Dreamweaver templates

4.2 (5)
21
2. Include static content
  • This technique is often called Fusebox.
  • Essentially, there is one page, called the box
    which controls the layout.
  • Then, any files which are displayed in that
    layout are included into the box. These are the
    fuses.
  • Truly separates content and display by putting
    them in different files.
  • Content experts can create fuses while the
    programmers worry about the box.

4.3 (5)
22
3. XML/XSL
  • Similar to Fusebox would be to make the XSL
    transformation the box and the XML files the
    fuses.
  • XML can be created from many applications,
    including MS Office.
  • Software can help a person make well-defined XML
    files.

4.4 (5)
23
4. Database Content Repository
  • But, why do you need so many files?
  • If you have a box into which you can plug fuses,
    put the fuses in the database.
  • Often requires very few files for the public
    site.
  • However, the content management files for
    getting the content in to the database make up
    the lions share of the system.
  • Dynamic form builders can come in handy for
    making new content on the fly.
  • More likely, however, the programmers will
    probably be creating a number of web forms which
    handle different types of content.

4.5 (5)
24
DB Content Repository Needs
  • Depend on the layout and content of your site.
  • Most common database needs are
  • Page table this can be as simple as the page
    title and an identifier (page_id)
  • Menu table using the page_id, look up the
    necessary menu information
  • Content table textual and graphical content on
    a page maintaining the page_id relationship with
    the other two tables.

25
How does the Content Expert interact with the
Database?
  • Answer web forms.
  • Programmer can create an authenticated system
    where content experts can access the existing
    page information and change it as necessary
    365/24/7.
  • Downside this does impose a certain amount of
    conformity between pages. Any page that upsets
    the status-quo (i.e. calendars, contact pages,
    etc.) usually needs its own form.
  • Upside content experts never need to touch
    software like Dreamweaver, they just use a web
    browser.

26
How Many Web Forms?
  • Depends on the number of different page types.
    Some common forms are
  • List of links
  • Paragraphs with headers
  • News articles
  • Events and/or event calendars

27
But what about the HTML?
  • If content experts enter their data into web
    forms, how do these data end up as a web page?
  • Answer server side programming and form
    validation.
  • Form validation for each type of content form
    creates the necessary HTML and then saves it in
    the database.

28
But what about the HTML?
  • Content experts could enter HTML directly into
    the web form.
  • This creates the possibility of a site
    vulnerability called a Cross Site Scripting (XSS)
    attack.
  • Someone would have to break into the
    authenticated system to perform the attack.
  • Somewhat defeats the purpose of the management
    tool, which was to remove HTML concerns from the
    content experts in the first place.

29
Example Nano-CEMMS
  • http//dev.nano-cemms.uiuc.edu/

30
What if
  • the content expert needs a list, or a link, or
    an image, or an
  • If youre allowing HTML and the experts know what
    to do, this can solve the problem.
  • More likely, though, this isnt a viable solution.

31
What if
  • Client side solution
  • JavaScript can often be leveraged to provide the
    ability to enter lists and links so that expert
    doesnt have to worry about the HTML involved.
  • Example
  • Downsides
  • can only add information to the end of the
    content.
  • if HTML is blocked in form processes (to protect
    against bad markup) then you need a different
    markup (like BBCode) to control your display.
  • Not WYSIWYG
  • Could use pop-up interface windows to provide
    similar functionality, to solve many of these
    downsides, as long as the visitor allows you to
    pop a window, of course

32
What happens when theweb form isnt enough?
  • If possible, make a new web form. Some problems
    can be solved by making a new tool for the
    content experts.
  • Could allow a WYSIWYG editor via Java or perhaps
    even Flash.
  • Example Editize
  • Problem with these is that they could be slow and
    require a plug-in which may not be available.
  • Many, Editize included, can accept copy/paste
    from Word and other applications, however.

33
Do database content management solutions it
really help?
  • How does all this back-end processing help save
    time for the programmers?
  • Depends on the environment
  • A site with a team of dedicated programmers and
    content experts may have available workers to
    avoid this type of system.
  • A smaller site without a dedicated web programmer
    cant always wait for one to be available.
    Content has to go online as soon as possible.

34
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com