WEBDEV Concepts

64 Part 2: Developing a site WLanguage: a simple and powerful language WLanguage is the programming language used in WEBDEV. This language allows you to easily program all the desired web processes without being fluent in HTML, JavaScript or PHP. WLanguage is made of simple commands, close to natural language, and is available in English and in French. It allows for intuitive programming. Let’s see an example that illustrates the power of WLanguage: checking the input of an address: In WLanguage , only a few lines of code are needed: IF NoSpace(ADDRESS) = "" THEN Error("Specify your address") SetFocusAndReturnToUserInput(ADDRESS) END Here is the equivalent process in JavaScript : <SCRIPT LANGUAGE=Javascript> function EXE_NoSpace(szString, nPart) { var nFirst = 0; var nLast = szString.length-1; if (nPart & 1) while (szString.charAt(nFirst)==" ") nFirst++; if (nPart & 2) while (szString.charAt(nLast)==" ") nLast--; return szString.substring(nFirst,nLast+1); } // Click (onclick) of BUTTON_OK function _VALIDORD_BUTTON_OK_CLI() { if((EXE_NoSpace(ADDRESS,3)=="")) { alert("Specify your address"); return; } } </SCRIPT> WLanguage code is easier to write, understand and maintain. It is much more reliable. Changes are easier to make. Use WLanguage in all your processes .

RkJQdWJsaXNoZXIy NDQ0OA==