Very nice indeed. Any chance we will see some kind of SourceFourge opening soon? Maybe after adding docs and multithreading capabilities?
__ Raymond Irving --- Günter Greschenz <[EMAIL PROTECTED]> wrote: > hi raymond, > > your idea of including other files is already done. > there is a function "script" (see "gas,js") which > includes other files. > that how i want to support different "applications". > on example is > "notes". in "apps/notes.js" i implemented the ajax > backend, in > "www/Notes/*" i implemented the frontend. > > the part you've written about loading xml files > (contacts.xml) is solved > like this (again, see gas.js): > var config = new XML(new > File("server.xml").read()); > print(config.port+"\n"); > > a simple scheduler is also already implemented > (again, see gas,js :-): > // print "from timer" to console in 10 secs > addTimer(10, "print('from timer\\n');"); > > i also implemented a database sample for directly > editing databases via > the browser (see SQLiteBrowser in the source zip). > but its still not > finished (only running in MSIE correctly !) > there you can play with databases: select a database > / select a table / > edit values just with a dblclick, change the value, > hit return... > > cu, gg > > > Raymond Irving schrieb: > > This is very very sweet :) > > > > Many thanks for sharing Greschenz. I would love to > see > > this project mature. Maybe something like a > ThinClient > > webserver with Javascript as the backend so we > could > > write lovely web apps with AJAX support that > offers > > database like features? Could it also run on > > Thinstation with some attached storage? Wow! > > > > Here's some other ideas: > > > > * Make it possible to include external classes or > > files, for example include('myclass.jsp') > > * add some build it object to make it easier to do > > stuff inside the server. Example Mail, File, > Scheduler > > > > var mail = new Mail() > > mail.to = '[EMAIL PROTECTED]'; > > mail.from = '[EMAIL PROTECTED]' > > mail.subject = 'Hello'; > > mail.send() > > > > var f = new File('contacts.xml'); > > var xml = f.readAll(); > > > > var sch = new Scheduler(); > > if(!sch.exists('MyImporter')) { > > sch.setName('MyImporter'); > > sch.setInterval(30); // every 30 minutes > > sch.execute('imports.jsp'); > > sch.save(); > > } > > > > > > Just my 2 cents. > > __ > > Raymond Irving > > > > > > __ > > Raymond Irving > > > > --- Günter Greschenz <[EMAIL PROTECTED]> wrote: > > > > > >> Hi, > >> > >> the reasons why i did this: > >> 1) i wanted to have a simple webserver to get my > son > >> involved in > >> programming an online game, and he knows already > a > >> little bit javascript > >> 2) my hobby is programming in c++ and javascript, > >> but at work i have to > >> code in c#, so i just wanted to have some fun :-) > >> > >> i think its no a new idea, ive seen some > webservers > >> using javascript as > >> backend language, but everything i found was to > >> complicated to > >> install/use or to complicated to port to a new > >> hw-platform (i want to > >> run it on my linksys-nslu2 with ftpd to my > topfield > >> hd-vcr to program > >> the recordings via web). > >> and i like sqlite very much and no webserver i > found > >> had this combination. > >> if you look at my code, you see that i just use > >> *) sqlite > >> *) the javascript-engine from mozilla (very > >> advanced: js v1.7 including > >> xml support...), > >> *) some glue code to access sqlite and a simple > http > >> server from js > >> (only one file: gas.cpp) > >> > >> the trick between js and sqlite is like yours: > every > >> sql statement > >> executed returns a 2-dim array... > >> one thing is maybe iteresting: the class > "DBItem". > >> its a kind of (very > >> simple) or-mapper. > >> it maps the properties of a javascript-object to > the > >> columns of a table. > >> here is a code example: > >> > >> var db = new Database("user.sdb"); > >> db.exec("create table if not exists user (id > >> integer primary key > >> autoincrement, name varchar unique, pwd varchar, > >> test varchar)"); > >> var user = new DBItem(db, "user"); > >> user._name = "Guenter"; > >> user._pwd = "FooBar1234567890"; > >> user._test = "blubb"; > >> user.flush(); > >> var id = user._id; > >> var user = new DBItem(db, "user", id); > >> print("name="+user._name+"\n"); > >> //db.exec("delete from user where id="+id); > >> > >> if you are still curious (or anyone else ?), i > can > >> send you the actual > >> source by mail. :-) > >> > >> btw: i had a look into your http-source: looks > nice, > >> but its maybe to > >> complicated to implement my features like > >> http-multipart-posts. > >> > >> cu, gg > >> > >> > >> > >> > >> > >> John Stanton schrieb: > >> > >>> The multi-threaded application/www server I > >>> > >> described requires no > >> > >>> threading involvement from the application > >>> > >> programmer. That > >> > >>> programmer uses SQL, HTML, Javascript and the > >>> > >> application language we > >> > >>> call MUV. Think about it, when you use Apache > you > >>> > >> don't have to be > >> > >>> aware of its internal threading. > >>> > >>> The only significant synchronisation element is > to > >>> > >> do with multiple > >> > >>> users of Sqlite, and that is handled > transparently > >>> > >> to the application > >> > >>> programmer. > === message truncated === ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------