Im Not Playing Any More

.. rantings and blog of Chris Williams @scampiuk

Chris Williams

Chris Williams

PHP programmer for a mere 6 years, I've worked on creating social communities and content management systems while teaching myself the language.   For the last few years I've worked on free-to-view and pay-per-view live streaming / in-demand streaming media sites 247.tv and livesquash.tv, We travel around the world filming live sporting events, often doing post-production work for TV in the process.

Website URL:

There have been great advances in the social component market over the last year or so.  Old staples such as Community Builder have had more competition with the likes of JomSocial.  All with the goal of quickly turning your Joomla! site into a social hub - have we lost track of an important question: Could we do it in the first place?

Saturday, 10 July 2010 21:30

External Databases and Joomla!

I get may people asking me about linking external databases with Joomla! because they have found my ExternalDB plug-in on the JED - but people often look for different things when they tap in this simple phrase into Google.. I'm going to try to clear up things a little to get people working in the right direction.

Thursday, 08 July 2010 17:33

The Utility Computing story: one year on.

I think it's been about a year that we've been using Amazon Web Service as our main servers now.  I think because I can't remember exactly!  However long we've been using it, we've used it to manage our media servers and web servers without to many problems, just the occasionally steep learning curve.

Monday, 28 June 2010 21:02

imgResize plugin

How many times have you looked on one of your clients web sites - the site you've spend more than a few hours getting the template right, the content imported and the typography just right - only to find a huge image that's been shrunk down to under 100px?

Wowza Media Server is a very nice tool, and with the use of their images on Amazon Web Services, very very fast to get additional servers up and running when you need them for as long as you need them. The documentation to set it up as an edge for Flash Media Interactive Server can be a little, err, thin at times however, and sometimes you don't have time to spend an hour going through the forums to work something out!

Tuesday, 18 May 2010 07:15

ExternalDB

Introduction

ExternalDB was created for internal use at HORIZONSolutions.tv to overcome a simple yet common problem - how to connect to an external database, or multiple external databases, for multiple components / plugins / modules without having to duplicate the connection details again and again.

We created a plugin, ExternalDB, which allowed us to set these connection details once and get on with it!  Because of the kind of work we do we often have to query multiple databases to retrieve things like tournament information, player rankings and other such things that can't be moved into the local dataset as you would want to in these situations.

It's such a useful tool to us know that we install it with nearly every Joomla! deployment that we do.

What it does do

What it does not do

  • Allow you to add external database connections into your components, plugin and modules
  • Control database connection details site-wide for all the components / modules / plugins that use ExternalDB
  • Set up multiple connections to multiple databases
  • Make other 3rd party components work with external databases without modification
  • Allow Joomla! to run off another database
  • Allow connections to non-MySQL databases

 

Installing and Configuring

  • Install the plugin in the usual way, then make sure you enable it!
  • In Plugin Manager, configure your external database details for the database(s) you need.
    • DSN: Your name for the database to be used later on
    • Hostname: Host where the MySQL server is
    • Port Number: Defaults to 3306, but can change if needed
    • Username / Password : Authentication details for the database
    • Database Name: Name of the MySQL database to use

 

Implementing

This is where most of the confusion is, by what I read in my email from people asking me how to use it!  This is a code solution to using external databases.  There is no way of using this without modifying some code.  That out of the way, here's how to use it in that code.

ExternalDB simply creates a new jDatabase object with your given connection details - nothing clever but simple to maintain connection details. Here's a sample of code from one of our components...

 

// Create new ExternalDB instance, using the details that we set earlier.  
// 'resultsDb' is what we called the DSN
$dbxo = new externaldatabase ( 'resultsDb' ); 

// Create a new jDatabase object, connected with the details from the above selected DSN. 
// We call ExternalDB objects $dbx just as a standard practice
$dbx = $dbxo->getDB ();

$sql = "SELECT * FROM sport WHERE site = 2"; // Some simple SQL..

// Now you use your ExternalDB object in exactly the same way as you would the regular DB object..
$dbx->setQuery ( $sql );
$dbx->query ();
$res = $dbx->loadAssocList ();

I hope this clears up things!  We'll be working on moving this over to 1.6 very soon.

Sunday, 03 January 2010 20:08

Developers dilemma - Joomla! 1.6

I've been charged with my usual creation of components and modules.  It's nothing special, nothing to taxing or complicated, but with the Joomla! 1.6 beta coming up soon, I'm temped to wait and see...

I know I'll have enough to do with J! 1.6 to migrate some sites to it, or more likley, migrate our `standard batch` of plug-ins and modules (you know the ones, the three or four things you always install), just hoping that the development teams for nearly everything are keeping an eye on the development Google Groups for any potential problems (and feature conflicts - I site K2's hierarchical category feature).  I've also got to manage my own list of modules/components/plug-ins!

So - how to go about developing new things, now?   We've been told that if we adhere to the framework, all will be well.  Will it?   The alpha is getting better (try the SVN version for a different thing breaking each day Wink )   So the options are...

  1. Develop for both 1.5 and 1.6
  2. Develop for 1.5 and hope....

I don't like ether of these options, so I'll add a third..

Don't develop it

Simple, wait until 1.6 is out.  I'm sure the clients won't mind that.

 

 

 

Sunday, 27 December 2009 14:45

Lamp Scalling? See how Last.fm do it

After a little googling I stumbled over this PDF from Matt @ Last.fm, which gives a wonderful idea of how Last.fm deal with their scaling issues.

While some things won't work for our implementations of products, mainly because we're using Cloud Computing rather than maintaining our own hardware - however there are some very good ideas in here.

Worth a read while you're digesting the last of the mince pies!

Sunday, 13 December 2009 16:30

Sounds like a good idea...

http://www.smashingmagazine.com/2009/12/10/how-to-explain-to-clients-that-they-are-wrong/

How to tell your clients that they are wrong in what they want!

Thursday, 05 November 2009 21:05

Unlearning the things you taught yourself

I'm trying to resolve the problems caused by the self taught nature of my PHP coding.  It's not a huge problem, however I do know that there are things that I don't know, don't do with the greatest efficiently as I could be doing.

So, how do you un-learn those years of bad habits?  Those methods for doing the every day mundane and routine things that I've developed over years of programming?

  • «
  •  Start 
  •  Prev 
  •  1 
  •  2 
  •  Next 
  •  End 
  • »
Page 1 of 2

Biog

Chris Williams
Chris Williams
chris@imnotplayinganymore.com
PHP & Joomla! Developer
FacebookFlickrFollow @scampiuk on twitter

A coffee is always welcome, or maybe some pennies to charge the laptop.
They also pay for flowers for my wife so she doesn't hate me spending so much time on the computer...

Me on Twitter

scampiuk: I'm at Smorall Lane Lake/park. http://4sq.com/9c3pLm
scampiuk: someone buy me some! RT @uncrate: Stay Puft Caffeinated Marshmallows http://un.cr/2JD
scampiuk: I understood it all RT @philiplocke: @nikosdion Nicholas, as an engineer you'll aprreciate this lol ;-) http://bit.ly/bM0qpQ
scampiuk: all my #coffee has gone :( more in the pot! :)
scampiuk: woo the rest of my peppers are turning red

Hosted by...

Dreamhost - a nice host

Get a free domain and up to 50% off registration costs! use the promo code CHRISWDISCOUNT

You are here: