Re: [Pharo-users] How not to serve an AngularJs application from Pharo
Kilon wrote
Really nice I now see the teapot stuff, for example this
GET: 'demo/common/style.css' -> [ self styleCss ];
is really flexible meaning you can interpret http addresses and map them to pharo methods. This a really cool idea indeed, I see now why people are excited about teapot. Excuse my ignorance about web >development but html/css and js always scared me away :D
I found it a very easy way to get some existing javascript app delivered fast from Pharo. It needs a lot of refactoring and cleaning up to become maintainable though. Separate classes for the angular components, and the canvas from Seaside to structure the html. A more difficult aspect is how to create the javascript. For (qc)magritte applications it looks like a builder should be able to generate form components and a json data binding. With GT it should even be possible to integrate javascript development directly in the pharo image. And it might be better to use React or Amber or SqueakJS Stephan
would it not be better to have the html / css and js code outside the image ? so instead to load files instead of return strings ? this would make it easier to edit the code for html/css/js . GT js integration no idea how that works, does GT has for example syntax highlighting or other js specific features ? Even though I always have been a supporter of Amber the IDE has still a very long way to go. Dont know about Seaside, but I assume for Seaside js code will still be something foreign. I think in practice would be better to use the IDE tools offered by firefox and chrome, though its still possible to use both amber and these tools, amber does not produce readable js code. No clue about React and SqueakJS. I am very new to web dev so probably I miss a lot, but frankly I found the fragmentation so shocking and so many negative opinions about the whole workflow that I have been reluctant to invest as much time as I have invested in Pharo. But then the things I do are not so web orientated as other people. But still I am very interested into this. SqueakJS looks definitely very interesting. On Mon, Oct 27, 2014 at 10:05 PM, Stephan Eggermont <stephan@stack.nl> wrote:
Kilon wrote
Really nice I now see the teapot stuff, for example this
GET: 'demo/common/style.css' -> [ self styleCss ];
is really flexible meaning you can interpret http addresses and map them to pharo methods. This a really cool idea indeed, I see now why people are excited about teapot. Excuse my ignorance about web >development but html/css and js always scared me away :D
I found it a very easy way to get some existing javascript app delivered fast from Pharo. It needs a lot of refactoring and cleaning up to become maintainable though. Separate classes for the angular components, and the canvas from Seaside to structure the html.
A more difficult aspect is how to create the javascript. For (qc)magritte applications it looks like a builder should be able to generate form components and a json data binding. With GT it should even be possible to integrate javascript development directly in the pharo image.
And it might be better to use React or Amber or SqueakJS
Stephan
"would it not be better to have the html / css and js code outside the image ? so instead to load files instead of return strings ? " *GET: '/index.html' -> [ self openspaceHtml ]; * can be modified to: *GET: '/index.html' -> [ self fetch: 'html/openspace.html' ]; * and the *fetch:* method can be coded to return the file statically stored.. ( increase efficiency by using a cache with change detection on say filesize / timestamp ) On Tue, Oct 28, 2014 at 1:51 AM, kilon alios <kilon.alios@gmail.com> wrote:
would it not be better to have the html / css and js code outside the image ? so instead to load files instead of return strings ?
this would make it easier to edit the code for html/css/js . GT js integration no idea how that works, does GT has for example syntax highlighting or other js specific features ?
Even though I always have been a supporter of Amber the IDE has still a very long way to go. Dont know about Seaside, but I assume for Seaside js code will still be something foreign. I think in practice would be better to use the IDE tools offered by firefox and chrome, though its still possible to use both amber and these tools, amber does not produce readable js code. No clue about React and SqueakJS. I am very new to web dev so probably I miss a lot, but frankly I found the fragmentation so shocking and so many negative opinions about the whole workflow that I have been reluctant to invest as much time as I have invested in Pharo. But then the things I do are not so web orientated as other people. But still I am very interested into this.
SqueakJS looks definitely very interesting.
On Mon, Oct 27, 2014 at 10:05 PM, Stephan Eggermont <stephan@stack.nl> wrote:
Kilon wrote
Really nice I now see the teapot stuff, for example this
GET: 'demo/common/style.css' -> [ self styleCss ];
is really flexible meaning you can interpret http addresses and map them to pharo methods. This a really cool idea indeed, I see now why people are excited about teapot. Excuse my ignorance about web >development but html/css and js always scared me away :D
I found it a very easy way to get some existing javascript app delivered fast from Pharo. It needs a lot of refactoring and cleaning up to become maintainable though. Separate classes for the angular components, and the canvas from Seaside to structure the html.
A more difficult aspect is how to create the javascript. For (qc)magritte applications it looks like a builder should be able to generate form components and a json data binding. With GT it should even be possible to integrate javascript development directly in the pharo image.
And it might be better to use React or Amber or SqueakJS
Stephan
oh brilliant, I really like this design very much. Definitely will look a bit deeper into this . I guess it makes sense to pass the source files as string when the web app is finished to speed up loading times. I really like this workflow for creating web apps. Well done guys. On Wed, Oct 29, 2014 at 9:31 AM, S Krish <krishnamachari.sudhakar@gmail.com> wrote:
"would it not be better to have the html / css and js code outside the image ? so instead to load files instead of return strings ? "
*GET: '/index.html' -> [ self openspaceHtml ]; *
can be modified to:
*GET: '/index.html' -> [ self fetch: 'html/openspace.html' ]; *
and the *fetch:* method can be coded to return the file statically stored.. ( increase efficiency by using a cache with change detection on say filesize / timestamp )
On Tue, Oct 28, 2014 at 1:51 AM, kilon alios <kilon.alios@gmail.com> wrote:
would it not be better to have the html / css and js code outside the image ? so instead to load files instead of return strings ?
this would make it easier to edit the code for html/css/js . GT js integration no idea how that works, does GT has for example syntax highlighting or other js specific features ?
Even though I always have been a supporter of Amber the IDE has still a very long way to go. Dont know about Seaside, but I assume for Seaside js code will still be something foreign. I think in practice would be better to use the IDE tools offered by firefox and chrome, though its still possible to use both amber and these tools, amber does not produce readable js code. No clue about React and SqueakJS. I am very new to web dev so probably I miss a lot, but frankly I found the fragmentation so shocking and so many negative opinions about the whole workflow that I have been reluctant to invest as much time as I have invested in Pharo. But then the things I do are not so web orientated as other people. But still I am very interested into this.
SqueakJS looks definitely very interesting.
On Mon, Oct 27, 2014 at 10:05 PM, Stephan Eggermont <stephan@stack.nl> wrote:
Kilon wrote
Really nice I now see the teapot stuff, for example this
GET: 'demo/common/style.css' -> [ self styleCss ];
is really flexible meaning you can interpret http addresses and map them to pharo methods. This a really cool idea indeed, I see now why people are excited about teapot. Excuse my ignorance about web >development but html/css and js always scared me away :D
I found it a very easy way to get some existing javascript app delivered fast from Pharo. It needs a lot of refactoring and cleaning up to become maintainable though. Separate classes for the angular components, and the canvas from Seaside to structure the html.
A more difficult aspect is how to create the javascript. For (qc)magritte applications it looks like a builder should be able to generate form components and a json data binding. With GT it should even be possible to integrate javascript development directly in the pharo image.
And it might be better to use React or Amber or SqueakJS
Stephan
Also, there is a serveStatic: '/statics' from: '/var/www/htdocs' if someone wants to store something outside the image. -- View this message in context: http://forum.world.st/How-not-to-serve-an-AngularJs-application-from-Pharo-t... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
On Mon, Oct 27, 2014 at 10:21:18PM +0200, kilon alios wrote:
Even though I always have been a supporter of Amber the IDE has still a very long way to go.
I've been meaning to build a code browser for Amber (and GST) in Pharo with Omnibrowser using the Shampoo protocol[1], once I get some copious spare time. [1] http://dmitrymatveev.co.uk/shampoo Pierce
I'm really interested to see how we could develop amber inside pharo and generate JS/amber code. May be you should look at spec instead of OB. On 4/11/14 03:55, Pierce Ng wrote:
On Mon, Oct 27, 2014 at 10:21:18PM +0200, kilon alios wrote:
Even though I always have been a supporter of Amber the IDE has still a very long way to go. I've been meaning to build a code browser for Amber (and GST) in Pharo with Omnibrowser using the Shampoo protocol[1], once I get some copious spare time.
[1] http://dmitrymatveev.co.uk/shampoo
Pierce
I have welcomed Amber with open arms, but I have failed miserably to wrap my head around it. Is ironic if you think about, Pharo really lacks documentation even in basic areas, libraries are nowhere near as powerful as those offered by javascript yet I have found Pharo way easier to use. Web development looks to me like a big pile of unnecessary mess. Actually Amber is the best part of it :D So the problem for me is not so much the System Browser , but the steep learning curve . Or maybe its just the fact that I dont like many of the web frameworkds, including html / js / css etc. I wish I could make something in pharo and click a button to deploy it as a website but alas thats just a dream. I think however that for the amount of developers Amber has been making some amazing progress. On Tue, Nov 4, 2014 at 4:55 AM, Pierce Ng <pierce@samadhiweb.com> wrote:
On Mon, Oct 27, 2014 at 10:21:18PM +0200, kilon alios wrote:
Even though I always have been a supporter of Amber the IDE has still a very long way to go.
I've been meaning to build a code browser for Amber (and GST) in Pharo with Omnibrowser using the Shampoo protocol[1], once I get some copious spare time.
[1] http://dmitrymatveev.co.uk/shampoo
Pierce
On 4/11/14 13:53, kilon alios wrote:
I have welcomed Amber with open arms, but I have failed miserably to wrap my head around it.
Is ironic if you think about, Pharo really lacks documentation even in basic areas, Are you joking? I spend my time writing books and chapters and their quality is quite good. libraries are nowhere near as powerful as those offered by javascript yet I have found Pharo way easier to use. Web development looks to me like a big pile of unnecessary mess. Actually Amber is the best part of it :D
So the problem for me is not so much the System Browser , but the steep learning curve . Or maybe its just the fact that I dont like many of the web frameworkds, including html / js / css etc.
I wish I could make something in pharo and click a button to deploy it as a website but alas thats just a dream.
I would like to have a solution for that without having a smalltalk compiler in JS as amber is doing.
I think however that for the amount of developers Amber has been making some amazing progress.
On Tue, Nov 4, 2014 at 4:55 AM, Pierce Ng <pierce@samadhiweb.com <mailto:pierce@samadhiweb.com>> wrote:
On Mon, Oct 27, 2014 at 10:21:18PM +0200, kilon alios wrote: > Even though I always have been a supporter of Amber the IDE has still a > very long way to go.
I've been meaning to build a code browser for Amber (and GST) in Pharo with Omnibrowser using the Shampoo protocol[1], once I get some copious spare time.
[1] http://dmitrymatveev.co.uk/shampoo
Pierce
Stef I did not meant it as offence, of course you do great amount of work for documentation. But I cannot ignore the fact that PBE is still stuck to 1.4, that there is no documentation for Pharo Morphic and most libraries if not all are partly documented."lacks documentation" does not mean that there is no documentation. I meant exactly what I typed. Stef you guys do an amazing job and I am proud to be a member of the Pharo community and make my own small contributions to make Pharo more popular and better. On Fri, Nov 7, 2014 at 2:27 PM, stepharo <stepharo@free.fr> wrote:
On 4/11/14 13:53, kilon alios wrote:
I have welcomed Amber with open arms, but I have failed miserably to wrap my head around it.
Is ironic if you think about, Pharo really lacks documentation even in basic areas,
Are you joking? I spend my time writing books and chapters and their quality is quite good.
libraries are nowhere near as powerful as those offered by javascript yet I have found Pharo way easier to use. Web development looks to me like a big pile of unnecessary mess. Actually Amber is the best part of it :D
So the problem for me is not so much the System Browser , but the steep learning curve . Or maybe its just the fact that I dont like many of the web frameworkds, including html / js / css etc.
I wish I could make something in pharo and click a button to deploy it as a website but alas thats just a dream.
I would like to have a solution for that without having a smalltalk compiler in JS as amber is doing.
I think however that for the amount of developers Amber has been making some amazing progress.
On Tue, Nov 4, 2014 at 4:55 AM, Pierce Ng <pierce@samadhiweb.com> wrote:
On Mon, Oct 27, 2014 at 10:21:18PM +0200, kilon alios wrote:
Even though I always have been a supporter of Amber the IDE has still a very long way to go.
I've been meaning to build a code browser for Amber (and GST) in Pharo with Omnibrowser using the Shampoo protocol[1], once I get some copious spare time.
[1] http://dmitrymatveev.co.uk/shampoo
Pierce
Kilon, You did start with converting PBE, right ? What is the current status ? I kind of liked the git book. And it is badly needed, indeed. Sven
On 07 Nov 2014, at 13:56, kilon alios <kilon.alios@gmail.com> wrote:
Stef I did not meant it as offence, of course you do great amount of work for documentation. But I cannot ignore the fact that PBE is still stuck to 1.4, that there is no documentation for Pharo Morphic and most libraries if not all are partly documented."lacks documentation" does not mean that there is no documentation. I meant exactly what I typed.
Stef you guys do an amazing job and I am proud to be a member of the Pharo community and make my own small contributions to make Pharo more popular and better.
On Fri, Nov 7, 2014 at 2:27 PM, stepharo <stepharo@free.fr> wrote:
On 4/11/14 13:53, kilon alios wrote:
I have welcomed Amber with open arms, but I have failed miserably to wrap my head around it.
Is ironic if you think about, Pharo really lacks documentation even in basic areas, Are you joking? I spend my time writing books and chapters and their quality is quite good. libraries are nowhere near as powerful as those offered by javascript yet I have found Pharo way easier to use. Web development looks to me like a big pile of unnecessary mess. Actually Amber is the best part of it :D
So the problem for me is not so much the System Browser , but the steep learning curve . Or maybe its just the fact that I dont like many of the web frameworkds, including html / js / css etc.
I wish I could make something in pharo and click a button to deploy it as a website but alas thats just a dream.
I would like to have a solution for that without having a smalltalk compiler in JS as amber is doing.
I think however that for the amount of developers Amber has been making some amazing progress.
On Tue, Nov 4, 2014 at 4:55 AM, Pierce Ng <pierce@samadhiweb.com> wrote: On Mon, Oct 27, 2014 at 10:21:18PM +0200, kilon alios wrote:
Even though I always have been a supporter of Amber the IDE has still a very long way to go.
I've been meaning to build a code browser for Amber (and GST) in Pharo with Omnibrowser using the Shampoo protocol[1], once I get some copious spare time.
[1] http://dmitrymatveev.co.uk/shampoo
Pierce
Is ironic if you think about, Pharo really lacks documentation even in basic areas, Are you joking? I spend my time writing books and chapters and their quality is quite good. Hi, i think in the meantime the docu _is quite good. i like the deep into pharo book, that also covered basic areas like Blocks (i liked that chapter). btw there are a few other areas where i'd want to read something about: refactoring, the RBSomething objects, Ring (the RGSomething objects), AST. werner
participants (8)
-
Attila Magyar -
kilon alios -
Pierce Ng -
S Krish -
Stephan Eggermont -
stepharo -
Sven Van Caekenberghe -
Werner Kassens