Deploy a Hyperlambda website in 20 seconds

Deploy a Hyperlambda website in 20 seconds

One of the really cool features in our latest release of Magic is the ability to render static websites directly from your cloudlet. Basically, just search for?“free website template download”, choose any of the 1.2 billion hits, drag and drop it to your cloudlet – And voila! You’ve got a website.

Ignoring that this is easier than using GitHub pages, WordPress, Wix, or anything else out there of course, there is one additional kick ass feature you’ll get with?Aista, which is that you can create dynamic Hyperlambda substitutions directly in your HTML. Below is an example of how to replace the?H1?tag with dynamic content.

<h1>{{*/execute-dynamic-insert}}</h1>        

If you add the above in your index.html page, and add the following Hyperlambda in a file called?“index.hl”, you will have created your first snippet of server side rendered HTML.

execute-dynamic-insert
   data.connect:magic
      data.select:select value from users_extra where type = 'name' limit 1
      return:x:@data.select/*/*/value        

Below is a screenshot of how your file system should look like. Notice the HTML page has an associated?.hl?file.

No alt text provided for this image

The reference in your HTML is basically an expression to a Hyperlambda?“mixin”, which is evaluated as a lambda object, for then to dynamically include whatever your lambda object returns, by substituting the reference in your HTML. This allows you to dynamically build your websites, similarly to how PHP works, except minus all the (censored) PHP syntax. Basically, PHP minus the braindead syntax. In the video below I am illustrating how it works, by creating a new cloudlet, downloading a website template, and creating a Hyperlambda mixin substituting parts of my HTML.

To try this out for yourself, you can?signup at Aista Hub, create a new cloudlet, and get going :)

要查看或添加评论,请登录

AISTA的更多文章

社区洞察

其他会员也浏览了