I'm considering switching my Web app development platform from CoffeeScript to Amber. I've just started using CS and while I like it just fine, I'm a lot more comfortable with Smalltalk which I already know.
-- Before I can make a final decision, I need to get a handle on how good the JS is that Amber outputs. But I have had no luck finding Web apps built from Amber. I'd like to see the JS from a moderately complex app. Any pointers or ideas? You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Hi, a rather big and complex web application built with Amber is SmalltalkHub: The sourcecode is available here: And if you are keen enought you can open a Smalltalk IDE from the JavaScript console on the SmalltalkHub page to inspect the code while it is running.
If I am correct this is now the main site used by the Pharo project for collaborating on code. However, the Pharo people are by all means not the only ones using this service. Best, Manfred On Mon, Sep 30, 2013 at 7:28 PM, dshafer <[hidden email]> wrote:
You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
In reply to this post by Dan Shafer
Hi!
First, the JS ouptut changes over time and it's quality will likely be improved. The present compiler occasionally compiles a little nonsensical JS (expression statements that only include one variable), but that can be fixed. Second, Amber is a little more heavyweight than CS because it needs to map amber methods into JS methods (between:and: -> _between_and_) and maintain parallel inheritance (Amber String is subclass of Collection though JS String is not; in runtime both concepts are merged, Amber wraps JS String), so the output looks accordingly. Third, you any app in amber woud have same type of JS output as Amber itself, so look up Amber's own js directory to see how Amber-produced JS looks like. If you really want some app, SmalltalkHub client part is written in Amber, but in pretty outdated version 0.9.1, JS output has changed radically from that point; or look at http://github.com/herby/trapped and start the demo app - it is just a trivial ToDo demo, but you can see there if you really want some app (though, as I stressed before, there is no difference in JS between amber app and amber itself). Herby dshafer wrote: > I'm considering switching my Web app development platform from > CoffeeScript to Amber. I've just started using CS and while I like it > just fine, I'm a lot more comfortable with Smalltalk which I already > know. > > Before I can make a final decision, I need to get a handle on how good > the JS is that Amber outputs. But I have had no luck finding Web apps > built from Amber. I'd like to see the JS from a moderately complex app. > > Any pointers or ideas? > > -- > You received this message because you are subscribed to the Google > Groups "amber-lang" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [hidden email]. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Thanks, Herby and Manfred. I appreciate the quick and detailed responses.
-- I suppose some ignorance is showing here, but I can't for the life of me figure out how to look at the source of the SmalltalklHub stuff. I get to the page where there's a tab labeled "Source" but when I click on it, then on any of the package names, I don't get any source display or any meaningful links. I get a list of versions. Clicking on any of those takes me to a page with no source or meaningful source links. There's a button to download the .mcz file but I don't know what app will open such a file and Google tells me it's a Poser material information file? Sorry for showing my ignorance here but it's my first exposure to SmalltalkHub. On Monday, September 30, 2013 10:43:12 AM UTC-7, Herby wrote: Hi! You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Hi,
-- to see the Smalltalk source code, open the JavaScript console in your browser (F12 in Chrome/Chromium) and run this code: "amber.toggleIDE()". Take a look at the packages starting with "Hub". If you want to compare the Smalltalk code to the JavaScript code, take a look at the transferred JS files in the network tab. Every package in Amber corresponds to one JavaScript file with the same name. If you are not only interested in the Amber code but also the backend code (that serves the files, handles the ajax requests, database stuff), you have to take a look at the MCZ files. The MCZ files contain the Amber code and the other backend code. You can explore them in Pharo (drag-and-drop into the Pharo image, or download with Monticello). Keep in mind that you do not have to use a Pharo backend. It could, for instance, also be a Rails application. Matthias On Monday, September 30, 2013 12:59:57 PM UTC-7, dshafer wrote:
You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Thanks, Matthias....
-- You said, "take a look at the transferred JS files in the network tab" but when I click that tab, the only files shown are three .png files. I find several .js files listed in the contents of the page file but none of them seems to be the actual application, at least as far as I can tell. I'm fairly bewildered at this point (though I am grateful to know that I can open the Amber IDE from the JS Console. I'm sure that will come in quite handy!) Dan On Monday, September 30, 2013 1:20:59 PM UTC-7, Matthias Springer wrote:
You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
You might have to reload the website with the network tab already opened. There should be requests like "http://smalltalkhub.com/Kaliningrad/js/HubAmberWidgetsCore.js". The JavaScript files that are included in the HTML code just load several libraries and Amber itself (amber.js). The "loadAmber(...)" call loads the JavaScript files for Smalltalk Hub afterwards.
-- Matthias On Monday, September 30, 2013 8:44:10 PM UTC-7, dshafer wrote:
You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
That worked, Matthias. I've pored over a bunch of sample and related JS code and I must say that overall, I think it's pretty darned good. Now i'm going to build a small sample Web app using Amber to see how it compares to the experience of building the same app in CoffeeScript. I am encouraged, though, and I'm hoping I'll be able to switch to Smalltalk from CoffeeScript for my new projects.
-- On Monday, September 30, 2013 8:57:03 PM UTC-7, Matthias Springer wrote:
You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
That would be nice. May I ask what kind of app you plan on building?
Nico On Tue, 2013-10-01 at 00:54 -0700, dshafer wrote: > That worked, Matthias. I've pored over a bunch of sample and related > JS code and I must say that overall, I think it's pretty darned good. > Now i'm going to build a small sample Web app using Amber to see how > it compares to the experience of building the same app in > CoffeeScript. I am encouraged, though, and I'm hoping I'll be able to > switch to Smalltalk from CoffeeScript for my new projects. -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Free forum by Nabble | Edit this page |