Entries Tagged 'Ajax' ↓

Ajax versus Socket Connections

Ever have to argue Ajax versus Socket Connections? Me either. Today, I had the chance to talk about the differences, their advantages and their disadvantages.

Ajax has many advantages. You do not have to parse content/page headers, you can parse XML, you can build objects out of JSON serializations, and above all there are a lot of frameworks that are cross-browser friendly so you do not have to worry about writing the framework yourself.

A Socket Connections’ advantages are much smaller in my opinion. There is no browser limitations, which is a major advantage, keeping it browser independent. It can support any type of response content, JSON serializations, XML, HTML, strings, etc.

So what about the disadvantages? Ajax has the complications of cross-browser friendliness, but that has been removed by frameworks doing all that hard work for us. Ajax’s biggest disadvantage is probably the lack of JavaScript standards being followed by each browser. Though this is removed by using popular frameworks, it matters for the rest of your JavaScript code to setup the Ajax event.

So how about Socket Connections? Socket Connection have the complication of trying to figure out where the response data starts and where the response headers end. Secondly, they are language dependent. Not all languages support sockets and some may make it very complicated to use them though, whereas, Ajax is getting easier and easier to use.

What are your thoughts?

Fun with Kiosk

I am having a blast writing some of the things in kiosk. I have put in a few things, I am fairly certain no one has done before. The use of AJAX is completely written throughout the application and it has allowed the application to be placed on a level like no other.

For example, imagine having the ability to upload 1000 images for all of your products using cpCommerce or a different cart variant. You would have to upload them individually. Now, take a look at how kiosk handles it.

Kiosk Image Area Let’s take a look at the Kiosk Image Area located in the Administration Area. This area has many options, but look at the intriguing “Find FTP’d Images”. Now that is what I am talking about!


Kiosk Image Folder Now, this is the folder where the images are stored in Kiosk. Look carefully, and you will see a folder named “FTP”. This is the folder where your 1000 images should be uploaded to.


Kiosk Image Folder With Images To show you that this works, I have placed over 600 images in the folder! I realize that isn’t exactly 1000, but it should be enough to prove it will work with 1000 as well. Now, that I have the images placed, I need to head back to the Administration Area to complete this process.


Kiosk Image Inserting the Images Back in the Images Administration Area, I clicked on the “Find FTP’d Images” and this is what you will be presented with! Now realize, only one process of this is able to run at a time. So if you have 4 people updating the store, when one person runs this command, it will prevent the other 3 from running it too. With that said, the process also checks to see where in the process it is. For example, it checks every few seconds to see if it is finished inserting the images, or if it is still running. Now, I know what you are thinking. What about the Time Out Limit in PHP? How do you get around that? Well that is my secret and you can’t figure it out unless you pull down the Source Code from the SVN Repository.


Kiosk Image Inserting the Images Complete Finally, when it is all said and done, you the user are prompted with this final screen. The process is complete.


Kiosk Image Listing Upon clicking on “Close” it will reload the page to show all of your images now listed within the application. That’s it! It doesn’t get any easier than that! Feel free to comment and leave your remarks, as this is going to make kiosk stand out from Joe Smoe and you got my word on that!


kiosk Development

kiosk is progressing very well. I have started the programming some of the more significant portions of the project, such as, uploading Image, and creating Categories. Unlike cpCommerce images will not be handled during the Category, Product, Manufacturer, etc. creation. Instead, it is its’ own section. Why? This way you can upload all of your images via FTP, click a nice little link stating “Find Uploaded Images” and it will insert them into your database for you. Then all you have to do is assign them to a Product, Category, Manufacturer, or Both, or All Three!

Images are entirely reusable. So if you want to show a Product’s Image as the Category Image too, YOU CAN! And you can do it without uploading another file! I like to think kiosk is taking what cpCommerce started and taking it to a whole new level learning from its’ mistakes, and hopefully you all agree.

Well that is enough on that for now, I will update everyone once again, when I have these sections entirely done. Then you can pull it from the kiosk subversion repository and give it a try yourself.