Scientific web programming with PHP and MySQL - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

Scientific web programming with PHP and MySQL

Description:

When you open PHP-documents locally, they look like gibberish; you need a web server to process ... PHP is still easy (not a easy as HTML though) Other ... – PowerPoint PPT presentation

Number of Views:116
Avg rating:3.0/5.0
Slides: 28
Provided by: bcb9
Category:

less

Transcript and Presenter's Notes

Title: Scientific web programming with PHP and MySQL


1
Scientific web programming with PHP and MySQL
  • Yves Sucaet
  • Michael Zimmermann

2
What to expect?
  • Learn 5 new languages
  • HTML, PHP, SQL, CSS and JavaScript
  • Write dynamic web pages
  • Turn web pages into web applications
  • What is a database and why should you care?
  • Lots of best practices
  • dos and dont of web development
  • Make your advisors happy!

3
(No Transcript)
4
Different technologies
5
Reviewing the basics HTML
  • CERN (Geneva) Tim Berners Lee
  • Different versions 1, 2, 3, 3.2, 4, XHTML
  • You can see HTML by choosing View Source

6
Structure of an HTML document
7
HTML tables
8
How does the Web work?
  • Your web browser
  • Your client application
  • Surfing to a website
  • Connecting to a server
  • A physical other computer
  • This computer is called a web server
  • Only when you contact it with a webbrowser!
  • Special language HTTP

9
HTTP vs. HTML
  • HTML is what everybody knows
  • Hyper Text Markup Language
  • Used to define the layout of a website
  • It's what you when you do View Source
    in your webbrowser
  • HTTP provides a communication protocol
  • If HTML is a letter, then HTTP is the USPS mail
  • The web browser sends a request to the web server
    using HTTP (request)
  • The web server sends HTTP back (response), which
    may or may not contain an HTML document

10
The Internet ! WWW
  • Not everything on the Internet is WWW
  • Different applications require different
    protocols
  • Email, File transfer, Gopher... (defined in RFCs)
  • How does your computer know which is which?
  • Different port-numbers different functions
  • Port 80 HTTP
  • Port 21 FTP (File transfer)
  • Port 25 SMTP (Email)
  • Ports are configurable!

11
What is a web server? 1
  • It's a piece of hardware
  • When you type http//www.iastate.edu, a computer
    in Ames is contacted
  • When you type http//www.stuff.co.nz, a computer
    in New Zealand does your bidding!
  • It is the physical machine that serves you the
    websites that you request
  • When you request a website, this corresponds to a
    physical file on the computer's hard disk
  • Your own computer can function as a web server!

12
What is a web server? 2
  • It's a piece of software
  • Connecting a computer to the Internet does not
    make it a web server
  • You need to install software that can interpret
    the incoming HTTP requests from webbrowsers all
    around the world
  • Xitami, Apache, IIS, Tomcat...
  • You have a webserver on your computer that turns
    it into a webserver
  • http//127.0.0.1 is always the local server.

13
Markup languages
  • HTML is a programming language
  • It's static HTML by itself doesn't anything
  • When you open HTML-documents locally, they appear
    in your web browser the way you intended
  • HTML is easy
  • Other markup languages SGML, LATEX, PCL

14
Programming languages
  • PHP is a programming language (scripting)
  • It's dynamic PHP does a lot of things
  • no laundry or dishes they're still working on
    that one
  • When you open PHP-documents locally, they look
    like gibberish you need a web server to process
  • PHP is still easy (not a easy as HTML though)
  • Other languages JavaScript, Python, Ruby, Perl

15
Your first PHP script
16
Your first PHP script
17
The reason why you have Xitami
  • After saving the file, open it locally in your
    browser (use File Open)
  • Chances are this doesn't even work
  • If it does, it doesn't look like you intended
  • PHP scripts need to be processed first!
  • This is where the Xitami web server comes in
  • Make sure you save the file in the
    c\xitami\webpages (Xitami) or c\inetpub\wwwroot
    (IIS) folder
  • Then, surf to http//127.0.0.1/firstreal.php
  • Now the page displays as you intend it.
  • Use View Source to see the result no more
    echo

18
Before we continue
  • NetBeans can improve your speed a lot!

19
A quick tour of NetBeans
20
Looking at your scripts
21
NetBeans is willing to help
22
Now onto some science
  • Central dogma of molecular biology
  • DNA ? RNA ? protein

23
Chemistry meets PHP
  • DNA, RNA and proteins encode information
  • Information can be represented as text
  • Text can be treated as data
  • Data can be stored by computers
  • Programming languages can manipulate the data
  • Retrieve, search, display, transform etc
  • The web is the ultimate platform
  • Flexible, scalable, multi-threading, multi-OS,

24
Presenting molecular data
  • Simply PHP
  • More advanced data formats
  • FASTA multiple sequences
  • PDB 3D protein structures
  • SBML, BioPax biochemical pathways

25
Output
26
Where to from here?
  • Exercises on covered material
  • Afternoon control structures
  • Choices If then else, select case
  • Loops for, while
  • Tuesday
  • HTML forms
  • Working with files
  • Wednesday Databases

27
Questions
  • http//lab.bcb.iastate.edu/training/webdev/nmsu
Write a Comment
User Comments (0)
About PowerShow.com