Sunday, 17 July 2011

Course Conclusion

This is the final post of this course, so I'll keep it a short one and just list my thoughts of the course as a whole.

I found this course to be highly beneficial for me as we have touched on vast material which I could use not only for my final project but for my line of work as a software developer, except Second life, which honestly I thought they were 3-4 wasted weeks on a technology that never took off and seems to never will, and I still find no use for it in work or life.

Having gone through topic ranging from HTML, CSS, JavaScript, PHP, HTML5, XML and Cloud Computing give me a much needed start in interesting topics that I could use, and having a base on this topics would help me understand quicker anything new I could need to do.

I even found Topics such as Accessibility and Social Networking, which are not exactly in my line of work, to be interesting and still useful as they still have an importance in life.

Finally I found the interaction between classmates and tutor to be pleasing as most of us of different experiences could provide valuable information and tips of these topic and others.

Cloud Computing

Introduction
  
Cloud computing is when using multiple servers via a digital network, to increase additional processing and computing power to a website or web application, to offer a lot different services. This is done by having the website, service or web application share its servers with a lot of other servers with other websites of various size and memory, and when 1 website suddenly becomes popular the cloud would automatically allocate more processing power and memory to handle those extra requests the website is now receiving.

Here is a diagram of various applications and services being offered on a cloud which any device through a secure connection can access.




Aspects of Cloud Computing

Here are important aspects of cloud computing and advantages and disadvantages of each aspect:

Hosted Apps and Platforms: Applications will be installed on the cloud instead of locally on the user’s machine, so as long the browser supports the features needed every application would run on any machine. So apart from disc space other advantages are access from anywhere, especially in today’s world where everyone is using smart phones with fast internet connections, on the user’s part and upgrading is now facilitated on the server side since once an application is updated on the cloud, everyone will have a new version.

A disadvantage of hosted apps is that the user will now have less control on the application. For example a new version of the application has completely changed the user interface and the user doesn’t like it, he still has to upgrade since the user interface has been upgraded on the cloud. Also another disadvantage is the over reliance on the internet connection which sometimes is not good enough for the user’s need. Also there are cases which applications need to have an offline mode in case the internet connection is disconnected such as a point of sale system.

Security: Although one would think that having items locally would be more secure, this is a common misconception. Using clouds would offload most of the security to a company whose job is to make your data as secure as possible. Think of it like a bank is to people’s money. But a disadvantage to this would be that everything on the cloud is now easier for a hacker to access, since he knows where it is.

Control: Although one wouldn’t quickly think of, Cloud Computing providers will have capabilities to get all data back from cloud without any additional costs, and as fast as possible should the user decide to get out of the idea.
       
Thinner Clients: The Clients machine will have less responsibility in terms of Processing and Memory, but clients are still getting more and more powerful so it is not a direct advantage of Cloud Computing.
                                     
         
Scalability: Cloud computing will have us think in a scalable fashion which is not always needed for a small company, but would be very beneficial for a fast growing one.
       
Costs: In some cases licenses are needed for short periods of time, so the best thing to do is to pay per use, a service which most Cloud Computing providers offer, although with incurring costs there is always a chance of making mistakes and having to pay more then you need to. Another thing which could be viewed as either good or bad, depending on your personal opinion, is that with these systems it is much harder to get away with software piracy.
                      
Legal: a problem with cloud computing being such a modern way of doing thing is that laws are not good enough or clearly defined enough to cope with this idea. All the ambiguity in laws would create problems in regards of privacy and define rules of what is permitted on the cloud.
       

Conclusion 

Cloud computing has many advantages that could help a user, but it still has a lot of ways which it can improve. Also better laws to help define what can and can’t be done on cloud computing is a must to remove any ambiguity of the use of cloud computing

Saturday, 16 July 2011

Social Networks

Introduction

Social Networking, the global phenomenon that made the internet the place where everyone tells their friends and even people they don’t know, what are they doing every minute of their life. Yes it can be bad, but there are also positives in it. They are a great way to promote events, shops, bands, competitions etc…

The amount of people using social networking sites are increasing by the second, also the networking sites used are increasing and the popular ones reach a peak before they begin to die slowly when people move to the “next big thing”.

