Sie sind auf Seite 1von 47

Dynamic Web

Madiha Kiran

1
Dynamic Website.

Dynamic websites contain Web pages that are


generated in real-time.
These pages include Web scripting code, such as
PHP or ASP.
When adynamic page is accessed, the code within
the page is parsed on the Web server and the
resulting HTML is sent to the client's Web browser.

2
Dynamic Web

 Employ Dynamic pages that exist as files with


extensions based on the type of programming
used.
 .jsp , .cfm, .pl, .php, .asp, .aspx

 Pages are Dynamic in that they can draw ever


changing Content from external information
sources

 Pages can provide Create, Retrieve, Update, and


Delete functions for company records

Pages may not require


republishing

3
Dynamic Websites - Features

 Your basic “CRUD”

 Pages are capable of


providing interactivity such as:
 Forms to request information
or submit sales leads

 Internal searches within your


site

 Registration and Login,


personal profile maintenance,
and authenticated/secure
access to protected or
premium content

4
Dynamic Websites - Features

 Dynamic Product Catalogs and online sales (Ecommerce)

• Information that is already maintained within company I.T. Systems such


as Databases, Spreadsheets, and text files can be leveraged as Web Content.


Access can be granted to allow customers to maintain their own
information.

5
Dynamic Websites - Content Management Systems

Web Content Management System (WCMS)

A web content management (WCM) system is a CMS


designed to simplify the publication of Web content to Web
sites, in particular allowing content creators to submit
content without requiring technical knowledge of HTML or
the uploading of files.

- definition from Wikipedia.org


Dynamic Websites – CMS Features

 When new web pages are added, Page


Navigation Menus are maintained
automatically

 Many Common Interactive and Dynamic


Features may be provided such as:
forms, articles, blogs, ecommerce,
event calendars, forums, etc.

 Pages and sub-pages may be created


based on a universal design or template

 Pages may have a modular design


featuring panels/areas for information
of certain types on select pages

No software installation is
necessary, just a web browser.
Is Static Right for Your Organization

Static websites are a better choice when you:

 are limited in budget and are starting with a core web presence

 are dealing with 20 pages or less

 are planning to add new pages occasionally

 are assigning maintenance to a provider or have skilled staff and proper


software

 need of portable, physical web page files


Is Dynamic Right for Your Organization

Dynamic websites are a better choice when you:

 need custom programming to accommodate your unique business needs

 need pages that must pull information from sources external to the website proper

 need to be able to easily add and edit web pages (Content) from within a browser

 need web pages that will display and update records from your information systems

 need to give one or more staff members access to edit the site

 need convenient access to setup common interactive features such as Article


Publishing, Event Calendaring, Blogs, Secure Login, Ecommerce, and others.
Web Technologies (Dynamic)

• Basic Requirements
– Web server, server side technology, database server
• Programming Languages
– CGI, Embedded Languages
• Architectures
– LAMP
• Third Party Solutions
– Stand alone applications, Portals, Content Management Systems

10
Basic Requirements

• Web server
– A computer that delivers (serves up) Web pages.
– Any computer can be turned into a Web server by
installing server software and connecting the
machine to the Internet.
– Can use your own web server or a web server
Provided by an Internet Service Provider

11
Web Servers: Apache web server
• Apache web server - The Apache Project is a collaborative
software development effort aimed at creating a robust,
commercial-grade, featureful, and freely-available source code
implementation of an HTTP (Web) server. (Open Source)
• Currently Dominates the web server market
• More Info http://httpd.apache.org/
• Very Secure
• Works on multiple platforms (Windows, Unix)

12
Server side Technologies
• Software that connects two otherwise separate applications.
• There are a number of technologies that link a database system
to a Web server to allow users to request data from the
database using forms displayed on a Web browser,
• Technologies enable the Web server to return dynamic Web
pages based on the user's requests
• In this example we mean programming languages

13
Stand alone languages
• Pattern Extraction and Regular expression Language – PERL
– Especially designed for processing text
– One of the most popular languages for writing CGI scripts
– Common Gateway Interface CGI, a specification for transferring information
between a World Wide Web server and a CGI program
• JAVA,– object oriented
– a general purpose programming language with a number of features that make
the language well suited for use on the World Wide Web
• Python - object oriented
– OpenSource
• All Require Large amounts of programming to output HTML

