Should I embrace CSS3?

I would love to but…

I’ve noticed a few designers I very much respect “namedropping” CSS3 as of late. Unless something changed, or what current web browsers support has suddenly been turned on sideways, many cool things that I would love to do in CSS using CSS3 just wont do me any good for about 70% of my visitors across the board. This may be a bit of a tirade, but let’s look at which browsers currently play nice with CSS3, and what the browser penetration rate is for those lucky enough to see the effects of CSS3.

Here’s a opening bit of text I found on http://www.css3.info/preview/

Many exciting new functions and features are being thought up for CSS3. We will try and showcase some of them on this page, when they get implemented in either Firefox, Konqueror, Opera or Safari/Webkit.

Where is IE in this bit? According to w3schools, IE still has is the browser of choice for about 40% of their users, and Mashable reports that 25% of users still use IE6. I’d love to see 70% of the browser use on Firefox or Safari with the other 30% on Oprah or IE, but that is just not the case.

Ok, let me digress a bit, I’m not saying that CSS3 wont make things easier for a web dev trying to make his own life easier, I’m simply saying that until the world no longer acknowledges the existence of browsers like IE6, and all CSS layouts are displayed equal, CSS3 is just as useful to me as a CSS conditional statement for IE6.

Also, as I have a love for newer technology don’t harass me if i decide to take on a few tutorials or examples using CSS in the coming weeks or months, I think I’ve just come to the conclusion so far that until CSS3 plays nice with IE for the majority of my IE users I’m just better off finding other ways to accomplish things.

Sources:
http://www.css3.info
http://www.webdevout.net/browser-support-css
http://westciv.com/iphonetests/

Posted in Programming | 2 Comments

Use JSON to connect Flash to a Database

I’ve worked through a few samples of JSON AS3 code so that I can hopefully create a simple example that readers may take away and expand for their needs. In a nutshell, I’ve used PHP to encode content into JSON which can then be decoded in AS3 to allow you to query a database in AS3 and get your results in Flash. I’ve shown all my PHP code in this post, however for the AS3 code download my zip file and run it in Flash. Note: I created this using CS4. I’m trying not to get out of this easy, but I feel the best way to understand the code is just download it, and look at how it works. Any questions, leave a comment!

Why add a database to Flash

Because you don’t want static content! By adding a database to your Flash files you allow for all sorts a possibilities. You can query a database, allow users to filter their data, add data to the database, and just make your page much more interesting!

Use PHP To Make the Database Connection

I use ADOdb Lite to make sure I have a secure database connection. You can check it out at the ADOdb sourceforge site. I’ll include the ADOdb files with the source code at the end of this post.

Get data from your database to your Flash file

I’ve created a file called query.php which acts as an intermediary between the database and Flash. query.php will receive a $_GET value named “name” which it will use to query the database. The first two are sample cases in the switch statement are just there to test that the query.php file is working. So if you go to query.php?name=car you should some output and likewise for query.php?name=truck.


< ?php
require_once 'config.php';
$name = $_GET['name'];
switch($name)
{
case "car":
$pp -> vehicle_make = "Ford";
$pp -> vehicle_model = "Mustang";
$pp -> vehicle_year = "2009";
$arr = array($pp);
echo json_encode($arr);
break;
case "truck":
$pp -> vehicle_make = "Ford";
$pp -> vehicle_model = "F-150";
$pp -> vehicle_year = "2000";
$arr = array($pp);
echo json_encode($arr);
break;
case "get all":
$dbResult = $qdb->Execute("SELECT * FROM work");
$results = $dbResult->GetAll();
$strippedResults = array();
foreach($results as &$result)
{
$strippedResults []= array(
'title' => stripcslashes($result['title']),
'description' => stripcslashes($result['description']),
'image' => stripcslashes($result['image'])
);
}
print_r(json_encode($strippedResults));
break;
default:
$pp -> results = "no valid information";
$arr = array($pp);
echo json_encode($arr);
break;
}
?>

Moving onto the AS3 Code

First thing’s first, make sure you have your required files to make sure Flash and AS3 can make sense of the JSON code.

