11/26/2010

What is YAML? What are its advantages over XML? Give examples on how an XML document can be represented by a YAML document.


What is YAML? What are its advantages over XML? Give examples on how an XML document can be represented by a YAML document.

YAML, “YAML Ain’t Markup Language”, is a data serialization language designed to be human-friendly and work well with modern programming languages for common everyday tasks. This specification is both an introduction to the YAML language and the concepts supporting it, and also a complete specification of the information needed to develop applications for processing YAML, from Oren, Clark and Ingy. They also mentions that, “YAML’s indentation-based scoping is similar to Python’s (without the ambiguities caused by tabs). Indented blocks facilitate easy inspection of the data’s structure. YAML’s literal style leverages this by enabling formatted text to be cleanly mixed within an indented structure without troublesome escaping. YAML also allows the use of traditional indicator-based scoping similar to JSON’s and Perl’s. Such flow content can be freely nested inside indented blocks.”

According to Oren, Clark and Ingy, the design goals for YAML are, in decreasing priority,
“Easily readable by humans”, unlike XML, the formatting of YAML does not require a lot of “<xxx>”, which is very difficult to read. It just use simple use “-, #, :, ?“ as a paragraph to define the sequence of the sources.

“YAML data is portable between programming languages and matches the native data structures of agile languages”, YAML integrates and builds upon concepts described by C, Java, Perl, Python, Ruby, RFC0822 (MAIL), RFC1866 (HTML), RFC2045 (MIME), RFC2396 (URI), XML, SAX, SOAP, and JSON. It carried much more than XML.

“YAML is easy to implement and use and expressive and extensible”, XML can only implement by XSLT , or some program which specific to designed to read XML. However, YAML can easily to implement and use by the language which mentioned before.
”YAML has a consistent model to support generic tools” but XML does not

All in all, YAML is trying a more agile way than XML, XML to complete the task.

There are at least two issues that arise in representing this chess club data as XML by David. The first, and simpler, issue is exactly what the best XML representation would be in the abstract. Hhe would propose something like the following as a best attempt in XML:
<?xml version="1.0"?>
<club>
  <players>
    <player id="kramnik"
            name="Vladimir Kramnik"
            rating="2700"
            status="GM" />
    <player id="fritz"
            name="Deep Fritz"
            rating="2700"
            status="Computer" />
    <player id="mertz"
            name="David Mertz"
            rating="1400"
            status="Amateur" />
  </players>
  <matches>
    <match>
        <Date>2002-10-04</Date>
        <White refid="fritz" />
        <Black refid="kramnik" />
        <Result>Draw</Result>
    </match>
    <match>
        <Date>2002-10-06</Date>
        <White refid="kramnik" />
        <Black refid="fritz" />
        <Result>White</Result>
    </match>
  </matches>
</club>

The YAML format simply matches the data structures of dynamic languages better. And it looks nicer too. Here's a YAML representation of the same chess club data:
 
---
players:
  Vladimir Kramnik: &kramnik
    rating: 2700
    status: GM
  Deep Fritz: &fritz
    rating: 2700
    status: Computer
  David Mertz: &mertz
    rating: 1400
    status: Amateur
 
matches:
  -
    Date: 2002-10-04
    White: *fritz
    Black: *kramnik
    Result: Draw
  -
    Date: 2002-10-06
    White: *kramnik
    Black: *fritz
    Result: White

There are a number of nice things about this format. The YAML Web site gives exact specifications, but this brief sample gives you a pretty accurate idea of the basic elements. The spec also includes an intuitive means of including (multi-)paragraph strings. YAML is terse, but still readable. Moreover, quoting is minimal, with data types being inferred from patterns (for example, if it looks like a date, it is treated as a timestamp value unless explicitly string quoted). You can use references to any named target. And, significantly, YAML maintains the distinction between ordered and associative collections. As an added bonus, you can very easily edit YAML in a text editor, by David.

Reference:
Oren Ben-Kiki, Clark Evans, Ingy döt Net (2001-2009), "YAML Ain't Markup Language" Retrieved from:  http://www.yaml.org
David Mertz, Alternator, Gnosis Software, Inc., "XML Matters: YAML improves on XML" Retrieved from:   http://www.ibm.com/developerworks/xml/library/x-matters23.html

11/23/2010

What is your vision on Web 3.0? What are the key technologies that will make it happen?

 
In 2004, Web 2.0 was coined. Today is near the end of 2010. On the other words, Web 2.0 lived with us around 6 years already. It is older than windows 98, NT, 2000. Nowaday, I think all people who accessing computer must have a experience enjoying web 2.0 services such as Wiki, RSS, Blog… So far, these services are experience is positive.

In addition, some company try platform as a service, storage as a services, services as a service… from the web browser. However, due to limitation Internet speed, and browser refreshing speed, some applications cannot be applied in cloud such as 3D Games, photo editing, movie editing… Therefore, the high refreshing rate, large files rendering is not suitable for implement in web 2.0.

