5. Why PHP?
Built for Web
Easy to Learn
Most Requested
<?php
echo "Hello World!";
?>
PHP
Frameworks
Rapid
Most popular
75% of Web is served by PHP
(as per Google)
9. Installation
Python 2.7
Google App Engine SDK 1.8.4
PHP (Thread Safe) 5.4
Remember:
Add each of it to your OS’s PATH variable.
URLs
http://www.python.org
https://developers.google.com/appengine/
http://php.net/downloads.php
Example installers (for Windows):
GoogleAppEngine-1.8.3.msi and php-5.4.17-Win32-VC9-x86.zip
22. Limits on PHP
Limit Amount
request size 32 megabytes
response size 32 megabytes
request duration 60 seconds
maximum total number of files (app files and static files) 10,000 total
1,000 per directory
maximum size of an application file 32 megabytes
maximum size of a static file 32 megabytes
maximum total size of all application and static files first 1 gigabyte is free
$0.13 per gigabyte per month after first 1 gigabyte
All database requests must finish within the HTTP request timer, around 60
seconds.
Offline requests like cron tasks have a time limit of 10 minutes.
Backend requests to Google Cloud SQL have a time limit of 10 minutes.
24. Web App : URL Shortener
Use Bootstrap with PHP
Recommended: CodeIgnitor or Yii
Source Code available at https://github.com/bhavik1st/php-
4-gae
Web App on Google App Engine
http://php-4-gae.appspot.com/
$client = new Google_Client();
$service = new Google_UrlshortenerService($client); $taskDone = false;
if (isset($_GET['url']))
{
// Start to make API requests.
$url = new Google_Url(); $url->longUrl = $_GET['url'];
//Shorten URL
$shortUrl = $service->url->insert($url);
$taskDone = true;
}
PHP
26. References & Other details
developer.google.com
venturebeat.com
udemy.org
Disclaimer: All images & logos used in
the presentation are various trademarks
of respective organizations.
Other details
Code : https://github.com/bhavik1st/php-4-gae
Article: http://goo.gl/X7hbBI
PaaS - Platform as a Service, Web Hosting Scalable - Storages, Databases and Services Reliable - Distributed, Redundancy Languages - Python, Java, Go and PHP * PaaS uses same infrastructure that Google Applications Use. Reliability zero downtime Google IO 2013 May 14 2013 San Fransisco.
Despite node and Ruby http://en.wikipedia.org/wiki/PHP#cite_note-W3Techs_usage_statistics-79 http://w3techs.com/technologies/overview/programming_language/all stood for Personal Home Page , [4] it now stands for PHP: Hypertext Preprocessor ,
Despite critic of PHP about language inconsistency, scalability, performance.
Multiple data centers Memcache optimizes Mysql library ..
PaaS - Platform as a Service, Web Hosting Scalable - Storages, Databases and Services Reliable - Distributed, Redundancy Languages - Python, Java, Go and PHP * PaaS uses same infrastructure that Google Applications Use. Reliability zero downtime Google IO 2013 May 14 2013 San Fransisco.
PaaS - Platform as a Service, Web Hosting Scalable - Storages, Databases and Services Reliable - Distributed, Redundancy Languages - Python, Java, Go and PHP * PaaS uses same infrastructure that Google Applications Use. Reliability zero downtime Google IO 2013 May 14 2013 San Fransisco.
PaaS - Platform as a Service, Web Hosting Scalable - Storages, Databases and Services Reliable - Distributed, Redundancy Languages - Python, Java, Go and PHP * PaaS uses same infrastructure that Google Applications Use. Reliability zero downtime Google IO 2013 May 14 2013 San Fransisco.
$client = new Google_Client();$service = new Google_UrlshortenerService($client);$taskDone = false; if (isset($_GET['url'])) { // Start to make API requests. $url = new Google_Url(); $url->longUrl = $_GET['url']; //Shorten URL $shortUrl = $service->url->insert($url); $taskDone = true; }