Tuesday, March 10, 2009

Tips to get the best results

Vote Early, Vote Often

Are you tired of sitting quietly in the background, but lack the boldness to post your opinion? SitePoint Forums' polls let you discreetly join the conversation. They enable you to follow the ever-changing Internet trends and give you a chance to influence them. So vote early and vote often! We've compiled a list of currently open polls to start with:

  • Promotion Techniques
> If you had to choose one Autoresponder which would it be?
  • MySQL

> In what order does MySQL "bore down"?

  • Search Engine Optimization

> Should you change your backlink's anchor text?

  • Business and Legal Issues

> Vote for EACH CMS you WOULD use for a "cheaper" client.

> Would you drop your rates for the suffering economy?

> How do you charge for PPC campaign management?

  • .NET

> If you've tested or started using IE8RC1 moving from IE7, how has it worked?

  • General Chat

> Do You Smoke?

  • Web Page Design

> What is the ONE thing you want to see most in IE9?

  • Content

> Do you write your own content?

> Who should provide the content for a web site?

  • Blogging

> Is your web site merged with your blog, or is your blog in a subdirectory?

  • Graphics

> Jpeg XR will ...

The polls below recently closed, but you can click on the links for the results:

  • Business and Legal Issues

> Do you put your service prices on your web site?

  • General Chat

> What movie are you most looking forward to?

It's easy to start your own poll, too. Post your thread as usual but before you submit, scroll down and click on “Add a Poll.” Then submit your thread and you'll be redirected to your poll. There you can enter your questions or change any options.

latest and greatest in SitePoint

Simply SQL -- a practical, step-by-step guide to writing SQL.

Rather than bore you with theory, in Simply SQL author Rudy Limeback focuses on the practical use of SQL with common databases. It's packed with plenty of diagrams, easy-to-read text, and clear examples to help make learning SQL easy and fun.

Any questions? Rudy (aka r937) is always around the forums -- almost 24/7 -- to answer them.

The Official SitePoint Twitter Background Competition

Around my neighborhood spring is in the air. The birds are a-twitter and so is nearly everyone else!