Social networks existed ever since the internet was available to the general public, and has greatly evolved throughout the ages. This week we’ll see the past, the present and the future of social networking.
The Beginning
The first ever forms of Social Networks where called Bulletin Board System (BBS in short). These online “meeting places” allowed users to communicate with a central system where they could post messages to other users, or in some cases download files and games (which would take ages with the internet connections in those times). These primitive systems were often run by hobbyists using their modem, but these systems would only allow 1 person at a time to connect to it meaning usually you’ll have a time limit of how long you can access it per day.
After the BBS, in 1994 GeoCities was launched (first named Beverly Hills Internet). At first the users of this site would select a “city” or “neighborhood” in which to place their web pages. In 1995 the company running the website decided to give users the ability to develop free homepages within those “cities” or “neighborhoods”. The cities and neighborhoods were used to give the user a sequentially assigned “street address” to be used to make the URL unique. In 1999 GeoCities had an online shop called GeoCities Marketplace which sold GeoCities-branded merchandise. Users would cash in “GeoPoints” in the store.
Another social network called theGlobe.com, which gone public in 1998(although created in 1995) gave users the freedom to personalize their online experiences by publishing their own content and interacting with others with similar interests
Sixdegrees.com was another social network site, having the capability of having users create their own profile and listing friends.
Sharing of online content and media was first made possible with the social network called Friendster, which was launched in 2002.

Recent Social Network methods
Modern networking sites such as Myspace, hi5, Linked-in (used more for business), and Facebook where all launched between 2003 and 2004. A slightly more recent social network called Twitter was launched in 2006. Also another aspect of social networking is in online games such as Second life and World of Warcraft, which users take control of an avatar to explore the application’s world while communicating with others.
Today, Facebook has around an astonishing 630million users. Twitter has around 200million and myspace ha fallen behind at 63million.
The Future
An interesting new social network which is now in its beta testing phase is Google+. Its main features include the ability to add people in circles to filter contacts into groups for sharing items to specific groups of people only, and hangouts which are video chats that for now can hold up to 10 people simultaneously. For now new users can only enter the network with an invite from somebody who’s already in it. But this hasn’t stopped 10 million people to sign up to it in the first 2 weeks. Google+ is planned to go public to everyone on the 30th of July 2011.

Thursday, 7 July 2011

Web Development for Mobile Phones

Introduction

Once, mobile phones were a luxury, today with 5.3 billion (77% of the world’s population) mobile subscribers in the world (as of October 2010) mobile phones are a necessity.  Starting off as huge rugged machines that could only make phone calls and maybe send a text message, today’s mobile devices have internet capabilities, an enormous amount of applications for every imaginable use, high definition displays and cameras, touch screens and ever increasing processing power and memory.




Evolution of Mobile Phones

Here is a detailing the evolution Mobile phones have had throughout the years. 
  • Basic Mobile Phones – Rugged and very big and heavy. Only able to call someone and send SMS. Screens only available in Black and White
  • Low-end Mobile Devices – Limited memory, no touch support, but some had a very basic camera, and very basic web support. Also some had a music player which could only play 1 format of “music”.
  • Mid-end Mobile Devices – same as above but with some HTML-browser support in the web department (although still very incompatible with a lot of websites), better camera and music player, more memory (but still pretty limited), better colours and have some basic games installed.
  • High-end Mobile Devices – Higher camera mega pixels, Bluetooth, decent web support, more advanced features, 3G support, much better memory (usage of  micro SD cards etc) and processing power
  • Smartphones – full browser and html support.  3G or 4G support, Wi-Fi support, music player, GPS, Bluetooth, touch screens. Again better cameras, memory and processing power.
  • Non-phone Devices (Tablets) - Wi-Fi support, browsers and other features (depending on brand)




Mobile Phone Statistics

Here are some statistics on Mobile phones which I found to be quite interesting:

  • In 2010 6.5 trillion messages have been sent.
  • Apple launched the Appstore in July 2008 with 500 apps, by June 2010 over 225,000 apps were available.
  • 10.9 billion apps where downloaded in 2010 (not only from the Apple Appstore)
  • Around 160,000 new Andriod smartphones are being sold each day.
  • In 2010 6.2billion dollars was spent on apps, and it is estimated that in 2013 almost 30 billion will be spent on apps
  • Around 3.3billion dollars will be spent on mobile advertising in 2011
  • Users browsing the net with mobile phones are set to top users using PCs in 2013.


