Windows Azure - Getting Started with PHP
Windows Azure for PHP

I created a framework in PHP, called Beam With Joy. It follows the MVC Programming pattern and I've been using it for a few months now, expanding on it, and using it for a variety of projects, from CMS System, to Analytical Systems, to full advanced web applications.

I've been developing a web application which I cannot give all the details, but it needed to be able to handle millions upon millions of rows of data. The old BWJ framework used an Eager Load methodology, I had it pre-load almost all the information you could ever possibly need. While this works fantastic for small amounts of data, when you get into the hundreds of thousands, to millions of data rows, it is impossible to use.

I restructured the framework into lazy-loading, meaning only the data that needs to be displayed will be actively loaded. For example, if I have 259K user accounts, I will only be displaying a page of 20, and not load the others. For this I used the dojox.data.Grid, I created JSON Rest Stores and linked it up, and now you can view quite easily a million + rows of data in a table, and it runs beautifully.

It turns out that Microsoft is interested in this project, and that it could one day be combined with an ongoing project they have been working on. In order for my side of things to connect with their side of things, I have to convert my project into a Windows Azure project.

Now, I am a .NET hater. I hate it absolutely, I think it is the worst programming language ever, so I was absolutely not thrilled when this news came about, however! Windows Azure not only supports PHP and Java (the 2 languages this particular application uses) but there was an extension for Eclipse to allow me to connect.

Setting up Eclipse

I had been using Eclipse for some time, I had all my wonderful plugins installed, Subversion support, Eclipse SQL, the PDT Plugin, etc. I followed the instructions on http://www.windowsazure4e.org/ added the update site, waited...and alas! It broke, couldn't find the dependencies. There was no support for this error anywhere, I spent many hours searching and trying things.

How did I solve it? You need to download the exact version of Eclipse they are using. Eclipse Helios is not supported, I highly suggest those who want to use Azure for PHP development, download the Eclipse Build they suggest, which is Galileo

After I figured out that was the problem, I got the Azure plugin to install successfully! Yay! I did the hello world application, and ran it in the Windows Azure Development Fabric – Which! Didn't go so well. I finally tracked it down to a problem with IIS. I had followed the instructions to a T and still, couldn't get it to go anywhere. Going to 127.0.0.1 in my browser did nothing.

I thought this might be a problem with WAMP being installed as well, but since it wasn't running couldn't think of how that could be. I then noticed that in IIS, the Default Website wasn't running. I right clicked it and told it to run. Nothing happened. The Problem, it turns out, after hours of searching, was Skype. When Skype is running, IIS doesn't like to (at least for the first run). I closed Skype, re started the Default Website and voila! It started up no problem.

Using Eclipse with the Windows Azure plugin I was able to start my Hello Azure application and get it running.

Setting up SQL Azure

SQL Azure

This application relies heavily on relational databases so the normal Table, Blob, etc that Azure offers as Data Storage wouldn't suffice. Luckily! They have SQL Azure, which is a SQL Server in the cloud.

For this I had to register an Azure Account (thought I could get away with not having one for a while) But I wanted to make sure it worked in the cloud, so after that very easy process, I had it up and running, and created my first SQL Instance on the cloud.

Eclipse has a very handy way of handling SQL Azure, when you create a new project (or migrate a previous project) you can set it to support SQL Azure. I did this and it created a SQLAzureSample.php which contained all the information I needed to know. Essentially it asks you to right-click on the WebRoll and go to Properties, Go down to Windows Azure, and configure the SQL Connect information. This automatically creates a connect.php file in your root directory.

I had a small problem connecting with the database, it turns out your username needs to include @domain, so for example, siosphere@c62swz6k2ha and it worked wonderfully. I was able to click Test Connection and it connected fine.

I then saved it, uploaded my Application to the Development Fabric and....Nothing. Got an error that it could not connect to host. I opened up SQLAzureSample.php and located the connection line, and saw that it didn't have any real error messaging. I tracked down the correct function which is sqlserv_errors(); and put that in there.

Turns out the error I was getting was that no Default Driver could be found. And in the error message it gave a link of where to get it, how convenient right? Wrong. The installer it downloaded opened up and then said that it wasn't supported on this processor. So I tried searching all over Microsoft's site to try to find the x64 version of this driver, but to no Avail.

I finally found a forum post that helped immensely and gave me a direct link to what I needed in the x64 Architecture. I have included these below:

After that was installed, and I submitted my application to go to the cloud, it worked and connected to the database flawlessly.

Now, I just need to update the full application to support this. So far I've gotten it to give me an 500 Error, so progress is coming.

I will post more at a later date, Thank you.

Beam With Joy Progress
Beam With Joy

More Progress on Beam With Joy. I have changed the Database model from what it was previously to a relational database. This will allow for quicker queries, and easier data management.

I use the InnoDB Database type and setup foreign key constraints, this makes it so that data within tables can be linked, and if I update data in Table A, if the fields are linked in Table B or Table C they will also update automatically. This is by a process called CASCADE

I also have been heavily modifying the AJAX calls in the framework. I have created ways using my data parser to refresh logs, mark completed, mark uncompleted, remove, and move data to another project. Currently this is implemented within the Checkmarks system and the Log system.

