Geeks On PHP OOP Update

I want to give everybody a quick update on what is going on with Geeks On PHP and what to expect in the near future. As we talked about on our last episode we are putting together a series of podcasts focused on OOP in PHP. Unfortunately due to time constraints, work overload and other things out of our control we have had to push things back a bit. The series is still going to happen and we are excited to have Mitchell Hislop who is a friend of mine and a very talented developer / social media expert joining us for the series.

As soon as we are able to settle on dates to record I will provide updates via Twitter and our Facebook page letting people know what to expect. Thank you for your patience and we look forward to releasing a great series on OOP!

Follow both Stephen & Myself on Twitter and also subscribe via Tunes.

- Nicholas

  • Share/Bookmark

Read Users' Comments (2)

Geeks On PHP Episode 11

In this episode we talk about everything from image manipulation, generating charts & graphs, classes and frameworks and even home invasions.

The charting libraries I discuss are Fusion Charts and pChart, both are very good libraries and have great documentation on how to get started.

The following is a code snippet that I wrote which takes in an associative array, parses it out for a data label ($a[0]) and a data value ($a[1]) and generates a Fusion compatible XML file.

function fnGenerateXML($scaption, $sxaxis, $syaxis, $adata)
{
  if(empty($adata))
    die("Empty data set passed to function.");

  $sdata = "\n";

  foreach($adata as $arow)
    $sdata .= " \n";

  $sdata .= "";

  $sfile_xml = "./chart.xml";
  file_put_contents($sfile_xml, $sdata);
  return $sfile_xml;
}

The function is called in the following fashion:

$sfile_xml = fnGenerateXML("Caption", "X Lbl", "Y Lbl", $a);

The Fusion Chart is generated using the following method call:

echo renderChartHTML("./Column3D.swf", "$sfile_xml", "",
      "ID", 650, 650, false);

Here is some sample code I wrote to generate a graph using pChart:

// Dataset definition
$pData = new pData;
$pData->AddPoint($a1, "s1");
$pData->AddPoint($a2, "s2");
$pData->AddPoint($alabels, "lbl");
$pData->AddSerie("s1");
$pData->AddSerie("s2"); 

$pData->SetSerieName("s1lbl", "s1");
$pData->SetSerieName("s2lbl", "s2");
$pData->SetYAxisName("Ylbl");

$pData->SetAbsciseLabelSerie("lbl");

// Init graph
$pGraph = new pChart(800, 340);
$pGraph->setFontProperties("./tahoma.ttf",8);
$pGraph->setGraphArea(50,30,680,200);
$pGraph->drawFilledRoundedRectangle(7,7,693,240,5,240,240,240);
$pGraph->drawRoundedRectangle(5,5,695,240,5,260,230,230);
$pGraph->drawGraphArea(255,255,255,TRUE);
$pGraph->drawScale($pData->GetData(),
   $pData->GetDataDescription(),SCALE_ADDALL,150,150,150,TRUE,0,2,TRUE);
$pGraph->drawGrid(4,TRUE,230,230,230,50);

// Draw the 0 line
$pGraph->drawTreshold(0,143,55,72,TRUE,TRUE);

// Draw the graph
$pGraph->drawStackedBarGraph($pData->GetData(),
   $pData->GetDataDescription(),TRUE);

// Finish
$pGraph->drawLegend(500,40,$pData->GetDataDescription(),255,255,255);
$pGraph->drawTitle(225,22,"Title",0,0,0);
$pGraph->Stroke();

As you can see pChart requires a bit more setup to get going but both are great libraries for getting the job done. Another free option for charting/graphing that we didn’t discuss on the podcast is the Google Chart API.

Check both Stephen and Myself out on Twitter and also subscribe to us on iTunes!

Enjoy the show and as always, stay geeky!

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

- Nicholas

  • Share/Bookmark

Read Users' Comments (1)

Geeks On PHP Is Alive!