14
Embedded Languages
• Embedded languages embed code directly with in HTML
• Active Server Pages – ASP
– Works primarily with Microsoft products
– Insert Microsoft Visual Basic into web pages
• Java Server pages - JSP
– An extension to the Java servlet technology
– Preated as an alternative to Microsoft's ASPs
• Coldfusion
– Web pages include tags written in Cold Fusion Markup Language (CFML) that
simplify integration with databases

15
Embedded languages
• PHP: Hypertext Preprocessor - PHP
– Open source
– Similar syntax to that of Perl or C
– In an HTML document, PHP script is enclosed within special PHP tags
author can jump between HTML and PHP (similar to ASP and Cold
Fusion)
– Works on a wide number of platforms
– Work natively with the MySQL DB
– PHP was created in 1994 by Rasmus Lerdorf
– More info: http://www.php.net/

16
Database Servers

• Microsoft SQL Server, Oracle


– Are powerful full feature RDMSs
– Provide lots of tools for managing databases
– Have the ability to communicate with most all
programming languages
– MSSQL only runs on windows
– Oracle runs on Windows and Unix
– Both Are proprietary and require purchasing
software licenses ($$$$)
17
Database Servers

• MySQL
– Open source RDBMS that relies on SQL for
processing the data in the database.
– MySQL is most commonly used for Web
applications and embedded applications
– Become a popular alternative to proprietary
database systems because of its speed and
reliability.
– Can run on UNIX, Windows and Mac OS.
– More info http://www.mysql.com/
18
What’s the course?
• Programming in PHP + mySQL
• “But ... I’m not a programmer!”

Right. That’s why you are here.


When we are done, you WILL be
a programmer.
19
PHP
PHP is the most widely used scripting language for web programming.
PHP extends HTML pages by adding server-executed code segments to
HTML pages. The output of the execution of the PHP code is merged into
the HTML page.

<?php
echo "Hello World. Today is ".date("l").". ";
?>How are you?

Hello World. Today is Wednesday. How are you?


MySQL

MySQL is one of the most popular free and open source


database engines in the market place. MySQL powers
Facebook, Yahoo!, WordPress, Drupal, Joomla, and
millions of other dynamic web sites.

INSERT INTO users VALUES('Smith', 'John', 'jsmith@mysite.com');

SELECT surname,firstname FROM users WHERE email='jsmith@mysite.com';


Apache Server
• Its job is to establish a connection between
a server and the browsers of website visitors
(Firefox, Google Chrome, Safari, etc.) while
delivering files back and forth between them
(client-server structure).
• Apache is a cross-platform software, therefore
it works on both Unix and Windows servers.

22
All-In-One Pre-Packaged
• WAMP - Windows, Apache, MySQL, and
PHP
• MAMP - Mac, Apache, MySQL, and PHP
• LAMP - Linux, Apache, MySQL, and
PHP
• XAMPP

• Prefer: WAMP
So ... who ARE you?
• from Information Technology and you have
skilled in TECHNOLOGY, equipped with
CREATIVITY and experienced in
PROBLEM SOLVING:
* Analyzing Problems
* Designing and Building Solutions

24
The Goals:
• A dynamic Web application
• PHP language
• mySQL database design and language
• Improve your HTML skills
• Understand and use XML

25
What you’ll learn
Server-side scripting – PHP
Form processing
Cookies + Validation + Regular Expressions
Sessions + Authentication
File processing
Image libraries + APIs
Relational databases / MySQL
SimpleXML
Objects + Classes
Security

26
Two Tier Web Architecture:

Request: HTTP
Client: Web Server:
e. g. FireFox e. g. Apache
On your PC On sulley.dm.ucf.edu

27
Two Tier Web Architecture:

Request: HTTP .html


Client: Web Server: Files
e. g. FireFox e. g. Apache
On your PC On sulley.dm.ucf.edu

28
Two Tier Web Architecture:HTML

Request: HTTP .html


Client: Web Server: files
e. g. FireFox e. g. Apache
On your PC On sulley.dm.ucf.edu
Response: HTTP/HTML
(or other doctypes:PDF,etc)
(client doesn’t see PHP)

29
Two Tier Web Architecture: PHP

Request: HTTP
Client: Web Server:
e. g. FireFox e. g. Apache
On your PC On sulley.dm.ucf.edu
Response: HTTP/HTML
(or other doctypes:PDF,etc) .php files help Apache
(client doesn’t see PHP) CREATE html
Tagged data

