59
Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy

Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Embed Size (px)

Citation preview

Page 1: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Database PublishingDatabase Publishing

Jon WhitenerWeb Communications Specialist

University of Detroit Mercy

Jon WhitenerWeb Communications Specialist

University of Detroit Mercy

Page 2: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

How many of you…How many of you…New to Cascade Server?

Are adminstrators?

Use Cascade for multiple, separate but related sites?

Have worked on any Web site that pulled data dynamically from a DB?

Have used Cascade’sDatabase Publishing?

New to Cascade Server?

Are adminstrators?

Use Cascade for multiple, separate but related sites?

Have worked on any Web site that pulled data dynamically from a DB?

Have used Cascade’sDatabase Publishing?

Page 3: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

What isDatabase Publishing?

What isDatabase Publishing?

Page 4: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Cascade ServerCascade Server

Page 5: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Cascade ServerCascade Server

External External DatabaseDatabase

Page 6: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Cascade ServerCascade Server

External External DatabaseDatabase

Site ASite A

Site DSite D

Site 5Site 5

Site BSite B Site CSite C

Page 7: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Dynamic sites are…Dynamic sites are…

Page 8: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Dynamic sites are…Dynamic sites are…

Page 9: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Example:UDM news articles

Example:UDM news articles

Page 10: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

UDM’s sitesUDM’s sitesCollege ofCollege of

HealthHealthProfessionsProfessions

College ofCollege ofBusinessBusinessAdmin.Admin.

wwwwww(General site)(General site)

School ofSchool ofDentistryDentistry

College ofCollege ofLiberal ArtsLiberal Arts& Education& Education

AlumniAlumni

College ofCollege ofEngineeringEngineering& Science& Science

Page 11: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

The idea: share newsThe idea: share news

Enable each site to share (access / use) the news articles of every other site

Selective inclusionE.g.

The Business site can include news from the Engineering site, like Ford CEO visit

The Alumni site can pull articles from any site where alumni are mentioned

Enable each site to share (access / use) the news articles of every other site

Selective inclusionE.g.

The Business site can include news from the Engineering site, like Ford CEO visit

The Alumni site can pull articles from any site where alumni are mentioned

Page 12: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Sharing isn’t always easySharing isn’t always easy

Sharing articles withinCascade was difficult and/or inefficientIndex blocksHighly contorted XSL

Publishing to various sites also tricky Publish all news pages on all sites

We did get it working …

Sharing articles withinCascade was difficult and/or inefficientIndex blocksHighly contorted XSL

Publishing to various sites also tricky Publish all news pages on all sites

We did get it working …

Page 13: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Sharing isn’t always easySharing isn’t always easy

Upgrade to version 5broke it

Upgrade to version 5broke it

Page 14: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Database Publishingoffers a better way

Database Publishingoffers a better way

Page 15: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

“DBP” for short“DBP” for short

(“DaBaPu” didn’t test well)(“DaBaPu” didn’t test well)

Page 16: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

The goalsThe goals

Enable separate sites to share news articles

Avoid duplication of content

Avoid multiple publishes for each article creation / edit

Use a tested, familiar technique

Enable separate sites to share news articles

Avoid duplication of content

Avoid multiple publishes for each article creation / edit

Use a tested, familiar technique

Page 17: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

How to do it with DBP?How to do it with DBP?

Page 18: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

In addition to their separate target sites, all sites publish to the shared, external database

In addition to their separate target sites, all sites publish to the shared, external database

Page 19: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Sites can now select from all news articles

Sites can now select from all news articles

Page 20: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Tagging articlesTagging articles

Articles have custom metadata to indicate appropriate audiencesAlumni, current students, faculty, etc.

Also, path and Site ID are informative

Live sites can select appropriate articles using these criteria

Articles have custom metadata to indicate appropriate audiencesAlumni, current students, faculty, etc.

Also, path and Site ID are informative

Live sites can select appropriate articles using these criteria

Page 21: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

How does it work?How does it work?

Page 22: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

OverviewOverview

Set up external database

Set up Administration assets in Cascade

Create content assets in Cascade

Create PHP Web page that can perform live queries of external database

Set up external database

Set up Administration assets in Cascade

Create content assets in Cascade

Create PHP Web page that can perform live queries of external database

Page 23: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Set up external databaseSet up external database

MySQL 5.0+ required

Grant access to Cascade Server

Grant access to production Web servers

May want direct access (e.g. Navicat)

Follow security practices (omitted here)

MySQL 5.0+ required

Grant access to Cascade Server

Grant access to production Web servers

May want direct access (e.g. Navicat)

Follow security practices (omitted here)

Page 24: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Set up external databaseSet up external database

External database schema is set by Hannon Hill

We’ll look at schema later

External database schema is set by Hannon Hill

We’ll look at schema later

Page 25: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Set up CascadeAdministration assets

Set up CascadeAdministration assets

TransportTargetDestinationTemplate

TransportTargetDestinationTemplate

Configuration Set

Metadata SetData DefinitionContent Type

Configuration Set

Metadata SetData DefinitionContent Type

Page 26: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

TransportTransport

Page 27: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

TransportTransport

Site Id

User

Page 28: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

TransportTransport

Test

“Test Transport” option appears when a Transport is selected

Page 29: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

TargetTarget

Out. File Ext.

Base Folder

Page 30: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

DestinationDestination

DB Transport

Page 31: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Test DestinationTest Destination

Page 32: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Test DestinationTest Destination

Page 33: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

TemplateTemplate

Page 34: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Configuration SetConfiguration Set

We create a new Set here

One Configuration pointing to new DBP Template

Would likely make sense to add DBP Configuration to one of your existing Configuration Sets

We create a new Set here

