HTMLRenderer testing framework

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

HTMLRenderer testing framework

Postby norbertjurkiewicz84 on Thu Nov 02, 2017 9:07 pm

We put together a small framework to test the HTMLRenderer and a full stack application running within.

https://github.com/the-carlisle-group/H5RFramework


This is experimental and WILL change but allows me to create API endpoints and allows a third-party to write the HTML5/CSS/JS front-end against a defined spec...

The really nice feature is having the ability to assign APL callback functions to server endpoints such as

/Application/File
/API/V1/TestFmt

via

Code: Select all
 
ep←⎕NEW #.H5R.APIEndPoint
ep.Path←h5.APIEntryPath,'API/V1/TestFmt'
ep.GET←'#.FmtBuilder.getFmtIntitial'
ep.POST←'#.FmtBuilder.getPostResponse'
     


A full window definition looks like this

Code: Select all
          path←'c:\temp\application\apitest.html'
          h5←⎕NEW #.H5R.HTMLViewer path
          h5.Debug←0
          h5.DisplayLogWindow← 0
     
          ep←⎕NEW #.H5R.APIEndPoint
          ep.Path←'API/V1/TestFmt'
          ep.GET←'#.FmtBuilder.getFmtIntitial'
          ep.POST←'#.FmtBuilder.getPostResponse'
     
          h5.APIEndPoints←,⊂ep
     
          ob←h5.Show
          ob.Wait



With this, I can quickly create a distributable package that a front-end developer can run and test without needing to distribute a whole app or setup a server.

Maybe it will make life easier for someone here...
Attachments
HTMLViewer and Log.png
Framework in action
User avatar
norbertjurkiewicz84
 
Posts: 48
Joined: Mon Nov 01, 2010 7:26 pm

Re: HTMLRenderer testing framework

Postby ArrayMac227 on Tue Nov 07, 2017 3:21 pm

(unavoidably public, apologies.) The page refers to H5RProejct.dws, when H5RProject.dws may be the correct spelling...
ArrayMac227
 
Posts: 40
Joined: Sat Sep 12, 2015 1:40 pm

Re: HTMLRenderer testing framework

Postby norbertjurkiewicz84 on Tue Nov 07, 2017 4:13 pm

ArrayMac227 wrote:(unavoidably public, apologies.) The page refers to H5RProejct.dws, when H5RProject.dws may be the correct spelling...


Good catch.
User avatar
norbertjurkiewicz84
 
Posts: 48
Joined: Mon Nov 01, 2010 7:26 pm


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest