[En-Nut-Discussion] EIR and java script

Ulrich Prinz uprinz2 at netscape.net
Sat Jan 30 13:11:21 CET 2010


Hi!

Thank you all for these ideas. I don't see any problem to implement 
feature rich extensions to the EIR and for SAM7X-EK there is a serial 
dataflash that may contain the whole http data content. That's even more 
cheaper than any SD-Card and probably even cheaper than a reasonable 
SD-Socket.
But then there is AVR...

So my intention was to keep large data shoveling as low as possible and 
any work that could be done on the client side should be done there.
Second reason is, that startups should not get confused by millions of 
#if #else conditions on every second line of the EIR code.

I think I will split the code some day to may be EIR and all others. I 
actually develop my code in a branch of the sourceforge SVN as I cannot 
verify compatibility with SAM7X and AVR.

So my branch will get all extensions that will make EIR feature rich and 
may even include ajax or other libraries, OLED color display, IR- or 
wireless remote controller and slimserver compatibility.

But there are basic features missing like bass/treble control, text 
search, wakeup / alarm and others. These features should work in trunk, 
i.e. for all platforms. SO I have to respect the smallest device.

Now, here is what I did:
To the discovery page I added an INPUT line for the search text and a 
search button. These call a small java script that modifies the button 
value to from 'Search' to 'Wait' and with that, my CGI detects if 
someone pressed Search or hit enter after giving a search text, or, if 
the value stays Search, it must have been a change on the genre list.

That was easy. The problem is, that every action will do a submit. The 
code then always does the query again, sometimes from cache, sometimes 
content is gathered from shoutcast. That eats up time and memory.

What I'd prefer is, that the browsers page is only refreshed, if there 
was a content change, i.e. someone selected a different genre or gave a 
different search text. It should not refresh on 'Play' or 'Add Favorite'.

In that case no large caches are needed, and may be AVR and SAM7 can 
display unlimited search results. Actually these smaller systems are 
limited to a small number of results.

So, any idea?
May be it's very simple but I don't have much knowledge of http programming.

Best regards and have a nice weekend
Ulrich

Bernd Walter schrieb:
> On Fri, Jan 29, 2010 at 08:43:46PM +0100, András Szemz?? wrote:
>> Ohh, I see. I did it on SAM7X, where space is not so much. :)
> 
> Depends - of course you can add an SD card to SAM7X as well.
> I usually add micro-SD header to almost every SAM7X layout.
> I've found an afordable header and size requirements for micro-SD
> aren't that much - cards are more expensive though.
> But I personally tend more to mootools than jquery, this decision
> however was made by a web-developer I trust and not myself.
> I'm personally not very good with web design.
> 
>> On Jan 29, 2010, at 6:06 PM, Ole Reinhardt wrote:
>>
>>> Hi!
>>>
>>>> I have implemented AJAX on one of my board. It's really simple, about 10-15 line of javascript and a CGI
>>>> function, no need to add that HUGE jquery lib.
>>> That's right. But jquery is still very cool to create very nice
>>> interfaces. If he uses the EIR he should have enough space to store the
>>> jquery library.
> 


More information about the En-Nut-Discussion mailing list