Archive for the 'PHP' Category

Why a Blog is Great Marketing

Marketing, MySQL, PHP, SEO, Web Design No Comments »

Many people wonder what a Blog can really do for their business. The answer to this question depends on what your website needs. A well written blog gives your website a more professional feel. An informative blog can drive hits to your website. A blog that is updated often will keep people coming back to your website and offer new visitors fresh, up to date content. A properly integrated blog can help save money by allowing you to control the content on your site without needing to pay for the services of a web developer. Keyword rich blog posts can dramatically help your search engine optimization.

A Blog gives your site dynamic content. Content that you, the owner of the website, can control. There are many different kinds of blogging software that can be integrated into your existing website. Wordpress is our Blogging software of choice. It has an easy to use interface, numerous plug-ins and is constantly being updated and extended.

Armed with a Blog powered by Wordpress you no longer need to pay a web developer when you want to add content to your website. If you need to update information, fix a spelling mistake, add new content, change a picture, or any other situation in which information on your website needs to be added, updated or deleted, the power is in your hands.

Once you have your Blog integrated with your website you can begin to write the content. Informative and up to date information in your blog posts is a great way to get people coming back to your website over and over. They may even send the link to your website to friends, or others they know would be interested in the information posted on your blog. This gives you even more chances to convert these visitors into leads and clients.

Most Blogging software (such as Wordpress) is designed to be very search engine friendly, and easily installed and configured plug-ins can be added to make it even more so. Links to your blog posts can be submitted to Digg.com and LotText.com, further increasing traffic to your website as well as your Search Engine Optimization.

There are some pitfalls to having a blog as well. If the blog is not setup properly, or properly integrated with your existing website, it can be hard to find, hurt your Search Engine Optimization, or appear unprofessional to potential clients visiting your site. The initial installation of Blogging software can be very difficult for anyone who is not tech-savvy.

If you do not already have a website and are looking for set one up around a blog, then Wordpress can be used not only as a peice of Blogging software, but as a fully configurable content management system that can run your website. Each page, post, category, link and image, fully editable by you.

At Storm Code we install, setup, design and host numerous Blogs. If you have any questions, or would like to get a quote. Please contact us.

Affordable Web Design

Marketing, PHP, Web Design No Comments »

Affordable Web Design is a rare commodity these days.  Many companies will claim to be affordable, even quote you an affordable rate, but you must be wary.  Hidden charges, development delays and endless headaches await if you choose the wrong company.

Starting five years ago many Web Design Firms began to make a killing all across the United States by offering cheap web design and development.  They accomplished this by outsourcing all of their development and design work to places like India and more recently China and Russia.  Sometimes the websites created were exactly what the Clients had hoped for and more.  More often then not though, the Client paid the price not in dollars, but in wasted time, lost leads, and empty aspirin bottles.

More recently these same web design companies have begun claiming that they don’t outsource their Project Management and Web Development.  This is true in some cases.  They do in fact have a Project Manager in-house, that talk with the clients and manage the project.  However they are still sending the projects to designers and developers overseas.  While some of the headaches may be gone, the development slags and hidden project costs remain.  The fundamental problems with outsourcing are not going away.  Time differences, language barriers and communication problems coupled with unrealistically low initial quotes are nothing more than a recipe for disaster.

Pick a company that does all of its Web Design, Web Development and Project Management in-house.  In this day and age do you really want to gamble on something that looks and sounds like it’s to good too be true, or would you prefer the comfort of knowing your project is in capable hands and that your developers are just a phone call way?

The choice is of course yours.

Website Optimization: MySQL

MySQL, PHP, SEO, Web Design No Comments »

No one likes waiting.  Not in line, not on hold, and certinaly not for a webpage to load.  That’s why optimizing your website for speed is so important.  Many things go into website optimization.  In this article we will focus on how database queries can slow down your website if they are not done properly.

Bulky queries to your database can drastically slow down the speed of your website.  This isn’t specific to MySQL, this problem is present in any website that is backed by a database.  Normally when you go to a website, the web server serves you a page of HTML.  That’s simple, small and quick.  When you have a dynamic page done in PHP, ASP or JSP an extra step is added (this article assumes that PHP is the language being used).  The web server must compile the code on the server and then serve the resulting page.  When you have a dynamic page that queries a database, the server must compile the code, stop to query the database server, wait for a response, continue compiling the code, and then serve the page.  Another added step.

