{"id":4152,"date":"2022-07-12T12:33:40","date_gmt":"2022-07-12T12:33:40","guid":{"rendered":"https:\/\/gridnet.org\/wpp\/?p=4152"},"modified":"2022-07-28T08:34:39","modified_gmt":"2022-07-28T08:34:39","slug":"create-ui-dapps-right-now-developer-guide","status":"publish","type":"post","link":"https:\/\/gridnet.org\/wpp\/index.php\/2022\/07\/12\/create-ui-dapps-right-now-developer-guide\/","title":{"rendered":"GRDINET OS Hello World UI dApp"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-71 alignleft\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2021\/05\/gridUser1.gif\" alt=\"\" width=\"125\" height=\"176\" \/><\/p>\n<p data-pm-slice=\"0 0 []\"><strong><span style=\"color: #00ffff;\">So\u00a0<\/span><\/strong><em><strong><span style=\"color: #00ffff;\">folks!<\/span>\u00a0<\/strong>Our<\/em> beloved\u00a0cyber funky\u00a0fellas!\u00a0Since, decentralization is all around\u00a0and\u00a0<em>since everyone<\/em> is talking about\u00a0<em><span style=\"color: #ff99cc;\">Web 6.9 <\/span><\/em>(..)\u00a0 The time has come for all of us, developers\u00a0,\u00a0the lovers of bits and bytes (..) the 0s and 1s (..) to at least consider the possibility of deploying <span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee\u00a0<strong>UI dApps<\/strong> <\/span>of our own<i>.<\/i><\/p>\n<p data-pm-slice=\"0 0 []\"><em>What would you say?\u00a0<\/em>\u00a0Have you not implemented a decentralized application before?\u00a0<em>Oh!<\/em>\u00a0Now,\u00a0<em>why is so?<\/em>\u00a0Have you not considered Ethereum, maybe?\u00a0<em>Worry not.<\/em>\u00a0Truth be told,\u00a0<em>neither did we<\/em>&#8230;\u00a0 as there ever was so little point in doing so. This time, it is <em>way\u00a0different<\/em>, though.<\/p>\n<p data-pm-slice=\"0 0 []\">We are talking about allowing for arbitrary user-friendly applications users are already well familiar with when using \u2018normal\u2019 operating systems.<\/p>\n<p data-pm-slice=\"0 0 []\"><em>Now made decentralized.\u00a0<\/em>That is right.<\/p>\n<p data-pm-slice=\"0 0 []\">If you are not familiar so much with the benefits of decentralization these let us\u00a0just name a few, in the context of<span style=\"color: #00ff00;\"><strong> <span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS<\/span><\/strong><\/span>:<\/p>\n<ul>\n<li data-pm-slice=\"0 0 []\">use technologies you are already well familiar with such as JavaScript, HTML, CSS\ud83d\udc7e<\/li>\n<li data-pm-slice=\"0 0 []\">these are new grounds so high chances for your application to become popular.<\/li>\n<li data-pm-slice=\"0 0 []\">no need for any server. The network hosts your app all by itself.<\/li>\n<li data-pm-slice=\"0 0 []\">no need to configure any kind of software.<\/li>\n<li data-pm-slice=\"0 0 []\">you can modify your web-page \/ application from any device. Yet again, &#8211; without installing any kind of software.<\/li>\n<li data-pm-slice=\"0 0 []\">nobody can bring your app down.<em>\u00a0<\/em><\/li>\n<li data-pm-slice=\"0 0 []\">nobody, <em>including government institutions<\/em>\u00a0ever gets access to any kind of data, including meta-data your app processes.<\/li>\n<li data-pm-slice=\"0 0 []\">anonymous data exchange.<\/li>\n<li data-pm-slice=\"0 0 []\">your app is available from anywhere.<\/li>\n<li data-pm-slice=\"0 0 []\">you are 100% anonymous and so are your users.<\/li>\n<li data-pm-slice=\"0 0 []\">access to data-storage and crypto exchange APIs at your fingers.<\/li>\n<li data-pm-slice=\"0 0 []\">your app looks like it would be running on Windows and\/or MacOS X even though it gets launched from a web-browser.<\/li>\n<li data-pm-slice=\"0 0 []\">lots of ways to monetize your application. Ultra fast crypto payments available through JavaScript APIs. You may want to take a look <em>(you do want to take a look!)<\/em> at our <a href=\"https:\/\/talk.gridnet.org\/t\/metal-detector-mechanics\/89\/2\">GridCraft <\/a>\u00a0game and see how players are rewarded with crypto for finding Gold Veins in a dynamically generated environment.<\/li>\n<li data-pm-slice=\"0 0 []\">the possibility to implement arbitrary logic running on nodes maintaining the network.<\/li>\n<li data-pm-slice=\"0 0 []\"><em>the list goes on and on.<\/em> Limited only by your imagination.<\/li>\n<\/ul>\n<p>If, you are not a developer,\u00a0worry not\u00a0as developers are to come to\u00a0like\u00a0<strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS<\/span><\/strong>\u00a0so much,\u00a0soon enough you are to be seeing an eruption of decentralized User-Interface equipped applications making their way onto\u00a0the platform. Talk about a Tsunami of ideas now\u00a0made possible to become Real at the least amount of effort required. With all the building-blocks Easily\u00a0accessible\u00a0from a single, coherent decentralized development and runtime environment.<\/p>\n<blockquote><p><span style=\"color: #00ffff;\"><em><strong>Wizards<\/strong><\/em><\/span>\u00a0are\u00a0<strong><span style=\"color: #00ffff;\"><em>Real<\/em><\/span><\/strong>.\u00a0\u00a0<span style=\"color: #99ccff;\"><em>(..) You remember that (..)<\/em><\/span><\/p><\/blockquote>\n<p>Now,\u00a0this article is intended for\u00a0developers.\u00a0What kind of developers?\u00a0All developers are welcome!\u00a0Still, if you&#8217;ve got some solid background in JavaScript, CSS, HTML and neighbouring technologies you would feel just at home.<\/p>\n<p>Our time is precious, <em>so<\/em> let us get straight down to business!<em>\u00a0Shall we?<\/em><\/p>\n<h2><span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee Rationale<\/span><\/h2>\n<p>So we all have heard ab<strong>out <\/strong>decentralization<strong>. D<\/strong>ecentralized state-machines. Bitcoin, Ethereum and stuff. Guess what? People now want their applications decentralized! Games, collaborative apps, content delivery networks, services such as YouTube, Twitter, exchanges; anything and everything! And there are some good reasons behind these market preferences! For more unbiased background on the evolution of decentralized systems &#8211; from Bitcoin, across Ethereum towards <strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS<\/span><\/strong> check out\u00a0<a href=\"https:\/\/gridnet.org\/wpp\/index.php\/2022\/06\/30\/decentralized-os-with-a-decentralized-ui-dapps\/\" target=\"_blank\" rel=\"noopener noreferrer\">this\u00a0<\/a>article and draw your own conclusions. At any time, feel invited to visit\u00a0<a href=\"https:\/\/talk.gridnet.org\">https:\/\/talk.gridnet.org<\/a>\u00a0for a discussion.<\/p>\n<div style=\"width: 1920px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-4152-1\" width=\"1920\" height=\"1080\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/2022-07-07-13-01-30.mp4?_=1\" \/><a href=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/2022-07-07-13-01-30.mp4\">https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/2022-07-07-13-01-30.mp4<\/a><\/video><\/div>\n<blockquote><p>Is that MacOS X2? Windows 2022, maybe ?<\/p><\/blockquote>\n<h3 style=\"text-align: center;\"><\/h3>\n<p>Everything a developer might ever need to make her ideas a\u00a0R<em>eality.<\/em>\u00a0The system makes sure\u00a0she never needs to mix centralized and decentralized architectures. At least no more.<\/p>\n<p>Storage of large files?\u00a0Sure!\u00a0 Incentivisation of nodes for having parts of these files delivered to web-browsers?<strong> Sure! <\/strong>Cross-browser communication? Wait a sec! How about\u00a0Onion-Routed\u00a0cross browser communication while the exchange of data packets is incentivized through cryptocurrenc<em>y? Easy. <\/em>Windows? Window Managers? Package Managers? Access Control List-based file system? It is all there, just waiting to be used. Ease of development? Inherit from CWindows class, change the default Package ID, window title and voil\u00e0, you\u2019ve just created your very first Hello-World decentralized windowed app. No other platform provides. That is how it is.<\/p>\n<p>All the fancy APIs, accessible from JavaScript wrap around the underlying uncertainties or performance troubles stemming from decentralization. Same for communication. No need to be familiar with browser specific WebRTC implementations. Just instantiate a <strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS<\/span><\/strong> <span style=\"color: #33cccc;\"><strong>Swarm<\/strong> <\/span>and sign up for events!<\/p>\n<p><strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS\u00a0<\/span><\/strong>would be making sure everything is end-to-end encrypted at all times and decentralized. Yeah, our wrappers around WebRTC are probably the first implementation which entirely eliminated reliance on centralized servers as it holds true even for initial signaling, making sure the initial WebRTC handshake between browsers is carried out through <span style=\"color: #ccffcc;\">random <\/span>nodes comprising the network.<\/p>\n<p>Want your application to be notified about things happening in its environment? Like what happens to its window, whenever the window gets resized, minimized, maximized, whenever the user hovers over the window? Whenever data arrives to your application from the decentralized network of nodes? Whenever a user logs on? Whenever another application receives a certain kind of data? Whenever another application attempts to commit data onto the decentralized state-machine? Whenever state of user-owned files gets changed, maybe?<\/p>\n<p>No problem!\u00a0Simply sign up for appropriate events.<\/p>\n<p>Worried about concurrency issues while having your User Interface-equipped decentralized application requesting data from the decentralized state-machine or committing data? Worry not, <strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS<\/span><\/strong> ? It would be taking care of all of that. <strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS<\/span> <\/strong>&#8211; it provides,\u00a0\u00a0remember?\u00a0So that you may focus on the idea of yours.<\/p>\n<blockquote><p>It was implemented by passionate folks on YouTube LIVE since the early 2017, where there are now well over 35TB of Live programming sessions available. Should you have any kind of ideas and or requests head straight over to\u00a0<a href=\"https:\/\/talk.gridnet.org\">https:\/\/talk.gridnet.org<\/a>. Each decentralized project you work on you are alone no more.<em>\u00a0<\/em><em>Now,<\/em>\u00a0it is you and <strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee GRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS<\/span><\/strong>. You have one aim and one aim only &#8211; to make your decentralized\u00a0<strong><em>dreams a reality.\u00a0<\/em><\/strong>Everything else is on the shoulders of the former.<\/p><\/blockquote>\n<h2><span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee\u00a0Architecture<\/span><\/h2>\n<p>When it comes to creating applications and their corresponding architectures,- an<span style=\"color: #00ffff;\"> \u22ee\u22ee\u22ee Application<\/span> is composed of code running at nodes maintaining the network and code running within web-browser(s). The former is written in <span style=\"color: #00ffff;\">#GridScript,<\/span> while the latter employs JavaScript\u00a0 &#8211; for the most of it. Indeed, <strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS<\/span><\/strong>\u00a0makes everything available through easily accessible <strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee\u00a0<\/span><\/strong><span style=\"color: #00ffff;\">JavaScript (ECMA 6)<\/span> <span style=\"color: #ffffff;\">APIs<\/span>. The two realms can be mixed or decoupled, depending on your requirements.<\/p>\n<p>What are the benefits? One may<strong> <em>choose <\/em>to deploy an ap<\/strong>plication composed solely of\u00a0<span style=\"color: #00ffff;\">#GridScript,\u00a0<\/span>effectively resulting in something reassembling what Ethereum allows for (what they call a &#8216;Smart-<em>Contract<\/em>&#8216;&#8230; we all know Ethereum was doomed to remain with its one leg stuck in the realm of <em>finance<\/em>, like <strong>forever.<\/strong><em> Whatever<\/em>). Then, one may choose to use solely front-end technologies such as JavaScript\u00a0and interact with the environment (data storage, communication, UI, events etc.) through the\u00a0\u00a0<strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS&#8217;\u00a0<span style=\"color: #ffffff;\">JavaScript <\/span><\/span><\/strong><span style=\"color: #ffffff;\">APIs.<\/span> And\u00a0finally, one may choose to mix both realms! An example? Our GridCraft game, it takes heavy use of front-end technologies for dynamic game-world generation through web-workers and it employs code running at full-nodes for dynamic spawning of Gold-Veins appearing underground, depending on the current player&#8217;s position. The code, running at full-nodes analysis players&#8217; positions in real-time, employs anti-cheat mechanics and issues crypto-rewards once player successfully finds and digs out a gold vein. Could Ethereum provide? No way\ud83d\ude09<\/p>\n<p>Going deeper, from the JavaScript developer\u2019s perspective all the APIs are\u00a0exposed through\u00a0the CVMContext singleton. It is the main object all the other components and thus APIs are made available from. One may access these at any time by calling CVMContext.getInstance() static method.<\/p>\n<p><strong>Now,<\/strong>\u00a0let us get going and deploy our first <span style=\"color: #00ffff;\"><strong>\u22ee\u22ee\u22eeHello World<\/strong><\/span> UI dApp, shall we?<\/p>\n<blockquote><p>(..) you are about to deploy your very first Decentralized Hello World UI dApp! on the very first 100% decentralized operating systems!\u00a0You might thus very much feel like developing first windowed app for Windows 3.11 back in the early 90s! (..)<\/p><\/blockquote>\n<p>While the <strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS<\/span><\/strong> UI dApp does not do much besides displaying its window and querying user for some data, it effectively demonstrates interactions between an average application and the operating system. Interacting with some of the main APIs, signing up for events etc. For more advanced mechanics feel invited to look through sources codes of other UI dApps that are available within the repository. These cover data storage, video streaming, gaming etc.<\/p>\n<h2><span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee Hello World UI dApp<\/span><\/h2>\n<h3><span style=\"color: #00ffff;\">Get The \u22ee\u22ee\u22ee Template From \ud83d\ude3aGitHub<\/span><\/h3>\n<p data-pm-slice=\"0 0 []\">First, let us visit the <strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS<\/span><\/strong>\u2019 GitHub repository available right over\u00a0<a href=\"https:\/\/github.com\/GRIDNETOS\/GRIDNETOS\/tree\/main\/WebUI\/dApps\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>. While you may want to check-out all of the UI dApps, for now we are to pay special interest to one file in particular, the\u00a0<a title=\"UserDeployable.app\" href=\"https:\/\/github.com\/GRIDNETOS\/GRIDNETOS\/blob\/main\/WebUI\/dApps\/UserDeployable.app\" target=\"_blank\" rel=\"noopener noreferrer\">UserDeployable.app<\/a>\u00a0&#8211; which is a self-contained <span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeUI dApp Package<\/span>.<\/p>\n<p>Since an <strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeUI dApp Package<\/span><\/strong>, in its simplest form, is a JavaScript file with its extension set to &#8216;.app&#8217; &#8211; you may want to change the extension to &#8216;.js&#8217; for editing purposes, so to have all the in-code-highlighting within the favourite code-editor of yours enabled (<a href=\"https:\/\/atom.io\">Atom\u00a0<\/a>is great! Almost all of the <strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS<\/span><\/strong>&#8216; JavaScript components were written within of it.)<\/p>\n<blockquote><p><strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee GRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS<\/span><\/strong> makes it possible to edit and implement applications right within of the system through the <span style=\"color: #00ffff;\">\u22ee<\/span><span style=\"color: #00ffff;\">\u22ee\u22ee Editor UI dApp<\/span>. While its possibilities may be a far cry (at least for now) when compared to code Editors you my be familiar with, still it might be great to know that it is possible at all! To introduce hot-fixes to any files, from any computer also an untrusted one! Without needing to install anything.<\/p><\/blockquote>\n<p>What comprises a minimal <span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeCode Package<\/span>? An &#8216;.app&#8217; file having a single class inheriting from CWindow defined, together with all the <span style=\"color: #00ffff;\">\u22ee\u22ee\u22eePackage<\/span> interface functions implemented. The operating system expects the implementation of the former to be set as a default export. These would be looked for by the\u00a0<span style=\"color: #ccffcc;\">\u22ee\u22ee\u22ee<\/span><span style=\"color: #00ffff;\">Package Manager<\/span>\u00a0once the user attempts interact with the package file, presumably so to have it installed.<\/p>\n<p><a title=\"UserDeployable.app\" href=\"https:\/\/github.com\/GRIDNETOS\/GRIDNETOS\/blob\/main\/WebUI\/dApps\/UserDeployable.app\" target=\"_blank\" rel=\"noopener noreferrer\">UserDeployable.app<\/a>, while being a sample, readily installable code package, it may be treated as an\u00a0UI dApp template. We shall proceed with changing just a couple of lines just to get an overlook of how things are structured. Let us now go through the template file together, shall we?\ud83d\ude0c<\/p>\n<h3><span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee Template Checklist<\/span><\/h3>\n<p>Once opened, the file welcomes us with a rather short to-do-list. These points are to ensure a customized experience once your UI dApp , based on this template, gets installed and then launched. It takes you by hand through things\u00a0 like defining your app\u2019s Package ID, icon, title , contents of the main\u00a0<span style=\"color: #00ffff;\">Window<\/span>\u00a0and so on. It all takes two or three minutes if you have got all the values already in your head.<\/p>\n<div id=\"attachment_4286\" style=\"width: 641px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4286\" class=\"wp-image-4286\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/checklist.png\" alt=\"\" width=\"631\" height=\"213\" \/><p id=\"caption-attachment-4286\" class=\"wp-caption-text\">There&#8217;s always some sort of a to-do-list is there not..<\/p><\/div>\n<h3><span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee Imports Section<\/span><\/h3>\n<p>Scrolling further, right after the checklist we see a code section related to &#8216;imports&#8217;. <strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS<\/span><\/strong> provides a variety of objects and APIs. First though, one needs to import the components that are about to be used. Just remember to use relative paths, starting from the root of the\u00a0<span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeFile-System. <\/span>Make sure that the file paths begin with \u201c\/\u201c . That is important, since\u00a0 the<span style=\"color: #00ffff;\"><strong>\u00a0\u22ee\u22ee\u22eePackage Manager,<\/strong><\/span>\u00a0under the hood, it does some crazy cool stuff allowing for ECMA6 classes to be loaded from byte arrays, even before the files are committed onto the decentralized network. This in turn gives us the possibility to test how everything works in sandbox-mode, before proceeding to deployment.\u00a0<span style=\"color: #00ffff;\"><em>Let us Flow!<\/em><\/span><\/p>\n<div id=\"attachment_4287\" style=\"width: 416px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4287\" class=\"wp-image-4287\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/imports-1.png\" alt=\"\" width=\"406\" height=\"390\" \/><p id=\"caption-attachment-4287\" class=\"wp-caption-text\">The components one is about to use, these need to be imported first..<\/p><\/div>\n<p>Let us now go real quick over things that are being imported:<\/p>\n<ul>\n<li><strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee CWindow &#8211;<\/span>\u00a0<\/strong>a class representing.. you&#8217;ve got it right! A Window! There are other classes covering \u00a0<span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeThreads\u00a0<\/span>and\u00a0<span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeProcesses<\/span>\u00a0as well, while\u00a0<span style=\"color: #00ffff;\">CWindow<\/span>\u00a0wraps these under the hood so you do not need to worry about any of the details while creating an simplistic app. Through\u00a0<span style=\"color: #00ffff;\">CWindow<\/span>\u00a0one may get and set a variety of properties and interact with your UI. Force the window to get resized, check its current size, disable min\/max icons apparent on the window\u2019s title-bar and so on. CWindow would take care of the default events\u2019 processing queue and spawn a single thread for you the very moment it is initialized. It would also make sure, by default, that the app appears at the\u00a0<span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeTaskbar<\/span>\u00a0and that the previews of its contents are made available as its icon on the\u00a0<span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeTaskbar<\/span>\u00a0hovered etc. Everything taken care of by the syst<em>em.\u00a0<\/em><\/li>\n<li><span style=\"color: #00ffff;\"><strong>\u22ee\u22ee\u22eeCTools &#8211;<\/strong><\/span>\u00a0now you are to come to like this class. Data encoding, compression, type conversions, animations, instantiation of images from byte arrays etc. It is all right over there. A real Swiss Army Knife, waiting to be used, proper handling of exceptions assured.<\/li>\n<li><strong><span style=\"color: #00ffff;\">CDataConcatenator &#8211;<\/span>\u00a0<\/strong>now that is a very low level utility. Basically, it allows for any object to be serialized into a decentralized-state-machine-compatible byte vector.<\/li>\n<li><strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeCSettingsManager &#8211;<\/span><\/strong>\u00a0your app might want to offer persistent settings. This<span style=\"color: #00ffff;\">\u00a0\u22ee\u22ee\u22eeAPI<\/span>\u00a0would ensure that these settings are loaded with each and every launch of your application across user sessions. Everything events-driven. Just keep updating the &#8216;settings object&#8217; within your app with new data and the system would be taking care of the rest. Ensuring the data is always up to date. easy peasy!<\/li>\n<li><strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeCContentHandler &#8211;<\/span>\u00a0<\/strong>Are you creating an image editor? Your app might want to register, with the operating system,\u00a0 file-type handlers for say &#8216;.png&#8217; and &#8216;.jpg&#8217; file extensions. Then, once the user attempts to open\u00a0either\u00a0file-type, she would get to choose among the registered UI dApps.<\/li>\n<li><strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeCNetMsg &#8211;<\/span> <span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS<\/span><\/strong>\u00a0UI dApps support crypto-incentivized data exchange. Data might be taking a variety of paths. From one web-browser to another, data may be onion routed across peers, be\u00a0<em><span style=\"color: #ccffff;\">flowing<\/span>\u00a0<\/em>through multiple full-nodes comprising the GRIDNET network or be on its way straight to the user\u2019s mobile app. End-to-End encrypted at all times. At least by default. Because in the end, you are the developer. You get to choose. Anyhow,\u00a0 CNetMsg\u00a0is\u00a0an\u00a0envelope containing the payload.<\/li>\n<li><span style=\"color: #00ffff;\"><strong>\u22ee\u22ee\u22eeMetaData &#8211;<\/strong><\/span> <strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS<\/span><\/strong> boards its own data-exchange meta-language, which is based on<span style=\"color: #00ffff;\">\u00a0BER (Basic Encoding Rules)<\/span>\u00a0binary encoding. Thanks to it, we get a\u00a0very efficient meta-language which is\u00a0 binary encoded. This stays\u00a0 in contrast with say XML or JSON; The language, it is well understood across all of the platforms involved: Web-browsers, full-nodes and mobile apps. It is also very storage efficient.\u00a0<em>\u00a0There will be a separate article tackling this very topic.<\/em><\/li>\n<\/ul>\n<h3><span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee Window Contents<\/span><\/h3>\n<p data-pm-slice=\"0 0 []\">As we scroll down, we get to define contents of a<span style=\"color: #00ffff;\">\u00a0<strong>\u22ee\u22ee\u22ee<\/strong>Window.<\/span>\u00a0The template supports loading data from another file or through the inline &#8216;appTemplateBody&#8217; variable.<\/p>\n<p>For defining window contents feel free to use use technologies that you already well acquainted with meaning HTML and CSS;\u00a0 worry not about data-presentation boundaries or whether your CSS would affect another UI dApps, or the systems itself,\u00a0 as the\u00a0latter\u00a0assures proper compartmentation through the Shadow DOM technology now available in Chromium. You may choose to use additional files and import these for code-clarity. For the purposes of this tutorial, we would not be adding any additional UI components and leave the default style sheets as they are.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-4289 aligncenter\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/windowBody.png\" alt=\"\" width=\"554\" height=\"336\" \/><\/p>\n<h3 data-pm-slice=\"0 0 []\"><span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee UI dApp&#8217;s Constructor<\/span><\/h3>\n<p data-pm-slice=\"0 0 []\">As has been already covered, your decentralized, graphical application inherits from CWindow. The constructor o the derived class. it is\u00a0its\u00a0main initialization point. Anything that needs to be set before the main window of your app is shown? Put it right over here. Otherwise, plug your logic into an appropriate event handler, fired once the window gets opened.<\/p>\n<p>Now, let us change the derived class&#8217; name \u2018CUIAppTemplate\u2019 to something else. Simply replace\u00a0all\u00a0occurrences of \u2018CUIAppTemplate\u2019 with something more personal. Here, we will simply go with \u2018CMyHelloWorld\u2019.<\/p>\n<div id=\"attachment_4290\" style=\"width: 838px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4290\" class=\"wp-image-4290\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/constructor.png\" alt=\"\" width=\"828\" height=\"359\" \/><p id=\"caption-attachment-4290\" class=\"wp-caption-text\">Let us customize the application just a little bit..<\/p><\/div>\n<p data-pm-slice=\"0 0 []\">Notice how the app registers Callback Functions with some <strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS<\/span><\/strong> APIs. First, it registers a Callback Function with the already mentioned<span style=\"color: #00ffff;\">\u00a0\u22ee\u22ee\u22eeMetaData<\/span>\u00a0sub-protocol. The sub-protocol is used for signaling. Thanks to it, we are able to\u00a0react\u00a0whenever anything of significance happens in the local environment, but also at another web-browser, at a full-node or at the user\u2019s mobile app.<\/p>\n<p data-pm-slice=\"0 0 []\">Going further, our app registers yet another Callback Function with the\u00a0<span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeDecentralized File System API<\/span>. Also, another callback function goes to the<span style=\"color: #00ffff;\">\u00a0\u22ee\u22ee\u22eeGridScript<\/span>\u00a0processing API &#8211; so that our application is notified and thus, yet again, able react to results of\u00a0<span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGridScript<\/span>\u00a0code processing happening at full-nodes. Within the event handler, the app would then be able to check whether the event originated as a result of\u00a0<span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGridScript<\/span>\u00a0code-processing\u00a0\u00a0issued on on behalf of our application, or maybe the\u00a0code processing was requested by another\u00a0<span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeUI dApp\u00a0<\/span>running within the system. This indeed gives as the ability of plugging right into logic of\u00a0external\u00a0applications.<\/p>\n<p data-pm-slice=\"0 0 []\">Hold your horses! We are to\u00a0be taking a closer look at implementations\u00a0of sample callback functions later on.<\/p>\n<p>Let us go back to personalizing our application further. Here in Atom, we simply hit CTRL+H and replaced\u00a0&#8216;CUIAppTemplate&#8217; with \u2018CMyHelloWorld\u2019. There were 17 occurrences. That was rather quick, was it not?<\/p>\n<div id=\"attachment_4291\" style=\"width: 851px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4291\" class=\"wp-image-4291\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/customized1.png\" alt=\"\" width=\"841\" height=\"554\" \/><p id=\"caption-attachment-4291\" class=\"wp-caption-text\">Looking better..more personal that is..<\/p><\/div>\n<p data-pm-slice=\"0 0 []\">As the former checklist commands<em><strong>,<\/strong><\/em> we shall now change the title of the application, which is shown within the title bar, once the UI dApp gets launched,- just as one would expect. <span style=\"color: #ccffff;\"><em>Right?<\/em> <\/span>Let us proceed in accordance to its rulings<em><strong>.<\/strong><\/em><\/p>\n<div id=\"attachment_4299\" style=\"width: 875px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4299\" class=\"wp-image-4299\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/constructor-1.png\" alt=\"\" width=\"865\" height=\"391\" \/><p id=\"caption-attachment-4299\" class=\"wp-caption-text\">The title may contain arbitry data and can be changed dynamically.<\/p><\/div>\n<p>We just changed the title to &#8220;My Hello World App&#8221;. Yet again &#8211;\u00a0easy.<\/p>\n<p>Note: you would be able to change title of your window during runtime, dynamically through the Window API.<\/p>\n<h3><span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee File Handlers<\/span><\/h3>\n<p data-pm-slice=\"0 0 []\">As we scroll further, we\u00a0cross over a code section in which\u00a0File Handlers are being defined. The uncommented part of the section,- it establishes two file handlers. One\u00a0goes for\u00a0files containing arbitrary binary data (eDataType.bytes) and the other for unsigned integers (eDataType.unsignedInteger). These are called implicit file-type handlers, since they do not specify explicit file-type extensions.<\/p>\n<div id=\"attachment_4300\" style=\"width: 697px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4300\" class=\"wp-image-4300\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/filehandlers-2.png\" alt=\"\" width=\"687\" height=\"302\" \/><p id=\"caption-attachment-4300\" class=\"wp-caption-text\">Your application may register itself for particular file-types!<\/p><\/div>\n<p data-pm-slice=\"0 0 []\">Indeed, under the hood, each file on the\u00a0<span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeDecentralized File System <\/span>is of a certain type, even if it does not come with an &#8216;extension&#8217; after a dot in its name. Same as on MacOS X. One could also find similarities with the\u00a0Microsoft Windows\u2019 alternative data streams. By default, any user-created file\u00a0has a data type equal to\u00a0eDataType.bytes, meaning an arbitrary byte vector. The system does its best to toggle between the underlying file-type as needed. At the bottom of everything these represent types of nodes in a Merkle Patricia Trie. If the system detects a byte array to comprise a valid Big Integer it would change the file type to a more relevant etc.<\/p>\n<p>Here, going back to our file, the commented-out section depicts how explicit file handlers could be defined, in this example, for *.jpg, *.png and *.webp file types respectively.<\/p>\n<p><span style=\"color: #ccffff;\">Let us keep scrolling through the template file.<\/span><\/p>\n<h3><span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee\u00a0Package Identification<\/span><\/h3>\n<p>Scrolling even further, we arrive at functions called by the operating system when it needs to query our app about some of the package- identifying properties.<\/p>\n<div id=\"attachment_4301\" style=\"width: 697px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4301\" class=\"wp-image-4301\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/customized3.png\" alt=\"\" width=\"687\" height=\"372\" \/><p id=\"caption-attachment-4301\" class=\"wp-caption-text\">Each UI dApp needs to have an unique identifier.<\/p><\/div>\n<p>The\u00a0<span style=\"color: #00ffff;\">\u22ee\u22ee\u22eePackage Identifier.<\/span>\u00a0You may consider it\u00a0as a name-space of your\u00a0application. Basically, it needs to contain the \u2018\u00a0org.gridnetproject.UIdApps.\u2019 prefix and it needs to be unique. Only alpha-numerical characters.<em><span style=\"color: #00ff00;\">\u00a0<\/span><\/em>Easy.<\/p>\n<p>For all the presentation purposes, such as\u00a0coming up with\u00a0a\u00a0string\u00a0to be put into a\u00a0shortcut leading to your app, the system would derive your application\u2019s nicely printed name autonomously, from the suffix of the\u00a0\u00a0<span style=\"color: #00ffff;\">\u22ee\u22ee\u22eePackage Identifier.<\/span>\u00a0\u00a0So, in our case, when presented to the user, the shortcut would\u00a0read\u00a0\u201cMy Hello World\u201d &#8211; placed right onto\u00a0the\u00a0\u00a0<span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeDesktop\u00a0<\/span>once installed.<\/p>\n<blockquote><p><span style=\"color: #00ff00;\">Hint: <\/span>use alternating capital and low letters in the\u00a0<span style=\"color: #00ffff;\">\u22ee\u22ee\u22eePackage Identifier<\/span>, as that is where a whitespace would be placed.<\/p><\/blockquote>\n<p>Now, what about the the Default Category? It tells where your UI dApp is to land in system-related places such as the\u00a0<span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeStart Menu.<\/span><\/p>\n<p>Icon &#8211; an icon which appears at the upper left corner of the window also on the Desktop etc.\u00a0 One may provide an icon as a base64 encoded string. The system would take care of all the scaling, aspect-ratio maintenance matters, etc.<\/p>\n<h3><span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee\u00a0Settings API<\/span><\/h3>\n<p>Then, we proceed to a section related to the <span style=\"color: #00ffff;\"><strong>\u22ee\u22ee\u22eeSettings API.<\/strong><\/span> The <span style=\"color: #00ffff;\"><strong>\u22ee\u22ee\u22eeSystem<\/strong><\/span> detects autonomously whether your package implements the appropriate public<strong><span style=\"color: #00ffff;\"> \u22ee\u22ee\u22eeSettings API<\/span> <\/strong>relevant interfaces. Once detected it would sign-up for all the relevant processing all by itself. If you desire support of persistent settings make sure to implement getSettings() public prototype function in particular. <strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS<\/span><\/strong> was designed with\u00a0 end-user\u00a0and developer in mind, remember? We want you to become hooked onto our technology same as Microsoft and Apple strive to addict their developers, but in the return.. we provide ..always for free. And we provide Big Time.. so that you can materialize the ideas of yours.. the decentralized ideas of your using least effort and cost. \u00a0<span style=\"color: #00ffff;\"><em><strong>Wizards<\/strong><\/em>\ud83e\uddd9\ud83e\uddd9\u200d\u2640\ufe0f<\/span>put a lot on themselves indeed, so that you focus on your particular idea. Microsoft and Apple were conceived in times when there was no cryptocurrency around (..) no decentralized state-machines (..) here, the more apps, the more developers are satisfied, the higher popularity of the underlying crypto asset (..) meaning higher its value (..) meaning higher returns for everyone<em>. <\/em>And so everyone is happy!<\/p>\n<div id=\"attachment_4303\" style=\"width: 758px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4303\" class=\"wp-image-4303\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/settings.png\" alt=\"\" width=\"748\" height=\"634\" \/><p id=\"caption-attachment-4303\" class=\"wp-caption-text\">Persistent Settings? Easy!<\/p><\/div>\n<p>So, in order to support dynamic, persistent settings your application would be returning a new updated version of\u00a0CAppSettings, once queried by the System. At the bottom of everything CAppSettings is a wrapper around your custom arbitrary JavaScript object (note &#8216;obj&#8217; provided to its constructor below).<\/p>\n<div id=\"attachment_4305\" style=\"width: 563px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4305\" class=\"wp-image-4305\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/appsettings.png\" alt=\"\" width=\"553\" height=\"84\" \/><p id=\"caption-attachment-4305\" class=\"wp-caption-text\">CAppSettings is just a wrapper..<\/p><\/div>\n<p data-pm-slice=\"0 0 []\">The app may keep invoking\u00a0setSettings() whenever relevant settings change. The system would autonomously query your app, from time to time, for these. In the end these might be any kind of values your application needs to &#8216;remember&#8217;. You may also enforce storage of your settings by invoking\u00a0saveSettings(). The system would invoke\u00a0activateSetings() whenever new settings became available, it is then your responsibility to retrieve current settings through\u00a0CMyHelloWorld.getSettings() and apply relevant changes to View \/ Model as needed.<\/p>\n<p>Examples? The Walle(t) UI uses settings to retrieve Wallet\u2019s\u00a0 transaction history. The Browser UI dApp uses Settings to allow users to customize the looks and feels of external websites.<\/p>\n<h3><span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee\u00a0Custom Initializations and Local Threads<\/span><\/h3>\n<div id=\"attachment_4308\" style=\"width: 774px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4308\" class=\"wp-image-4308\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/initialize.png\" alt=\"\" width=\"764\" height=\"329\" \/><p id=\"caption-attachment-4308\" class=\"wp-caption-text\">Each dApp is a little bit different, right?<\/p><\/div>\n<p>Now,The initialize function. Every CWindow comes with a thread of its own. Here, a separate user-mode UI Thread is spawned through the setInterval() function. The function also explicitly loads the current settings and reports on result through the logEvent() method of CTools. These log events appear in an appropriate section of the animated, retractable Logging Pane, also within the Google Developer Tools console window.<\/p>\n<p>Here, we may enter any instructions to be executed at a interval specified earlier. One may want to put these instructions into the &#8216;Operational Logic&#8217; code-block.<\/p>\n<div id=\"attachment_4309\" style=\"width: 612px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4309\" class=\"wp-image-4309\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/customLocalThread.png\" alt=\"\" width=\"602\" height=\"365\" \/><p id=\"caption-attachment-4309\" class=\"wp-caption-text\">Local, JavaScript based threads.<\/p><\/div>\n<h3><span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee Overriding Window Events<\/span><\/h3>\n<p data-pm-slice=\"0 0 []\">Indeed, <strong><span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeGRIDNET<\/span>\u00a0<span style=\"color: #00ccff;\">OS<\/span><\/strong> promotes object-oriented, events-driven development. What follows are callback functions to events our UI dApp signed up for.<\/p>\n<p><span style=\"color: #ccffff;\"><strong>Overriding window-related functions.<\/strong> <\/span>Developer are allowed to override user-mode window-related functions at their discretion. Functions related to resizing of Windows, scrolling, etc. Looking at out template, here we have window-related events. Fired whenever the window gets resized, scrolled, etc.<\/p>\n<div id=\"attachment_4310\" style=\"width: 789px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4310\" class=\"wp-image-4310\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/callbacks.png\" alt=\"\" width=\"779\" height=\"541\" \/><p id=\"caption-attachment-4310\" class=\"wp-caption-text\">Overriding window events? It feels Good!<\/p><\/div>\n<p data-pm-slice=\"0 0 []\">There are a multitude of window-related events you app may plug right into.<\/p>\n<h3><span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee System Callbacks<\/span><\/h3>\n<p>Further, we have callback functions our app explicitly signed up for,- during its initialization, within the Constructor, as seen earlier.<\/p>\n<div id=\"attachment_4311\" style=\"width: 871px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4311\" class=\"wp-image-4311\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/callbacks2.png\" alt=\"\" width=\"861\" height=\"577\" \/><p id=\"caption-attachment-4311\" class=\"wp-caption-text\">Implementations of user-mode Callback Functions.<\/p><\/div>\n<p data-pm-slice=\"0 0 []\">Remember, as the app signed up for certain kinds of events right within of its Constructor? Now, can you see how the newDFSMsgCallback checks whether the Decentralized File System Message contains results related to a file-system query that was issued by our app? Each invocation of the Decentralized File System API returns a request identifier, which is kept track of by CWindow, for your convenience.\u00a0 Now, all it takes to verify whether the callback is relevant to us is to invoke hasNetworkRequestID of CWindow.<\/p>\n<p>By the end of the template, CMyHelloWorld is exported as a default export. Yet again, that is important as the <span style=\"color: #00ffff;\">\u22ee\u22ee\u22eePackage Manager<\/span> would be looking for it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4313\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/ending.png\" alt=\"\" width=\"901\" height=\"338\" \/><\/p>\n<p data-pm-slice=\"0 0 []\">Now, this is all it is to the Template! Feel free to browse the multitude of source codes on GitHub for some advanced usage of a variety of APIs! Server-Less, crypto-incentivized WebRTC swarms? <em><span style=\"color: #00ffff;\">Sure!<\/span><\/em> Live audio\/video streaming with screen sharing?<em><span style=\"color: #00ffff;\"> Sure!<\/span><\/em> No knowledge of WebRTC needed! The system wraps everything for your convenience! Decentralized Threads running at full-nodes? #GridScript code-processing code in real-time? To be seen, nowhere else? <em><span style=\"color: #00ffff;\">Sure!<\/span><\/em> Many additional tutorials are on the way. The code of the sample apps is very well documented though.<\/p>\n<h2><span style=\"color: #00ffff;\">Deployment<\/span><\/h2>\n<p>Now, how about deploying our Hello World UI dApp onto the decentralized system?<em><span style=\"color: #00ffff;\"> Simple!<\/span><\/em><\/p>\n<p>Change extension of the file to *.app and drag and drop it right onto the<span style=\"color: #00ffff;\"> \u22ee\u22ee\u22eeFile Manager.<\/span> Just like seen below:<\/p>\n<div style=\"width: 1920px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-4152-2\" width=\"1920\" height=\"1080\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/2022-07-11-15-33-35.mp4?_=2\" \/><a href=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/2022-07-11-15-33-35.mp4\">https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/2022-07-11-15-33-35.mp4<\/a><\/video><\/div>\n<p data-pm-slice=\"0 0 []\">Deploy the package just like you would any other file by tapping onto the<span style=\"color: #00ffff;\"> \u22ee\u22ee\u22eeMagic Button.<\/span><\/p>\n<p>You may install the app in SandBox mode just by tapping onto it, even in sandbox mode, before the package is committed onto the network, for testing purposes.<\/p>\n<p>If everything works well, you may choose to Commit your<span style=\"color: #00ffff;\"> \u22ee\u22ee\u22eeUI dApp<\/span> onto the <span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeNetwork,<\/span> so to make it persistent and available across the \ud83c\udf0eGlobe.<\/p>\n<p>All it takes is to tap onto the <span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeMagic Button.<\/span><\/p>\n<p>If you see a\u00a0<span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeQR Intent<\/span> straight away, it means you were not logged in. Scan the <span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeQR\u00a0Intent.<\/span><\/p>\n<p>If you were logged in, you would see a work-flow such as the one below:<\/p>\n<h2><span style=\"color: #00ffff;\">Installation<\/span><\/h2>\n<p>From now on, your very first\u00a0\u00a0<span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeUI dApp<\/span> is accessible by anyone!\u00a0 The user just needs to access your State-Domain and the *.app you have just deployed.<\/p>\n<div style=\"width: 1920px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-4152-3\" width=\"1920\" height=\"1080\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/2022-07-08-11-11-55.mp4?_=3\" \/><a href=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/2022-07-08-11-11-55.mp4\">https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/2022-07-08-11-11-55.mp4<\/a><\/video><\/div>\n<h2><span style=\"color: #00ffff;\">Running the \u22ee\u22ee\u22eeUI dApp<\/span><\/h2>\n<p data-pm-slice=\"0 0 []\">The app just made its way onto the Desktop! Pretty co<em>ol, huh?\u00a0No<\/em>w, double click on it to have it launched!<\/p>\n<p>Note that our Hello World app registered two implicit file handlers so it would be listed as being able to open files whenever a file is right clicked.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/pbs.twimg.com\/media\/FXI1UaxXEAAsslA?format=jpg&amp;name=large\" alt=\"Zdj\u0119cie\" width=\"793\" height=\"407\" \/><\/p>\n<p>Or the system would use it by default if it is the only app registered with a particular implicit of explicit file-type.<\/p>\n<div style=\"width: 1920px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-4152-4\" width=\"1920\" height=\"1080\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/2022-07-06-14-36-37.mp4?_=4\" \/><a href=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/2022-07-06-14-36-37.mp4\">https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/2022-07-06-14-36-37.mp4<\/a><\/video><\/div>\n<h2><span style=\"color: #00ffff;\">Everything Combined<\/span><\/h2>\n<p>On The video below you may see all the steps combined together, starting with a Developer logging-in into the system, launching the<span style=\"color: #00ffff;\"> \u22ee\u22ee\u22eeFile Manager <\/span>UI dApp, dragging the Hello World Code package from his native operating system onto the decentralized <span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeState-Domain<\/span> within the\u00a0<span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeFile Manager <\/span>UI dApp and having it deployed.<\/p>\n<div style=\"width: 1920px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-4152-5\" width=\"1920\" height=\"1080\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/2022-07-11-15-59-03-2.mp4?_=5\" \/><a href=\"https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/2022-07-11-15-59-03-2.mp4\">https:\/\/gridnet.org\/wpp\/wp-content\/uploads\/2022\/07\/2022-07-11-15-59-03-2.mp4<\/a><\/video><\/div>\n<h2><span style=\"color: #00ffff;\">Things To Consider<\/span><\/h2>\n<p data-pm-slice=\"0 0 []\">By default, <span style=\"color: #00ffff;\">\u22ee\u22ee\u22ee\u00a0UI dApps<\/span> are deployed on the <span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeEternal Storage<\/span>, meaning full-redundancy storage. You may store assets using <span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeCrowd-Funded Storage<\/span> though. Such as large texture or video files. That would still be 100% decentralized while not relying on centralized paid-for hosting servers. As for the <span style=\"color: #00ffff;\">\u22ee\u22ee\u22eeEternal Storage,<\/span> keep in mind that the storage fee depends on the size of your file. Thus, you might want to use JavaScript code minification, etc. This time it indeed does pay to do so!<\/p>\n<p>More tutorials and more documentation on the way!<\/p>\n<p><em><span style=\"color: #00ccff;\">~~Forever Yours\u00a0<\/span><\/em><br \/>\n<span style=\"color: #00ffff;\"><em><strong>Wizards<\/strong><\/em>\ud83e\uddd9\ud83e\uddd9\u200d\u2640\ufe0f<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So\u00a0folks!\u00a0Our beloved\u00a0cyber funky\u00a0fellas!\u00a0Since, decentralization is all around\u00a0and\u00a0since everyone is talking about\u00a0Web 6.9 (..)\u00a0 The time has come for all of us, developers\u00a0,\u00a0the lovers of bits and bytes (..) the 0s and 1s (..) to at least consider the possibility of deploying \u22ee\u22ee\u22ee\u00a0UI dApps of our own. What would you say?\u00a0\u00a0Have you not implemented a decentralized [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3829,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,115,17,16],"tags":[],"class_list":["post-4152","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-os-news","category-programming","category-tutorial","category-web-ui"],"_links":{"self":[{"href":"https:\/\/gridnet.org\/wpp\/index.php\/wp-json\/wp\/v2\/posts\/4152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gridnet.org\/wpp\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gridnet.org\/wpp\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gridnet.org\/wpp\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gridnet.org\/wpp\/index.php\/wp-json\/wp\/v2\/comments?post=4152"}],"version-history":[{"count":81,"href":"https:\/\/gridnet.org\/wpp\/index.php\/wp-json\/wp\/v2\/posts\/4152\/revisions"}],"predecessor-version":[{"id":4806,"href":"https:\/\/gridnet.org\/wpp\/index.php\/wp-json\/wp\/v2\/posts\/4152\/revisions\/4806"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gridnet.org\/wpp\/index.php\/wp-json\/wp\/v2\/media\/3829"}],"wp:attachment":[{"href":"https:\/\/gridnet.org\/wpp\/index.php\/wp-json\/wp\/v2\/media?parent=4152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gridnet.org\/wpp\/index.php\/wp-json\/wp\/v2\/categories?post=4152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gridnet.org\/wpp\/index.php\/wp-json\/wp\/v2\/tags?post=4152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}