According to Selena, 「Web 2.0 applications that are simple photo / video storage sites are not suitable as standalone applications for setting out eportfolios. So it looks like I will have to adapt my plans. I will probably still use one of the web 2.0 applications as a repository to archive photos. It is relatively easy to post a photo on to a site like flickr from a mobile phone. Once it is there, I will need to work out how to add value to the image so that the collection of images tell a story of how competency is acquired.」

Web 3.0 contains more feature then web 2.0. As Digitial Inspiration mention, 「Web 3.0 – This will be about semantic web (or the meaning of data), personalization (e.g. iGoogle), intelligent search and behavioral advertising among other things.」

In Web 3.0, all sites, links, media and databases can be smart, automatic transmission more meaning, for example, a Web site announces a meeting behind contains many links to related information and programs, users just click the link able to immediately log the time and place logs at work, or even sent to the relevant latitude and longitude GPS, will also immediately speaker background and information sent to the list of topics related to personnel. In the future, may have all the features we can imagine and not imagine the network to applications. I think Web 3.0 will be the same as the 2.0 mode of operation and the subversion of consumer behavior.

However, in Web 3.0, ideally there should be a help you all the details ready to complete a good package tour programs, like having a travel agency staff to help you plan the same.

Also I think it support various possible applications, Web 3.0 services will be integrated with flexible, self-help way to achieve the target, if successful, will certainly more than today's search engines, but also have commercial value, Web 3.0 is significant because in response to a search problem, rather than thousands of copies of documents may be irrelevant response, this is actually a very large business applications to bring imagination.

Actually, Web 3.0 is our imagine. The new technology is still drafting in progress. 「That's not all. Many of these experts believe that the Web 3.0 browser will act like a personal assistant. As you search the Web, the browser learns what you are interested in. The more you use the Web, the more your browser learns about you and the less specific you'll need to be with your questions. Eventually you might be able to ask your browser open questions like "where should I go for lunch?" Your browser would consult its records of what you like and dislike, take into account your current location and then suggest a list of restaurants「, mentioned by HowStuffWorks.



Reference

Selena (18 May 2006). learning elearning: Limitations of Web 2.0 applications in setting up eportfolios. Retrieved from http://www.labnol.org/internet/web-3-concepts-explained/8908/

Digital Inspiration (2004-2010). What is Web 3.0? Semantic Web & other Web 3.0 Concepts Explained in Plain English:. Retrieved from http://mportfolios.blogspot.com/2006/05/limitations-of-web-20-applications-in.html

HowStuffWorks (1998-2010).HowStuffWorks "How Web 3.0 Will Work". Retrieved from http://computer.howstuffworks.com/web-30.htm

11/22/2010

How cloud computing is related to SOA? Why Web Services standards are important to adoption of could computing?

The spirit of cloud computing is combine a machines as a super computer via network. Once your machine can access network, the server can process the things which should be run on your own PC. The server can through SOA to provide services to users. iPad is one of the products which using these cloud computing to be developed. Besides Internet function, all other function has been removed. It is because Apple believes that only access Internet, iPad can use cloud computing technology to do anything.  For example, Google Doc, the function likes open office. Also it save all the data in the server storage online. 

SOA is a one of the software developing concepts. A system should be combined with a lot of services. For each of the services, it can be run as repeat and individually in different system in order to save the time of system developing. If these services can match with cloud computing, each service can be distributed to all machines over the world. Also, these services should be classified as a Web Services. On the other hand, standardization of web services is an important topic about this. Without standardization, how the services integrated to same system?

So, developing a system which requires to integrate with these distributed services, the same protocol should be used. For example, SOAP is one of the formatting to make the communication between service and platform. It uses HTTP as a communication protocol, XML as document formatting. As a result, the services which provide between different companies can communicate with each others. This idea is excellent!
Web Services standards are key point to adoption of could computing. For cloud computer, most of them should be use in web. As a result, web services are very important. We can also say that could computing can be sum up of various of web services. As a result, application as a service is one of the examples in could computing. The application can be delivered through web browsers. It also known as Software as a service. Therefore, different web services require to adopt in same could. If there cannot adopt in same could, the data cannot be transfer from one to another services. For example, we cannot use MSN messenger to chat with Yahoo messenger user. 

However, Web Services standards hardly adopt in could computing. To get the output, input is required. If one of the services output cannot as a input of next services. SOA cannot be applied. For example, although both services are using XML format, the important point is contents of XML. The contents of the next service need to complete before providing a service it? This standard can adopt how many needs? If it applied into business system, customer uses software of company A as merchandising products order. Supplier uses software of company B as sales services. Can it accept? Who should define the order format? 

Some successfully web services can be transform they data. For example, Facebook can search your friend with using your Google account. Ebuddy, can provide a platform to do chatting with ICQ, MSN and Yahoo messenger together. Buzz can follow by twitter and plurk However, it can be only a small parts to do the cross over the services. There is seldom services can do the large web portal which combine services with various companies.

All in all, different industries have different requirements. Even in same industry, different companies have different needs and culture. Is it possible to make a standardize format? Developing the content of each document in service standard is the hardest part of SOA.