One Configuration pointing to new DBP Template

Would likely make sense to add DBP Configuration to one of your existing Configuration Sets

Page 35: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Configuration SetConfiguration Set

Page 36: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Bear with me …Bear with me …

Page 37: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Data DefinitionData Definition

Page 38: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Metadata SetMetadata Set

Custom (“dynamic”) metadata will be used to make the news articles easily selectable

Here, we add “audience” information, i.e. indicate which audiences would be interested in the news article

Custom (“dynamic”) metadata will be used to make the news articles easily selectable

Here, we add “audience” information, i.e. indicate which audiences would be interested in the news article

Page 39: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Metadata SetMetadata Set

Page 40: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Metadata SetMetadata Set

When creating / editing a page, custom metadata will look like:

When creating / editing a page, custom metadata will look like:

Page 41: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Content TypeContent Type

Page 42: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Site ID cascades upSite ID cascades upSome administrative assets are

specific to a site number, i.e. the Site ID

TransportDestinationTargetTemplateConfiguration Configuration SetContent Type

Some administrative assets are specific to a site number, i.e. the Site ID

TransportDestinationTargetTemplateConfiguration Configuration SetContent Type

Page 43: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Create content assetsCreate content assetsCreate Page with new Content TypeCreate Page with new Content Type

Page 44: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Create content assetsCreate content assetsCreate Page with new Content TypeCreate Page with new Content Type

Page 45: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Now we’re getting tothe good stuff

Now we’re getting tothe good stuff

Let’s publish a page from the general site – Site ID 1

Let’s publish a page from the general site – Site ID 1

Page 46: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Peek at the DBPeek at the DB

External database contains five tablespagemetadatametadata_customfilefolder

We’re concerned with the first three

External database contains five tablespagemetadatametadata_customfilefolder

We’re concerned with the first three

Page 47: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Table: pageTable: pageAfter first Page publish, we have 1 record:After first Page publish, we have 1 record:

id 4

account_id 1

site_id 1

cms_id cef30e52c66d185201260e7b6b1a1634

folder_id 67597412c66d1852000369bbff883f8b

metadata_id

1736

name www-page-1

path www.udmercy.edu/dbp/page-1

content <region-render><system-data-structure><headline>This is a headline</headline><body-text><p>This is REVISED body text, in a p element.</p><p>This is some more, plus a picture, below:</p><p><img alt="Basketball" src="www.udmercy.edu/dbp/basketball.jpg"/></p><p>A link to the <a href="www.udmercy.edu/index">home page</a>.</p></body-text></system-data-structure></region-render>

Page 48: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Table: pageTable: pageAfter first Page publish, we have 1 record:After first Page publish, we have 1 record:

id 4 Table’s auto-increment key

account_id 1 Always 1

site_id 1 Set in Transport

cms_id cef30e52c66d185201260e7b6…

Page’s ID in Cascade

folder_id 67597412c66d1852000369bbf…

Folder’s ID in Cascade

metadata_id

1736 Foreign key metadata table

name www-page-1 Cascade system name

path www.udmercy.edu/dbp/page-1

Cascade path (≠ published path)

content <region-render><system-data-structure><headline>This is a headline</headline><body-text><p>This is REVISED body text, in a p element.</p> … </body-text></system-data-structure></region-render>

XML of the page’s DEFAULT region.

(Would include any transformations applied to the DEFAULT region.)

Page 49: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Table: metadataTable: metadataOne record, with the fields you know

from a Cascade’s Wired Metadata pane:One record, with the fields you know

from a Cascade’s Wired Metadata pane:

id

account_id

site_id

display_name

title

summary

teaser

keywords

description

author

review_date

start_date

end_date

last_published_at

last_published_by

created_by

created_at

updated_by

updated_at

idhere matches page.metadata_id

Page 50: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Table: metadata_customTable: metadata_customHere, we have two records for the page,

because we selected two checkbox valuesHere, we have two records for the page,

because we selected two checkbox values

id 51

account_id

1

site_id 1

file_id [Null]

folder_id [Null]

page_id 4

field audiences

value Alumni

id 52

account_id

1

site_id 1

file_id [Null]

folder_id [Null]

page_id 4

field audiences

value Students

Foreign key page.id

First record Second record

Page 51: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Time to shareTime to shareRepeat steps, from Transport up, for

another site (Business) with Site ID 2

Publish a page from the Business site to the external database

Now the DB contains data published from two separate sitesSite ID 1: general site (www)Site ID 2: College of Business site

Repeat steps, from Transport up, for another site (Business) with Site ID 2

Publish a page from the Business site to the external database

Now the DB contains data published from two separate sitesSite ID 1: general site (www)Site ID 2: College of Business site

Page 52: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Tables after Site 2 publishTables after Site 2 publish(Selected fields)(Selected fields)

pagepage

metadatametadata

Page 53: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Tables after Site 2 publishTables after Site 2 publish(Selected fields)(Selected fields)

metadata_custommetadata_custom

Page 54: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Create PHP Web pageCreate PHP Web page

PHP to connect to databasePHP to connect to database

Page 55: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Create PHP Web pageCreate PHP Web page

The SQL we’ll use in this PHP pageThe SQL we’ll use in this PHP page

Page 56: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Create PHP Web pageCreate PHP Web page

PHP that queries DB and creates link list

PHP that queries DB and creates link list

Note http://and .htm

Page 57: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

The resultThe result

Page 58: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

The resultThe resultYou will need to add another Configuration to actually publish the news article to the Web server so the links will work

Page 59: Database Publishing Jon Whitener Web Communications Specialist University of Detroit Mercy Jon Whitener Web Communications Specialist University of Detroit

Thank you!Thank you!