Home   Archive   Permalink



New Tutorial: Create Mobile and Web Based Client-Server Apps with jsLinb/Sigma Visual IDE and Rebol

I wrote a tutorial which explains how to use the free jsLinb library and Sigma visual builder IDE to create web client UIs that connect to Rebol server apps. This little toolkit has been really productive at creating rich client apps which run absolutely everywhere, on any mobile device, and in virtually every old or new browser (I've tested in the stock browsers on the very first models of iPhone and Android 2.2 devices, in IE6, Firefox 1.5, etc., as well as in the newest Chrome, Microsoft Edge, etc.), and the apps run exactly the same everywhere:
    
http://re-bol.com/jslinb
    
Not only do the created apps run on virtually any platform, but the visual IDE also runs on all those platforms. So, not only can you use the apps, but also create them, on any platform, and connect to Rebol servers anywhere. The toolkit is very well documented, easy to use, and much deeper than you'd expect at first look. So far, it's the best cross platform Rebol client-server solution I've found for my needs (it's also useful for connecting to servers/services written in other languages and development toolkits, and tying them all together with Rebol server code, etc.).

posted by:   Nick     5-Sep-2015/10:15:24-7:00



Thank you Nick, for the effort and dedication to this community. A great tutorial! Do you use the builder for production code?

posted by:   Danie     6-Sep-2015/6:53:52-7:00



Do you think Julia can also be used with the builder? It certainly will be a great companion besides Rebol, for 'full stack' coverage.

posted by:   Danie     6-Sep-2015/7:01:41-7:00



Hi Danie,
    
I've used jsLinb for in-house tasks which are in production at Rockfactory, and I'm building a commercial app for a friend/client with it. So far all has gone well.
    
I haven't played with Julia much yet. As long as there is some network I/O, server, CGI, or other method of accepting URL formatted requests from a browser (GET, POST), you should be able to use jsLinb with it.

posted by:   Nick     6-Sep-2015/8:54:01-7:00



I just took a look at julialang.org - that needs to get higher on my todo list :)
    
It looks like the CGI.jl project at https://github.com/Jaylle/CGI.jl , for example, should do what's needed. A few examples there show how to retrieve submitted GET and POST values:
    
print("Hello, " * app.input.get["name"])
print("Hello, " * app.input.post["name"])
    
Just be sure that the key in the key=value pair sent from jsLinb matches the key in the app.input.get or app.input.post function ("name" above). For example:
    
linb.Ajax(
     "http://localhost/cgi-bin/script.jl",
     ('name=' + self.input1.getUIValue()),
     function(s){}
).start();

posted by:   Nick     6-Sep-2015/13:49:43-7:00



Thanks for the response Nick. The developers of Julia mentioned on their website that Julia isn't particularly well-suited for desktop development. I think that this builder will solve the GUI part just nicely. Apparently its slow with CGI use. Fast CGI, they say, will speed things up. What is your take on this?

posted by:   Danie     7-Sep-2015/5:27:09-7:00



The project linked above states near the top that it's specifically engineered to work with FastCGI.

posted by:   Nick     7-Sep-2015/9:54:21-7:00



Also, at first glance, it looks like the Julia standard API has network IO built in. So you should be able to roll your own server, without needing to use the whole Apache stack. I wrote some more in the tutorial about how to do that sort of thing with Rebol (it's great if you've got your own dedicated server, but CGI generally works on any old shared hosting, or if you already have an AMP setup installed somewhere accessible).

posted by:   Nick     7-Sep-2015/22:15:26-7:00



Thanks for the tutorial.

posted by:   Sam     12-Sep-2015/1:09:03-7:00



You're welcome Sam :)
    
I made some updates and added more code examples to the tutorial today.

posted by:   Nick     19-Sep-2015/0:37:28-7:00



You might be interested in this link. They're trying to accumulate info on exactly what you're doing. You may be and probably are far ahead of them but there may be something there for you. Their web page title,
"unhosted web apps, freedom from web 2.0's monopoly platforms".
    
https://unhosted.org/


posted by:   Sam     20-Oct-2015/0:46:16-7:00



That struck me as a sign of the times. Sort of "how to make applications (for web browsers) which don't need to connect with web servers in order to run". And it's all based on the assumption that web technology is the default way in which applications, in any domain, are built. I guess many users these days do see computing that way. What a mess the industry has made for itself.

posted by:   Nick     26-Oct-2015/6:30:03-7:00