Internet Browsing on the Mobile Phone

Since this course is about is called Client/Server Web System Development for a reason. I am going to list the  different types of mobile phone web browsing:

  • Focus Navigation - using the arrow keys to scroll the websites and navigate between links.
  • Cursor Navigation – Using a mouse cursor, this is moved by using arrow keys
  • Touch Navigation – Using the user’s finger or a stylus. The Stylus will be more presice since the tip of the stylus is much smaller.
  • Multitouch Navigation – users may select more than one item at the same time.



Geolocation

For this week’s lab session, we made our smart phones and laptops use Geolocation. Geolocation  identifies an object's geographic location, which can be a radar, a computer terminal connected to the Internet or a mobile phone. The mobile phone I’ll be using Geolocation on, is my HTC Wildfire.
Using javascript, the userlocated() function was used as shown below to get the position of the device that run it. The latitude and longitude where found by using position.coords.latitude and position.coords.longitute. These where stored in variables along with a time stamp, which were then printed on the screen when the function was run. If any error occurred while running this function the error message would be displayed.






First I tried to run this on my mobile phone but nothing happened. Then I ran the script on Google Chrome and the message box with “1” as the message was displayed. Then I decided to run the script on Opera and finally the script worked and showed three numbers, the latitude the longitude and the timestamp.


Another more complex example of Geolocation can be found on www.html5demos.com/geo where the location found is shown to you a map. As I ran through the source code to find out how this is done, I discovered that this example used the IP address of the device to find the location, so it was not as accurate as possible.

Wednesday, 29 June 2011

HTML5 and CSS3

Introduction
Even if more and more websites are starting to implement features of HTML5 since most modern browsers have some HTML5 support, this new standard for HTML, XHTML, and the HTML DOM is still a work in progress. 

Apart from the obvious of having new features based on HTML, CSS and JavaScript, the main aim of HTML5 is to reduce the need for external plugins (such as Flash) and scripting, have better error handling and perhaps most importantly (at least in my view) is to be independent from any device.



New Features in HTML5



Since the web has changed so much since the previous version of HTML released in 1999 HTML 5 introduces a lot of new features, to make better use of web capabilities. Some of the most noted features include:
  • Video and Audio Elements for media playback
  • More and better support for local offline storage which is based on databases instead of cookies
  • A canvas element for drawing used for rendering of graphics or other visual images
  • New form controls to be used for error handling
  • Content specific elements (such as: article, footer, header, nav and section) to give pages more meaning
  • New form controls ( such as : calendar, date, time, email, url, search) to be used instead of standard textboxes when a specific format of input must be done.




Browser compatibility 

Unfortunately browsers still don’t have a standard which all follow, each and every one of them have different compatibility with HTML5. A good way to find out how much your browser supports HTML5 is to go the website called html5test.com with any browser. This will give your browser a score out of 450 and then give you a detailed explanation where your browser gained an lost points on HTML 5 standard and specifications.

I first tested this website using the latest version of Google Chrome (12.0.742.112), this scored a respectable 328 (plus 13 bonus points) out of a possible 450, being highly compatible in the areas of Parsing rules, the Canvas element, Video (with the exception of subtitles and MPEG-4 support), Audio, Elements, User interaction, Geolocation, WebGL, Communication, and Storage, while having completely no support of microdata, local multimedia and notifications. Google Chrome fared reasonably in the Forms, Security and Files sections.

As a comperision Internet Explorer 9 only scores a 141 (with 5 bonus points) out of 450. Even the default browser of an Android smart phone scored a slightly better 184.





CSS 3


CSS 3 is the latest standard for CSS, which was developed to go with HTML 5 and has a lot of new features to be used to style Web pages.

The first feature that I have come across is the additional functionalities of borders. With CSS3, you can create rounded borders, add shadows to boxes and use images as borders. Unfortunately not all browser support all these features, and most that do require a prefix in order for everything to work.

Here is an example of a rounded border:





*here the –webkit- prefix is used for Google Chrome and Safari

Another interesting feature is the text shadow effect which is very simple to use, the only parameters to give are the horizontal shadow, the vertical shadow, the blur distance, and the color of the shadow.