Geeks On PHPHey all, I just want to give everybody an update on the Geeks On PHP podcast.  Stephen and I have arranged our schedules as such that we will be on a regular weekly recording schedule beginning NEXT WEEK.  This is very exciting news for us and for our listeners.  We apologize for the gaps between episodes in the past and the long gap between our last recording and the upcoming one.

Episode 9 will be focused on discussing different ways to utilize data from a database (agnostic discussion) with PHP.  We are set to record on Wednesday 4/28 and the show should be available on iTunes by the weekend.

We really want to thank all of our listeners for the feedback and support we received during our down time.  It means a lot to both of us and we look forward to getting back on track and bringing you the best PHP podcast the internet has to offer.

Sincerely,

- Nicholas Kreidberg

  • Share/Bookmark

Read Users' Comments (1)

Geeks on PHP — Update

geeksOnPHP

Hey all, I know the release schedule for the Geeks on PHP podcast has been erratic and unpredictable lately. We are currently in the process of revamping the format of the show including me taking over as host and the possibility of adding someone else as co-host. Stephen’s responsibilities with the New Brew Thursday podcast have increased exponentially which is the underlying reason behind the changes going on with Geeks on PHP.

I have a couple people in mind for co-hosts but would love to get feedback from our readers/listeners about what you would like to get out of the show. If any of you are interested in doing a guest spot please get in touch with me either by Email or on Twitter.

I will keep everybody updated as things progress but for now I just wanted to make people aware of what is going on and also that the show is not dead.

Thanks for listening and please don’t hesitate to comment, email or otherwise — your involvement is highly encouraged!

Sincerely,

- Nicholas Kreidberg

  • Share/Bookmark

Read Users' Comments (0)

Geeks on PHP : Episode 8 : MySQL vs. PostgreSQL

This week we dive into the debate that has raged since the first database went online, MySQL or PostgreSQL ..

Stephen is a MySQL guy, while Nick is a PostgreSQL guy, and together they share the pros and cons of both, and why the debate that has raged is not likely valid anymore.

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Also, subscribe to us on iTunes and leave us your comments: [ Launch iTunes ]

Follow us on Twitter :
Stephen : http://www.twitter.com/darthweef
Nick : http://www.twitter.com/niczak

  • Share/Bookmark

Read Users' Comments (0)

Geeks On PHP : Episode 7 – Looping through while, for and foreach

At the heart of every redundant thing you do, is a loop.

Even the greeks knew it.  When Sisyphus pissed off the gods, they stuck him in a while loop

while($gods == “pissed”) {

$sisyphus = “Roll rock up a hill”;

}


Granted the greek gods were a bit tempermental, but like the greeks, your application will execute these types of statements to output data, count, and do all sorts of things that are even, at times, incredibly futile and redundant.  Also like gods, while loops can be tempermental, and when hastily constructed can leave Sisyphus pushing his rock for all of eternity.

Wondering who Sisyphus is ? http://en.wikipedia.org/wiki/Sisyphus

PHP Manual on Control Structures: http://us2.php.net/manual/en/language.control-structures.php

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Also, subscribe to us on iTunes and leave us your comments: [ Launch iTunes ]

Follow us on Twitter :
Stephen : http://www.twitter.com/darthweef
Nick : http://www.twitter.com/niczak

  • Share/Bookmark

Read Users' Comments (1)

Geeks On PHP : Episode 6 : Conditional Constructors and Operators

At the heart of everything you do, all day long every day, is an if/then conditional.

When you decide to leave the house, this is what your brain does :

If ( $raining == “Yes” ) {
$take_an_umbrella = “Yes”;
} else {
$take_an_umbrella = “No”;
}

Granted the brain is far more complicated, but like the brain, your application will execute these types of statements to process inputs, decide on which functions to execute, and overall allow more then one scenario to occur with your application.  Also like your brain, you if/then statements and other conditions will also get more and more complicated, but today we deal with the basics.

geeksOnPHP
If/else VS Switch:

The switch statement is similar to a series of IF statements on the same expression. In many occasions, you may want to compare the same variable (or expression) with many different values, and execute a different piece of code depending on which value it equals to. This is exactly what the switch statement is for.

