Question
Cacio Watt · Aug 28

Implementing simple web interface, how?

Hi,

Over time I have created an house-automation solution based on IRIS:
90% of my code is pure ObjectScript, with the most recent 10% being the use of Python libraries for specific tasks.
All of the above being terminal based up to now.

I would like to expose some configuration options / parameters via a very simple web page, to be serviced with the IRIS private web service (so I don't want to use an external Webserver just for this..)

My question:
how should I approach the creation of this simple, one page, web page?
Should I write it manually, in the "old" CSP way, copying some examples from SAMPLES, or is there an easy and fast way to generate such a basic input page using some existing libraries and/or tools?

I am Mac based, using VS Code. 
This is purely for my own internal need and use, so security/scalability etc play no role.

Thanks

Product version: IRIS 2022.1
0
0 212
Discussion (7)3
Log in or sign up to continue

Nowadays I would not recommend plain CSP files at all, and for sure, and totally no ZEN. 

I see that you use Python in some cases, I may recommend you use Django in that case, I wrote a few articles about it recently.

Or just do REST with %CSP.REST class, and do plain web application on plain HTML and JS, or may use ReactDOM (my application as an example).

I suggest to give a try Kozo by @Sean Connelly. It's a WYSIWIG editor for CSP pages that supports ObjectScript, SQL, charts, and other fancy visualization options. 

can be easily installed ZPM:

zpm "install kozo"

To me, the simplest is CSP. You require an HTML file with some Server Side code, and you already have some samples.

A more modern (but also simple) would be REST. You require a little extra setup with ObjectScript class (To handle the REST) + HTML code + Javascript Code to call the rest pages.