Archive for July, 2008

ICT governance

I wonder about ICT Governance. I will provide brief description about it in this post and in the other post I will describe different model of the ICT governance.  Standards Australia has recently released for comment a draft Australian standard for corporate Governance of information and communication technology. AS 8015 is the first in a series of Standards and companion publications being developed to provide guidelines for directors on the effective, efficient and acceptable use of Information and Communication Technology within their organisation? The standard proposes a framework of principles for senior officers to evaluate, direct and monitor the ICT functions ain their organisations. It encompasses authority, accountability, leaderships, direction and control exercised in the organisation. The standard forms part of the set of standards dealing with corporate governance and risk management and international standards for quality management. It is anticipated that it will provide the general framework on which to build subsequent standards relating, for example, to project governance of ICT and a standard for operation governance of ICT. The standard recognises that ICT is now integral to the successful operation of all organisations, whether pubic or private, for profit or not for profit, and large or small. One of its important goals is to create a common language so that all parties, including external providers, vendors and auditors, understand their responsibilities and obligations. It also aims to assist with legal compliance, given the growing areas of potential liability faced by managers, directors and other involved with ICT. The general framework of the standard enunciates seven principles of sound ICT governance:

·             Establish clearly understood responsibilities for ICT all levels.

·             Plan ICT to best support the organisation.

·             Ensure ICT is of the required quality.

·             Ensure ICT performs when required.

·             Ensure ICT conforms to formal rules.

 

Leave a Comment

master web application

I will do bookmark store which is contains WebPages links together with a title and keywords.

 

·        Read from XML file

·        Navigate through the content of XML file

·        Links can be listed by keyword or searched.

·        List all the links in the bookmarks store

 

 

 

Leave a Comment

Task 7 Json

What is JSON?

JSON stands for Javascript Object Notation which is a data structuring format that is extremely clean and lightweight. Even though JSON is native to javascript (as in, it can be turned into an object directly by javascript), it is quite easy to handle with other languages, making it an ideal replacement of XML when javascript is involved with the exchange of data (i.e. ajax).

an example tweet represented in JSON.

{“tweets” : [{”tweet”: {

”image”: ” http://image.jpg”,

”text”: ” blog seven task” ,

”name”: ” Hamood”,

”date”: ”19-4-2008”,

”time”: ”11:12:12”,

}

}

]}

XML

<tweets>

<tweet>

< image> http://image.jpg </image>

<text> blog seven task </text>

<name> Hamood</name>

<date> 19-4-2008</date>

<time> 11:12:12</time>

</tweet>

</tweets>

The script looks rather a lot like the XML script. It does the same things, it just reads out the data from another format. XML and JSON are similar in that they both store data in plain, easy to read text.

 JSON is different in that it uses a simpler format that is easier to understand. It is also easier to use because you do not need to go through the DOM to manipulate data like you do with XML.

Leave a Comment

Blogging Task 6 jQuery

Blogging Task 6

what is jQuery?

 

jQuery is a lightweight JavaScript library that emphasizes interaction between JavaScript and HTML.

jQuery contains the following features:

DOM element selections: DOM traversal and modification  

CSS manipulation Effects and animations

Ajax Extensibility Utilities – such as browser version and the each function.

 

what does minify mean?

 

Minification is the practice of removing unnecessary characters from code to reduce its size thereby improving load times. When code is minified all comments are removed, as well as unneeded white space characters (space, newline, and tab). In the case of JavaScript, this improves response time performance because the size of the downloaded file is reduced. Two popular tools for minifying JavaScript code are JSMin and YUI Compress.

 