30
Three Tier Web Architecture:MySQL

Request: HTTP
Client: Web Server:
e. g. FireFox e. g. Apache
On your PC On sulley.dm.ucf.edu
Response: HTTP/HTML
(or other doctypes:PDF,etc) .php files ask MySQL
(client doesn’t see PHP) For info; put into
HTML form
Request:SQL
Database Reply:ASCII
Mgt System:
MySQL .frm, .MYD,
.MYI files
31
Three Tier Web Architecture:MySQL

Request: HTTP
Client: Web Server:
e. g. FireFox e. g. Apache
On your PC On sulley.dm.ucf.edu
Response: HTML
(client doesn’t see PHP) .php files ask MySQL
For info; put into
Examples (what they call for:) HTML form
Customer: Request:SQL
- Shopping Cart Database Reply:ASCII
DB Administrator: Mgt System:
- PHPmyAdmin
MySQL .frm, .MYD,
Managers,etc:
- Specialized PHP code .MYI files
32
PHP: A Recursive Definition

PHP stands for:

PHP Hypertext Processor

But … aren’t circular definitions illegal?

Sure they are. But who will punish us, in this case?

It is processed by the ZEND engine, which is normally built into


Apache the web server.

33
MySQL:

An open source database management system.

SQL: Structured Query Language.

- Relational databases, an IBM invention


- SQL, also from IBM

Basic concept: The TABLE.


Field titles Title Author ISBN
Field Types char(50) char(50) char(50)
Field rules NOT NULL
Key information PRIMARY KEY

Records: The Tempest Shakespeare, William 4433-2222-8097af


Rutabegas Potter, Harry 44-3321-4356x
etc…

34
Writing code in this class

I recommend using WAMP (if you’re a Windows user.).

A French project: includes Apache, MySQL and PH

www .wampserver.com - in French and English

If you’re a Mac user, the equivalent package is MAMP

www.mamp.info

<< Guided tour of MAMP on my laptop >>


<< Guided tour of Dreamweaver:
WYSIWYG and Syntax-Directed Editor Models
35
MAMP, WAMP - wazzat?
MAMP: Macintosh Apache, MySQL, PHP
www.mamp.info
WAMP: you get the picture.
www.wampserver.com
It's a local hosting system so that you can develop
and test PHP even when you don't have a live
connection.

36
Open Source Software
WampServer
WampServer
• WampServer is a Windows web
development environment. It allows you to
create web applications with Apaache, PHP
and the MySQL database. It also comes
with PHPMyAdmin to easily manage your
databases.
• WampServer installs automatically
(installer), and its usage is very intuitive.
You will be able to tune your server without
even touching the setting files.
WampServer
• WampServer is the only packaged solution
that will .allow you to reproduce your
production server. Once WampServer is
installed, you have the possibility to add as
many Apache, MySQL and PHP releases as
you want.
• WampServer also has a trayicon to manage
your server and its settings.
WampServer
Installing

• Double click on the downloaded file and


just follow the instructions. Everything is
automatic. The WampServer package is
delivered whith the latest releases of
Apache, MySQL and PHP.
• Once WampServer is installed, you can add
other releases by downloading them on this
website. They will then appear in the
WampServer menu and you will be able to
switch releases with a simple click.
Functionalities

• WampServer's functionalities are very


complete and easy to use so we won't
explain here how to use them.
• With a right click :
- change WampServer's menu language
- access this page
With a left click on
WampServer's icon
- Manage your Apache and MySQL services
- Switch online/offline (give access to
everyone
or only localhost)
- Install and switch Apache, MySQL and PHP
releases
- Manage your servers settings
- Access your logs
- Access your settings files
- Create alias
How to start
• When you install WampServer, a "www"
directory is created (generally
c:\wamp\www). Create a directory inside
for your project and put your PHP files in it.
Click on the link "Localhost" in the
WampServer menu or open your browser
and open the http://localhost address.
Home Page
Add Apache, MySQL and PHP
releases
• WampServer allows you to install almost all
the existing releases of Apache, PHP and
MySQL so you can reproduce exactly the
settings of your production server.
• Then click on the WampServer menu and
activate the release that you want to use.
Version Details

Das könnte Ihnen auch gefallen