Wednesday 30 December 2009

AJAX - Theory

OK so one of the first thing that I would usually ask is what is AJAX. Well it stand for Asynchronous JavaScript And XML which basically means interacting with a web page using JavaScript in an Asynchronous way i.e. the JavaScript interacts with the webserver to change the contents of the static HTML page sort of on the fly. That been said the web browser interacts with the web server using a thing called HTTP requests (HyperText Transfer Protocols) and what this basically does is that the user enters a URL and the web browser sends a request to the web server requesting the contents of the page. The web server responds with by sending the marked up page with any client side scripts. Please note that for server side scripts such as PHP the scripts are executed on a PHP enabled server before the markup is sent back to the browser. Once the brower recieves the marked up page(HTML) and the scripts it executes the scripts and displays the web page to the user following the rules that have been set for it in the CSS and stuff.

Now AJAX is a funny concept, it is JavaScript in the sence that it is executed on the client side but it also communicates with the server to load bits and pieces of the page. The communication is usually triggered by a user action such as a click on a button or the pressing of a key on the keyboard or basically anything that JavaScript can acknownledge. The requests that are being made are through a method called XMLHttpRequest. Now traditionally this would mean only getting XML from the server but from what I understand you could ask for anything to be imported like XHTML.

Next up will be how to make a request and please do correct me if I go wrong anywhere :).

Web Development Tools

Hi guys hope everyone is doing well and ready to start learning. First of all let me just aplogize for the delay in putting up this tutorial for everyone, as it turns out that making tutorials is way harder than I originally thought. This tutorial may not be very useful to people who already have a foundation in web development, and I will basically be sharing the resources and tools I usually use for making my web pages and stuff.

Starting with the tools, you will most definately need a text editor and for those on Windows you should already have Notepad, for Linux regardless of the distro that you are running you should already have my favourite text editor called Gedit and lastly for Macs you should already have TextMate. For Windows however I would strongly recommend getting Notepad++ which gives you alot more functionality than Notepad. Notepad++ can be found at the File Hippo website and download the latest version. One more thing you definately need is a web server, I am using WAMP server for Windows, you can even get a MAMP server for Mac, a LAMP server for Linux (the link provided is to the instructions of how to install it) or if want to install on any machine at all simply install the XAMPP server.Since AJAX is a server side language you WILL HAVE TO INSTALL THE APPROPRIATE SERVER. Oh by the way still on the note of text editors there is no harm in using a WYSIWYG editor like Dreamweaver or the Visual Web Developer(which is free for the express edition) as long as you understand what you are doing. One more thing I would recommend getting if you already haven't got is Firefox because it has alot of nice addons and built in tools to debug your code.

I do understand that alot of times when we work on our own we don't really have anyone around to help us out and what I am going to do for that is build an archive as a side bar of useful websites for programming in general. On that topic though if you don't already know about it you should bookmark W3Schools on your favourite browser.

Now that you should be up and running the next post will be introduction to the AJAX way of thinking. Please do bare with me as I am not too good at giving tutorials so comments on these would be highly appreciated :).

Monday 28 December 2009

Samba and AJAX

Hi guys hope everyone is doing well and enjoying their holidays before the New Year :)... Now getting down to business... over the past like week or so I have been trying to get started on my courseworks and have had very little success, so I thought to myself "Hey I got a blog, why not post tutorials for myself and my ckassnates". In doing this is anyone with any knowledge on the subject is reafing the blog entries than they could correct me and plus if anyone can benefit from the tutorials than thats just basically a plus on both our sides :). So basically this post is just to let everyone know that the next couple of posts will be tutorials in both Samba and AJAX. So sit back relax and happy learning...