SWAF

From HandWiki
SWAF Markup Language
Swaf.jpg
Designed byEzzat Harky
DeveloperEzzat Harky
Typing disciplinemarkup
LicenseMIT License
Websitehttps://github.com/ezzat92/swaf
Influenced
HTML, XML, DOM

SWAF is a markup language for mobile platforms to develop graphical web applications. It has its own compiler, tags, elements and properties. It supports all standard browsers. The SWAF markup language helps the user to code in an easy and efficient way. By embedding the SWAF compiler into the HTML file, the user can make use of SWAF tags, elements and properties to develop a mobile web application. SWAF elements support touch events with all the given elements. The user can easily customize the theme for any application by modifying the specific CSS file. For creating an element using HTML5, CSS, JavaScript the user needs to have more knowledge in front-end web development and needs to write more lines of code, but in SWAF the same thing can be accomplished with very few lines of code. As a result, a user can easily develop mobile web applications for different platforms with few lines of code.

Objective

The objective of SWAF is to be able to write an efficient mobile web application in very little time, with few lines of code and a small file size with a high level of design and special library for themes. It is a comfortable application for interacting with other programming languages. It is a suitable mobile web application for touch devices without having a good acknowledgement from front-end web development[clarification needed]. There is no need for a lot of web storage for SWAF files. If you do not have the acknowledgement above SWAF[clarification needed] with a few days can learn this markup language and make a product for Soran University like MIT's Scratch Script.[clarification needed]

Features in SWAF

  1. SWAF has its own compiler, tags and properties.
  2. It has a special library for themes.
  3. It supports touch events.
  4. The applications produced by SWAF are cross-platform applications.
  5. SWAF has two philosophies: short or complete
  6. It is a non-case sensitive markup language. For example: There is no difference between and[clarification needed]
  7. Small compiler size: it is 60kb and easy to load and compile. The compiler has been designed in such a way that its performance is high.

Limitations in SWAF

  1. SWAF tags cannot be written as a separate file with special extensions because the SWAF tags need to be embedded into a HTML file (since there is not a web browser to recognize the SWAF extension.) All standard web browsers only compile the HTML file and create elements by the tags written inside the HTML file. To fix this limitation, a new browser should be created and the SWAF extension defined in the browser.
  2. HTML tags were not working on SWAF because the SWAF was embedded into HTML and the SWAF compiler only recognizes SWAF tags. If HTML tags are found in SWAF, the compiler assumes it is unimportant and does not compile the tags.
  3. It works perfectly with server-side scripting languages but with client-side scripting it does not have a problem. #How to use this markup language? SWAF has its own compiler. The developer should reference the compiler source as an external JavaScript file then add the ezzat tag into the body tag and write the SWAF tags inside the ezzat tag like the below code.

How to write custom themes

  1. Replace the theme name with the end of the element class names. For example, to write a theme with the name AVIN: .SWAF_N_BTN_THEME_AVIN, .SWAF_A_BTN_THEME_AVIN. This must be done for all elements. The theme name should be in capital letters.
  2. Uncomment the css properties and set a favorite value when writing a custom theme, then reference the theme file as a CSS file. Set the value of T or Theme property inside the ezzat tag as the theme name, and put the created theme in the themes folder <!DOCTYPE html>
  3. Save the file with the theme name, like AVIN.CSS.