Web and Database Programming Database Content Management

Reviews
Web and Database Programming: Database Content Management David Goldfeder Web and Database Specialist Mechanical and Industrial Engineering Objectives 1. To understand what constitutes a database driven web site. 2. To understand the requirements of such a web site. 3. To analyze the preparatory steps necessary in designing such a site. 4. To discuss different content management techniques available to site administrators. 5. To analyze database driven content management. 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) “Normal” Site Operation 1. 2. 3. 4. 5. 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) Database Driven Site Operation 1. 2. 3. 4. 5. 6. 7. 8. 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) Database Driven Site Operation 1.4 (4) Requirements 1. Web Server 2. Server Side Programming Language 3. Database Technology 2.1 (4) 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) 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) 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) 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) 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) 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) Layout Type: Splash Page 3.4 (8) Layout Type: Content Page 3.5 (8) Layout Type: Content Page 3.6 (8) Layout Type: Content Page 3.7 (8) Design Concerns • Don’t 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. They’re job should be easy, the programmer can drink more coffee! 3.8 (8) Content Management Techniques 1. Apply dynamic template onto static pages 2. Include static content into dynamic template (a.k.a. Fusebox) 3. XML/XSL 4. 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) 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) 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) 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 welldefined XML files. 4.4 (5) 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 lion’s 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) 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. 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. 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 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. 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. Example: Nano-CEMMS http://dev.nano-cemms.uiuc.edu/ What if… • … the content expert needs a list, or a link, or an image, or an … • If you’re allowing HTML and the experts know what to do, this can solve the problem. • More likely, though, this isn’t a viable solution. What if … • Client side solution: – JavaScript can often be leveraged to provide the ability to enter lists and links so that expert doesn’t 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… What happens when the web form isn’t enough? 1. If possible, make a new web form. Some problems can be solved by making a new tool for the content experts. 2. 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. 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 can’t always wait for one to be available. Content has to go online as soon as possible.

Related docs
Content of the Database
Views: 0  |  Downloads: 0
Database Programming
Views: 15  |  Downloads: 1
Web and Database Integration
Views: 42  |  Downloads: 13
CS181 Introduction to Database and the Web
Views: 17  |  Downloads: 1
Database and the web
Views: 597  |  Downloads: 5
Content in the Database
Views: 148  |  Downloads: 7
Programming Database Web Applications
Views: 30  |  Downloads: 2
Database and Content Management Systems
Views: 7  |  Downloads: 2
WEB Programming
Views: 1  |  Downloads: 1
premium docs
Other docs by Corona NLime
adr109
Views: 79  |  Downloads: 0
Had it not been the Lord
Views: 252  |  Downloads: 0
Short Summary of US History: 1900 to 2006
Views: 924  |  Downloads: 12
A Career Guide for Urban Planning
Views: 504  |  Downloads: 12
Helicopters Nacionales de Columbia v Hall
Views: 212  |  Downloads: 0
Lord Reign In Me
Views: 189  |  Downloads: 2
He Will Come and Save You -Start Here
Views: 197  |  Downloads: 0
Designing a Career in Biomedical Engineering
Views: 1331  |  Downloads: 25
Consent by mother of illegitimate child
Views: 402  |  Downloads: 1
For insurance premium
Views: 203  |  Downloads: 0
ch120
Views: 142  |  Downloads: 0
Draft Glossary for Chinese Medicine
Views: 1543  |  Downloads: 68
Torts -- Prof. Cochran
Views: 625  |  Downloads: 59
dv126info
Views: 107  |  Downloads: 0
Derdiarian Watson
Views: 276  |  Downloads: 2