MAMPStack Development - PowerPoint PPT Presentation

1 / 43
About This Presentation
Title:

MAMPStack Development

Description:

MAMP-Stack Development. Presenter: Ted Fitzpatrick 'What boots up, must come down' ... For our discussion, it will be helpful if you already know the basics of: ... – PowerPoint PPT presentation

Number of Views:61
Avg rating:3.0/5.0
Slides: 44
Provided by: statecalif3
Category:

less

Transcript and Presenter's Notes

Title: MAMPStack Development


1
MAMP-Stack Development
Mac Apache MySQL PHP
  • Presenter Ted FitzpatrickWhat boots up, must
    come down

2
Overview
  • Web Applications
  • Pizzamatic Preview
  • PHP Overview
  • MySQL Overview
  • Using Dreamweaver and Coding PHP
  • QUESTIONS please wait until I open the
    discussion for questions

3
Prerequisites
  • For our discussion, it will be helpful if you
    already know the basics of
  • xhtml for semantic document structure
  • css for visual formatting
  • Web basics web browsers request webpages from
    server computers

4
Web Applications
  •  Web Apps calculate and/or store/retrieve data
  • A stack of technologies
  • Semantic markup (xhtml)
  • Visual Formatting (css and graphics)
  • Interface Enhancements (javascript)
  • Calculated and Stored Data (scripting and/or
    programming languages, databases and SQL)
  • Secure (SSL)

5
Web Applications Examples
  • Online Stores
  • Social Networking Sites
  • Content Management Systems (websites that we can
    update online)
  • Whatever we can imagine

6
(No Transcript)
7
(No Transcript)
8
Questions?
9
Web, Application, andDatabase Servers
  • Dreamweaver is one part of a larger picture and
    IDE
  • Apache, IIS (Windows only), others
  • PHP, ColdFusion, ASP.net, Java
  • MySQL, SQL Server, others

10
PHP and MySQL
  • Open-source
  • Free
  • Powerful
  • Some argue more secure
  • Sometimes pre-installed, can be installed
    separately or with package installers with Admin.
    GUI (MAMP, WAMP, XAMP)

11
Resources
  • Some platforms come with PHP and MySQL already
    intalled
  • Usually not the most current versions (not as
    many features, or not as safe)
  • www.apache.org, www.entropy.ch, www.php.net,
    www.mysql.com
  • www.google.com

12
PHP
  • Rasmus Lerdorf developed PHP to make dynamic
    development easy
  • Server-side scripting language (compiled at
    runtime)
  • Special code can be mixed within xhtml
  • Variables, flow control, database and file system
    access

13
PHP Basics
  • Inserted into xhtml with special tags lt?php code
    here ?gt
  • variables named values words, numbers,
    true/false (boolean), arrays, empty, _POST and
    _GET)
  • Statements execute top to bottom
  • Conditional Flow Control (if, else)
  • Repeat Loops  execute repeatedly
  • Functions(argument) called repeatedly, input -gt
    output, built-in PHP functions
  • Objects Compound collections of variables and
    functions

14
PHP Example
  • lt?php
  • strMyWord pizza
  • if (strMyWord pizza)
  • echo(lth1gtpielt/h1gt)
  • else
  • echo(lth1gtcalzonelt/h1gt)
  • // if
  • ?gt

15
PHP Function Example
  • function makePizza(strInput)
  • strNewString strInput . pie
  • return strNewString
  • // makePizza
  • strReturnedString makePizza(pizza)
  • echo(strReturnedString)

16
Questions?
17
MySQL
  • Relational Database Management System
  • Databases are the most efficient way to store
    data
  • MySQL has GUI interfaces, also command-line
    interfaces
  • Special Language SQL

18
Database Set-Up
  • Databases are comprised of records discreet
    elements of data that are related, e.g, name,
    address, phone, records are usually assigned a
    unique number (primary key)
  • Information is organized into tables for
    efficiency (so that the same information doesnt
    appear in two places)
  • Records in separate tables are related by
    identical values in a column
  • We use GUI tools or command line

19
MySQL Command-Line
20
MySQL Command-Line
21
Questions?
22
Development with Dreamweaver
  • WYSIWG v. Hand-Code
  • WYSIWG is convenient, good for non-coders, good
    for CRUD (create,read,update,delete) applications
  • Hand-coding is good for ultimate customization,
    and to do anything beyond CRUD calculation,
    e.g., a Bid System

23
Pizzamatic Preview
  • Web application comprised of two webpages an
    order form, and a results webpage
  • Customer name and ordered toppings are stored to
    the database, then retrieved to be displayed on
    the results webpage

24
Set-Up
  • File Organization
  • Graphics
  • Webpages
  • Database

25
(No Transcript)
26
(No Transcript)
27
Questions?
28
Dreamweaver Set-Up
  • Define Site
  • Applications Panel
  • Split View

29
(No Transcript)
30
Questions?
31
Order Form Webpage
  • Add database connection (Databases panel) (verify
    Connections folder is uploaded)
  • Add form (inputs must have id in order for the
    label "for" to work, name attribute must have
    toppings for the _POST array to be formed)
  • Make recordset to display available toppings
    (Server Behaviors and Bindings panels)
  • Model output, insert data by drag-and-drop,
    define repeating region, test

32
(No Transcript)
33
Order Form Webpage (Cont.)
  • Make form insert records into databases  Server
    Behavior
  • Hand-coding to move beyond WYSIWG limitations
    (interaction with multiple tables)
  • Pass order id on the query string (as a URL
    Variable)

34
(No Transcript)
35
(No Transcript)
36
Questions?
37
Order Up! Webpage
  • Define URL Variable so that we can use it
  • Recordset for toppings advanced SQL query
  • Recordset for customer name
  • Repeating region for toppings

38
(No Transcript)
39
Questions?
40
(No Transcript)
41
(No Transcript)
42
Next Steps
  • Object-Oriented PHP
  • Web Development
  • Security! SQL Injection and more
  • Working with query string and database values
  • Usability, Accessibility
  • Validation, AJAX

43
Wrap-Up
  • Web Applications
  • PHP Overview
  • MySQL Overview
  • Using Dreamweaver
  • Pizzamatic
Write a Comment
User Comments (0)
About PowerShow.com