text-shadow: 5px 5px 5px #FF0000;

 
CSS 3 has also added the capability to use fonts which are not installed on the user’s machine, but use a source with a URL.


A complete new feature is the 2D Transformations with which one can move, scale, turn ,spin and stretch elements.

-webkit-transform: rotate(30deg);
-webkit-transform: matrix(0.866,0.5,-0.5,0.866,0,0);
-webkit-transform: skew(30deg,20deg);
-webkit-transform: scale(2,4);
 
There are also the 3D transformations but these only work on Google Chrome and Safari using the –webkit- prefix

Another function is the Transition function which is used to add an effect when changing from one style to another without using Flash or JavaScripts.

This example would make a div element stretch whenever the user moved the mouse on it.







  
 







Finally there are also animations which can replace animated images, Flash animations, and JavaScripts in many web pages.

An example is to have the background color of an element change gradually, or the position change. This is done by writing what needs to happen at certain points of the animation, and how long would the animation take to fully complete.

For example an element starts off with a blue background color and you want it to animate to green midway through the animation and finally end up yellow. And you want the animation to last 10 seconds.
So in this case the CSS would be:









Conclusion

I found out that HTML 5 has amazing potential with all its features, unortunatly not all browsers are really compatible with it ubt progress is being made. I also think with all the features of HTML5 and CCS3, Flash and Javascript may die in the future.



Thursday, 2 June 2011

Second Life (cont.) Building Objects and Scripting

Introduction

In this blog post we go into more detail in Second life and start building some objects in this virtual world. To start building in Second Life first you must go in a place in the world that allows the user to build. These places are called Sandboxes, it is only allowed to build in these Sandboxes and each Sandbox has its own rules such as you cannot build a wall around an avatar caging him being not able to get out without a teleport. Failure to abide these rules could result to a ban from Second life.

Building Objects

To Start building in the sandbox you right click the ground and select build from the menu shown this will make the building menu visible on the screen. Building is done by selecting shapes (prims) and placing them in the world. These shaped can be modified in shape, position and size as the user wants. Also multiple items can be linked together to form one object. This is done so that an Object will have more details to it and will look better.








The first object I created was a couple of boxes linked together to make a very bad looking chair that an avatar can sit on.  Every avatar can sit on your object if you are not currently editing it. I made sure that when an avatar will sit on my object, it will sit properly.






Also you can create objects and wear them on your avatar carrying them around where you go showing, while showing them to other people. For this I decided to create a simple War hammer for my Avatar to carry around. I used the cylinder type prim and a cuboid type prim and linking them together after positioning them carefully at the right place.


To wear the object, just right click it and select wear from the menu. I decided to put the object I created on the right hand of my avatar. When I selected this the hammer didn't slot in my avatar's right hand correctly so I adjusted its position as well as I could to make it look like my avatar is carrying the hammer in its hand while walking.









Scripting


Users in 2nd life use Linden Scripting language to script objects and have them interact with the rest of the virtual world. To script an object, right click it and choose edit to open the edit window. In the edit window you may select "more>>>" to reveal five tabs marked general, object, features, content, and texture. Then choose "content".  This window shows the contents of an object which can hold scripts, notecards, and even other objects. Press "new script" to add a new script. 

When scripting an item you have to tell the object what to do and when will it do it. Simple examples of what an object can do with script include:

  • Rez an object
  • Give something to an avatar
  • Say something in chat
  • Change the object's color
  • Change the object's texture
  • Prompt an avatar to load a URL in a web browser
  • Create hovering text
  • Play a sound
  • Move around



Amongst other situations these scripts could be performed in the following situations:

  • As soon as the script starts
  • When an avatar touches your object
  • On a repeating timer
  • When an avatar is nearby
  • When someone says something


             
Here is an example of a script of an object changing its color to red whenever somebody touches the object the script:


default
{


touch_start(integer total_number) {


// change color!
llSetColor(<1.0,0,0>,ALL_SIDES);


}


}






This following example will have the object say "Hello"  in the chat on every 30 seconds.


default
{


state_entry() {
llSetTimerEvent(30);
}
timer() {


// speak out loud!
llSay(0,"Hello");


}


}





