SlideShare a Scribd company logo
1 of 15
Download to read offline
HappyKardashian.com
Fox Valley Computing Professionals
Why?
Full-time backend developer w/StraightNorth

Site required to fill multiple needs
● Learn new technologies
● Site needed to be built over lunch hours
● Site needed an element of "fun"
Fun Site / Fun Tech


●   Red Hat's OpenShift
●   RedBean ORM (Object Relational Manager)
●   Twitter Bootstrap (front-end framework)
●   Twitter OAuth
Red Hat OpenShift                  hosting
openshift.redhat.com

●   Free developer cloud server
●   git/ssh/shared ssl
●   JBoss/Node.js/Perl/PHP/Python/Ruby/...
●   Drupal/Cake/Ruby/Wordpres/...
●   MySQL/MongoDB NoSQL
●   Cron/phpMyAdmin
RedBeanPHP                     ORM Library
redbeanphp.com

Object Relational Mapper
Automatically:
● generates tables
● columns
● foreign keys
● no XML, YAML or ini files...just one file
● easy for fast development
RedBeanPHP Sample                  Overview
All database structures will be generated
automatically, on-the-fly, by RedBeanPHP

rb thinks in what it calls 'beans' -
plain old PHP object with public properties
RedBeanPHP Sample             Initialization
require('rb.php');
// for SQLite
R::setup();
 // for mysql
