O Language: First Router

The router socket structure was created with the intention of creating an API over the HTTP/S protocol and exchanging data through the socket. In web based projects it is possible to write web server quickly and easily. In addition, the API can be created in micro-services.

hello.olm (as hello module):

def hello = fn(name){
 return "Hello, "+name+"! Welcome to Olang"

router.ola (as router script):

load "hello.olm"

def config = {
 "GET" : {
 "/" : "Welcome to the O-Lang Router!"
 "/:name" : hello("{{.name}}")

show("Listening Ctrl+C to exit.")
router("8080", config);

GET method test:

~> curl -X GET localhost:8080
Welcome to the O-Lang Router!

POST method test (oytun as parameter value for name [ :name => {{.name}} ]):

~> curl -X POST localhost:8080/oytun
Hello, oytun! Welcome to Olang

As you can see in the example, we wrote a web micro service using port 8080 via get and post methods.

HTML is a programming language?

HTML as a programming language was presented to us for years. First programming language in web development was taught and is taught. But there is a point where people don’t know any. HTML is not a programming language.

HTML is a markup language. Actually HTML is a markup language XML extended through. So has been extended. It easier people web-based projects has enabled us to offer and develop people to their sites.

After it is compiled on the system works in real programming languages. Languages such as HTML or PHP is the script language completely. In no way are executed by an interpreter from compiled and interpreted. In html, the situation is different. HTML code in the browser of the DTD (Document Type Definition), XML structure are interpreted under the shed to screen it again. In this way, we can view each of them as a website.

The two are united under the roof of coding languages; compiled languages and interpreted languages that can be that can be. Languages that can be compiled; the platform on compiled byte-code form, and the generated byte-code only systems that have the same architecture employed by disassemble. In this way, the function of the actual programming language. Interpreting a text the interpreter to the user by showing the direct result.

By using the simple identifiers and document types on the screen and interprets the HTML codes of a website, there is a function to display the files or projects. For this reason, should not be regarded as a programming language.

This was present in the XML before HTML and was not so easy. Later, the W3C (Web Consortium) standards DTDS and engineers on various teams and can be understood by everyone and as a result began to develop a detectable ML (Markup Language) appeared. Currently we develop Web sites W3C’s own written HTML4/5 standards development we are doing. The main thing to be detected in the HTML, such as XML, extended. Because the origins of the first standards based on XML.

Sources: DTD on Wikipedia HTML 4 DTD HTML 5 DTD