Oct
5
2009
I think I may have found it! A use for twitter the small business owner can use and a developer can push.
I recently had a task of making a small news section where the user can easily ad a small blurb about their business. The other requirement was for it to be simple to update as the user had no knowledge of HTML and was not very tech savvy. This is where twitter came in. They did not need long updates or uploads of images. And I didn’t want to create a table in a database, as frankly, the site was small and didn’t even have a database.
After creating a small tool awhile back to update my facebook status, and create a tweet at once, I was somewhat familiar with the twitter web service. So I created about 4 lines of PHP that contained the username and password of the twitter user to publish from, then retrieved a certain number of tweets. It then simply formatted it between divs to look like the rest of the page. Simple and easy!
This is a simple too I will most likely suggest to future clients. I will also look for ways to extend it.
no comments | posted in PHP, web sevices
Jan
19
2009
I have been working on the new PlasmaCAM site for awhile. It employs a number of technologies.
The home page was made using Flash. We made sure and added links at the top and bottom for SEO value. The home navigation of the slides were done using Actionscript 3. All the slides are called from a loading php page in Actionscript, and all the slides are separate SWF files. This allows the ability to create a new SWF file and ‘plug it in’ easily without making any changes to the loading SWF file or the php code.
The rest of the site is database content driven. This is going to allow the ability to change text without going into the html and changing it. It is the step PlasmaCAM needed in separating the content from the style.
Other parts of the site, such as the owners community, uses jQuery and ajax functions to save user data and perform client validation.
So far the result are favorable, the conversion rate has almost doubled and the length of visit has gone up by almost a minute. This has been pretty consistent as it was launched at the end of November.
no comments | posted in PHP, SEO, Web Design, Web Development
Sep
4
2008
Ive written ajax request the long handed way using the long hand way of a XMLHttpRequest. It can be tedious and frustrating. Don’t get me wrong, it works great but building this functionality can take a long time, just to avoid a page refresh.
This is where jQuery comes in handy. In a few lines of javascript you can create quick ajax requests. This is how its done:
1. Download the jQuery library and include this file in your head tag like so.
<script type=”text/javascript” src=”path-to-file/jquery.js”></script>
2. Create a php file that will be called and return value to the DOM. This can be a simple file that echos ‘Hello World’.
3. Create a page element that receives the markup. Here would be an example:
<div id=”loadedContent”></div>
4. Now that you have a php file that returns content, and a page element that can recieve the content you can now create the javascript/jQuery to make the ajax request and input the results into the DOM.
<script type=”text/javascript”>
$(document).ready(function () {
$.post(”hello-world.php”, function(data){
$(”#loadedContent”).html(data);
});
});
</script>
That’s it! On the page load it should request the page. You can go further by using simple click events and send simple name/value pairs using the same request. jQuery is simple and easy to use. If you have any questions please leave a comment.
no comments | posted in Javascript, PHP, Web Development