If you look at this in a big picture manner of thinking what they are doing is just moving to Plan 9 operating system. Where everything is a file and networking and shared resources is a given. A little different but the idea is the same. If you want data displayed you just call a file on a server. Local or where ever and the file gives you the results. Plan 9 front link is just an offshoot of the original Plan 9 OS.
    
http://fqa.9front.org/fqa0.html#0.1
    
The reasons it didn't catch on seem to be about the same as Rebol. People were moving to free operating systems, cost and licensing. If Bell Labs had slashed the price to five bucks or something like that we may be using a much smaller, more secure OS now.

posted by:   Sam     27-Oct-2015/13:42:10-7:00



Just going thru the tutorial now. Can I use this to make a gui for running on my desktop computer that can read and/or write to local files? Basically can I make a desktop application?

posted by:   Tony     25-Feb-2016/22:07:27-8:00



The server part can write to local files (+ do anything else which Rebol is capable of), and jsLinb will run in just about any desktop or mobile browser, but this would certainly be a more time consuming, complicated, and limited method than just using one of the available GUI dialects to build desktop applications with Rebol. If your intent is to build a data management app which runs in a web browser, in both mobile and web browsers (*especially* if you want to support old and under powered devices), then this is a good choice. But if your only intent is to support desktop platforms, then use Rebol's native VID or one of the third party GUI libraries (i.e., RebGUI).

posted by:   Nick     26-Feb-2016/6:12:40-8:00



Thanks for the tips Nick.

posted by:   Tony     26-Feb-2016/12:26:41-8:00



Think of this as a much nicer approach to building web apps than plain old CGI with Rebol. You don't need to write a bunch of client (browser) display code, to be printed by the CGI script. Build the GUI front end visually with the Sigma IDE (and/or manually with jsLinb code), and get all the nice features that are built into jsLinb (all the widgets, such as tables, tabs, accordions, image layouts, etc.), plus multi-browser compatibility for free (just about any mobile browser in existence, even iPhone 1 and Android 2.2, IE6, etc.). And all the Rebol CGI script needs to do is store, retrieve, manipulate, etc., the data.
    
JsLinb/Sigma is really productive, versatile, compatible, and capable as far as web tools/libraries go, and I like the look and feel of jsLinb. But, for desktop only, I'm still using plain Rebol VID most often, and RebGUI next most often.
    
The best option, when it's done, will be Red's GUI port to the browser (or R3's, if I can get Cyphre to manage the time to complete that port).

posted by:   Nick     28-Feb-2016/12:14:20-8:00



Hi Nick. How did the project go since last we spoke? Also, do you think it is possible to build/construct the JsLinb code on the Rebol (server side), and have it send to the client to update/build the GUI dynamically?

posted by:   Danie     3-Sep-2016/12:51:56-7:00



Can RED be used instead of Rebol?

posted by:   David Murphy     23-Nov-2016/17:40:51-8:00



David,
    
There was a brief discussion about red cgi here: https://groups.google.com/forum/#!msg/red-lang/CDmbii-VVFk/Ztrjepb5kQUJ
    
I haven't seen more, but would assume that Rebol cgi support is more mature.

posted by:   Nick     24-Nov-2016/7:59:21-8:00



Danie,
    
Yes, you could create, alter, choose, etc., jsLinb code to be sent to the browser. jsLinb layouts can be represented entirely in code which can be composed, parsed, etc. by a server script, but that's not how it was designed to be used. The IDE was meant to be used to create single page apps which stay open in the user's browser and send JSON data back and forth with the server. It's best feature is the WYSIWYG IDE which runs in the browser on just about any new or old (and under powered) device. It's a nice simple and relatively easy to use solution for creating interfaces to Rebol server code which you can be sure will run just about anywhere (especially if you want to ensure support on older or simpler devices with browsers other than modern Chrome). It's also a nice way to build interfaces on older/unsupported devices, although that is probably less of a relevant use case these days (I wrote that article at a time when it was important for me to be able to not only run, but also create, data management apps using a variety older android and iDevices. These days tablets with full Windows OS are regularly available for less than $75, so jsLinb has become less necessary, though still a great tool for that niche).

posted by:   Nick     24-Nov-2016/8:30:33-8:00



Thanks NIck, I get the feeling Red has some ways to go, especially on Mac where even something as simple as request-file would not work

posted by:   David Murphy     24-Nov-2016/13:57:03-8:00



@David `request-file` on Mac was implemented two weeks ago and works fine.

posted by:   DocKimbel     25-Nov-2016/5:14:41-8:00



Thanks Doc, it's always great to hear that Red is progressing well!

posted by:   Nick     25-Nov-2016/12:02:07-8:00