PHP Certification studies part 2: Data Formats

Although Data Formats has “Low emphasis” in the test, it’s quite important for you as a developer. In the latest year, every major website has API Access, and there about 5000 + of them listed on programmableweb only in Json format. Understanding Data Formats then it’s quite a must if you want to build something that “Talks” to other platforms.

Sections

  • XML  Extensible Markup Language
    1 xml_parser_create() type constructor, to parse difficult XML data, like openimages Xml api
    2 simplexml_* functions to work with simple Xml data from php
    3 DOM permits manipulating XML documents
    4 xpath() Method to perform queries agains XML.
    Can work with simplexml FORMAT: array SimpleXMLElement::xpath(string $path)
  • SOAP Simple Object Access Protocol
    This Php extension is used to write Soap Servers and Clients
    They are runtime configuration variables and predefined  constants that start with SOAP_*
  • REST REpresentational State Transfer
    All the web is a giant REST model. Conceptually is a network of pages, accessed by users through a set of Links. Uses HTTP “verbs” :
    GET  List (no id) /Resource (needs an id)
    POST Create
    PUT  Update (needs an id)
    DELETE delete (needs an id)
  • JSON Javascript Object NotationJson is an data-interchange format. Is mostly used to pass data from Php to javascript and the extension is loaded in Php by default.
    The functions start with json_* being the most used: json_decode($json) & json_encode

Date and time

The date functions retrieve the date and time where the php server is running.

REFERENCES:
http://us2.php.net/manual/en/book.xml.php
http://us2.php.net/manual/en/book.dom.php
http://php.net/manual/en/refs.webservice.php
http://us.php.net/manual/en/book.json.php
http://php.net/datetime
http://php.net/simplexml
http://php.net/domxpath
http://php.net/soap

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s