Explain the following code and how it differs from using the onload event pattern? $(document).ready(function(){ // Your code here });

As almost everything we do when using jQuery reads or manipulates the document object model (DOM), we need to make sure that we start adding events etc. as soon as the DOM is ready. To do this, we register a ready event for the document. This code differs form the javascript onload event in that it declares the onload event in the function declaration. In javascript users must declare the onload event and the function separtely in different locations.

 

Chainability

Basically, what chainability means is that you can perform some method on an object and then immediately follow that result with a dot and a new method acting on what was returned. This leads to the nice possibility of writing short, concise and easy-to-understand code like this:

$(“container”).elmsByClass(“mandatory”).addEvent(“blur”, validateInput);

The code above finds all the elements with the CSS class “mandatory” amongst the children of an element named “container”. It then loops through all of the returned elements and applies an onblur event to them to call a function named validateInput.

 

Explain the following code and its connection with AJAX?

jQuary  is a fast, concise JavaScript library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. jQuery is designed to change the way that you write JavaScript, but it can be only used on the client-side JavaScript code. That means you need a framework on the server-side code if you want to add Ajax interactions to your web pages.

 

 

Leave a Comment

JavaScript

Overview of JavaScript

 

  • A lightweight programming language that runs in a Web browser
  • (client-side).
  •  Embedded in HTML files and can manipulate the HTML itself.
  •  Interpreted, not compiled.
  • JavaScript is not Java.

ü      Developed by Netscape, not Sun.

ü      Only executed in a browser.

ü      Is not a full-featured programming language.

ü      However, the syntax is similar.

 

Why use JavaScript?

  • To add dynamic function to your HTML.

ü      JavaScript does things that HTML can’t—like logic.

ü      You can change HTML on the fly.

  •  To shoulder some of the form-processing burden.

ü      JavaScript runs in the browser, not on the Web server.

  •  Better performance

ü      JavaScript can validate the data that users enter into the form, before it is

  • sent to your Web application

 

 

When not to use JavaScript

  •  When you need to access other resources. Files ,Programs , Databases
  •  When you are using sensitive or copyrighted data or algorithms. Your JavaScript code is open to the public.

 

Events

JavaScript is event-driven.

ü      Something has to happen before the JavaScript is executed.

JavaScript defines various events:

ü      onClick – link or image is clicked

ü      onSubmit – a form is submitted

ü      onMouseOver – the mouse cursor moves over it

ü      onChange – a form control is changed

ü      onLoad – something gets loaded in the browser

ü      etc.

Events are specified in the HTML code.

 

Form validation

  •  Have JavaScript validate data for the server-side
  • Program—more efficient.

ü      Processing done on the client.

ü      Data sent to server only once.

ü      JavaScript can update the original HTML if errors occur—

  • server-side program would have to regenerate the HTML page.

ü      Server-side program gets the data in the format it needs.

 

  • Add an onSubmit event for the form.
  • Use the return keyword to get an answer back
  • from JavaScript about whether the data is valid or
  • not.

ü      return false: server-side program is not called, and the user must fix the field(s).

ü      return true: the valid data is sent to the server-side program.

 

Leave a Comment

XHTML

n      XHTML stands for Extensible Hypertext Markup Language

      XHTML is aimed to replace HTML

      XHTML is almost identical to HTML 4.01

      XHTML is a stricter and cleaner version of HTML

n      XML (Extensible Markup Language) is a markup language designed for describing data

      XHTML is HTML redefined as an XML application

      XHTML is a “bridge” between HTML and XML

 

The problem with HTML

 

n      HTML started out as a way of way of describing the structure of documents, with tags to indicate headers, paragraphs, and the like

n      Because people wanted to control the appearance of documents, HTML acquired tags to control fonts, alignment, etc.

n      The result is a markup language that does both, but isn’t very good at either

 

HTML vs. XML

 

HTML

XML

 

HTML uses a fixed set of tags

 

With XML you make up your own tags (and define what they mean in a separate document)

 

HTML is designed to display data to humans

 

XML is designed to describe data to computers

 

Browsers are very tolerant of errors in HTML

 

XML documents must be well-formed (syntactically correct)

 

All browsers can display HTML

 

Most modern browsers can display XML

 

 

 

From HTML to XHTML

 

n      XHTML elements must be properly nested

           <b><i>bold and italic</b></i> is wrong

n      XHTML documents must be well-formed

           <html>
<head> … </head>
<body> … </body>
</html>

n      Tag names must be in lowercase

n      All XHTML elements must be closed

           If an HTML tag is not a container, close it like this:
<br />, <hr />, <image src=”smile.gif” />

 

n      Attribute names must also be in lower case

     Example: <table width=”100%”>

n      Attribute values must be quoted

      Example: <table width=“100%”>

n      Attribute minimization is forbidden

      Example: <frame noresize=”noresize”>,
cannot be abbreviated to <frame noresize>

n      The id attribute replaces the name attribute

      Wrong: <img src=”picture.gif” name=”picture1″ />

      Right:   <img src=”picture.gif” id=”picture1″ />

      Best:     <img src=”picture.gif” name=”picture1″ id=”picture1″ />

 

 

An XHTML Example

      <!DOCTYPE html PUBLIC
“-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html>
    <head>
        <title>A simple document</title>
    </head>
    <body>
        <p>A simple paragraph.</p>
    </body>
</html>

 

Leave a Comment

Blogging Task 5 AJAX

 

What does AJAX stand for and when did this name come into existence?

 

·        AJAX stands for Asynchronous JavaScript and XML.

·        AJAX is a way of developing Web applications that combines:

·        XHTML and CSS standards based presentation

·        Interaction with the page through the DOM

·        Data interchange with XML and XSLT

·        Asynchronous data retrieval with XMLHttpRequest

·        JavaScript to tie it all together

·        AJAX was first pioneered by Microsoft in their Outlook Web Access interface. The techniques have been in use since around 1998, but have really only become popular since the beginning on 2005.

 

The first ‘A’ in AJAX stands for asynchronous. Explain what this means.

 

This is the key. In standard Web applications, the interaction between the customer and the server is synchronous. This means that one has to happen after the other. If a customer clicks a link, the request is sent to the server, which then sends the results back.

With Ajax, the JavaScript that is loaded when the page loads handles most of the basic tasks such as data validation and manipulation, as well as display rendering the Ajax engine handles without a trip to the server. At the same time that it is making display changes for the customer, it is sending data back and forth to the server. But the data transfer is not dependent upon actions of the customer.

meaning that the client and server must work independently – and communicate independently

 

What exactly is XMLHTTPRequest?

 

XMLHttpRequest (XHR) is an API that can be used by JavaScript and other web browser scripting languages to transfer XML and other text data between a web server and a browser. Though it can do synchronous fetches, it is virtually always asynchronous, due to the greater UI responsiveness.

 

The data returned from XMLHttpRequest calls will often be provided by back-end databases. Besides XML, XMLHttpRequest can be used to fetch data in other formats such as HTML, JSON or plain text.

 

XMLHttpRequest is an important part of the Ajax web development technique, and it is used by many websites to implement responsive and dynamic web applications. Examples of web applications that make use of XMLHttpRequest include Google Maps, Windows Live’s Virtual Earth, the MapQuest dynamic map interface, Facebook, and many others.

 

 

Explain how Firefox and IE treat this differently.?

 

There is a difference in how and when the cached data is revalidated between Internet Explorer and Firefox . Firefox revalidates the cached response every time the page is refreshed, issuing an “If-Modified-Since” header with value set to the value of the “Last-Modified” header of the cached response.

Internet Explorer does so only if the cached response is expired (i.e., after the date of received “Expires” header). This raises some issues, and it is  widely believed that a bug exists in Internet Explorer, and the cached  response is never refreshed. It is possible to unify the caching behavior on the client. Also IE, if the open method is called after setting the onreadystatechange callback, there will be a problem when trying to reuse the XHR object. To be able to reuse the XHR object properly, use the open method first and set onreadystatechange later. This happens because IE resets the object implicitly in the open method if the status is ‘completed

.

 

What role does the property readyState play in the use of XMLHTTPRequest?

 

readyState  : Retrieves the current state of the request operation.

·        0 = uninitialized – open() has not yet been called.

·        1 = open – send() has not yet been called.

·        2 = sent – send() has been called, headers and status are available.

·        3 = receiving – Downloading, responseText holds partial data (although this functionality is not available in IE [2])

·        4 = loaded – Finished.

 

readyState 4 is equivalent to the load event and is a standard part of any xmlhttp script. ready state property tells you what’s going on XMLHttpRequest object as it is downloading data .

 

Here is a cross-browser general purpose example of an                             AJAX/XMLHttpRequest JavaScript function

 

function ajax(url, vars, callbackFunction) {

  var request =  new XMLHttpRequest();

  request.open(“POST”, url, true);

  request.setRequestHeader(“Content-Type”,

                           “application/x-javascript;”);

 

  request.onreadystatechange = function() {

    if (request.readyState == 4 && request.status == 200) {

      if (request.responseText) {

        callbackFunction(request.responseText);

      }

    }

  };

  request.send(vars);

}

 

 

In summary, what is the major benefit of using XMLHTTPRequest?

 

Ø     One main benefit of XmlHttp over all other methods is that it doesn’t invoke the browser’s navigation system. So, for example, the “throbber” in the top right of the browser doesn’t animate, the progress bar does not progress, and the stop button doesn’t become active. XmlHttp is completely invisible to the user.

 

Ø     at XmlHttp can easily and compatibly receive any textual data as a response. What type of response to send is an important thing to consider, as it will impact the performance, compatibility, and extensibility of your application.

 

Ø     Fast, returns any type of data, invisible to user.

 

http://en.wikipedia.org/wiki/XMLHttpRequest

http://www.ajaxtraining.blogspot.com/2007/12/xmlhttprequest-object-readystate.html

http://developer.mozilla.org/en/docs/AJAX

 

 

 

 

 

 

 

Leave a Comment

WHY XML

WHY XML

  • XML stands for Extensible Markup Language
  • XML was designed to transport and store data, with focus on what data is.
  • HTML was designed to display data, with focus on how data looks.
  • HTML is about displaying information,
  • XML is about carrying information.
  • XML is a markup language much like HTML
  • XML tags are not predefined. You must define your own tags
  • XML is designed to be self-descriptive

 

How XML complements HTML

  • XML Separates Data from HTML

If you need to display dynamic data in your HTML document, it will take a lot of work to edit the HTML each time the data changes. With XML, data can be stored in separate XML files. This way you can concentrate on using HTML for layout and display, and be sure that changes in the underlying data will not require any changes to the HTML. With a few lines of JavaScript, you can read an external XML file and update the data content of your HTML.

  • XML Simplifies Data Sharing

In the real world, computer systems and databases contain data in incompatible formats.XML data is stored in plain text format. This provides a software- and hardware-independent way of storing data. This makes it much easier to create data that different applications can share.

  • XML Simplifies Data Transport

With XML, data can easily be exchanged between incompatible systems. One of the most time-consuming challenges for developers is to exchange data between incompatible systems over the Internet. Exchanging data as XML greatly reduces this complexity, since the data can be read by different incompatible applications.

  • XML is Used to Create New Internet Languages

A lot of new Internet languages are created with XML.

Examples:

ü      XHTML the latest version of HTML 

ü      RSS languages for news feeds

 

Advantages of XML

·        It is text-based.

·        It can represent common computer science data structures : records, lists and tress

·        Its self documenting describes structure and field names as well as specific values.

·        XML is heavily used as a format for document storage and processing, both online and offline.

·        It can be updated incrementally.

·        It is platform-independent, thus relatively immune to changes in technology.

·        Forward and backward compatibility are relatively easy to maintain despite changes in DTD or Schema.

 

Disadvantages of XML

  • XML syntax is redundant or large relative to binary representations of similar data especially with tabular data.
  • The redundancy may affect application efficiency through higher storage, transmission and processing costs
  • XML syntax is verbose, especially for human readers, relative to other alternative text-based data transmission formats.
  • The distinction between content and attributes in XML seems unnatural to some and makes designing XML data structures harder

 

XML in Real Life

  • XML News: XML News is a specification for exchanging news and other information. Using such a standard makes it easier for both news producers and news consumers to produce, receive, and archive any kind of news information across different hardware, software, and programming languages.
  • XML Weather Service

 

Leave a Comment

« Newer Posts