Production Deployment

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Production Deployment

Oleg
Greetings!

Thanks for the interesting project. It seems fresh and exciting
especially after SproutCore and BackBone.
Nicolas, could you write a small article on deployment of applications
developed using Amber. How to create a single javascript file with a
Smalltalk core (no IDE) and my application already parsed to JS?

Kind regards,
Oleg
Reply | Threaded
Open this post in threaded view
|

Re: Production Deployment

gokr
amberc can do this for you. I am going to bed now, but check examples and run it -h too get instructions.

regards, Göran



-- Sent from my HP TouchPad

On Sep 30, 2011 8:11 PM, Oleg <[hidden email]> wrote:
Greetings!

Thanks for the interesting project. It seems fresh and exciting
especially after SproutCore and BackBone.
Nicolas, could you write a small article on deployment of applications
developed using Amber. How to create a single javascript file with a
Smalltalk core (no IDE) and my application already parsed to JS?

Kind regards,
Oleg
Reply | Threaded
Open this post in threaded view
|

Re: Production Deployment

Rudi Angela-2
In reply to this post by Oleg
+1
Reply | Threaded
Open this post in threaded view
|

Re: Production Deployment

Nicolas Petton
In reply to this post by Oleg
Hi!

As Göran said, amberc has quite some options if you use the command line.
To deploy an app, I create a single file with the *.deploy.js files generated in the js/ directory.

Since you don't want the compiler or IDE for deployment, you can concatenate boot.js, Kernel, Canvas and your own files to create a single file myapp.js like this:

cat js/boot.js js/Kernel.deploy.js js/Canvas.deploy.js js/MyPackage.deploy.js js/init.js > js/myapp.js


HTH,
Nico

2011/9/30 Oleg <[hidden email]>
Greetings!

Thanks for the interesting project. It seems fresh and exciting
especially after SproutCore and BackBone.
Nicolas, could you write a small article on deployment of applications
developed using Amber. How to create a single javascript file with a
Smalltalk core (no IDE) and my application already parsed to JS?

Kind regards,
Oleg

Reply | Threaded
Open this post in threaded view
|

Re: Production Deployment

Nicolas Petton
Oh, and at the end of the JavaScript file, you can set the deployment mode to true to avoid method context creation, and speed up your app:

smalltalk.setDeploymentMode();

Nico


2011/10/1 nicolas petton <[hidden email]>
Hi!

As Göran said, amberc has quite some options if you use the command line.
To deploy an app, I create a single file with the *.deploy.js files generated in the js/ directory.

Since you don't want the compiler or IDE for deployment, you can concatenate boot.js, Kernel, Canvas and your own files to create a single file myapp.js like this:

cat js/boot.js js/Kernel.deploy.js js/Canvas.deploy.js js/MyPackage.deploy.js js/init.js > js/myapp.js


HTH,
Nico


2011/9/30 Oleg <[hidden email]>
Greetings!

Thanks for the interesting project. It seems fresh and exciting
especially after SproutCore and BackBone.
Nicolas, could you write a small article on deployment of applications
developed using Amber. How to create a single javascript file with a
Smalltalk core (no IDE) and my application already parsed to JS?

Kind regards,
Oleg


Reply | Threaded
Open this post in threaded view
|

Re: Production Deployment

Patrik Sundberg
Hi,

Following up on this thread instead of creating a new one. 

I essentially have this vision for my amber client side UI (no static html, all html generated by amber) using a REST API served via sinatra.

development:
- serve a dev.html via sinatra that just loads amber.js and my packages + open class browser
- use RackDav in sinatra to serve as the dav server for commits
- use sass/compass via sinatra handler for css

that gives me a pretty nice workflow for development I think. I'm cloning a copy of amber repo to app/client_ui that I use (could use a git submodule and separate repo to make it easier to merge upstream changes to amber itself).

deployment:
- generate a single static application.js including all my packages, amber runtime and any libs
- generate a single static application.css file for all css
- load the files in index.html, with amber in deploy mode

I think I understand how I accomplish that and can create a little rake task for it that get's run before any deployment of the app (both REST part and client ui part).

Here comes the twist - what if I'd like to include the IDE etc in deployment (but without commit functionality and with setDeploymentMode()). Idea being I'd be quite happy to drop into IDE just for diagnostics also in production. Sounds weird or reasonable? Is functioning IDE and setDeploymentMode() orthogonal? I think I'd need to do a custom little script to concatenate in the IDE parts etc, and a way to include the amber css into my application.css but sounds pretty doable.

Feedback in general welcome. Thanks for a cool product.

Reply | Threaded
Open this post in threaded view
|

Re: Production Deployment

Chip Nowacek
@Patrick: did you get your sinatra-based config to work?