if($test == “foo”)
// do stuff
else if($test == “bar”)
// do other stuff
else if($test == “foo bar”)
// do other other stuff
else
// do something totally different

switch($test)
{
case “foo”:
// do stuff
break;
case “bar”:
// do other stuff
break;
case “foo bar”:
// do other other stuff
break;
default:
// do something totally different
break;
}

Visit the PHP Manual on operators.

Be sure to subscribe via iTunes and leave us your feedback there as well, we’d love to hear from you! Click here to subscribe!

Enjoy :

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

  • Share/Bookmark

Read Users' Comments (2)

Geeks on PHP : Episode 5 : Frameworks / Tools

This week we dive into Frameworks, and suggest some good coding tools such as TextWrangler, and BBEdit. We also talk a little about SVN repositories and why you should use them.

We want to hear from you … so contact us :

Twitter:

Nicholas Kreidberg : http://www.twitter.com/niczak
Stephen Johnson : http://www.twitter.com/darthweef

Rate and Review us on iTunes!

geeksOnPHPsmall

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Here are the notes, which are basically just links to download the stuff we talked about.

Links to popular Mac Editors:
TextMate: http://macromates.com/
TextWrangler: http://www.barebones.com/products/TextWrangler/
Coda: http://www.panic.com/coda/

Links to popular Win Editors:
NotePad+: http://notepad-plus.sourceforge.net/uk/site.htm
PsPad: http://www.pspad.com/
ConText: http://www.contexteditor.org/

Links to popular *nix Editors:
Eclipse: http://www.eclipse.org/
Vim: http://www.vim.org/
gEdit: http://projects.gnome.org/gedit/

Subversion complete reference guide:
http://svnbook.red-bean.com/ (Entire book online)

Frameworks:
CakePHP: http://cakephp.org/
CodeIgniter: http://codeigniter.com/
Zend: http://framework.zend.com/

Thanks for listening, and Stay Geeky.

  • Share/Bookmark

Read Users' Comments (2)

Geeks on PHP – Episode 4 – Beginners Best Practices

This week we delve into best practices for beginners , should you psuedo code, how much time to spend on design, etc …

geeksOnPHPsmall

We talk alot from this great list of 30 Best Practices for Beginning PHP Developers:

http://net.tutsplus.com/tutorials/php/30-php-best-practices-for-beginners/

Definitely check that out, as well as Paper Prototyping by Carolyn Snyder – http://www.paperprototyping.com/

Subscribe to us on iTunes & let us know how we are doing by rating and leaving a comment. :
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=325498336

You can also follow us both on Twitter :

Stephen : http://www.twitter.com/darthweef
Nicholas : http://www.twitter.com/niczak

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

  • Share/Bookmark

Read Users' Comments (0)

Geeks On PHP – Episode 2 – The Versus Episode

On this weeks episode Stephen and Nicholas talk a little Comic Con, and do a versus run on PHP topics.

Also, Stephen’s dogs insist on joining the show, but they don’t add anything of value to the topics.

For our comic con discussion, if you want to see Stephen’s Flickr stream of photos go here : [ ComiCon Flickr ]

We start the PHP portion of our show with Static Vs. Dynamic and then Server Dynamic vs. Client Dynamic, with some caveats on Client Side scripting.

We also toss a little discussion of Form Validation and Form Sanitation, and Nick gives us some code to use for quick and easy Sanitation of form data. You can get that here : [ Code Snippet ]

We also hit on the overall capabilities and advantages of PHP and do a quick and dirty rundown of PHP vs. ASP.

If you want to set up your own LAMP (Linux, Apache, MySQL, PHP) server check out this great walk-through : [ How-To ]

Enjoy the show, and tell us how we’re doing in the comments.

Also, visit us on iTunes and subscribe here : [ Launch iTunes ]

Enjoy the show!

geeksOnPHPsmall

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

  • Share/Bookmark

Read Users' Comments (1)

 Page 1 of 3  1  2  3 »