Alloy ui basic tutorial
Dev
. min read
Few points about alloy ui : Alloy ui is a library which built on the top YUI3 library. It uses the concept of sandbox. It is a meta framework for building rich ui web pages.
Sandbox concept for js:
This concept uses the call back concept for running the code. It provides the functionality of adding the module (s) on demand for accessing its defined functions. How to create sandbox?
YUI().use(arg1,arg2…….argn,function(A){ //code will be added here. });
Let us discuss about the above created sandbox.
- YUI () function creates new instance of YUI.
- On this new instance use method is being called which can zero or n no. of modules as a string parameters but last parameter will be a callback function.
- Here function (A) is a callback function and it is having A as an argument which nothing but new instance which is being created by YUI () function.
- it loads the dependencies which are e being called as modules here on demand.
Let’s create a simple hello world example to demonstrate the above
The following steps needs to be followed in order to create a hello world:
- Add the seed file (which is like a js library file) to the using < script > tag and related css file.
- Create the sandbox as mentioned above.
- Now supply an alert message to this sandbox.
Seed js file and css file
http://cdn.alloyui.com/2.0.0/aui/aui-min.js
http://cdn.alloyui.com/2.0.0/aui-css/css/bootstrap.min.css
< script > var checkObj=YUI(); checkObj.use(function(A){ alert("Hello World"); }); < /script >
Live Demo : Alloyui Basic Test
Let’s discuss how to use packages in the next tutorial in the series of basics of alloy ui.
More Stories from
Window Server 2025 Contabo VPS Install Guide
Window server in contabo is very costly but you can deploy your license key with custom image.
Setting up SSH keys to a Ubuntu Server with Mac
Generating SSH keys on a Mac for use with an Ubuntu server is a straightforward process. Here’s a step-by-step guide: Generate the SSH Key Pair
Git/Github Clone Private Repository on Ubuntu Server 24.04
GitHub is a free platform that provides repository hosting and We will guide you to install Git on Ubuntu 24.04, adding and cloning a repository from GitHub to your Ubuntu VPS server.
RAID 1 setup on Hetzner Dedicated Server - Rescue Ubuntu Install EasyPanel
Installing Ubuntu on Hetzner Server in Rescue Mode with RAID1 for Enhanced Storage Capacity. resizing MD2 and MD3, utilising full NVME in EasyPanel
Deploy Tailscale in Portainer docker container Raspberry pi
A comprehensive guide on deploying Tailscale through Portainer in Raspberry pi. lets integrate Tailscale into your existing Docker setup.