After experimenting with these simple examples on the Hammer I created,  I decided to create some more simple objects.

First I started with a very simple chair that would be used to sit on. I just used a cube to sit on and a thin cuboid to make the back of the chair, I combined both objects and made the avatar sit on it.


Finally as my last 2 scripts I decided to give a new script to my hammer to send emails and make it open an internet browser at a specific webpage. 

The script used for the emails is as follows:


default  
{  
  touch_start(integer total_number) 
  {   
    llEmail( "danielsammut92@gmail.com", "Test", "Test" );  
  }  







And The script used to open a web browser to a webpage I desired is :




default  
{  
      touch_start(integer total_number) 
      {  
             llLoadURL(llDetectedKey(0), "view my blog",   "http://sammutdaniel.blogspot.com/");  
       }  
}




Both scripts are run whenever the object is touched.


Wednesday, 25 May 2011

Introduction to Second LIfe


Introduction


This week, we start out on something completely different from what we have done so far in this topic. After going through so many different Web technologies such as HTML, CSS, JavaScript and PHP we will now begin a few weeks working on Second Life.

Second Life is an online virtual world developed by Linden Lab launched in 2003, This is like a social networking website but instead of profiles people communicate with each other with the use of avatars. An avatar is a graphical representation of the user’s character. This is similar to many Multiplayer Online RPGs (Role-Playing Games) where a user has his own personalized avatar, meets with other people’s avatars on the network and then do stuff together.


What is different in Second Life then other Online Games and Networks is the ability to build stuff in the virtual world and then program it in any way you want. This could be anything from clothing to buildings to cars with each having its own individual use.



Installing and Logging In

To install the client program for Second life an account was created with Second life on the website creating a username and password with the username being used as the name of your avatar and a sample Avatar is chosen to start with which then could be fully customized to the users desires (except the username). After registering the client application is downloaded and installed.


After installing the application, one could log in by using the username and password chosen in the registration. Also you must chose to login in either Basic or Advanced Mode. The difference is that in Advance mode you could code using Linden Scripting Language and the menus are arraigned in a slightly different way. What I found to be quite puzzling is that before you log in if you change from Basic to Advance Mode or vice versa you have to close the application and restart it. Since at first I decided that I will just look a bit around to see how things work in Second Life I decided to run in Basic Mode.


What I found to be quite annoying in Second life is the massive loading time it took to load everyone’s Avatar and the terrain around you and I am using a laptop which I can run games which came out a month ago smoothly so I can only imagine in 2003 how much worse the loading times where at that time since the hardware wasn’t as good. When I saw this I decided to lower the graphics used as much as possible so that it will run smoothly but for some reason I could not find the edit menu item anywhere to change the graphics (see screenshot below) at least I found a shortcut to go to the preferences (ctrl + p) and I lowered the graphics. Although the application now was much smoother when walking around the loading times where still long to load everyone’s Avatar and the terrain when either logging in or teleporting to a new locations.


The World of Second Life

Apart from this when logging in the first time you will be taken to a place to learn the controls. I found that the hotkeys/shortcuts automatically set for the controls are much simpler to use then the actual controls detailed in this part by Second Life. For Example, the key that is used to fly (yes you can fly around in Second life) is told to be “Page Up” and to go back down to the ground is “Page Down”, while the hotkeys for this command is “e” and “c”. Also the same applies for moving, I much prefer the  WASD set up of the hotkeys then the arrow keys since the mouse is used a lot in this to click objects and interact with them.



Teleporting




Since I mentioned teleporting before, let me expand on that a bit.


In Second life you have a search where you can find your friends and add them to your friends list by sending them a request. Once this is done and the request is accepted you could have private chats with anyone in your friends list and also something which is helpful is that you could ask for a teleport to go near friends quickly instead of needing to chat and decide on a specific place to meet and then make sure it’s a place where your fiend will see your avatar.


Conclusion

To conclude this post, I decided to get a change of clothes so that I won’t look like a complete beginner. I right clicked my character and selected edit appearance and started messing around with the shape and clothes of my avatar. I changed his hair, his figure through the multiple menus and features and decided on a short and fat dwarf like shape with a big beard since all the general male avatar seemed tall and well built and I like to be different. Next week we’ll start building some objects and scripting