diff --git a/Core/Boot.dyalog b/Core/Boot.dyalog index 9a6fd807..bc9f8d8b 100644 --- a/Core/Boot.dyalog +++ b/Core/Boot.dyalog @@ -63,7 +63,7 @@ :EndFor 'Pages'#.⎕NS'' ⍝ Container Space for loaded classes - #.Pages.(MiPage RESTful)←#.(MiPage RESTful) + #.Pages.(MiPage RESTfulPage)←#.(MiPage RESTfulPage) 'CachedPages'#.⎕NS'' ⍝ Container for cached pages diff --git a/Core/MiServer.dyalog b/Core/MiServer.dyalog index 15cfb2a7..9716c701 100644 --- a/Core/MiServer.dyalog +++ b/Core/MiServer.dyalog @@ -474,7 +474,6 @@ ∇ file HandleMSP REQ;⎕TRAP;inst;class;z;props;lcp;args;i;ts;date;n;expired;data;m;oldinst;names;html;sessioned;page;root;MS3;token;mask;resp;t;RESTful;APLJax;flag;path;name;ext;list;fn ⍝ Handle a "MiServer Page" request - path name ext←#.Files.SplitFilename file RETRY: @@ -516,8 +515,8 @@ :If 9=⎕NC'#.HtmlPage' :If MS3←∨/(∊⎕CLASS inst)∊#.HtmlPage ⋄ inst._Request←REQ ⋄ :EndIf :EndIf - :If 9=⎕NC'#.RESTful' - :If ∨/(∊⎕CLASS inst)∊#.RESTful + :If 9=⎕NC'#.RESTfulPage' + :If RESTful←∨/(∊⎕CLASS inst)∊#.RESTfulPage inst._Request←REQ :EndIf :EndIf @@ -535,7 +534,7 @@ MS3←RESTful←0 :If 9=⎕NC'#.HtmlPage' :If MS3←∨/(∊⎕CLASS inst)∊#.HtmlPage - :OrIf RESTful←∨/(∊⎕CLASS inst)∊#.RESTful + :OrIf RESTful←∨/(∊⎕CLASS inst)∊#.RESTfulPage inst.(_Request _PageRef)←REQ inst :If 0≡REQ.RESTfulReq REQ.RESTfulReq←'' diff --git a/Core/RESTful.dyalog b/Core/RESTfulPage.dyalog similarity index 99% rename from Core/RESTful.dyalog rename to Core/RESTfulPage.dyalog index f92e29b9..aaec559f 100644 --- a/Core/RESTful.dyalog +++ b/Core/RESTfulPage.dyalog @@ -1,4 +1,4 @@ -:Class RESTful +:Class RESTfulPage ⍝ Base class for RESTful web service pages diff --git a/Documentation Sources/Configuration.docx b/Documentation Sources/Configuration.docx deleted file mode 100644 index 5310cc00..00000000 Binary files a/Documentation Sources/Configuration.docx and /dev/null differ diff --git a/Documentation Sources/Configuring MiServer.pdf b/Documentation Sources/Configuring MiServer.pdf deleted file mode 100644 index b2281570..00000000 Binary files a/Documentation Sources/Configuring MiServer.pdf and /dev/null differ diff --git a/Documentation Sources/Installing MiServer.pdf b/Documentation Sources/Installing MiServer.pdf deleted file mode 100644 index a46c3160..00000000 Binary files a/Documentation Sources/Installing MiServer.pdf and /dev/null differ diff --git a/Documentation Sources/MiServer Documentation Template.docx b/Documentation Sources/MiServer Documentation Template.docx new file mode 100644 index 00000000..7dd03cc1 Binary files /dev/null and b/Documentation Sources/MiServer Documentation Template.docx differ diff --git a/Documentation Sources/Providing RESTful Web Services.docx b/Documentation Sources/Providing RESTful Web Services.docx new file mode 100644 index 00000000..b266603a Binary files /dev/null and b/Documentation Sources/Providing RESTful Web Services.docx differ diff --git a/Documentation Sources/RESTful Web Services.docx b/Documentation Sources/RESTful Web Services.docx deleted file mode 100644 index 1957857f..00000000 Binary files a/Documentation Sources/RESTful Web Services.docx and /dev/null differ diff --git a/Documentation Sources/~$ent Handling.docx b/Documentation Sources/~$ent Handling.docx deleted file mode 100644 index 5e078e0f..00000000 Binary files a/Documentation Sources/~$ent Handling.docx and /dev/null differ diff --git a/SampleMiSites/MS3/Code/MS3SiteUtils.dyalog b/SampleMiSites/MS3/Code/MS3SiteUtils.dyalog index bfc4761b..9865bc50 100644 --- a/SampleMiSites/MS3/Code/MS3SiteUtils.dyalog +++ b/SampleMiSites/MS3/Code/MS3SiteUtils.dyalog @@ -217,7 +217,7 @@ C.relevant←'' C.reldocs←'' C.doclinks←'' - info←FromCSV Read'Examples/Data/info.csv' + info←FromCSV Read'IndexData/info.csv' :For control ref src :InEach C.controls refs srcs i←info[;1]⍳⊂control :If i≤≢info diff --git a/SampleMiSites/MS3/Documentation/RESTful Web Services.pdf b/SampleMiSites/MS3/Documentation/Providing RESTful Web Services.pdf similarity index 78% rename from SampleMiSites/MS3/Documentation/RESTful Web Services.pdf rename to SampleMiSites/MS3/Documentation/Providing RESTful Web Services.pdf index 7a6255f3..d866f2e7 100644 Binary files a/SampleMiSites/MS3/Documentation/RESTful Web Services.pdf and b/SampleMiSites/MS3/Documentation/Providing RESTful Web Services.pdf differ diff --git a/SampleMiSites/MS3/Examples/Data/intro.txt b/SampleMiSites/MS3/Examples/Data/intro.txt index 67bbd102..2a1a818e 100644 --- a/SampleMiSites/MS3/Examples/Data/intro.txt +++ b/SampleMiSites/MS3/Examples/Data/intro.txt @@ -1,3 +1,3 @@

MiServer is a free, open-source web server implemented in Dyalog APL. It enables the APL user to build sophisticated websites with little to no knowledge of the web technologies like HTML, JavaScript, etc. We hope that you will enjoy MiServer; join the forums🔗, and contribute via GitHub🔗.

-

This website serves as guide to MiServer 3.0 – providing documentation, samples, and advice. At the same time, it showcases many of MiServer's capabilities. If you are just getting started with MiServer 3.0, go through the foundational documentation in the reading order of the right-hand tree.

-

Explore the tabs for documentation, the broad selection of available controls, and the vast collection of sample pages and mini-apps. See the source of any page by clicking the MS3 logo in the top left corner and access other resources by clicking the Dyalog logo in the top right corner.

\ No newline at end of file +

This website serves as guide to MiServer 3.0 – providing documentation, samples, and advice. At the same time, it showcases many of MiServer's capabilities. If you are just getting started with MiServer 3.0, look through the examples to get an idea of of the variety of web content that MiServer can generate.

+

Explore the tabs for documentation, the broad selection of available controls, and the vast collection of sample pages and mini-apps. See the source of any page by clicking the MS3 logo in the top left corner and access other resources by clicking the Resources link in the top right corner.

\ No newline at end of file diff --git a/SampleMiSites/MS3/Examples/RESTful/mortgagews.mipage b/SampleMiSites/MS3/Examples/RESTful/mortgagews.mipage new file mode 100644 index 00000000..18b2bbcb --- /dev/null +++ b/SampleMiSites/MS3/Examples/RESTful/mortgagews.mipage @@ -0,0 +1,28 @@ +:Class mortgagews : RESTfulPage + +⍝ calculate payment + calcpmt←{0::'Error' ⋄ p r n←⍵÷1 1200 (÷12) ⋄ .01×⌈100×p×r÷1-(1+r)*-n} + +⍝ calculate principle + calcprin←{0::'Error' ⋄ r n m←⍵÷1200 (÷12) 1 ⋄ .01×⌈100×m÷r÷1-(1+r)*-n} + + ∇ r←Respond;mask + :Access Public + + r←⎕NS '' + r.msg←'Please provide either (prin rate term) or (rate term pmt)' + + :if 1=+/mask←⍬∘≡¨r.(prin rate term pmt)←⍬ Get 'prin rate term pmt' + + :if mask[1] ⍝ principle missing + r.(msg prin)←'' (calcprin r.(rate term pmt)) + + :elseif mask[4] ⍝ payment missing + r.(msg pmt)←'' (calcpmt r.(prin rate term)) + + :endif + :endif + + ∇ + +:EndClass diff --git a/SampleMiSites/MS3/Examples/Data/info.csv b/SampleMiSites/MS3/IndexData/info.csv similarity index 100% rename from SampleMiSites/MS3/Examples/Data/info.csv rename to SampleMiSites/MS3/IndexData/info.csv diff --git a/SampleMiSites/MS3/IndexData/intro.txt b/SampleMiSites/MS3/IndexData/intro.txt new file mode 100644 index 00000000..2a1a818e --- /dev/null +++ b/SampleMiSites/MS3/IndexData/intro.txt @@ -0,0 +1,3 @@ +

MiServer is a free, open-source web server implemented in Dyalog APL. It enables the APL user to build sophisticated websites with little to no knowledge of the web technologies like HTML, JavaScript, etc. We hope that you will enjoy MiServer; join the forums🔗, and contribute via GitHub🔗.

+

This website serves as guide to MiServer 3.0 – providing documentation, samples, and advice. At the same time, it showcases many of MiServer's capabilities. If you are just getting started with MiServer 3.0, look through the examples to get an idea of of the variety of web content that MiServer can generate.

+

Explore the tabs for documentation, the broad selection of available controls, and the vast collection of sample pages and mini-apps. See the source of any page by clicking the MS3 logo in the top left corner and access other resources by clicking the Resources link in the top right corner.

\ No newline at end of file diff --git a/SampleMiSites/MS3/Examples/Data/reading.txt b/SampleMiSites/MS3/IndexData/reading.txt similarity index 100% rename from SampleMiSites/MS3/Examples/Data/reading.txt rename to SampleMiSites/MS3/IndexData/reading.txt diff --git a/SampleMiSites/MS3/Examples/Data/slideshow.txt b/SampleMiSites/MS3/IndexData/slideshow.txt similarity index 100% rename from SampleMiSites/MS3/Examples/Data/slideshow.txt rename to SampleMiSites/MS3/IndexData/slideshow.txt diff --git a/SampleMiSites/MS3/index.mipage b/SampleMiSites/MS3/index.mipage index e3178a87..19d134b1 100644 --- a/SampleMiSites/MS3/index.mipage +++ b/SampleMiSites/MS3/index.mipage @@ -13,7 +13,7 @@ ∇ - ∇ Compose;cols;tabs;rows + ∇ Compose;cols;tabs;rows;div :Access Public ⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝ @@ -22,9 +22,9 @@ ⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝ tabs.Titles,←'Introduction'Over'getting started/recommendations' cols←1 0⍴⍬ - cols,←'about'New _.div(Read'/Examples/Data/intro.txt') - cols,←'slideshow'New _.div(Shuffle Read'Examples/Data/slideshow.txt') - cols,←'reading'New _.List(ReadingTree Read'Examples/Data/reading.txt') + cols,←'about'New _.div(Read'IndexData/intro.txt') + cols,←'slideshow'New _.div(Shuffle Read'IndexData/slideshow.txt') + cols,←'reading'New _.List(ReadingTree Read'IndexData/reading.txt') tabs.Sections,←'intro'New _.Table cols ⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝ @@ -33,7 +33,9 @@ cols,←⊂(⊂'Task demonstrated'),C.tasks cols,←⊂(⊂'Type'),C.type cols,←⊂(⊂'Main controls used'Over'documentation links'),C.used - tabs.Sections,←'eg'New _.DataTable(⍉↑cols) + div←New _.div _.br (_.A 'Browse Examples Directory' '/Examples/') _.br + div.Add 'eg' New _.DataTable(⍉↑cols) + tabs.Sections,←div ⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝ tabs.Titles,←'Controls'Over'list of all supported controls/links to samples using them' diff --git a/Utils/HTTPCommand.dyalog b/Utils/HTTPCommand.dyalog index 3f0bbe31..bde0555e 100644 --- a/Utils/HTTPCommand.dyalog +++ b/Utils/HTTPCommand.dyalog @@ -273,8 +273,8 @@ getchunklen←{¯1=len←¯1+⊃(NL⍷⍵)/⍳⍴⍵:¯1 ¯1 ⋄ chunklen←h2d len↑⍵ ⋄ (⍴⍵)