If you have imagination, creativity, and style, this contest is for you. Design the best Twitter profile background imaginable and submit it in any graphic format that Photoshop can open. (Just remember, you'll be sending it by email so make it a reasonable size!)

Contest ends March 26, 2009. Our judges will consider any theme or style except for those that include political, violent, or adult references. Nothing controversial or offensive, please. Complete contest and entry submission details available here.

Prizes go to the top 10 entries: your choice of The Principles of Beautiful Design by Jason Beaird or a copy of the soon-to-be-released Sexy Web Design by Elliot Jay Stocks.

Need inspiration? Read Mihaela Lica's blog post, Beautiful Twitter Backgrounds to Inspire You for the SitePoint Twitter Contest.

SitePoint at SxSW Interactive 2009

SitePoint will be represented at SxSWi in Austin, Texas, March 13-17.

Besides co-founder, Matt Mickiewicz and some Australian staff members, it's your chance to meet SitePoint authors like Jason Beaird, Jina Bolton and Josh Catone, plus SitePoint Forum staff members like Podcast co-host Patrick O'Keefe and forum advisor Brandon Eley. You’ll find them all at the Razorfish opening party at The Madison, starting at 6pm on March 14.

Please post if you'll be attending. As Matt mentioned, we’d love to meet everyone in person.

Server-side JavaScript Common as PHP

Reading through the comments on Craig Buckler's blog post, Will Server-side JavaScript ever catch on?; confirms what Douglas Crockford wrote about JavaScript: it's been typecast. A lot of people can only see it in context of the browser. A big part of this is due to the confusion between the language and the browser DOM. The DOM interface is actually where most JavaScript programmers spend their time.

It also confirms another fact: a lot of people hate JavaScript. I'm confident though -- for programmers who appreciate JavaScript's finer features and can accept its rougher parts -- that the news JavaScript is moving server-side is unsurprising and probably welcome. And I'm certain that this is only the beginning.

So where can JavaScript be found server-side right now?

Jaxer is a JavaScript web application framework and server. The server-side API is as capable as any, including access to databases, files, and network sockets. There's a blurring of the boundary between server-side and client-side scripting; for example, server-side scripts can manipulate the web page DOM.

Scripts are embedded ASP style into your HTML:


The runat attribute can be server, both, or server-proxy. If set to server, the script is evaluated before the page is sent to the browser. If not set the scripts are executed client-side. If set to server-proxy, then the functions can be called from a client-side script by name, but are proxied, via Ajax, to the server-side equivalent.

Helma is another web application framework that uses JavaScript for server-side scripting. Helma has a templating system, which means it avoids mixing server-side and client-side JavaScript code. You instead write actions in JavaScript, which then render templates, injecting data into the rendering process. Each HTTP request triggers a configured action.

Here's an example of a template or skin in Helma jargon, named 'hello':

Hello, my name is <% response.name %>.

And the action that renders it:

res.data.name = 'Helma';
this.renderSkin('hello');

There are many more examples of server-side JavaScript as the Server-Side JavaScript topic on Wikipedia shows. Almost all of them use Rhino or SpiderMonkey to execute the JavaScript.

Is server-side JavaScript a serious proposition?

While implementations of JavaScript on the server are appearing, it's far from the ubiquity of PHP hosting. A fair comment is that server-side JavaScript is currently bound to the framework in which it resides. As such, JavaScript written in one environment is unlikely to be portable because of the lack of a standard API. It's a need that's already been identified and so the work of the ServerJS group has begun. Projects like jslibs also aim to solve this problem.

Lack of hosting services is also an issue, though Jaxer and AppJet provide their own hosting platforms. Helma applications can be hosted with services that support Java. Once the standard library problem is solved I'm sure we'll see hosting support improve -- you'll be asking your host for "mod_javascript" support.

Finally, JavaScript has more than enough rough parts to make many people nervous about using it server-side. I seriously think ECMAScript 3.1 and ECMAScript Harmony will eventually have that covered.

We're seeing JavaScript support appear in many platforms, both web and desktop, local and server. Will server-side JavaScript support offered in hosting packages be as common as PHP? I think it's inevitable.

Friday, March 6, 2009

Submit Your Work to Gallery Sites

Last week I spoke to a client of ours, who was quick to mention that the web site we built for them recently appeared on a CSS gallery site. They were glad to have been listed, because it confirms that he made the right decision choosing my company. He also said that he's already received an enquiry for their services, which he directly attributes to a link from this gallery.

It's great for me because I have a very happy client, but more importantly, we also have prospects enquire about our service as a result of being on such gallery sites. Additionally, there are the obvious SEO benefits of more inbound links. Finally, the team who works on the featured web site are pleased because they effectively are being judged by their peers, and so we all win.

So where do you find these galleries? Well, there are a few sites that come to your rescue:

* CSSGalleryList.com list 50 of the larger galleries and their Alexa rank, and link directly to their submission pages.
* This blog post from Web Design Beach has an exhaustive list of more than 250 gallery sites, complete with Alexa Rank, PageRank, Google, and Yahoo inbound links.
* Finally, if you haven't already had your share of lists, here's another list of 212 galleries, over at Web Gallery List.

You'll soon filter your preferred list down to a dozen or so galleries, and will be submitting away in no time at all. Good luck!

Create a Killer Business Card

If you want to impress, you'll want to have a clever business card. Especially if you do any design work, your business card needs to speak volumes about your ability, as well as provide those useful contact details.

A friend of mine uses old cereal boxes, which he cuts into the standard shape. Then he uses a rubber stamp on the unprinted side with his details. Every card is therefore different, and it sends a great recycling message.

Another friend has a square business card; I've recently seen a card utilizing Braille, and another which looks like a playing card.

Gimmicks aside, you still need to include those details, and my only word of warning is to ensure that your card fits in a standard business card wallet or binder easily, as well as your pocket.

For some great inspiration on what others have done manipulating the traditional business card, have a look at the recently launched gallery site, cardobserver.com or Art of the Business Card. There's also Inspiration: Business Card Designs, and finally the humorously named ItEvenHasAWatermark.com.

I Want to Build Your Next Web Site!

You might look at Chris's adventure above and think to yourself, what a geeky but once-only stunt he pulled; however, there's a lesson in there for all of us.

Suppose you're a web designer, and your target clients were small business owners. Imagine attending a small business trade show or conference with a T-shirt that said, I want to build your next web site! That's sure to gain a positive reaction.

Let's look at trade shows. Most trade shows and exhibitions cost a small fortune to have a display stand, and if you're a developer, what do you have to really show? Perhaps a few computer screens showing your portfolio as a slideshow? Boring!

A better (and considerably cheaper) idea here would be to attend as a normal visitor, but carry a stack of your business cards. Then go from booth to booth enquiring about the products and services on display, and politely hand them your card at an appropriate time.

You could even print a short run of special cards just for that event, which could potentially state, We met at the XYZ Expo, and I want to build your next web site! on one side, and your contact details on the other. This is cheap, and definitely memorable.

Tuesday, March 3, 2009

Build a Buzzword Bingo Card in PHP

In the past, I've done a fair bit of work with government departments. Here are three things I learned from that experience:

  1. government workers love meetings
  2. government workers also love jargon
  3. when you combine meetings and jargon, you have excellent conditions for a quick game of Buzzword Bingo*

If you've yet to play Buzzword Bingo, you're missing out on great fun! It's a game in which you collect buzzwords, clichés, and weasel words, then arrange them in a grid and check them off as you hear them during a particularly wordy meeting. When you've checked off a row, column, or diagonal line -- bingo!

With just a little bit of beginner PHP and a good collection of jargon words, you can make your own buzzword bingo card that's randomly generated every time you load the page. Let's take a look.

(*Buzzword Bingo has a less than worksafe name too, but because we want this newsletter to pass by unimpeded by any cursing filters, I can't repeat it here.)

Step 1: Create a Function Shell

We'll be creating a function called Bingo to generate a random buzzword bingo card, which we can then include within a document. Let's start out by creating a document shell with the Bingo function inside (I've called mine bingo.php):

 function Bingo() {

}
?>

Step 2: Compile Some Buzzwords

Grab a list of the jargon words or phrases you'd like to see in your bingo cards. You'll need at least 25 to fill a bingo card, so be sure you have a good collection. I've just spent an amusing few minutes strolling around Weasel Words, a site devoted to collecting some horrible examples of managerial speak, and I've plucked a bagful of my favorites.

Let's pop these in an array inside our PHP function:

$buzzwords = array(
"leverage",
"synergy",
"stakeholder",
"touch-points",
"knowledge initiatives",
"cross-organizational collaboration",
"strategic planning",
"dynamics",
"catalyst",
"values-driven",
"evangelize",
"incentivize",
"loop back",
"let's take this offline",
"360 degree thinking",
"in the pipeline",
"actioning",
"paradigm",
"2.0",
"going forward",
"game plan",
"the end of the day",
"thought leading",
"on board",
"monetize"
);

Step 3: Do the Shuffle

We want to make sure our card has a random arrangement of buzzwords, so we'll use PHP's shuffle function to jumble up the items in the array:

shuffle($buzzwords);

Step 4: Prepare a Table

Bingo is all about filling up rows or columns in a grid, so we'll use a table to arrange the items.

Let's create a new variable called $bingocard and start preparing the table markup. You can see I've left a gap in the middle -- this is where we'll later put the code that creates the cells and rows.

$bingocard = "summary='A random selection of 25 buzzwords
arranged in a bingo card'>";
$bingocard .= "";
$bingocard .= "

";
$bingocard .= "";
$bingocard .= "";
$bingocard .= "";

// here's the gap

$bingocard .= "";
$bingocard .= "";
$bingocard .= "
B IN GO
";

Step 5: Create Cells and Rows

We now need to create 25 cells from the items in our buzzwords array. We'll use a for loop to iterate through the items in our shuffled array 25 times, and create a table cell for each. That for loop goes in the gap we left in the previous step.

Our table will be a 5x5 grid, so we'll also need to create five rows, each with five cells. We already prepared the start of our first row and the end of our last row, so we'll also need to double-check to make sure we don't do this on the last cell.

To work that out, I've used a variable $rowend, which is the remainder of $cell + 1, divided by five. After we create each cell, there's a small if statement to check whether a $rowend is zero, and that it isn't the 25th cell. If that's the case, we'll close and open a table row element.

Here's the for loop:

for($cell=0; $cell<25; $cell++)
{
$rowend = ($cell + 1) % 5;
$bingocard .= ""
. $buzzwords[$cell] . "";
if($rowend == 0 && $cell < 24) {
$bingocard .= "n";
}
}

Step 6: Echo the Table

We've built an array, shuffled it, and made it into a table. All that's left to do now is print it:

echo $bingocard;

… and we're nearly done! You should now have a PHP file that looks similar to Example 1.

Step 7: Drop It in a document

Let's now use this function in a web page. Include the bingo.php file at the start of the document:

Now call on the Bingo function wherever you need to put your card:

Use some CSS to style the buzzword bingo table how you'd like. You can see a very plain example of a bingo card in Example 2, and the results in Example 3. You might even like to layer on some JavaScript to let players check off each cell by clicking on it, or cause an amusing effect when the player achieves bingo.

Step 8: Play!

When you're happy with how your card looks, it's time to pass on the URL of the bingo card to your co-workers. Next time there's a meeting, print a copy for every player, and see who can call bingo first!

Read the blog entry:

Raena Jackson Armitage PHP Blog: Dynamically Typed
by Raena Jackson Armitage

Build A Buzzword Bingo Card in PHP

Monday, March 2, 2009

Introducing Joomla By Andrew Eddie

SitePoint Feature Article

Joomla (TM) is among the most popular Open Source content management systems that exist today, in the company of Drupal and WordPress. If you just need to build a web site for yourself and are unfamiliar with all this HTML stuff, or you develop web sites for other people, or if you’re at the pointy end of developing web-based applications, then Joomla really should be on your evaluation list. It’s easy to install, use, and extend.

Installation

The server requirements for Joomla are fairly minimal. You need a host that supports PHP and MySQL, and an account with at least 50MB of disk space. This allows for the Joomla install, the database, and room for a bit of media. While Joomla can run on earlier versions of PHP, for security reasons your host should be running on the latest version of PHP4 (4.4.9 was the final version of PHP4 after development was halted) or PHP5. Joomla does run better on PHP5 but watch out for buggy versions like 5.0.4. The most desirable version of MySQL to use is version 4. It’s also wise to choose a host that runs PHP in CGI mode as this takes care of a great many annoying problems caused by file permissions. More information on the technical requirements is available on the Joomla web site.

You can download the latest version of Joomla from the Joomla site as well. When a new version comes out you’re able to download incremental patch packages that only contain the changed files between versions, thus saving you a little upload time and bandwidth.

Transfer the files to your server in the normal fashion, either by uploading the package and unpacking on your server, or unpacking first and then uploading all individual files (the latter takes a while). Once that’s done, that’s generally the last time you need to touch your FTP Client; the rest of the set up is done in your browser.

Point your browser to the URL of your site—including any subfolder path if required—where you unpacked all the Joomla files, http://www.example.com/joomla/. You will be taken to the Joomla installation wizard, as shown in the following screen:

On this screen you can select the language for the installation process (there are over 40 to choose from). Click Next and you come to the Pre-Installation Check screen.

This screen gives you an indication of whether your host has all of the required or desired settings for the Joomla site to run. Assuming all is well, click Next and you will come to the License Information screen. This screen presents you with a copy of the GNU General Public License under which the Joomla source code is released. Peruse at your leisure and click Next. This brings you to the Database Configuration screen.



This is probably the most complicated part of the process because you have to know your database credentials for the site to work properly. Often this is done using Plesk, Cpanel, phpMyAdmin, or the command line if you are a true geek. But if you’re unsure you need to ask your hosting service. I’m going to assume that you already know how to create your database and user account:
  • The database type is likely to be “mysql” (if you know what “mysqli” is then you probably know if you should select it).
  • The hostname is likely to be “localhost” but check with your hosting service or IT department.
  • The username and password will either have been created by you or given to you by your hosting service.
  • The database name is either one you have created, or if the database user account you have has permissions to create a database, then you can enter a new name.

If this is a first-time install, don’t worry about the Advanced Settings slider. It’s only needed if you are installing over the top of an existing database.

Click Next. There might be a short delay while the database scripts are run and, if no errors were encountered, you will be presented with the FTP Configuration screen. Unless you know you’re going to have problems with file permissions (from previous experience), then you can skip past this screen. Joomla’s “FTP Layer” attempts to address some file permission issues but, as stated before, if the host is running PHP in CGI mode, you’re quite safe to omit this step.

Live on the wild side and just click Next; this will bring you to the Main Configuration screen.

On this screen we set the Site Name and then the Super Administrator email address and password. We can also optionally install some sample data that will produce a fully fledged web site—to give you an example of what you can do—or your can load a migration script from the previous version of Joomla. In this example we’ll bypass loading any sample data because we want a clean site to work with.

Click Next and you’ll be taken to the Finish screen. Now, I told a lie before. You’ll have to use your FTP Client or File Manager to remove the folder called installation. This is really important because the site will fail to work otherwise. Besides, there are some unscrupulous people out there and, armed with a strong knowledge of Joomla, they could well do some nasty things to your site if you leave it there.

Opting to be lazy and just renaming the folder is unwise—make sure you delete it completely. When you have done that click the Site button. You will be presented with a fairly bland site and a Home link. We need to fix this!

For more information on installing Joomla, see the Joomla Documentation site.

Using Joomla

Well, the entire scope of what you can do with Joomla is far too much for a single article. The Absolute Beginner’s Guide to Joomla is a reference that gently leads you through what you need to know to become a seasoned Joomla master. For now though, we’ll look at how to place a few articles on the site.

Joomla is one of the few content management systems that completely separates administrative duties from the actual web site that your visitors see. We reach the Administrator by adding “/administrator/” to the URL path in your browser, for example: http://www.example.com/joomla/administator/.

You’ll be asked for a login Username and Password. The Username is “admin” by default and the password is what you set during the installation process. Once you’re in, you’ll see what is called the Control Panel, a screen that will become very familiar to you over time.

To see the fruits of your labor, click the Preview link that resides just above the Toolbar (or use whatever key or mouse-click combination you need to open it as a new tab).

Viola! You have content.

That’s about all we can cover in this introductory overview. Next time (if they’ll have me back) we’ll look at making the site sizzle with a new template (honestly, the stock one we ship is nice, but really boring) and adding a cool Ajax-driven comments system so that we can start a blog happening.

Useful Links

In the meantime, there are a number of links you absolutely have to know about when beginning your journey into the Joomla-sphere.

www.joomla.org is the main site. The homepage is useful as it aggregates feeds from various locations, and there is some information about the project if you’re interested in that kind of stuff.

community.joomla.org is the hub of the Joomla information universe. It hosts all of the official blogs that come from various working groups in the project, as well as a really cool aggregator of Joomla-related sites (take a look at JoomlaConnect—it will connect you with the highflyers in the Joomla community ).

You'll need to bring your shopping bag to extensions.joomla.org because it's the place where you find out what’s available to add on to Joomla. There are literally thousands of different bits to add—some free, some commercial.

If you really want to be in the mood you can buy a T-shirt, but your main focus will probably be all the books available about Joomla.

Perhaps less exciting than the other sites but useful nonetheless, the documentation wiki site holds a wealth of community-contributed information about using and extending Joomla.

Joomla® is the trademark of Open Source Matters, Inc. in the United States and other countries.

About the author : Andrew Eddie

Andrew Eddie Andrew Eddie is the owner of a small web consultancy based near Toowoomba, Australia and co-owner of the product solutions company JXtended which makes several free and commercial extensions for Joomla!, the award winning Content Management System and a project he co-founded. Andrew has been involved in the Open Source Software movement in professional, volunteer and leadership capacities since 2002, and he currently serves as one of the Development Coordinators of Joomla!. He also speaks regularly in Australia and internationally, advocating the cost effectiveness of Open Source software and generally sharing his knowledge about how individuals and business can be empowered by using Joomla!.

Thanks to sitepoint.com

Source : http://www.sitepoint.com/article/introducing-joomla/