MiServer APL Web Hosting Concepts

The beauty of running your own APL-based MiServer web server is that you have 100% full control over the complete Web hosting and presentation functionality.

MiServer is built using Dyalog APL  and runs in an APL Workspace.  MiServer is very effecient and easy to manage and extend.

There are three different approaches to using MiServer.  And, you can easily mix and match to produce your own hybrid solution.

1. Creating MiPages that reside on the server as  xxxx.dyalog  (or xxxx.mipage)  APL namespaces.  These are text files that can easily be edited and uploaded.  The "notepad" editor can be used and the files are saved using the Unicode UTF-8 format so they can contain any Unicode characters.  It is easy to edit these using the APL Font  (APL385 Unicode). MiPages have INCLUDE statements that will attach other .dyalog namespaces so you can include many other APL programs and variables. This approach will send a completed HTML web page to the end user who makes a call to a specific xxxx.dyalog  MiPage.  The complete APL language can be used within a MiPage to produce the desired final HTML output.  There are many HTML "tools" that are included to make it easy to define pages, styles, tables, links and content.

2. Creating APLscript sites and pages. APLscript is a cusomized MiServer MiPage  designed to be the only MiServer page that needs to be called.  The APLscript page looks at the inbound header, and can access HTML, JavaScript as well as APL  templates.  A special HTML Comment pattern is used that can be placed into any of the APLscript template files: <!--⍎ANYAPLCODE-->.  "ANYCODE" is any APL funtion, variable or expression.  When the APLscript.dyalog page is called, parameters are passed to indicate various actions such as   code=GetPage     &Page=Home           and so on.  The web site and pages are nicely organized as simple Windows folders.  This makes it easy to leverage existing HTML pages and sites that have already been developed.  By hosting an existing HTML site, and embedding the APLscript HTML command tags, APL will be executed, and the resultant content will be inserted into the Template - replacing the APLscript Comment Tags.  With this approach, the focus is more on programming APL and less on developing complete HTML and JavaScript web sites.  APLscript leverages existing HTML, JavaScript, APL, and TEXT template files that are pre-processed prior being sent to the user (or calling HTTP system as a web service). APLscript also includes a web-based programmer console where programmers can test and debug their APLscript web applications.

3. Web Services is a great way to leverage APL and MiServer.  Both MiPages (e.g. using the class  MildPage)  and APLscript tools can be used to provide web services.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to access passed HTTP header info for MiServer v2.0

First question: are you using MiServer 2 or 3? We've rationalized how things are accessed better...