Ganesh Kamath MS – EWT (Embedded and Wireless Technology) Internship at Intel MCIS - 111003002 Development of Python Script Generator
 INTRODUCTION  CONCEPTS  The AMP Stack  Benefits of using Database with Server-side scripts  Client-side versus Server-side scripting  Project Requirement  Problem Statement  Web Application Architecture  Expectation at the end of the project  Structure of the Script  Web Application in action  Features Supported  Auto update of script based on Test Case Details  Auto update of script based on Library Selection  Auto update of script based on Function Selection  Undo-Redo Feature  Auto-population of dropdown  Conclusion  Summary WebApplicationDevelopmentusingPHPandMySQL 2 5/25/2013
1. Today, PHP and MySQL are the most widely used combination of open source technologies for Web Application Development 2. In the presentation, we first discuss the various concepts that form a base-line for the development of web- technologies, followed by extensive focus on the specific application namely the Python Script Generator (PSG) 3. In the discussion of the Python Script Generator, the technologies that come into play behind the scenes are covered so that viewers of this presentation are acquainted with the knowledge to utilize the right technology for the application they intend to create WebApplicationDevelopmentusingPHPandMySQL 3 5/25/2013
WebApplicationDevelopmentusingPHPandMySQL 4 5/25/2013
 The AMP stack consists of:  A -> Apache the web-server.  M -> MySQL the database.  P -> PHP the server-side scripting engine.  There are several open-source AMP stacks readily available for use such as:  LAMP – Linux Apache MySQL PHP, Perl & Python  WAMP – Windows Apache MySQL PHP  MAMP – Mac Apache MySQL PHP  XAMPP – Cross-platform Apache MySQL PHP Platform WebApplicationDevelopmentusingPHPandMySQL 5 5/25/2013
 Free and open-source  Maintained by the Apache Software Foundation  Multi-platform & cross-platform support  Good support in the form of mailing list and large community of users  Strong Default Configuration  PHP has several inbuilt functions to perform query with MySQL  Ease of duplication of infrastructure on development machine WebApplicationDevelopmentusingPHPandMySQL 6 5/25/2013
Web Server Usage Open-source DBMS usage Server-side scripting language usage WebApplicationDevelopmentusingPHPandMySQL 7 5/25/2013
1. Storage, Retrieval, Management – Easy because database allows users to store data in a logic format 2. Security – Database adds to security of the web-application as database access includes secured authentication. 3. Independence – Data can be updated independently from the content of the web-site as well as from independent locations 4. Scalability – If data grows exponentially, it can be handled independently with respect to the web-site infrastructure. Database can be scaled across servers by implementation of several HDR options 5. Simple Integration – An existing database can be easily integrated 6. Load Sharing – Database queries are processed autonomously with respect to server-side scripts calling them, this decreases load on the server-side scripts. Moreover, data retrieval from database has been optimized over decades of data related studies 7. Concurrency – Databases provide robust concurrent multi-user access WebApplicationDevelopmentusingPHPandMySQL 8 5/25/2013
Client-side script Server-side script Processing Browser. Server. Process Script is sent to the browser. Script is fetched from file system into the server-side scripting engine Load User's computer. Server machine. Security Lower security because source-code of the script can be exposed on the user's computer. Higher security because source-code is interpreted and the resulting HTML is returned to the user's computer (Logic is secure). Speed Very quick, because processing is happening on user's computer There is delay in fetching the processed resource from the server. Dependency User's browser needs to support the client-side scripting language. It must also be enabled for the web- application to function smoothly. The result of server-side script processing is generally HTML which is supported on all browsers. Performance Improvement Performance can be improved by increasing hard-disk/RAM of the user's computer. There is performance impact seen when the user opens multiple web-application/web-pages on the browser simultaneously. Performance depends not only on server's hard-disk, RAM and the Network but also on simultaneous concurrent connections to the server-side application. Application Input-validation, user-interaction. Database or server-resource access Example CSS, JavaScript, AJAX, VBScript PHP, ASP.Net, Ruby on Rails, JSP, Perl WebApplicationDevelopmentusingPHPandMySQL 9 5/25/2013
WebApplicationDevelopmentusingPHPandMySQL 10 5/25/2013
WebApplicationDevelopmentusingPHPandMySQL 11 5/25/2013
WebApplicationDevelopmentusingPHPandMySQL 12 5/25/2013
 The dispatcher converts an URL such as: https://www.google.co.in/webhp?hl=en&tab=ww , into function calls with parameters: Dispatch.run(https://www.google.co.in/webhp, hl=en, tab=ww) 5/25/2013 WebApplicationDevelopmentusingPHPandMySQL 13
WebApplicationDevelopmentusingPHPandMySQL 14 5/25/2013
WebApplicationDevelopmentusingPHPandMySQL 15 5/25/2013
 Test automation is a challenging yet important field in Validation world  An average validation engineer is not expected to be expert in any of the programming languages that can be used to create the scripts to automate test execution  The idea was to create a tool that can aid validation engineers to generate scripts quickly and efficiently without the need of being an expert in the scripting language  Common Python script errors were improper indentations and spelling mistakes which were reducing the performance of validation engineers WebApplicationDevelopmentusingPHPandMySQL 16 5/25/2013
WebApplicationDevelopmentusingPHPandMySQL 17 5/25/2013
WebApplicationDevelopmentusingPHPandMySQL 18 5/25/2013
WebApplicationDevelopmentusingPHPandMySQL 19 5/25/2013
WebApplicationDevelopmentusingPHPandMySQL 20 5/25/2013
WebApplicationDevelopmentusingPHPandMySQL 21 5/25/2013
WebApplicationDevelopmentusingPHPandMySQL 22 5/25/2013
 http://localhost/college/PSG.php WebApplicationDevelopmentusingPHPandMySQL 23 5/25/2013
WebApplicationDevelopmentusingPHPandMySQL 24 5/25/2013
Table in Content Database Table in User Database Visitor Count through “IP + Time Stamp” interpretation WebApplicationDevelopmentusingPHPandMySQL 25 5/25/2013
WebApplicationDevelopmentusingPHPandMySQL 26 5/25/2013
WebApplicationDevelopmentusingPHPandMySQL 27 5/25/2013
WebApplicationDevelopmentusingPHPandMySQL 28 5/25/2013
WebApplicationDevelopmentusingPHPandMySQL 29 5/25/2013
WebApplicationDevelopmentusingPHPandMySQL 30 5/25/2013
 Auto-population of library specific dropdown values  Independent update database values  Ability to undo/redo an activity  Fill in the mandatory header field manually  Save the script on script completion  Function prototype  Authentication  Centralized storage  Analytics for the Admin  Formatting WebApplicationDevelopmentusingPHPandMySQL 31 5/25/2013
Change in state transition diagram and associated additional processing WebApplicationDevelopmentusingPHPandMySQL 32 5/25/2013
Redo Undo Undo Redo Change induced on Dependent Library part of the script Change induced on Script body WebApplicationDevelopmentusingPHPandMySQL 33 5/25/2013
Dynamic Dropdown population WebApplicationDevelopmentusingPHPandMySQL 34 5/25/2013
Web Application Development using PHP and MySQL 35 5/25/2013
 Common standard of test-case script creation – a benchmark tool  web-application - available everywhere, no need to install  It has eliminated the chances syntax errors such as spelling mistakes and problematic indentations.  It does not require a Python expert to create a test-case script. This eliminates the need to train people in Python to create the wrapper files.  Updating library - now independent of script creation  Fast  Centralized repository of scripts WebApplicationDevelopmentusingPHPandMySQL 36 5/25/2013
 Using AMP stack can help developers reduce the application development time.  The python code generator enabled rapid development of test-case execution scripts thereby reducing the duration of validation cycle.  In this project, no of scripts in library were ~800 where as scripts were ~4000  This give domain experts more time to create efficient & more generic scripts WebApplicationDevelopmentusingPHPandMySQL 37 5/25/2013
 In this presentation, we discussed the concepts which come into play during developing a web- application  Distinction between Client-side and Server-side scripting  Benefits of implementing a database with web-sites  The advantages of AMP stack was also discussed, where we saw why PHP worked so well with MySQL  Test cycle used in the Automation Team was discussed, this was followed by requirements of Python Script Generator  Architecture and Detailed implementation of each feature was discussed with a brief description of problems solved by the tool WebApplicationDevelopmentusingPHPandMySQL 38 5/25/2013
 Web technologies like HTML, PHP, CSS, JavaScript, JQuery, SQL, AJAX was learnt along with software suits like XAMPP, Doxygen, Perforce during the course of the project implementation.  Database implementation concepts  Importance of Scripting languages such as Python in test-case execution  Functioning of an organization with several teams WebApplicationDevelopmentusingPHPandMySQL 39 5/25/2013
 “Beginning PHP6, Apache, MySQL® Web Development”, Timothy Boronczyk, Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass, 2009  “Learning PHP, MySQL and JavaScript”, Robin Nixon, 2009  “PHP & MySQL For Dummies 3rd edition”, Janet Valadey, 2007  “Build your own Database driven Website using PHP & MySQL”, Kevin Yank, 2009  “How to Do Everything with PHP and MySQL”, Vikram Vaswani, 2007 5/25/2013 WebApplicationDevelopmentusingPHPandMySQL 40
