Sty - COMPUTER ENGINEERING
It's all about Internet, Security, Vulnerability, Programming, Networking, Software, and also Open Source Software. May this weblog can be your source of IT 's articles.
Showing posts with label Internet. Show all posts
Showing posts with label Internet. Show all posts

Introduction

The term Ajax is used to describe a set of technologies that allow browsers to provide users with a more natural browsing experience. Before Ajax, Web sites forced their users into the submit/wait/redisplay paradigm, where the user 's actions were always synchronized with the server 's "think time". Ajax provides the ability to communicate with the server asynchronously, thereby freeing the user experience from the request/response cycle. With Ajax, when a user clicks a button, you can use JavaScript and DHTML to immediately update the UI, and spawn an asynchronous request to the server to perform an update or query a database. When the request returns, you can then use JavaScript and CSS to update your UI accordingly without refreshing the entire page. Most importantly, users don't even know your code is communicating with the server: the Web site feels like it's instantly responding.

While the infrastructure needed by Ajax has been available for a while, it is only recently that the true power of asynchronous requests has been leveraged. The ability to have an extremely responsive Web site is exciting as it finally allows developers and designers to create "desktop-like" usability with the standard HTML/CSS/JavaScript stack.

Defining Ajax

Jesse James Garrett at Adaptive Path defined Ajax as follows:

Ajax isn't a technology. It's really several technologies, each flourishing in its own right, coming together in powerful new ways. Ajax incorporates:

  • Standards-based presentation using XHTML and CSS
  • Dynamic display and interaction using the Document Object Model
  • Asynchronous server communication using XMLHttpRequest
  • JavaScript binding everything together

This is all fine and dandy, but why the name Ajax? Well, the term Ajax was coined by Jesse James Garrett, and as he puts it, it is "short-hand for Asynchronous JavaScript + XML."

How Does Ajax Work?

The kernel of Ajax is the XmlHttpRequest JavaScript object. This JavaScript object was originally introduced in Internet Explorer 5, and it is the enabling technology that allows asynchronous requests. In short, XmlHttpRequest lets you use JavaScript to make a request to the server and process the response without blocking the user.

By performing screen updates on the client, you have a great amount of flexibility when it comes to creating your Web site. Here are some ideas for what you can accomplish with Ajax:

  • Dynamically update the totals on your shopping cart without forcing the user to click Update and wait for the server to resend the entire page.
  • Increase site performance by reducing the amount of data downloaded from the server. For example, on Amazon's shopping cart page, when I update the quantity of an item in my basket, the entire page is reloaded, which forces 32K of data to be downloaded. If you use Ajax to calculate the new total, the server can respond with just the new total value, thereby reducing the required bandwidth 100 fold.
  • Eliminate page refreshes every time there is user input. For example, if the user clicks Next on a paginated list, Ajax allows you to just refresh the list with the server data, instead of redrawing the entire page.
  • Edit table data directly in place, without requiring the user to navigate to a new page to edit the data. With Ajax, when the user clicks Edit, you can redraw the static table into a table with editable contents. Once the user clicks Done, you can spawn an Ajax request to update the server, and redraw the table to have static, display-only data.

The possibilities are endless! Hopefully you are excited to get started developing your own Ajax-based site. Before we start, however, let's review an existing Web site that follows the old paradigm of submit/wait/redisplay and discuss how Ajax can improve the user's experience.

Sty - Knowledge is Free
Read More..

The Semantic Web is a web of data. There is lots of data we all use every day, and its not part of the web. I can see my bank statements on the web, and my photographs, and I can see my appointments in a calendar. But can I see my photos in a calendar to see what I was doing when I took them? Can I see bank statement lines in a calendar?

Why not? Because we don't have a web of data. Because data is controlled by applications, and each application keeps it to itself.
The Semantic Web is about two things. It is about common formats for integration and combination of data drawn from diverse sources, where on the original Web mainly concentrated on the interchange of documents. It is also about language for recording how the data relates to real world objects. That allows a person, or a machine, to start off in one database, and then move through an unending set of databases which are connected not by wires but by being about the same thing.

Humans are capable of using the Web to carry out tasks such as finding the Finnish word for "car", to reserve a library book, or to search for the cheapest DVD and buy it. However, a computer cannot accomplish the same tasks without human direction because web pages are designed to be read by people, not machines. The semantic web is a vision of information that is understandable by computers, so that they can perform more of the tedious work involved in finding, sharing and combining information on the web.

For example, a computer might be instructed to list the prices of flat screen HDTVs larger than 40 inches with 1080p resolution at shops in the nearest town that are open until 8pm on Tuesday evenings. Today, this task requires search engines that are individually tailored to every website being searched. The semantic web provides a common standard (RDF) for websites to publish the relevant information in a more readily machine-processable and integratable form.
Read More..

After you read my article few days ago, XML - Introduction to XML Programming, now you have an understanding of what XML is and how it works, it’s time to learn how to apply your knowledge and design your own set of XML markup tags, and then use those tags to write your first XML document. In this article, you’ll learn step-by-step how to do this, along with other design features, to build a working XML document that enables you to share information electronically among various applications.
This section follows an old programmer’s tradition of introducing a new language with a program that prints “Hello World” on the console. XML is a markup language, not a programming language; but the basic principle still applies. Let’s do that.

Creating a Simple XML Document

In this section, you’ll create a simple XML document and save it in a file. Code below is about the simplest XML document I can imagine, so start with it. You can type this document in any convenient text editor, such as Notepad, G-Edit, or Emacs.

Hello.xml

<?xml version=”1.0”?>
<root>
Hello XML!
</root>


