View Full Version : Do N800/770 have a web server?
mathew.chacko
02-01-2007, 11:04 AM
I remember once we had client-server technology for desktop and now we have web technology. Should we also not consider to develop web based applications for our internet tablets? Which may be easier to develop and maintain.
If yes, Then which server technology should be used and how?
Any howtos...
mathew
DCr33P
02-01-2007, 11:50 AM
I am not quiete sure that I understand your proposal/idea...
If you are looking for some kind of servers for the n770/n800, there are ARM builds of apache, samba & Co available for the sharp zaurus devices. It should not be that complicated to install them on the nokia devices. Didn't find any hints on apache in this forum, neither by searching the maemo repository... maybe I overlooked something.
Easiest way I know of for coding local web apps on such platforms (Zaurus, Nokia) is Python.
The http server(s) in the standard library are quite enough for just one local client.
And there are a few lightweight frameworks (Snakelets, Karrigell, webpy...) with short learning curves, well adapted for this.
mathew.chacko
02-01-2007, 12:20 PM
I am not quiete sure that I understand your proposal/idea...
My idea was if we can develop lite weight web applications for N800 and host it locally. I thought could be an interesting direction.
Easiest way I know of for coding local web apps on such platforms (Zaurus, Nokia) is Python.
The http server(s) in the standard library are quite enough for just one local client.
And there are a few lightweight frameworks (Snakelets, Karrigell, webpy...) with short learning curves, well adapted for this.
If you try running something like MoinMoin with python2.5 (and I assume python2.4) you get an error message that says: "Mo module named Base HTTPServer"
When I looked sometime ago at the pymaemo page, the design decision to reduce size was to leave some modules out -- the HTTPServer being one of them. :(
What would be cool would be a batteries-included python maemo distro that could live in a cramfs/squasfs image on the memory cards. For the N800, especially storage is no longer an issue.
Yes, that was the way it was done on the Zaurus, very practical.
That said, BaseHTTPServer is python code, not a binary module, so it's very easy to add it to your python libs on the tablet, along with any other such that are missing.
aleksandyr
02-01-2007, 05:00 PM
I really dislike the idea of using locally hosted web applications. You're talking about adding a great deal of overhead for what gain, precisely? The browser is easily the heaviest non-media application on the 770/800, and interpreted web servers and applications add another layer of complexity on top of that.
It has been my frequent experience that web applications are easier to scale/distribute, not develop or maintain. Furthermore, there's nothing unique that a locally hosted webapp brings to the table, with the exception of webapps that enhance the browser (Privoxy is a good example.)
Cite an example webapp: prove me wrong :)
Aleksandyr, I mostly agree with you, but I think web apps still have their place on two counts :
- "almost free" user interface. For simple apps (like a lot of data entry stuff) with straightforward displays, the ease of obtaining a very dynamic UI offsets coding the server part. And even that, with a good framework, is not that much : single-user local app, so no hassles with file locking, sessions, security...
- cross-platform portability and occasional remote access.
An example ? A long time ago I had three Psion PDAs (Series5 and 5mx). I spent a long time coding an app in its horrible embedded BASIC variant. Widgets were almost non-existent so the UI was very bare and basic, and functionality minimal. It was an "expense recorder" - basically a flat-file database with templates, in which I could note my uses of checks, credit cards, etc., on the fly. Each month I would export that to a Quicken format file, which I then had to transfer to my PC, and import in my money manager app.
So, it was very useful while it lasted, but then Psion gave up on PDAs, and when my last unit gave up too I moved on to other things. The app, and all the work I'd put into it, were lost forever.
Next I had a Zaurus, with at last a decent language to code in (python) and a choice of frameworks. I could have gone for a true Qtopia, Zaurus-style app, using PyQt. But it would mean learning a whole new API, setting up an emulator for development on the desktop, and falling into all the beginner traps. And then I would still need to transfer my exported files, and I could still only run the app on the Z.
So I went for a web app : it was no different than all the previous cgi/web stuff I'd done, even simpler. I could just code on the PC with my usual tools and it worked just the same on the Z. With CSS/HTML it was easy to have a fluid interface that adapted gracefully to the small screen. And of course as it's a web server, at the end of the month I could just connect to the Z from my PC browser and download the exported file directly :-)
All in all I was quite happy with the development process and the result. And I'm even happier now, after a few years, when the Zaurus line has in turn been discontinued by Sharp, and I mostly carry around my 770 nowadays. If it had been a Qtopia/PyQt app I would have had to recode the entire UI part and port it to Hildon and PyGtk (whole new API, dev tools etc.). As it is I just copied the directory to the Nokia and it just worked...
In these days of fast-changing platforms and always-in-flux frameworks, I think this should not be underestimated. If Nokia should break backward compatibility again with a whole new Hildon API in a future N900, I don't care. If I want to run my app on my Windows PC, I can. If I want to host it on my Linux server, I can. Heck, if one day Hell freezes over and Apple brings out a successor to the Newton, it will probably run on that, too :-)
Another important bonus I forgot to mention : launch time and memory.
On Zaurus/770-style platforms, launching a standalone Python+PyGtk app can take quite some time and memory. If it's something you're going to use on-and-off, frequently but quickly (like an expense recorder :-) this can be a significant hindrance.
With a web app you just launch a python process with the server at boot, which is mostly painless. As you generally will have the browser open anyway, you app is just a bookmark away and immediately available.
YoDude
02-01-2007, 06:32 PM
Has anyone tried Google Docs & Spreadsheets apps on an N800 >> http://www.google.com/google-d-s/tour1.html
I would be interested if this works. This BTW, would be 80% of my desktop work with the remainder being email and web browsing.
No need for a lappy or bloatware while on the road. :)
atmasphere
02-01-2007, 11:59 PM
Google Docs are not supported... Zoho loads, but I can't get text to enter.
http://www.internettablettalk.com/forums/showthread.php?p=32945&posted=1#post32945
Canola runs a small web server btw... It would be potentially very interesting to run a web based app locally. Imagine a Maemo / Hildon UI on a web based app that's served localled - for GTD purposes for example. You could then rsync that info to the cloud and use the same info from a desk-tethered system ;)
Hi!
Some time ago I hab been able to install Cherookee web server om my N770:
http://www.cherokee-project.com/
I haven't been deeper with it but what I remember is that it was working.
I'll try with my N800.
mathew.chacko
02-02-2007, 12:13 PM
If web based solution is not resource hungry, then I think it will be a good move. I can think of accounting or personal CRM kind of apps for business users.
I feel it will give more flexibility to development of application. Even think of connecting to N800/700 hosted site from other computers in same network.
YoDude
02-03-2007, 01:23 AM
Google Docs are not supported... Zoho loads, but I can't get text to enter.
http://www.internettablettalk.com/forums/showthread.php?p=32945&posted=1#post32945
Yeah I saw that... I didn't know if Google Office was something I hadn't heard of... Seperate and different from Docs and Spreadsheets that I had recently found via a Gmail account...
That is strange, I can load a Google spreadsheet with Opera Mini on my cell phone and With Firefox running in a Maemo enviroment.
Without a device I don't know what you mean by "Not supported". Does the N800 browser return a "page can not load" or somesuch?
Does anybody know if I can find the Opera version that is preinstalled on the N800 so I can load in an emulator?
BTW, not being able to run simple, commercial web apps would make this thing kind of useless to some I would think.
YoDude
02-03-2007, 09:54 PM
The suspense was killing me so I went and purchased one today... Google Docs returns a page served by them that says something like "Sorry, this browser does not support web word processing" however, spreadsheets sent as attachments can be viewed.
Basically what atmasphere posted and linked to. :doh:
At least I can view them in full screen and that is an improvement.
Since this was a server generated response, it may be just the default for a browser that it is not "aware" of. :)
In any event it appears as if it is a third party software issue and not Nokia's.
Time will tell though...
Back on topic... just looking at the thing from my router, I'm prettty sure it can push a server out. But, a mobile device that isn't always connected would be my last choice as a server.
Can it run served web apps? Time will tell. :)
>> http://opensource.nokia.com/projects/mobile-web-server/index.html
TA-t3
02-04-2007, 12:37 PM
As for Google Docs (or other tricky sites), it could be worth trying this:
1) Install privoxy
2) Edit privoxy's user agent configuration (e.g. in /etc/privoxy/default.action) to make it look like a Google Docs - accepted browser
3) Make sure privoxy reloads its updated config (/etc/init.d/privoxy restart should do it, or just reboot the device)
4) Set up a connection configuration where you specify proxy 127.0.0.1 port 8118 (that is, privoxy)
5) This should fool Google Docs, at least if it only relies on the browser user agent, now it remains to see if the real browser can actually handle what it gets..
(One of the things I like with the (desktop) Konqueror browser is that you can simply set the user agent string to whatever you want, on a site-by-site basis. There should have been a config like that in Opera, unfortunately there isn't. I think there is/was one in the Desktop version IIRC.)
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.