AJAX-Tips Tutorials
AJAX-TipsLightweight Markup Languages
Markup languages for Ajax and JavaScript are usually limited to JSON for its compatibility with JavaScript and XML for universal recognition. These two mark-up languages are seen in almost any Ajax based applications as they provide the data needed for interaction.
Without these markup languages, the application might not have the ability to properly process data. Using HTML, txt and other raw data could be possible but they will not work as efficient compared to JSON and XML.
But JSON, XML are not the only markup languages that could be used with JavaScript and Ajax based applications. Lightweight markup languages could also be integrated with JavaScript and Ajax based applications. As a lightweight alternative it could provide the functionality needed in the application without dragging down the entire application.
The “Human Side” Advantage
Lightweight markup languages have been implemented before the current markup languages for Ajax and JavaScript. While it is deemed a little bit “outdated” for some projects, it is still useful in many platforms today. Wiki-sites are only some of the many platforms that use this type of markup language.
By implementing simplified and lightweight markup language, changes could be created by practically everyone since the raw data is readable to many users. With little to no training at all, understanding the raw data provided by the markup is possible and changes could be easily implemented.
The Lightweight Advantage
Of course by the name itself users should expect simplicity and minimal footprint from these types of markups. Lightweight markup languages were first implemented on platforms wherein customization of texts is not possible. It’s purely a code that could be understood by almost everyone with little to no programming experience.
Porting the Markup Languages
While lightweight markup languages provide the ease of implementation in some platforms, using these markup languages in JavaScript would be a little bit challenging. JSON and XML are used primarily for a reason – they have the ability to deal with asynchronous functions offered by JavaScript and Ajax based applications.
Without these abilities in many if not all lightweight markup languages, they will not be able to be properly implemented in Ajax and JavaScript based applications.
There are two ways a developer could port their lightweight markup to JavaScript or Ajax. The first method is to use the intrinsic functionality of browsers in reading these types of markup languages. Browsers will automatically regard the codes as basic HTML. When this is used, JavaScript and Ajax will read them as raw data and implement them just like they interpret HTML.
The second technique is to use JSON’s functionality in terms of converting lightweight markup language. It will naturally convert the data provided but it will become JSON and might not be lightweight as it was first coded. This only defeats the purpose of using lightweight markup languages.
Lightweight markup languages could be used in Ajax and JavaScript based applications. However, because of their limitation in coding, they are only recommended for lightweight applications which will use raw HTML as the source of data.
Sponsored Links