WebApplicationDevelopmentusingPHPandMySQL 41 5/25/2013

Web Application Development using PHP and MySQL

  • 1.
    Ganesh Kamath MS –EWT (Embedded and Wireless Technology) Internship at Intel MCIS - 111003002 Development of Python Script Generator
  • 2.
     INTRODUCTION  CONCEPTS The AMP Stack  Benefits of using Database with Server-side scripts  Client-side versus Server-side scripting  Project Requirement  Problem Statement  Web Application Architecture  Expectation at the end of the project  Structure of the Script  Web Application in action  Features Supported  Auto update of script based on Test Case Details  Auto update of script based on Library Selection  Auto update of script based on Function Selection  Undo-Redo Feature  Auto-population of dropdown  Conclusion  Summary WebApplicationDevelopmentusingPHPandMySQL 2 5/25/2013
  • 3.
    1. Today, PHPand MySQL are the most widely used combination of open source technologies for Web Application Development 2. In the presentation, we first discuss the various concepts that form a base-line for the development of web- technologies, followed by extensive focus on the specific application namely the Python Script Generator (PSG) 3. In the discussion of the Python Script Generator, the technologies that come into play behind the scenes are covered so that viewers of this presentation are acquainted with the knowledge to utilize the right technology for the application they intend to create WebApplicationDevelopmentusingPHPandMySQL 3 5/25/2013
  • 4.
  • 5.
     The AMPstack consists of:  A -> Apache the web-server.  M -> MySQL the database.  P -> PHP the server-side scripting engine.  There are several open-source AMP stacks readily available for use such as:  LAMP – Linux Apache MySQL PHP, Perl & Python  WAMP – Windows Apache MySQL PHP  MAMP – Mac Apache MySQL PHP  XAMPP – Cross-platform Apache MySQL PHP Platform WebApplicationDevelopmentusingPHPandMySQL 5 5/25/2013
  • 6.
     Free andopen-source  Maintained by the Apache Software Foundation  Multi-platform & cross-platform support  Good support in the form of mailing list and large community of users  Strong Default Configuration  PHP has several inbuilt functions to perform query with MySQL  Ease of duplication of infrastructure on development machine WebApplicationDevelopmentusingPHPandMySQL 6 5/25/2013
  • 7.
    Web Server UsageOpen-source DBMS usage Server-side scripting language usage WebApplicationDevelopmentusingPHPandMySQL 7 5/25/2013
  • 8.
    1. Storage, Retrieval,Management – Easy because database allows users to store data in a logic format 2. Security – Database adds to security of the web-application as database access includes secured authentication. 3. Independence – Data can be updated independently from the content of the web-site as well as from independent locations 4. Scalability – If data grows exponentially, it can be handled independently with respect to the web-site infrastructure. Database can be scaled across servers by implementation of several HDR options 5. Simple Integration – An existing database can be easily integrated 6. Load Sharing – Database queries are processed autonomously with respect to server-side scripts calling them, this decreases load on the server-side scripts. Moreover, data retrieval from database has been optimized over decades of data related studies 7. Concurrency – Databases provide robust concurrent multi-user access WebApplicationDevelopmentusingPHPandMySQL 8 5/25/2013
  • 9.
    Client-side script Server-sidescript Processing Browser. Server. Process Script is sent to the browser. Script is fetched from file system into the server-side scripting engine Load User's computer. Server machine. Security Lower security because source-code of the script can be exposed on the user's computer. Higher security because source-code is interpreted and the resulting HTML is returned to the user's computer (Logic is secure). Speed Very quick, because processing is happening on user's computer There is delay in fetching the processed resource from the server. Dependency User's browser needs to support the client-side scripting language. It must also be enabled for the web- application to function smoothly. The result of server-side script processing is generally HTML which is supported on all browsers. Performance Improvement Performance can be improved by increasing hard-disk/RAM of the user's computer. There is performance impact seen when the user opens multiple web-application/web-pages on the browser simultaneously. Performance depends not only on server's hard-disk, RAM and the Network but also on simultaneous concurrent connections to the server-side application. Application Input-validation, user-interaction. Database or server-resource access Example CSS, JavaScript, AJAX, VBScript PHP, ASP.Net, Ruby on Rails, JSP, Perl WebApplicationDevelopmentusingPHPandMySQL 9 5/25/2013
  • 10.
  • 11.
  • 12.
  • 13.
     The dispatcherconverts an URL such as: https://www.google.co.in/webhp?hl=en&tab=ww , into function calls with parameters: Dispatch.run(https://www.google.co.in/webhp, hl=en, tab=ww) 5/25/2013 WebApplicationDevelopmentusingPHPandMySQL 13
  • 14.
  • 15.
  • 16.
     Test automationis a challenging yet important field in Validation world  An average validation engineer is not expected to be expert in any of the programming languages that can be used to create the scripts to automate test execution  The idea was to create a tool that can aid validation engineers to generate scripts quickly and efficiently without the need of being an expert in the scripting language  Common Python script errors were improper indentations and spelling mistakes which were reducing the performance of validation engineers WebApplicationDevelopmentusingPHPandMySQL 16 5/25/2013
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
    Table in Content Database Tablein User Database Visitor Count through “IP + Time Stamp” interpretation WebApplicationDevelopmentusingPHPandMySQL 25 5/25/2013
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
     Auto-population oflibrary specific dropdown values  Independent update database values  Ability to undo/redo an activity  Fill in the mandatory header field manually  Save the script on script completion  Function prototype  Authentication  Centralized storage  Analytics for the Admin  Formatting WebApplicationDevelopmentusingPHPandMySQL 31 5/25/2013
  • 32.
    Change in statetransition diagram and associated additional processing WebApplicationDevelopmentusingPHPandMySQL 32 5/25/2013
  • 33.
    Redo Undo Undo Redo Change induced onDependent Library part of the script Change induced on Script body WebApplicationDevelopmentusingPHPandMySQL 33 5/25/2013
  • 34.
  • 35.
    Web Application Developmentusing PHP and MySQL 35 5/25/2013
  • 36.
     Common standardof test-case script creation – a benchmark tool  web-application - available everywhere, no need to install  It has eliminated the chances syntax errors such as spelling mistakes and problematic indentations.  It does not require a Python expert to create a test-case script. This eliminates the need to train people in Python to create the wrapper files.  Updating library - now independent of script creation  Fast  Centralized repository of scripts WebApplicationDevelopmentusingPHPandMySQL 36 5/25/2013
  • 37.
     Using AMPstack can help developers reduce the application development time.  The python code generator enabled rapid development of test-case execution scripts thereby reducing the duration of validation cycle.  In this project, no of scripts in library were ~800 where as scripts were ~4000  This give domain experts more time to create efficient & more generic scripts WebApplicationDevelopmentusingPHPandMySQL 37 5/25/2013
  • 38.
     In thispresentation, we discussed the concepts which come into play during developing a web- application  Distinction between Client-side and Server-side scripting  Benefits of implementing a database with web-sites  The advantages of AMP stack was also discussed, where we saw why PHP worked so well with MySQL  Test cycle used in the Automation Team was discussed, this was followed by requirements of Python Script Generator  Architecture and Detailed implementation of each feature was discussed with a brief description of problems solved by the tool WebApplicationDevelopmentusingPHPandMySQL 38 5/25/2013
  • 39.
     Web technologieslike HTML, PHP, CSS, JavaScript, JQuery, SQL, AJAX was learnt along with software suits like XAMPP, Doxygen, Perforce during the course of the project implementation.  Database implementation concepts  Importance of Scripting languages such as Python in test-case execution  Functioning of an organization with several teams WebApplicationDevelopmentusingPHPandMySQL 39 5/25/2013
  • 40.
     “Beginning PHP6,Apache, MySQL® Web Development”, Timothy Boronczyk, Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass, 2009  “Learning PHP, MySQL and JavaScript”, Robin Nixon, 2009  “PHP & MySQL For Dummies 3rd edition”, Janet Valadey, 2007  “Build your own Database driven Website using PHP & MySQL”, Kevin Yank, 2009  “How to Do Everything with PHP and MySQL”, Vikram Vaswani, 2007 5/25/2013 WebApplicationDevelopmentusingPHPandMySQL 40
  • 41.

Editor's Notes

  • #2 Good morning and welcome Ladies and gentlemen for my presentation on Web Application Development using PHP and MySQL. I am Ganesh Kamath a student of MCIS