marcoschwartz / aREST

A RESTful environment for Arduino
http://aREST.io/
Other
1.2k stars 279 forks source link

Add Offline Bootstrap & jQuery with SPIFFS #91

Open ghost opened 8 years ago

ghost commented 8 years ago

Hello, As my Knowledge Grew with esp8266 i would like to say that you can add Offline Bootstrap and JavaScript Files to make the aRest Work with SoftAP Mode. I Made web Pages on ESP-12, Uploaded to SPIFFS and Opened them - also added ICONS , FONTS and Java Script and they all Work with Soft AP . We can Get Files from SPIFFS by Separate GET Requests for each file. Actually, you can Bundle the Bootstrap and Jquery Files with your Library to Upload Files to SPIFFS with a Click. ( ESP8266FS will be needed be installed by user).

marcoschwartz commented 8 years ago

Hi! Indeed that's something we need :) I was thinking more about embedding the files with the library (maybe as Strings?), this would work but it's a bit complicated for the average user. What do you think?

ghost commented 8 years ago

If we could Attach the Offline Bootstrap & Javascript Files with .h files then the user will only need to upload it through FS tool for one time only and it will persist there even after unlimited code uploads. Point is, User have to just Upload it for 1 time only so i think this wouldn't be an problem. Even when i was a average user when i got to knew about the SPIFFS , after many tries i got to understand about SPIFFS because there was no Tutorial on Web about Loading Webpages from Spiffs. So A Detailed Tutorial on how to upload the files and install the tool will be required in Readme Section / Example Code . We could Add like this ("/* Line : 'Download Link of Tool' & 'how to install tool' */") in SoftAP Examples. I Think Restful Experience can only be obtained by this method only otherwise Library will lack in Soft AP Options and What all things we can do with SoftAP.

klerone commented 8 years ago

I think the easy way to make a nice UI is using the offline bootstrap and attach it to your html file, then this you can easily make an app for Windows (phone, tablet and PC), BlackBerry, Android and I exclude iOS cause you have to $100 to upload your own stuff or using in any web browser (not IE) I did it and works nice using the aREST.js version.