That code is very simple, but it is a good XML document. To be more precise, it is a well-formed XML document. XML has special terms for documents that it considers “good” depending on exactly which set of rules they satisfy. “Well formed” is one of those terms, but we’ll get to that later.

Loading the XML File into a Web Browser

Now that you’ve created your first XML document, you’re going to want to look at it. You can open the file directly in a browser that supports XML such as Internet Explorer 5.0 or later. Figure at below shows the result; display Hello.xml in Internet Explorer 6.0.

XML in Browser

Congratulation you finally done your first XML document. Now you’re ready to continue for more advance topic of XML. Ha ha, it’s very little knowledge about XML, but it’s very useful to you, especially the root tag, so don’t be underestimate with those tag, I’ve tell you. See you in next article about XML, DTD – Document Type Definitions.

Sty – Knowledge is Free
Read More..

What is XML?

The following points can explain the purpose of XML.

  • XML stands for eXtensible Markup Language
  • XML is a markup language much like HTML.
  • XML was designed to describe data.
  • XML tags are not predefined in XML. You must define your own tags.
  • XML uses a DTD (Document Type Definition) to describe the data.
  • XML with a DTD is designed to be self describing.

It is important to understand that XML is not a replacement for HTML. The main purpose of HTML is the Format the Data that is presented through Browser. The purpose of XML is not to Format the Data to be displayed. It's mostly used to store and transfer data and to describe the data. It is device or language independent and can be used for Transmitting Data to any device. The Parser (Or the Program which is capable of understanding the Tags and returning the Text in a Valid Format) on the corresponding device will help in displaying the data in required format.

You can define your own tags in XML file. The way these tags will be interpreted will depend on the program which is going to get this XML file. The data embedded within these tags will be used according to logic implemented in the secondary program which is going to get this XML as feed. This point will be clearer when we start explaining you about how to use the Parsers in next few paragraphs.

XML Declarations

Most of the XML tags have a name associated with it. Here we explain different terms used to indicate the Elements defined in the XML file.

Well Formed Tags:

One of the most important features of a XML file is it should be a Well Formed File. What it means is all the tags should have a closing tag. In a HTML file, for some tags like <br> we don't have to specify a closing tag called </br>. Where as in a XML file, it is compulsory to have a closing tag. So we have to declare <br></br> or <br/>. This are what called as Well Formed Tags.

Elements and Attributes:

Each tag in a XML file can have elements and attributes. Here's how a typical tag looks like.

<Email
to="
admin@mydomain.com"
from=
"user@mySite.com"
subject="Introducing XML">

</Email>

In this example, Email is called as Element. This element called Email has three attributes, to, from and subject.

The Following Rules need to be followed while declaring the XML Elements Names:

  • Names can contain letters, numbers, and other characters
  • Names must not start with a number or "_" (underscore)
  • Names must not start with the letters xml (or XML or Xml ..)
  • Names can not contain spaces

Any name can be used, no words are reserved, but the idea is to make names descriptive. Names with an underscore separator are nice.

Examples: <author_name>, <published_date>.

Avoid "-" and "." in names. It could be a mess if your software tried to subtract name from first (author-name) or think that "name" is a property of the object "author" (author.name).

Element names can be as long as you like, but don't exaggerate. Names should be short and simple, like this: <author_name> not like this <name_of_the_author> .

XML documents often have a parallel database, where fieldnames parallel with element names. A good rule is to use the naming rules of your databases.

Non-English letters like éòá are perfectly legal in XML element names, but watch out for problems if your software vendor doesn't support it.

The ":" should not be used in element names because it is reserved to be used for something called namespaces.

Empty Tags:

In cases where you don't have to provide any sub tags, you can close the tag, by providing a "/" to the Closing Tag. For example declaring

<Text></Text> is same a declaring <Text/>

Comments in XML File:

Comments in XML file are declared the same way as Comments in HTML File.

<Text>Welcome To XML Tutorial</Text>
<!-- This is a comment -->
<Subject/>

The XML Prolog

XML file always starts with a prolog. The minimal prolog contains a declaration that identifies the document as an XML document, like this:

<?xml version="1.0"?>

The declaration may also contain additional information, like this:

<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
  

The XML declaration may contain the following attributes:

version

Identifies the version of the XML markup language used in the data. This attribute is not optional.

encoding

Identifies the character set used to encode the data. "ISO-8859-1" is "Latin-1" the Western European and English language character set. (The default is compressed Unicode: UTF-8.).

standalone

Tells whether or not this document references an external entity or an external data type specification (see below). If there are no external references, then "yes" is appropriate.


Sty - Knowledge is Free

Read More..


The DoomsdayYou must be heard a unstoppable killing machine named Doomsday that was successful overcame Superman in the DC's comic. The day at the time of Doomsday defeat Superman was the doomsday, the destruction day of humankind. Like doomsday, 0-Day (Zero-Day) is a doomsday for software developer.


0-Zero Day is a term that was difficult to be proven the existence. Meaning that, the person often named this term, but in practice it was said almost had not been found. Zero-Day that I intention here often was mentioned by Zero-Day (hour) attack/exploit.

In my opinion, not was unknown, but was difficult to be proven that was a zero day attack. The term derives from the age of the exploit. A Zero-Day exploit is almost always unknown to the public and to the software developer, but generally circulate through hackers until finally being released on public forums.

In the other word, A Zero-Day attack is one that takes advantage of a security vulnerabilitZero Day Attacky on the same day that the vulnerability becomes generally known. After someone detects there is a software contains a potential exposure to exploitation. That person can notify the software developer and sometimes the world at large so that action can be taken to repair the exposure or defend against its exploitation. Unfortunately, sometimes had someone who was successful make use of this vulnerability before software developer succeeded in fixing that software.

Sty - Knowledge is Free
Read More..

Your Ad Here