Project Groups is another addition to the project manager, it supports the ability for multiple groups however single groups is the only thing that is enabled at the moment.

The next step is the Project Data, this system will allow adding of custom data in custom data categories to your projects. Examples of this include, FTP Information, Social Accounts, Copy to be posted, and other data can be added and arranged.

Me and a fellow developer have brainstormed and decided we are going to add a "time-machine" feature, which will save all edits and deletions in the database, so that you can peak

Zombies of Zion

I have stumbled across an up and coming blog called Zombies Of Zion. It's about a zombie outbreak in Salt Lake City. I have high hopes for it. http://zombies-of-zion.blogspot.com/

Helping a Local Business with SEO

Utah-Mattress.com,

I started this website a month and a half ago, completely from scratch, as an SEO experiment and as a favor to my Fiancé's family. They did not know I was making the website, or was planning on making one, or anything of the sort. I simply wanted their volume of calls to increase dramatically and have no reason how that happened.

Originally I had purchased 3 domains, all targeting local keywords which would lead back to the main domain, which is a broader local keyword. It is very important, when targeting local SEO to have your domain contain your local key term as well as your product/service key term. I had to create the entire site without aid from them as I wanted it to be a complete surprise, so I had to research and write all the content myself. The important part of writing content is...content. Do not over-do the keywords, do not steal content from others, everything must be unique, and the more content there is the better.

Stage One

Initially I started with a 4 page site. Homepage, About Us Page, Inventory Page, and Contact Us. The homepage had a few call to actions, the phone number big and large (as the goal is to get them to call) a small contact form, a paragraph of text giving an overview of the company and the site and some latest promotions and sales.

The About us page expanded on the homepage text by providing a more in-depth look at the company and allowing for a lot more use of local keywords as well as product keywords. The Inventory page..initially had no content other than a coming soon, as I had no information on exactly what they carried other than the KSL ads they were posting. So that part had to come later. The goal is to get something up and starting to get ranked as soon as possible.

The contact us page allowed a chance to post directions, information on contacting them, and a CTA with a contact form.

All the content on the site was directed towards calling, call for latest prices, call for latest stock, call for more information, it is very important to stress a point without over-stressing a point. And my overall goal is to get them to call in.

I setup a tracking number so that I personally could track how many calls were coming from the website, and my good friends over at WiWorks helped me out. http://www.wiworksinc.com/call-tracking.php With the call tracking I could see how many people were calling, what times were peak times, etc. And if I got multiple call tracking numbers I could see which numbers on the site got the highest hits and start moving content around to reflect the best available options for generating leads.

Make sure you install analytics on your site. They are needed to see how your site grows and performs.

Stage Two

After I got the initial content and the site laid out, I started focusing on aesthetics, as we don't want just search bots looking at our website. So I did a redesign, added pretty flowers, and gradients. The important thing about design is KEEP IT MINIMAL! Do not overdo the graphics. You need FAST load times, both for SEO purposes and for general use of the website. Sites with HUGE amounts of graphics and large assets will not generate leads.

I then expanded on the content, originally I focused on mattresses only, but I wanted to expand on furniture. I redesigned the main CTA section of the site to allow bullet points of easy-access information that I wanted the customer to view. You have 7 seconds to capture their attention, as the average user spends 7-8 seconds viewing a page looking for what they want before they leave.

I added several CTA's targeting both mattresses and furniture. It is important to note that the CTA's need to appear above the fold for them to be effective. You lose out on up to 50% of clicks if you design for resolutions bigger than 1024X768, and you'll continue to lose potential leads the large the resolution you choose to have your site at. I suggest staying around 1024X768, but I personally design for 800X600. There is a lot you can do in a little space, and you are guaranteed to get the optimum number of clicks.

Using Keyword Research Tools and my own general knowledge of how search engines work, I re-wrote a lot of the content, meta-tags and alt-tags to better help my keyword efforts. And it greatly paid off. Within a week I climbed to the first page for a lot of my top terms.

I then started adding my site to directories and blogs to get inbound links. Inbound links are very very important to SEO. The more, relative inbound links you get, the better your site will rank for your terms.

In a month and a half, I generated 86 Calls, received 800 unique vistors to the site, and over 4200 page views. In just a short amount of time, I crawled to the top of the search engines for selected terms, and have made a big impact in a local business. More than half of those calls led to sales, and 40+ sales is a great big help, especially in these hard economic times.

Stage Three and the Future

SEO Is an organic process. It is constantly changing, and constantly evolving, and you have to continue to update content, add pages, and get inbound and outbound links. I constantly try new things, add new content, update old content, and update CTA's and CTA placement to see what converts the best.

The best thing you can do is constantly add content and keep your site dynamic and alive, while keeping it user friendly and accesible.

ENGAGED!

I am now engaged! YAY! Ha Ha, couldn't be happier.

Bored!

Got really bored. 10 Min with photoshop.

Really Really Bored.

New Piece Progress

Still working on the site, but wanted to post a new art piece

Siosphere for Bryttan
Welcome

Site is undergoing changes at the moment. Hold tight. I know..exciting, the one viewer (myself) can hardly contain themselves.