Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Web Development (Part 2)

Similar presentations


Presentation on theme: "Introduction to Web Development (Part 2)"— Presentation transcript:

1 Introduction to Web Development (Part 2)
Jeremy Shafer Department of MIS Fox School of Business Temple University

2 Course Overview We are here. MySQL To do:
2 weeks HTML & CSS 2 weeks PHP 3 weeks PDO To do: Organize your code with MVC (1 week) Work with forms (1 week) Use cookies and sessions (1 week) We are here.

3 The Internet We talked about this last time, but the internet is made up of a series of computers which are exchanging information. Imagine a restaurant… Your computer is a client… it makes a request of the waiter. The language they speak is TCP/IP The waiter is a server… it brings back what has been requested Sometimes the client is not allowed to have what has been requested… the server will say no (like an angry spouse) It is important to remember that the internet is just computers talking to computers. And the computer that your computer is talking to, has a file structure just like your computer (i.e. folders and files).

4 File Systems + Hierarchy
This is a file system (in File Explorer)

5 File Systems + Hierarchy (2)
This is the same set of files and folders (in NetBeans) The address of a web page, corresponds to the hierarchy of the file system relative to some starting point. (That starting point is called “the web root”.) For example:

6 Some examples Discuss: Why are index.htm, index.html and index.php called “default pages”?

7 Possible responses to default pages

8 Possible responses to default pages(2)
Discuss: Depending on the configuration of a server, you may not see a folder structure like this. Why would a server administrator choose to restrict a view like this?

9 Just for Emphasis See? No file specified here. *But* index.php was present.

10 PHP… Getting Going Lets chat about PHP
PHP was designed as a server side scripting language (it can be used for general purpose programming now as well) Others Include: ASP, ASP.NET, R, Perl, Python, Ruby on Rails As a concept Some programs are run on your local machine e.g. HTML Server side languages run on the SERVER, which renders CUSTOMIZED results for each machine This is different from things like HTML and CSS where the code is embedded in the server’s response.

11 Keep in mind how it all works…
Where does the PHP code resides? Watch out! Forgetting to refresh your browser is a common mistake for beginners. Also - you may encounter situations where it appears your changes are not taking effect. If that’s happening make sure that: You are editing the right page Completely shut down and restart your browser Also – You may find occasions on which you need to clear your browser’s cache. If client side code is “stuck” in the browser’s memory, sometimes you need to clear it out. (This is usually a CSS problem!)

12 Viewing Source (Client side)

13 Hey, where’s the php code?
Viewing Source (2) Hey, where’s the php code? Why can’t we see it here?

14 Time for an exercise


Download ppt "Introduction to Web Development (Part 2)"

Similar presentations


Ads by Google