import com.adobe.serialization.json.JSON;

I’ve zipped up a sql dump and all of the files for this project into a folder. Unzip the files, start up MAMP or the server of your choice, add the database, make sure the config.php file is configured correctly and you should be in action! Holler at me if you have any questions. If this post is popular I may go a bit more in depth into how to use this method of accessing a database to add data to a site and create a few examples.

Posted in Programming, Tutorials | 1 Comment

When some is greater than many, or why not to fish with dynamite

I’ve been trying to become more active in a web developer communities which I used to frequent these last few weeks.  Now in more than one case I’ve seen topics of conversation go to Twitter and MySpace and Facebook as a means of “Driving lots of traffic to my site”.  Heck that may work, but is it what you want?

Let’s say you go to your favorite fishing spot and after moderate success someone says “You can catch a lot more fish if you use dynamite.”  And the poor, poor sucker you are tosses a stick of dynamite in the water.  Boom goes the dynamite, and dozen upon dozen of fish float up to the top of the water for you to scoop up.  Now you’ve got countless times more fish than you wanted…. but you were only fishing for bass, and you’ve got yourself no less than 15 different fish varieties.  You may have countless fish, many more than on a normal day, but how many more bass did your tactic get you?  A marginal increase?  Some is greater than many.

Now that ridiculous example follows exactly over to social networking and using social media to drive visitors.  Now these conversations i’m finding involve someone asking how to use Twitter or Facebook, and the user is getting several replies telling the original poster to create a massive amount of friends or followers and that by having that huge volume of people, that will translate into more people at their site.  That may work, but like the fella with buckets of fish… If you are only looking for a particular niche of visitor you are trying to get to your site, your massive friend pooling technique will only result in a moderate increase in traffic.

Here lies the moral of the story: It is better to slowly grow a closely targeted group of followers and friends who are more likely to be interested in your content from the start, than try to simply pool together a large group of people who may, or may not be interested in your content.  Targeted users are much more likely to not only click through to your site when you post a link, but also these targeted followers also provide you with a higher likelihood that they will become a continued visitor because you share a mutual interest and they fill the niche you are targeting.

Dynamite Fishing

Posted in Uncategorized | Comments Off on When some is greater than many, or why not to fish with dynamite

Users of the Internet are social creatures

We are all social creatures.  If we weren’t none of us would be plugged into this world wide web.  End of debate.

Search engine optimization is something i’ve noticed a few articles pop up about today.  Per usual people saying how to do it, or what works (for now).  I came across one particular article on powazek.com that sums it up, plain and simple, “Make something great. Tell people about it. Do it again.“  That idea is not my own, I can’t take credit for it.  Now this great straight-forward concept I will say isn’t just for Google and SEO, but it is great for creating social media.

I am going to take my current tasks explain them, explain how they fit into this simple recipe for social success, and make readers of this blog see how darn simple creating social content is.  I am a huge Detroit Red Wings fan.  Right now they are playing the Buffalo Sabres.  I do not own cable TV.  However I am listening to the game, streamed via the Internet.  The simple process I went through to do this, Google “Detroit Red Wings”.  I clicked on their official site link.  I clicked go to site when offered a deal for tickets.  Then right on their first page I see I clicked on the Live On 97.1 FM link.

How the hell does this fit into the social content process?

Make Something Great: Stream your favorite sports team
Tell People About It: Professional sports teams have a rather large fanbase
Do It Again: Next Red Wings game I’ll probably be streaming too!

I’m also on the defacto social media network Facebook.

Make Something Great: Share a video or message with all your friend in your network
Tell People About It: Sites like MySpace, Facebook and Twitter send out your updates to followers and friends
Do It Again: next time you feel like telling your friends what you are making for dinner, rest assured Facebook is listening.

We are social creatures, creatures of habit, and consume as well as create content in the Internet of today.  By continually making something great, sharing it with others, consuming, adapting and creating more content, you will not only engage those who view your content, you will grow the base of users from which view your content, and hopefully provoke reaction, interaction, and communication.

Posted in Blogging, Social Media, Social Networks | Comments Off on Users of the Internet are social creatures