First stab at serving web pages

116 wyświetleń
Przejdź do pierwszej nieodczytanej wiadomości

Chris Cunnington

nieprzeczytany,
14 mar 2014, 11:26:3914.03.2014
do newspeak...@googlegroups.com
Well, nobody is going to think this is stroke of genius, but it's a start. 
I figured with Gilad's talk of security and viruses, there ought to be a server somewhere to make webpages with Newspeak. 
It took a while to grok Hopscotch and for the blackMarket lightbulb to flash. 

Install with Monticello from the project WebClient both WebClient-Core and WebClient-HTTP from http://www.squeaksource.com
Then go to the HelloWorld example and change: 

Transcript open show: 'Hello, Oh Brave new world'

to: 

WebServer exampleBrowser 

Evaluate: 

HelloBraveNewWorld usingPlatform: platform 

in a Workspace. Then go to http://localhost:9999 to see files served. 
I'm quite pleased by this. It's a beachhead into serving webpages with Newspeak. 
Oceania will quake. 

Chris 

Gilad Bracha

nieprzeczytany,
14 mar 2014, 15:45:5914.03.2014
do newspeak...@googlegroups.com
Hi Chris,

I haven't had a chance to try this, but am I right in that this is simply invoking Smalltalk code from Newspeak? Or is there more going on that I've missed? And what are your plans going forward?

Gilad Bracha

nieprzeczytany,
14 mar 2014, 15:55:1914.03.2014
do newspeak...@googlegroups.com
I also want to point out that one shouldn't need blackMarket to do something like this. The recommended approach is to define a Newspeak application for deployment that gets at WebServer (or whatever else is desired) via the IDE namespace and use that to configure a module that takes WebServer as a parameter. 


On Friday, March 14, 2014 8:26:39 AM UTC-7, Chris Cunnington wrote:

Gilad Bracha

nieprzeczytany,
14 mar 2014, 16:06:5214.03.2014
do newspeak...@googlegroups.com
Actually, a  better way nowadays would be to import it via 

WebServer = platform squeak Webserver.

we are trying to crack down on the black market.

Gilad Bracha

nieprzeczytany,
14 mar 2014, 16:15:5814.03.2014
do newspeak...@googlegroups.com
One path that might be interesting to follow would be to set up cross-image actors that communicated via HTTP. 


On Friday, March 14, 2014 8:26:39 AM UTC-7, Chris Cunnington wrote:

Chris Cunnington

nieprzeczytany,
14 mar 2014, 16:49:1614.03.2014
do newspeak...@googlegroups.com


>>I haven't had a chance to try this, but am I right in that this is simply invoking Smalltalk code from Newspeak? Or is there more going on that I've missed?

Pretty much, yea. 

I've found that it's easy to start a Newspeak image headlessly on Linux (on my Sputnik Dell XPS laptop with ubuntu 12.04 LTS), so I think deploying a website would be similar to the way I just did the new squeak.org homepage. 

I've played with Seaside in Squeak a lot. What's nice about making a website in a new language is it gives an immediate paradigm. I'm doing it in Self at the moment as well. Trying to build a familiar thing, a website, in a new language is great way to come to terms with a new language. 

My grasp of Newspeak is rudimentary so far. The Twitter example uses FFI to access curl ( if I read it correctly ). The virtual machine Eliot works on has all that's needed for web development, I think. The more I grasp the language, I hope the less to use blackMarket and Smalltalk.  I could deploy the example I mentioned with Andreas Raab's WebClient to the internet on Linux right now, but it's a tad trivial even for me. 

>>And what are your plans going forward?

Fumble and iterate until I am making a decent enough website in Newspeak in localhost and then deploy it online. 

What would you like to see a Newspeak website do?


Chris

Gilad Bracha

nieprzeczytany,
14 mar 2014, 21:38:5214.03.2014
do newspeak...@googlegroups.com


On Friday, March 14, 2014 1:49:16 PM UTC-7, Chris Cunnington wrote:


>>I haven't had a chance to try this, but am I right in that this is simply invoking Smalltalk code from Newspeak? Or is there more going on that I've missed?

Pretty much, yea. 


Ok, just making sure I understand.
 

I've found that it's easy to start a Newspeak image headlessly on Linux (on my Sputnik Dell XPS laptop with ubuntu 12.04 LTS), so I think deploying a website would be similar to the way I just did the new squeak.org homepage. 


I expect so.
 

I've played with Seaside in Squeak a lot. What's nice about making a website in a new language is it gives an immediate paradigm. I'm doing it in Self at the moment as well. Trying to build a familiar thing, a website, in a new language is great way to come to terms with a new language. 

My grasp of Newspeak is rudimentary so far. The Twitter example uses FFI to access curl ( if I read it correctly ).

I believe so.
 

What would you like to see a Newspeak website do?


As I suggested earlier on this thread,  one possibility is to use it to implement cross-network actors using HTTP as transport. Running a Newspeak service that auto-updated clients is the ultimate goal I suppose. Pragmatically, applications like the late, great dabbleDB come to mind. Bear in mind that our emphasis is on rich clients that run in the browser, written using Hopscotch, more than on traditional server side web apps. We are not there yet, but we getting pretty close.
Odpowiedz wszystkim
Odpowiedz autorowi
Przekaż
Nowe wiadomości: 0