The time it takes the server to serve up a page that requires one or more queries to the database server is negligible most of the time.  Especially if the database server is hosted locally on your web server.  However, with large, complicated queries, the time the web server must wait for the database server to run the query and return the result can go from negligible to intolerable.

This is mostly caused by poor structure in the queries made on the database.  As a rule a query should never return more results then is needed, and should never return information that is not needed.  This might seem like common sense, and indeed it is, but never the less, some developers do not take care when writing their SQL queries.  The result is extended load times for the pages that use them.

Page load times can have a negative effect many things.  First and foremost the patience of  your visitor.  Second and less well known is search engine optimization.  Long load times can result in lower page ranks.  Third and possibly even less well known is the effectiveness of your CPC (Cost per Click) advertisement campaigns.   Google Adwords as well as many other online marketing tools take the load time of your landing page into account.  Longer page load time can result in lower quality scores for your keywords.

Let us examine an example.  You have a table in your database that holds information about various books.  That information is as follows: Author Name, Purchase Price, Sale Price,  Number of Copies in Stock, ISBN, Date Published, Publishing Company, Number of Pages, Blurb about the book.

On your home page you want to display a random book.  The information about the book you want to display is: Author Name, Date Published, Blurb.

Some developers will take a shortcut when writing the query to the database and simply ask for all information about all the books that are stored in the table.  Then they’ll pick a random book and the information they want about that book in their PHP code.   This causes several things to happen.  First, the query takes MUCH longer to execute because it has to return all the information about every book in the database.  Second, the PHP code has to deal with the massive amount of information.  Third,  significant strain is put on both your web server and your database server.  Fourth, the page takes much longer to load then it should.  That is the fast way, not the right way.

Two things can be done right off the bat to optimize this query.  First, instead of returning the entire tables worth of books, have the database server pick a book randomly and return only the information about that specific book.  There is no need to use PHP to do something that the database server itself can do.  Second, structure your SQL query so that you are asking for only the information you want.  Author name,  Date Published, Blurb.  This significantly reduces the strain on your database server and increases the speed at which the query executes.  It also increases the speed at which your PHP code can execute, as it is dealing with much less information.  It also doesn’t have to randomize that information, or sift through it.  It simply displays the result of the database query.

The example above may seem unrealistic, but it’s something we see time and time again when we take on new clients.  Some developers charge such a small fee that if they took the time to develop your site properly they wouldn’t make any money.  That is the proverbial catch.

There are many things that must be taken into account when your site is being developed for it to be as optimized as possible.  Properly structured and thought out database queries are just the tip of the iceberg.

PHP Code Optimization

Customer Service, PHP, Web Design 1 Comment »

In the past ten years computers have become so powerful that small performance tweaks and good coding standards and practices are overlooked. The reason for this is because coders have very little reason to care about coding standards and practices these days. It used to be that if you wrote sloppy code or didn’t take the time to optimize your code, you saw a drastic decrease in the performance of your program or script. Now that computers are as powerful as they are, even sloppy unoptimized code performs at such a high speed the loss of performance is barely noticeable.

At least that is what someone who writes code like that will tell you. At Storm Code we follow a best practices formula for writing optimized, performance driven code. If you run a small website with just a few scripts that are not often used, then you would notice very little difference (if any) between optimized code and unoptimized code. However, as your website grows in users and complexity the performance gap between unoptimized and optimized code grows larger quickly.

Several performance enhancing techniques can be used while coding. One of these examples is the use of single quotes instead of double quotes. An Example String using single quotes and double quotes in PHP:

echo ‘Hello World!’; // Single Quotes

echo “Hello World!”; // Double Quotes

In PHP, when using double quotes the parser looks for variables and formating information inside the String while using single quotes tells the parser not to look for variables and formatting information. Many coders use double quotes all the time for simplicity however this can cause a decrease in performance especially in large scripts that output a lot of information. Double quotes should only be used when formatting or variable matching is needed. This is one of many performance increasing best practices for PHP that Storm Code employs.

The main thing to remember is that doing something right the first time will save you having to redo it again down the road. Just because a website does not have a large user base or complex functionality right now, does not mean that it will not in the future and keeping performance and optimization in mind when coding, or hiring coders will not only save you money, but also headaches.

What can a database driven website do for you?

AJAX, Marketing, MySQL, PHP 1 Comment »

Some people hear the word Database and cringe at the complexity and cost of setting one up. There would have been cause for such a reaction ten, maybe even five years ago. Now however, in the age of MySQL, having Database support for a website is much less complex and time consuming.

MySQL was first released in 1995 and has since become one of the dominant web based database management systems (DMBS). PHP, Ruby on Rails, and ASP all support MySQL. Wikipedia runs on the MediaWiki software which is written in PHP and uses a MySQL database. MySQL is used for running many of the popular content management systems such as Joomla!, WordPress, and Drupal. For more information on MySQL history and documentation please visit Wikipedia

A database is integral for creating a dynamic website. Having a database supporting your website allows you to have features and functionality like user registration, blogs, statistics, content management, photo galleries, video galleries, searchable content, product tracking, e-commerce, and much more.

These days most web hosting providers (including Storm Code) offer MySQL as a standard feature of your web hosting package. Some providers offer unlimited MySQL databases, while others limit the number or size of the databases.

Creating a database is as simple as clicking a few buttons. The simplicity ends at that point though and the real work begins. Modeling out the Information Architecture of the Database takes both time and knowledge. A database must be normalized to prevent logical or structural problems, and normalization must be taken into account during the modeling phase of the database design. Normalization can be very tricky for an inexperienced designer and can cause severe problems and limitations in the future if not done correctly. For more information on Database Normalization read up at Wikipedia.

At Storm Code we have a team of experienced designers that understand the pitfalls and production delays caused by bad database design and we know how to avoid them. We have experience designing databases in many areas including but not limited to Real Esate and Automotive sales. If you are interested in speaking with one of our Project Managers about your existing database or a new project please refer to our Contact page.

Why AJAX is right for You

AJAX, Marketing, PHP, Web Design 1 Comment »

AJAX stands for Asynchronous JavaScript and XML. It’s not a new technology, but a new way of using existing technology. When AJAX is properly used it allows normal web applications to function in a way more consistent with desktop applications. It allows the web application to pass or request information from the web server without reloading the entire page. This makes web applications faster and more dynamic.

Two examples of websites that rely heavily on AJAX are Google’s Gmail (www.gmail.com) and Facebook (www.facebook.com). Without AJAX, it wouldn’t be possible for Gmail to update your inbox at the rate it does and Facebook wouldn’t be able to list completions to your friend search before you hit search.

Not only does AJAX allow you to create more dynamic pages, but it saves on load time. Instead of sending a request to the web server and then displaying the page the server returns, AJAX allows you to make small requests from the web server and then use Javascript to display that information on the page without having to reload it.

Load time isn’t the only thing you save by not having to reload the entire page every time a users wants to interact, it also saves you bandwidth. If your website was created with AJAX in mind the reduction in bandwidth usage compared to the same site without AJAX support would be significant. There are no figures to offer on actual bandwidth saved as every website is different. However, if a web page that is five kilobytes is reloading itself every time a user has to send one kilobyte of information, and the page that is reloaded is the same with the addition of just a success or failure message based on the users input, you would be saving four kilobytes of bandwidth every single time a user enters said information. If you have a thousand users that all use that page a single time using AJAX would save you roughly four megabytes of bandwidth and save your users precious time.

Upgrading to PHP 5

Customer Service, Marketing, PHP 1 Comment »

The biggest reason for upgrading from PHP4 to PHP5 is the end of life announcement made. As of December 2007 only critical security fixes will be made to PHP4. No support is being offered for PHP4 after August 2008.

Now is the time to migrate from PHP4 to PHP5. You do not want to wait until the last minute. As of right now you can migrate on your own terms, and take your time. The amount of difficulty in migrating from PHP4 to PHP5 will depend on your current code base. Some features enabled in PHP4 do not come enabled in PHP5 by default. Register Globals is one such feature.

PHP5 has the core functionality to support many of the new web technologies such as AJAX. Upgrading to PHP5 before August 2008 is a must. If you have a website that is still running PHP4, or you are not sure what version of PHP your website is running you need to find out. If you have access to your web server via FTP or a file manager do the following:

Open notepad (or equivalent text editor)

Enter the following code:

<?php

phpinfo();

?>

Save the file as phpinfo.php

Upload the file to your web server and execute it.

Displayed will be detailed information about your PHP build. You will see your current PHP version included with that information. If you are not using PHP5 and you wish to make the transition, please feel free to contact Storm Code and arrange for one of our project managers to take a look at your code base and give you an estimate on cost and time.