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...

Saturday 26 December 2009

Merry Christmas

Hi guys. First of all a very Merry Christmas to everyone and also a very happy Shahidi of Chote Sahibzade. For those not too familiar with the second event please click here to go to the Wiki page. Know as this is just my second post I would like to let everyone know that the contents of the blog will most probably be changing with each new post and I will be taking any requests for topics to cover via email or any other way you can get your suggestion to me.

Now a small update... I finally got a new laptop so "Yippeee" and Dhan Guru Nanak, and like most geeks out there I took my own sweet time in customising and getting well versed with my new Windows 7 PC and am loving every minute of it. Now that I have a new PC I will most definately try and be much more regular with new posts. As for my old lovely laptop... well I finally got it running again but it doesn't seem like it will be alive for too long I am still trying to make every minute I have with it count by installing Ubuntu 9.10 on it as the primary OS.

Anyway I am finally shifting gears from repairing PC to studies mode and I really want to finish my assignments before the new year so that I can start revisions for the exams and get to spend some time with my cousins :). Until next time take care guys and please check back for updates.

Monday 21 December 2009

Ammm... :'(

Hi guys. I am sorry sad starting this new blog at a very sad note... You see about 4 years ago something pretty wicked happened in Canada, I bought my very first Toshiba laptop. Ahhh those were the days I just fell in love with it the moment I laid my eyes on it, and I remember that day like it was yesterday. Microsoft was on the verge of releasing its latest Operating System, Windows Vista. At that time I was really excited especially seeing how much I liked XP. Anyway cutting the whole story short my laptop who I lovingly called my "WIFE" is officially dead and I am really really really sad.

I should post something nice after getting a new one because typing from my phone is honestly not fun anymore.