PHP and MySQL

1,325 views

Published on

The presentation used on Software Freedom Week on Day 2, the web day (11-oct-2011) about, PHP and MySQL

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,325
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
79
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

PHP and MySQL

  1. 1. PHP and MySQL
  2. 2. Some Basic Concepts <ul><li>Webpages and Website </li></ul><ul><li>Web Application: Design And Development </li></ul><ul><li>Design- HTML,CSS and other design concepts </li></ul><ul><li>Development- Scripting ! </li></ul><ul><li>Client-Server Architecture </li></ul>
  3. 3. Static & Dynamic Pages?
  4. 4. Dynamic Pages <ul><li>A dynamic web page is a kind of web page that has been prepared with fresh information (content and/or layout), for each individual viewing. It is not static because it changes with the time (e.g. news content), the user (e.g. preferences in a login session), the user interaction (e.g. web page game), the context (e.g. parametric customization), or any combination thereof. </li></ul>
  5. 5. Server-side Scripting <ul><li>It is a web server technology in which a user's request is fulfilled by running a script directly on the web server to generate dynamic web pages. </li></ul><ul><li>It is usually used to provide interactive web sites that interface to databases or other data stores. </li></ul><ul><li>This is different from client-side scripting where scripts are run by the viewing web browser, usually in JavaScript. </li></ul><ul><li>The primary advantage to server-side scripting is the ability to highly customize the response based on the user's requirements, access rights, or queries into data stores. </li></ul>
  6. 6. Some scripting languages: <ul><li>PHP (*.php) </li></ul><ul><li>JavaServer Pages(*.jsp) </li></ul><ul><li>ASP </li></ul><ul><li>ColdFusion Markup Language (*.cfm) </li></ul><ul><li>Perl (*.pl) </li></ul><ul><li>SMX (*.smx) </li></ul><ul><li>Python (*.py) </li></ul><ul><li>Ruby (*.rb) </li></ul><ul><li>Lasso (*.lasso) </li></ul><ul><li>WebDNA (*.dna,*.tpl) </li></ul>
  7. 8. Apache- The PHP web Server <ul><li>Apache (By ASF) is THE webserver with complete PHP support </li></ul><ul><li>Notable for playing a key role in the initial growth of the World Wide Web. In 2009, it became the first web server software to surpass the 100 million website milestone </li></ul><ul><li>Works with almost any OS </li></ul><ul><li>Apache was estimated to serve 63% of all websites and 66% of the million busiest. </li></ul>
  8. 10. Where?
  9. 11. Facebook
  10. 12. Wikipedia
  11. 13. PHP: Hypertext Preprocessor <ul><li>Born on June,1995. </li></ul><ul><li>Widely used, general-purpose scripting language </li></ul><ul><li>Was originally designed for web development to produce dynamic web pages. </li></ul><ul><li>These scripts were written as C programming language Common Gateway Interface(CGI) binaries, extending them to add the ability to work with web forms and to communicate with databases and called this implementation 'Personal Home Page/Forms Interpreter' or PHP/FI. </li></ul>
  12. 14. PHP supports many DBMSs… <ul><li>MySQL </li></ul><ul><li>Informix </li></ul><ul><li>Oracle </li></ul><ul><li>Sybase </li></ul><ul><li>Solid </li></ul><ul><li>PostgreSQL </li></ul><ul><li>Generic ODBC etc. </li></ul>
  13. 16. MySQL <ul><li>Initially released on May, 1995. </li></ul><ul><li>MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. </li></ul><ul><li>Written in C,C++ ! </li></ul>
  14. 17. <ul><li>Wikipedia-depends upon the LAMP platform </li></ul><ul><li>Uses an array of 5 MySQL servers </li></ul><ul><li>Processes 200 million+ queries </li></ul><ul><li>2 million updates daily </li></ul><ul><li>Illustrative of MySQL’s capabilities in a high read and high write environment </li></ul>
  15. 18. <ul><li>Yahoo! Operates on the FreeBSD platform,an open source Unix variant </li></ul><ul><li>http://finance.yahoo.com/ uses FreeBSD and MySQL back end </li></ul><ul><li>Billions of Monthly usage. (Yes, B illions) </li></ul>
  16. 19. Why PHP and MySQL? <ul><li>Childhood Friends </li></ul><ul><li>Free and powerful </li></ul><ul><li>Written in C,C++. This Combination makes implementations faster </li></ul>
  17. 20. More importantly… <ul><li>because of the stability, </li></ul><ul><li>the lower server costs (Linux Servers - Apache HTTP Servers) than hosting . </li></ul><ul><li>Net applications </li></ul><ul><li>and the availability of ready to use Open Source Software Applications on the Internet. </li></ul>
  18. 21. LAMP
  19. 22. Are you ready to code? If(lamp||xampp) return true; else If(apache && mysql==true) return true; else Visit GLOSS website !!
  20. 23. Talk is cheap. Show me the code -By ???
  21. 24. PHP Basics <ul><li><?php </li></ul><ul><ul><li>/*code here */ </li></ul></ul><ul><ul><li>echo “Hello World” ; //end with ; </li></ul></ul><ul><ul><li>?> </li></ul></ul><ul><li>Weakly Typed, $var_name = value; </li></ul><ul><li>Arithmetic, Assignment, Comparison, Logical operators. </li></ul><ul><li>Conditionals and loops – Same as C. Just use echo “ print this !“; //instead of printf() </li></ul><ul><li>Functions: </li></ul><ul><ul><li>function functionName() { </li></ul></ul><ul><ul><li>code to be executed; </li></ul></ul><ul><ul><li>} //Call using function name </li></ul></ul>
  22. 25. SQL Basics <ul><li>Either use the GUI (Say phpMyAdmin, MySQL query browser), form or menu based systems or </li></ul><ul><li>Use SQL scripts. </li></ul>
  23. 26. PHP-MySQL Connectivity <ul><li>Follow these steps </li></ul><ul><ul><li>Connection //mysql_connect() </li></ul></ul><ul><ul><li>Creation/Selection //mysql_select_db() </li></ul></ul><ul><ul><li>Query //mysql_query() </li></ul></ul><ul><ul><li>Connection Close //mysql_close() </li></ul></ul>
  24. 27. Want More?? Use Existing PHP frameworks to code faster and clear for Real-Time Applications
  25. 28. PHP Frameworks <ul><li>CakePHP </li></ul><ul><li>Zend </li></ul><ul><li>Symfony </li></ul><ul><li>CodeIgnitor </li></ul><ul><li>Akelos </li></ul><ul><li>Recess </li></ul><ul><li>PRADO </li></ul>
  26. 29. Online Resources <ul><li>HTML – http://htmlhelp.com/reference/html40 </li></ul><ul><li>PHP – http://www.php.net/manual/en </li></ul><ul><li>PHP Libraries </li></ul><ul><li>http://en.wikipedia.org/wiki/List_of_PHP_libraries </li></ul><ul><li>MySQL – http://dev.mysql.com/doc/refman/5.0/en/ </li></ul><ul><li>BROWSER – View Page Source </li></ul><ul><li>http://www.w3schools.com/ </li></ul><ul><li>OpenSource Applications – http://sourceforge.net/ </li></ul><ul><li>And,of course,GOOGLE!!!! – whatever you want is out there </li></ul>
  27. 30. Now, What Next?? Why PHP is preferred than ASP? Is PHP object-oriented or procedural? Learn advanced topics on PHP and MySQL
  28. 31. Opportunities?
  29. 33. And finally… <ul><li>//Build your own “Dynamic Web Application”// </li></ul>
  30. 34. Adios! <ul><li>Feel free to contact me @ </li></ul><ul><li>[email_address] </li></ul><ul><li>facebook.com/manigandan.balachandran </li></ul><ul><li>twitter.com/manigandan_b </li></ul><ul><li> Manigandan,B III CSE +91 9677216418 </li></ul>

×