ESP8266 Webserver Project

Moderator: Sprite_tm

User avatar
By Sprite_tm
#4635 Hi bkajendra, I think you took my message in a harsher way than I intended it.

bkrajendra wrote:I do not understand why u disagree..!
Basically I myself put entire Twitter Bootstrap GUI into the ESP. I'm not against it.
There is something called Thin and thick client. Its absolutely up to the need of application and thinking of developer, to decide about where to put the GUI and logic. I never said it must be done in one particular way... its just an option. Either put "GUI and Logic on ESP" or Keep only logic in ESP and make HTML5 app for desktop, Mobile, TV or any device.

For application with complex CPU hungry logic with many clients accessing ESP remotely its always better to have json api on ESP. This has been done all over internet to reduce the server load and improve throughput...!

We just look at the thing from different vantage points. You said "There is absolutely no need to put GUI in ESP" implying the general practice should be to put only a JSON API into the ESP and leaving the UI to an app or external website. My point of view is that the 128K of flash the ESP has is a great opportunity for an integrated HTML5 user interface on the ESP itself, and that that should be the default, reverting to external apps/UIs only when it's necessary.

For wireless sensor network reply I was just answering one thread n just trying to share an idea.

Sure, no worries, but what usually happens is that more people share ideas or respond to your ideas and before you know it, the thread is about wireless networks. What I ask is just to take the discussion, interesting as it may be, elsewhere so people looking for esphttpd information won't have to trudge through heaps of offtopic information.

sorry if anything has gone wrong!!!


No worries :)

alonewolfx2 wrote:@bkrajendra webserver with your guy too slow for first load.

Alonewolfx2: Sorry, I have trouble parsing that sentence.
User avatar
By alonewolfx2
#4638 I edited. T9 changed my word. Not guy, gui :)
@bkrajendra page loading too slow with your gui. Normal html file loading 2-5 second but responsive gui loading ~40 second and sometimes 1minutes.
User avatar
By bkrajendra
#4664 Thank you @Sprite_tm ...
It ok.. I've not taken it harsher way... just trying to clear my point. :)
n sorry for offtopic. I'll take care next time..!

@alonewolfx2 .. . Thats obvious!
Jquery.min.js --- 94 kb
bootstrap.min.css -- 119kb
bootstrap.min,js -- 35 kb
(Also bootstrap requires extra fonts of 144kb for gliphicons which ive not included. Bootstrap might be making request to these fonts which might be eating some time.)

Imagine time require to send it through wifi and load it in ur browser :)
Thats why I suggest to keep things lighter about UI. Its ok if UI also there in ESP but its better if we use Ajax and Json to save data transfer during request response, so that UI loads only once (fewer times) , and it doesn't matter even if its little heavy.

Or there is also even other nice solution... but not all will like it.
Loading all CSS and JS from CDN. But for this its mandatory ESP to be in station mode and connected to other wifi AP with internet connection.
so this is not a good option for all situations.

So its better to have Light, nice responsive GUI with Ajax.
User avatar
By Sprite_tm
#4673
bkrajendra wrote:@alonewolfx2 .. . Thats obvious!
Jquery.min.js --- 94 kb
bootstrap.min.css -- 119kb
bootstrap.min,js -- 35 kb
(Also bootstrap requires extra fonts of 144kb for gliphicons which ive not included. Bootstrap might be making request to these fonts which might be eating some time.)


Wow, 250K for only the Bootstrap framework... I use some Javascript/AJAX too for the WiFi selector, but the only 'library' I use is 140medley which totals to a whopping 825 bytes. Which is useful, I wouldn't want to delete the cat pictures :P