InternetUniversity: Programming 102
Basically, web developers have a certain set of tools they use to design pages. So, how do they insert content into these layouts? For smaller websites the content is the text on the page written within the HTML. This means that every time there is a change in the content of the page, it must be edited by hand and updated on the web server. For a website like CNN.com which publishes hundreds of articles a day, this would become quite a cumbersome daily task.
Rather than update hundreds of pages a day, web developers create HTML templates in which a space is left to accommodate an article. To put it simply, when a visitor clicks on a link to read an article, the page calls the HTML template on the site’s server, giving it the ID of the requested article. The server looks the ID up in a database, and the template is sent back to the visitor’s screen with the specified article loaded into it. When the visitor clicks on the next article, the same template is called but with a different article ID, and so on. Now let’s go a little deeper.
Connecting a web page and its visitor to a database really involves the use of two types of programming languages. First you need a language the database understands. This is usually some form of SQL, or Structured Query Language. It’s a fairly simple set of commands that allows the programmer to select, insert, update, or delete records from a table in a database. If I wanted to insert this article into the STORIES table of my database, I would write a query that would look like this:
INSERT INTO STORIES (date, author, title, body) VALUES (7/01/01, ‘Mark Kecko’, ‘Programming 102’ ‘All of this text...’)
Now that we have the mechanisms for retaining and displaying data, we can create really dynamic web pages. Let’s say we wanted to create an archive of all the news stories on CNN.com, allowing the visitor to search the archives by date. First we would write the HTML template to display the stories once they were retrieved from the database. Then, using SQL, we would write a query to get all the articles from that day, such as:
SELECT author, title FROM STORIES WHERE date = 7/01/01
Let’s assume we retrieved ten articles from the query. Using a language such as Java, ColdFusion, or ASP we could loop over the results displaying the titles. The choice of language to create this dynamic behavior depends on the individual programmer. I would do the following:
BEGIN LOOP ON STORIES QUERY #title# - #author# IF NOT LAST RECORD GO TO BEGIN END LOOP
This would display the title and author of the ten articles from that day. If there were 100 articles archived on that day, all of them would be displayed and the visitor would then simply click on the title of the article he was searching for. Or, we could allow the visitor to narrow his search with another parameter (such as keyword, author, etc.) using another simple SQL query.
We could also add articles to the archives at any time and not have to worry about changing the template at all. All the aforementioned are scalable, cross-platform programming languages that make it possible to manage the content of any website including text, graphics and—you guessed it—ads.
Recent OMMA Magazine Articles
-
Agency of the Year: Gold -- Digitas Dec. 28, 4:43 p.m.
With its newsroom approach to real-time brand storytelling, Digitas continues to create campaigns with Page-One punch ...
-
Agency of the Year: Bronze, Design -- Digitaria Dec. 5, 4:44 p.m.
By tuning out East Coast chatter and conventional thinking, Digitaria creates digital designs that are as ...
-
Agency of the Year: Silver -- AKQA Dec. 5, 4:42 p.m.
The reason this company keeps winning, year after year? It’s taken its magic far beyond traditional ...
-
Agency of the Year: Bronze, Mobile -- PHD Dec. 5, 4:41 p.m.
To reach the fast-growing audience of smartphone owners, Omnicom's PHD isn't afraid to pump up the ...
-
Agency of the Year: Bronze, Search -- Covario Dec. 5, 4:41 p.m.
San Diego-based Covario’s commitment to clients results in increases in traffic, conversion rates and sales. But ...
-
Agency of the Year: Bronze, Media Planning -- mediahub/Mullen Dec. 5, 4:40 p.m.
For its strategic breakthroughs, mediahub/Mullen goes beyond asking what to buy. Instead, it creates an enduring ...
-
Agency of the Year: Bronze, Creative -- Wieden + Kennedy Dec. 5, 4:39 p.m.
From making moms the star of the Olympics to its Southern Comfort everyman, Wieden + Kennedy ...
-
Ed:Blog Dec. 5, 4:38 p.m.
While choosing OMMA Agency of the Year winners is never easy, making the final cuts this ...
-
Agency of the Year: Bronze, Small Agency -- 72andSunny Dec. 5, 4:36 p.m.
With its choregraphed percussion of brilliant ideas and precise execution, 72andSunny gets more attention than agencies ...
-
Agency of the Year: Bronze, Social -- Pereira & O'Dell Dec. 5, 4:35 p.m.
Thinking far beyond Facebook and branded content, Pereira & O’Dell knows how to put on a ...


Be the first to comment on "InternetUniversity: Programming 102"
Leave a Comment