R::setup('mysql:host=localhost;
dbname=database','user','password');
// PostgreSQL available as well
// only InnoDB
RedBeanPHP                                       happykardashian.com

$find = R::findOne('anniversary', "twitter = ?", array($_REQUEST['twitter']));
        if(!isset($find)){
            $bean = R::dispense('anniversary');
            $bean->twitter = $_REQUEST['twitter'];
            $bean->anniversary = $start_date;
            $bean->anniversaries = $anni_data;
           R::store($bean);
        }else{
            $bean = R::load('anniversary', $find->id);
            $bean->twitter = $_REQUEST['twitter'];
            $bean->anniversary = $start_date;
            $bean->anniversaries = $anni_data;
           R::store($bean, $find->id);
          }
Twitter Bootstrap
twitter.github.com

HTML & CSS-based design templates for:
● typography
● forms
● charts
● naviation
● Responsive!
Twitter OAuth                     API Fun
dev.twitter.com
● Access level        - Read & Write
● Access token        - <string>
● Access token secret - <string>
Twitter OAuth                  initial
config
<?php
$Key   = 'abc';
$Secret = '123';
$Token = 'def';
$SToken = '456';

require_once('twitteroauth.php');
Twitter OAuth              send that tweet!
$tweet = new TwitterOAuth($Key,
                              $Secret,
                              $Token,
                              $SToken);
$msg = 'Happy ' . $kims . ' Kardashians!';
$tweet->post('statuses/update',
              array('status' => $msg)
            );
Thank you!



Eric Michalsen
eric.michalsen@gmail.com
@michalsen

More Related Content

What's hot

Traversing Search Results
Traversing Search ResultsTraversing Search Results
Traversing Search ResultsTammy Hart
 
PHP Basics and Demo HackU
PHP Basics and Demo HackUPHP Basics and Demo HackU
PHP Basics and Demo HackUAnshu Prateek
 
So cal0365productivitygroup feb2019
So cal0365productivitygroup feb2019So cal0365productivitygroup feb2019
So cal0365productivitygroup feb2019RonRohlfs1
 
全裸でワンライナー(仮)
全裸でワンライナー(仮)全裸でワンライナー(仮)
全裸でワンライナー(仮)Yoshihiro Sugi
 
The Magic Of Tie
The Magic Of TieThe Magic Of Tie
The Magic Of Tiebrian d foy
 
Mojolicious - A new hope
Mojolicious - A new hopeMojolicious - A new hope
Mojolicious - A new hopeMarcus Ramberg
 
Pemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan SessionPemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan SessionNur Fadli Utomo
 
Php 102: Out with the Bad, In with the Good
Php 102: Out with the Bad, In with the GoodPhp 102: Out with the Bad, In with the Good
Php 102: Out with the Bad, In with the GoodJeremy Kendall
 
Perl Bag of Tricks - Baltimore Perl mongers
Perl Bag of Tricks  -  Baltimore Perl mongersPerl Bag of Tricks  -  Baltimore Perl mongers
Perl Bag of Tricks - Baltimore Perl mongersbrian d foy
 
Leveraging the Power of Graph Databases in PHP
Leveraging the Power of Graph Databases in PHPLeveraging the Power of Graph Databases in PHP
Leveraging the Power of Graph Databases in PHPJeremy Kendall
 
Can WordPress really do that? A case study of vierderduer.no
Can WordPress really do that? A case study of vierderduer.noCan WordPress really do that? A case study of vierderduer.no
Can WordPress really do that? A case study of vierderduer.noMorten Rand-Hendriksen
 
Leveraging the Power of Graph Databases in PHP
Leveraging the Power of Graph Databases in PHPLeveraging the Power of Graph Databases in PHP
Leveraging the Power of Graph Databases in PHPJeremy Kendall
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applicationselliando dias
 
Undercover Pods / WP Functions
Undercover Pods / WP FunctionsUndercover Pods / WP Functions
Undercover Pods / WP Functionspodsframework
 
Let's write secure Drupal code! Drupal MountainCamp 2019
Let's write secure Drupal code! Drupal MountainCamp 2019Let's write secure Drupal code! Drupal MountainCamp 2019
Let's write secure Drupal code! Drupal MountainCamp 2019Balázs Tatár
 
Pemrograman Web 8 - MySQL
Pemrograman Web 8 - MySQLPemrograman Web 8 - MySQL
Pemrograman Web 8 - MySQLNur Fadli Utomo
 
Advanced modulinos
Advanced modulinosAdvanced modulinos
Advanced modulinosbrian d foy
 

What's hot (20)

Traversing Search Results
Traversing Search ResultsTraversing Search Results
Traversing Search Results
 
Blog Hacks 2011
Blog Hacks 2011Blog Hacks 2011
Blog Hacks 2011
 
PHP Basics and Demo HackU
PHP Basics and Demo HackUPHP Basics and Demo HackU
PHP Basics and Demo HackU
 
So cal0365productivitygroup feb2019
So cal0365productivitygroup feb2019So cal0365productivitygroup feb2019
So cal0365productivitygroup feb2019
 
Import o matic_higher_ed
Import o matic_higher_edImport o matic_higher_ed
Import o matic_higher_ed
 
wget.pl
wget.plwget.pl
wget.pl
 
全裸でワンライナー(仮)
全裸でワンライナー(仮)全裸でワンライナー(仮)
全裸でワンライナー(仮)
 
The Magic Of Tie
The Magic Of TieThe Magic Of Tie
The Magic Of Tie
 
Mojolicious - A new hope
Mojolicious - A new hopeMojolicious - A new hope
Mojolicious - A new hope
 
Pemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan SessionPemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan Session
 
Php 102: Out with the Bad, In with the Good
Php 102: Out with the Bad, In with the GoodPhp 102: Out with the Bad, In with the Good
Php 102: Out with the Bad, In with the Good
 
Perl Bag of Tricks - Baltimore Perl mongers
Perl Bag of Tricks  -  Baltimore Perl mongersPerl Bag of Tricks  -  Baltimore Perl mongers
Perl Bag of Tricks - Baltimore Perl mongers
 
Leveraging the Power of Graph Databases in PHP
Leveraging the Power of Graph Databases in PHPLeveraging the Power of Graph Databases in PHP
Leveraging the Power of Graph Databases in PHP
 
Can WordPress really do that? A case study of vierderduer.no
Can WordPress really do that? A case study of vierderduer.noCan WordPress really do that? A case study of vierderduer.no
Can WordPress really do that? A case study of vierderduer.no
 
Leveraging the Power of Graph Databases in PHP
Leveraging the Power of Graph Databases in PHPLeveraging the Power of Graph Databases in PHP
Leveraging the Power of Graph Databases in PHP
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
 
Undercover Pods / WP Functions
Undercover Pods / WP FunctionsUndercover Pods / WP Functions
Undercover Pods / WP Functions
 
Let's write secure Drupal code! Drupal MountainCamp 2019
Let's write secure Drupal code! Drupal MountainCamp 2019Let's write secure Drupal code! Drupal MountainCamp 2019
Let's write secure Drupal code! Drupal MountainCamp 2019
 
Pemrograman Web 8 - MySQL
Pemrograman Web 8 - MySQLPemrograman Web 8 - MySQL
Pemrograman Web 8 - MySQL
 
Advanced modulinos
Advanced modulinosAdvanced modulinos
Advanced modulinos
 

Viewers also liked

Creating Truly Personal Omnichannel Customer Experiences
Creating Truly Personal Omnichannel Customer ExperiencesCreating Truly Personal Omnichannel Customer Experiences
Creating Truly Personal Omnichannel Customer ExperiencesSmartFocusWorld
 
Galesburg 091114143108-phpapp02
Galesburg 091114143108-phpapp02Galesburg 091114143108-phpapp02
Galesburg 091114143108-phpapp02Eric Michalsen
 
Obligation du Tiers Payant : les généralistes belges se sont exprimés (Enquête)
Obligation du Tiers Payant : les généralistes belges se sont exprimés (Enquête)Obligation du Tiers Payant : les généralistes belges se sont exprimés (Enquête)
Obligation du Tiers Payant : les généralistes belges se sont exprimés (Enquête)Medical Web Services
 
Marketing Tata Nano and Nissan Micra using social media (Ali Raza Anjum)
Marketing Tata Nano and Nissan Micra using social media (Ali Raza Anjum)Marketing Tata Nano and Nissan Micra using social media (Ali Raza Anjum)
Marketing Tata Nano and Nissan Micra using social media (Ali Raza Anjum)Ali Raza Anjum
 
はじめてのAws jawsug沖縄 20150425
はじめてのAws jawsug沖縄 20150425はじめてのAws jawsug沖縄 20150425
はじめてのAws jawsug沖縄 20150425Hideki Ojima
 

Viewers also liked (6)

Creating Truly Personal Omnichannel Customer Experiences
Creating Truly Personal Omnichannel Customer ExperiencesCreating Truly Personal Omnichannel Customer Experiences
Creating Truly Personal Omnichannel Customer Experiences
 
Galesburg 091114143108-phpapp02
Galesburg 091114143108-phpapp02Galesburg 091114143108-phpapp02
Galesburg 091114143108-phpapp02
 
Obligation du Tiers Payant : les généralistes belges se sont exprimés (Enquête)
Obligation du Tiers Payant : les généralistes belges se sont exprimés (Enquête)Obligation du Tiers Payant : les généralistes belges se sont exprimés (Enquête)
Obligation du Tiers Payant : les généralistes belges se sont exprimés (Enquête)
 
Marketing Tata Nano and Nissan Micra using social media (Ali Raza Anjum)
Marketing Tata Nano and Nissan Micra using social media (Ali Raza Anjum)Marketing Tata Nano and Nissan Micra using social media (Ali Raza Anjum)
Marketing Tata Nano and Nissan Micra using social media (Ali Raza Anjum)
 
はじめてのAws jawsug沖縄 20150425
はじめてのAws jawsug沖縄 20150425はじめてのAws jawsug沖縄 20150425
はじめてのAws jawsug沖縄 20150425
 
Lista de exercícios matéria
Lista de exercícios matériaLista de exercícios matéria
Lista de exercícios matéria
 

Similar to Red Hat OpenShift Backend for Fun Happy Kardashian Site

Build a bot workshop async primer - php[tek]
Build a bot workshop  async primer - php[tek]Build a bot workshop  async primer - php[tek]
Build a bot workshop async primer - php[tek]Adam Englander
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐいHisateru Tanaka
 
PHP SA 2014 - Releasing Your Open Source Project
PHP SA 2014 - Releasing Your Open Source ProjectPHP SA 2014 - Releasing Your Open Source Project
PHP SA 2014 - Releasing Your Open Source Projectxsist10
 
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebookguoqing75
 
Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统yiditushe
 
Perl调用微博API实现自动查询应答
Perl调用微博API实现自动查询应答Perl调用微博API实现自动查询应答
Perl调用微博API实现自动查询应答琛琳 饶
 
Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!Anatoly Sharifulin
 
TwitterKitではじめる OAuthスピードクッキング
TwitterKitではじめる OAuthスピードクッキングTwitterKitではじめる OAuthスピードクッキング
TwitterKitではじめる OAuthスピードクッキングTakashi Nojima
 
Redis for your boss 2.0
Redis for your boss 2.0Redis for your boss 2.0
Redis for your boss 2.0Elena Kolevska
 
Intro to php
Intro to phpIntro to php
Intro to phpSp Singh
 
Async. and Realtime Geo Applications with Node.js
Async. and Realtime Geo Applications with Node.jsAsync. and Realtime Geo Applications with Node.js
Async. and Realtime Geo Applications with Node.jsShoaib Burq
 
Building an e:commerce site with PHP
Building an e:commerce site with PHPBuilding an e:commerce site with PHP
Building an e:commerce site with PHPwebhostingguy
 
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webclkao
 
HackU PHP and Node.js
HackU PHP and Node.jsHackU PHP and Node.js
HackU PHP and Node.jssouridatta
 

Similar to Red Hat OpenShift Backend for Fun Happy Kardashian Site (20)

Api
ApiApi
Api
 
Build a bot workshop async primer - php[tek]
Build a bot workshop  async primer - php[tek]Build a bot workshop  async primer - php[tek]
Build a bot workshop async primer - php[tek]
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
 
Fake My Party
Fake My PartyFake My Party
Fake My Party
 
PHP SA 2014 - Releasing Your Open Source Project
PHP SA 2014 - Releasing Your Open Source ProjectPHP SA 2014 - Releasing Your Open Source Project
PHP SA 2014 - Releasing Your Open Source Project
 
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook
 
Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统
 
Little Big Ruby
Little Big RubyLittle Big Ruby
Little Big Ruby
 
Perl调用微博API实现自动查询应答
Perl调用微博API实现自动查询应答Perl调用微博API实现自动查询应答
Perl调用微博API实现自动查询应答
 
Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!
 
TwitterKitではじめる OAuthスピードクッキング
TwitterKitではじめる OAuthスピードクッキングTwitterKitではじめる OAuthスピードクッキング
TwitterKitではじめる OAuthスピードクッキング
 
Redis for your boss 2.0
Redis for your boss 2.0Redis for your boss 2.0
Redis for your boss 2.0
 
Hacking with hhvm
Hacking with hhvmHacking with hhvm
Hacking with hhvm
 
Intro to php
Intro to phpIntro to php
Intro to php
 
Async. and Realtime Geo Applications with Node.js
Async. and Realtime Geo Applications with Node.jsAsync. and Realtime Geo Applications with Node.js
Async. and Realtime Geo Applications with Node.js
 
Building an e:commerce site with PHP
Building an e:commerce site with PHPBuilding an e:commerce site with PHP
Building an e:commerce site with PHP
 
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time web
 
HackU PHP and Node.js
HackU PHP and Node.jsHackU PHP and Node.js
HackU PHP and Node.js
 
Node.js - A Quick Tour
Node.js - A Quick TourNode.js - A Quick Tour
Node.js - A Quick Tour
 
QA for PHP projects
QA for PHP projectsQA for PHP projects
QA for PHP projects
 

More from Eric Michalsen

More from Eric Michalsen (9)

FVCP Trademarks in Ad Words
FVCP Trademarks in Ad WordsFVCP Trademarks in Ad Words
FVCP Trademarks in Ad Words
 
Php2pdf
Php2pdfPhp2pdf
Php2pdf
 
Drupal Video Presentation
Drupal Video PresentationDrupal Video Presentation
Drupal Video Presentation
 
Frank Twitter
Frank  TwitterFrank  Twitter
Frank Twitter
 
Dave Facebook
Dave FacebookDave Facebook
Dave Facebook
 
FVCP :: Twitter
FVCP :: TwitterFVCP :: Twitter
FVCP :: Twitter
 
FVCP :: Facebook
FVCP :: FacebookFVCP :: Facebook
FVCP :: Facebook
 
FVCP :: Posi
FVCP :: PosiFVCP :: Posi
FVCP :: Posi
 
SEO 101
SEO 101SEO 101
SEO 101
 

Red Hat OpenShift Backend for Fun Happy Kardashian Site

  • 2. Why? Full-time backend developer w/StraightNorth Site required to fill multiple needs ● Learn new technologies ● Site needed to be built over lunch hours ● Site needed an element of "fun"
  • 3. Fun Site / Fun Tech ● Red Hat's OpenShift ● RedBean ORM (Object Relational Manager) ● Twitter Bootstrap (front-end framework) ● Twitter OAuth
  • 4. Red Hat OpenShift hosting openshift.redhat.com ● Free developer cloud server ● git/ssh/shared ssl ● JBoss/Node.js/Perl/PHP/Python/Ruby/... ● Drupal/Cake/Ruby/Wordpres/... ● MySQL/MongoDB NoSQL ● Cron/phpMyAdmin
  • 5. RedBeanPHP ORM Library redbeanphp.com Object Relational Mapper Automatically: ● generates tables ● columns ● foreign keys ● no XML, YAML or ini files...just one file ● easy for fast development
  • 6. RedBeanPHP Sample Overview All database structures will be generated automatically, on-the-fly, by RedBeanPHP rb thinks in what it calls 'beans' - plain old PHP object with public properties
  • 7. RedBeanPHP Sample Initialization require('rb.php'); // for SQLite R::setup(); // for mysql R::setup('mysql:host=localhost; dbname=database','user','password'); // PostgreSQL available as well // only InnoDB
  • 8. RedBeanPHP happykardashian.com $find = R::findOne('anniversary', "twitter = ?", array($_REQUEST['twitter'])); if(!isset($find)){ $bean = R::dispense('anniversary'); $bean->twitter = $_REQUEST['twitter']; $bean->anniversary = $start_date; $bean->anniversaries = $anni_data; R::store($bean); }else{ $bean = R::load('anniversary', $find->id); $bean->twitter = $_REQUEST['twitter']; $bean->anniversary = $start_date; $bean->anniversaries = $anni_data; R::store($bean, $find->id); }
  • 9. Twitter Bootstrap twitter.github.com HTML & CSS-based design templates for: ● typography ● forms ● charts ● naviation ● Responsive!
  • 10. Twitter OAuth API Fun dev.twitter.com ● Access level - Read & Write ● Access token - <string> ● Access token secret - <string>
  • 11.
  • 12.
  • 13. Twitter OAuth initial config <?php $Key = 'abc'; $Secret = '123'; $Token = 'def'; $SToken = '456'; require_once('twitteroauth.php');
  • 14. Twitter OAuth send that tweet! $tweet = new TwitterOAuth($Key, $Secret, $Token, $SToken); $msg = 'Happy ' . $kims . ' Kardashians!'; $tweet->post('statuses/update', array('status' => $msg) );