deploying an application

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

deploying an application

abergel
Hi!

I feel I am bumping into a problem that my lack of knowledge in the field has created.
Basically, I don't understand how to deploy an application.

Consider the hello application contained in the distribution: http://amber-lang.net/documentation.html#A-first-application
How can I deploy it? The tutorial does not say much about this important step.

Simply changing:
        <script src="../../js/amber.js" type="text/javascript"></script>
        ...
        loadAmber({
            files: ['HelloApp.js'],
            prefix: 'projects/hello/js', // path for js files i think
            ready: function() {
              $(function() {
                smalltalk.Hello._new()._begin();
              });
        }});
        ...
for:
        <script src="js/amber.js" type="text/javascript"></script>
        ...
        loadAmber({
            files: ['HelloApp.js'],
            prefix: 'projects/hello/js', // path for js files i think
            ready: function() {
              $(function() {
                smalltalk.Hello._new()._begin();
              });
        }, deploy: true});
        ...

does not seem to work. I put the "deployed" version on http://bergel.eu/hello and nothing happens when I click on the buttons.

What this "deploy: true" does exactly? How comes that changing src="../../js/amber.js" for src="js/amber.js" can make it work?

Help greatly appreciated

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





Reply | Threaded
Open this post in threaded view
|

Re: deploying an application

simondenier

Experts would provide a better answer but requiring amber.js is just the tip of the iceberg (basically it sets up a JS environment which then loads all things required to run Smalltalk/JS). If you open a web inspector on your page, you will see that your page requires a lot more js files (one per package) but they are missing on the server (strangely, not all are missing).

So to deploy, you also have to copy all required javascript files on the server: Amber packages + your own packages

I guess what this means is that a deployment task is missing: one which would produce a single minified js file with all the requirements. Otherwise I can't tell easily tell what is required between deploy: true and deploy: false.


On 19 avr. 2012, at 15:25, Alexandre Bergel wrote:

> Hi!
>
> I feel I am bumping into a problem that my lack of knowledge in the field has created.
> Basically, I don't understand how to deploy an application.
>
> Consider the hello application contained in the distribution: http://amber-lang.net/documentation.html#A-first-application
> How can I deploy it? The tutorial does not say much about this important step.
>
> Simply changing:
> <script src="../../js/amber.js" type="text/javascript"></script>
> ...
> loadAmber({
>    files: ['HelloApp.js'],
>    prefix: 'projects/hello/js', // path for js files i think
>    ready: function() {
>      $(function() {
>        smalltalk.Hello._new()._begin();
>      });
> }});
> ...
> for:
> <script src="js/amber.js" type="text/javascript"></script>
> ...
> loadAmber({
>    files: ['HelloApp.js'],
>    prefix: 'projects/hello/js', // path for js files i think
>    ready: function() {
>      $(function() {
>        smalltalk.Hello._new()._begin();
>      });
> }, deploy: true});
> ...
>
> does not seem to work. I put the "deployed" version on http://bergel.eu/hello and nothing happens when I click on the buttons.
>
> What this "deploy: true" does exactly? How comes that changing src="../../js/amber.js" for src="js/amber.js" can make it work?
>
> Help greatly appreciated
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>

--
Simon Denier



Reply | Threaded
Open this post in threaded view
|

Re: deploying an application

abergel
> Experts would provide a better answer but requiring amber.js is just the tip of the iceberg (basically it sets up a JS environment which then loads all things required to run Smalltalk/JS). If you open a web inspector on your page, you will see that your page requires a lot more js files (one per package) but they are missing on the server (strangely, not all are missing).
>
> So to deploy, you also have to copy all required javascript files on the server: Amber packages + your own packages
>
> I guess what this means is that a deployment task is missing: one which would produce a single minified js file with all the requirements. Otherwise I can't tell easily tell what is required between deploy: true and deploy: false.

Yes. But Nicolas said I just need to change the script tag and add deploy: true.

Cheers,
Alexandre


>
>
> On 19 avr. 2012, at 15:25, Alexandre Bergel wrote:
>
>> Hi!
>>
>> I feel I am bumping into a problem that my lack of knowledge in the field has created.
>> Basically, I don't understand how to deploy an application.
>>
>> Consider the hello application contained in the distribution: http://amber-lang.net/documentation.html#A-first-application
>> How can I deploy it? The tutorial does not say much about this important step.
>>
>> Simply changing:
>> <script src="../../js/amber.js" type="text/javascript"></script>
>> ...
>> loadAmber({
>>    files: ['HelloApp.js'],
>>    prefix: 'projects/hello/js', // path for js files i think
>>    ready: function() {
>>      $(function() {
>>        smalltalk.Hello._new()._begin();
>>      });
>> }});
>> ...
>> for:
>> <script src="js/amber.js" type="text/javascript"></script>
>> ...
>> loadAmber({
>>    files: ['HelloApp.js'],
>>    prefix: 'projects/hello/js', // path for js files i think
>>    ready: function() {
>>      $(function() {
>>        smalltalk.Hello._new()._begin();
>>      });
>> }, deploy: true});
>> ...
>>
>> does not seem to work. I put the "deployed" version on http://bergel.eu/hello and nothing happens when I click on the buttons.
>>
>> What this "deploy: true" does exactly? How comes that changing src="../../js/amber.js" for src="js/amber.js" can make it work?
>>
>> Help greatly appreciated
>>
>> Cheers,
>> Alexandre
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>
> --
> Simon Denier
>
>
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





Reply | Threaded
Open this post in threaded view
|

Re: deploying an application

Nicolas Petton

On Apr 19, 2012, at 4:29 PM, Alexandre Bergel wrote:

Experts would provide a better answer but requiring amber.js is just the tip of the iceberg (basically it sets up a JS environment which then loads all things required to run Smalltalk/JS). If you open a web inspector on your page, you will see that your page requires a lot more js files (one per package) but they are missing on the server (strangely, not all are missing).

So to deploy, you also have to copy all required javascript files on the server: Amber packages + your own packages

I guess what this means is that a deployment task is missing: one which would produce a single minified js file with all the requirements. Otherwise I can't tell easily tell what is required between deploy: true and deploy: false.

Yes. But Nicolas said I just need to change the script tag and add deploy: true.

Hi!

Changing deploy to true will make amber load *.deploy.js files which are the same files but without debug infos, etc. Also, it won't load the compiler, etc.
Now I have to look at the archive you sent me to really know what's wrong here :)

Cheers,
Nico


Cheers,
Alexandre




On 19 avr. 2012, at 15:25, Alexandre Bergel wrote:

Hi!

I feel I am bumping into a problem that my lack of knowledge in the field has created.
Basically, I don't understand how to deploy an application.

Consider the hello application contained in the distribution: http://amber-lang.net/documentation.html#A-first-application
How can I deploy it? The tutorial does not say much about this important step.

Simply changing:
<script src="../../js/amber.js" type="text/javascript"></script>
...
loadAmber({
   files: ['HelloApp.js'],
   prefix: 'projects/hello/js', // path for js files i think
   ready: function() {
     $(function() {
       smalltalk.Hello._new()._begin();
     });
}});
...
for:
<script src="js/amber.js" type="text/javascript"></script>
...
loadAmber({
   files: ['HelloApp.js'],
   prefix: 'projects/hello/js', // path for js files i think
   ready: function() {
     $(function() {
       smalltalk.Hello._new()._begin();
     });
}, deploy: true});
...

does not seem to work. I put the "deployed" version on http://bergel.eu/hello and nothing happens when I click on the buttons.

What this "deploy: true" does exactly? How comes that changing src="../../js/amber.js" for src="js/amber.js" can make it work?

Help greatly appreciated

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






--
Simon Denier




--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.







Reply | Threaded
Open this post in threaded view
|

Re: deploying an application

paul-3
In reply to this post by abergel
Hi,
what would be the best way to minify the javascript files in deployment mode?
Any hints are welcome :-)
Kind regards,
Paul

Am Donnerstag, 19. April 2012 15:25:52 UTC+2 schrieb Alexandre.Bergel:
Hi!

I feel I am bumping into a problem that my lack of knowledge in the field has created.
Basically, I don't understand how to deploy an application.

Consider the hello application contained in the distribution: http://amber-lang.net/documentation.html#A-first-application
How can I deploy it? The tutorial does not say much about this important step.

Simply changing:
        <script src="../../js/amber.js" type="text/javascript"></script>
        ...
        loadAmber({
            files: ['HelloApp.js'],
            prefix: 'projects/hello/js', // path for js files i think
            ready: function() {
              $(function() {
                smalltalk.Hello._new()._begin();
              });
        }});
        ...
for:
        <script src="js/amber.js" type="text/javascript"></script>
        ...
        loadAmber({
            files: ['HelloApp.js'],
            prefix: 'projects/hello/js', // path for js files i think
            ready: function() {
              $(function() {
                smalltalk.Hello._new()._begin();
              });
        }, deploy: true});
        ...

does not seem to work. I put the "deployed" version on http://bergel.eu/hello and nothing happens when I click on the buttons.

What this "deploy: true" does exactly? How comes that changing src="../../js/amber.js" for src="js/amber.js" can make it work?

Help greatly appreciated

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.

Reply | Threaded
Open this post in threaded view
|

Re: deploying an application

Amber Milan Eskridge
Closure compiler?

On Thu, May 3, 2012 at 5:16 PM, paul <[hidden email]> wrote:
Hi,
what would be the best way to minify the javascript files in deployment mode?
Any hints are welcome :-)
Kind regards,
Paul

Am Donnerstag, 19. April 2012 15:25:52 UTC+2 schrieb Alexandre.Bergel:
Hi!

I feel I am bumping into a problem that my lack of knowledge in the field has created.
Basically, I don't understand how to deploy an application.

Consider the hello application contained in the distribution: http://amber-lang.net/documentation.html#A-first-application
How can I deploy it? The tutorial does not say much about this important step.

Simply changing:
        <script src="../../js/amber.js" type="text/javascript"></script>
        ...
        loadAmber({
            files: ['HelloApp.js'],
            prefix: 'projects/hello/js', // path for js files i think
            ready: function() {
              $(function() {
                smalltalk.Hello._new()._begin();
              });
        }});
        ...
for:
        <script src="js/amber.js" type="text/javascript"></script>
        ...
        loadAmber({
            files: ['HelloApp.js'],
            prefix: 'projects/hello/js', // path for js files i think
            ready: function() {
              $(function() {
                smalltalk.Hello._new()._begin();
              });
        }, deploy: true});
        ...

does not seem to work. I put the "deployed" version on http://bergel.eu/hello and nothing happens when I click on the buttons.

What this "deploy: true" does exactly? How comes that changing src="../../js/amber.js" for src="js/amber.js" can make it work?

Help greatly appreciated

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.


Reply | Threaded
Open this post in threaded view
|

Re: deploying an application

Amber Milan Eskridge
In reply to this post by paul-3
Closure compiler?

On Thu, May 3, 2012 at 5:16 PM, paul <[hidden email]> wrote:
Hi,
what would be the best way to minify the javascript files in deployment mode?
Any hints are welcome :-)
Kind regards,
Paul

Am Donnerstag, 19. April 2012 15:25:52 UTC+2 schrieb Alexandre.Bergel:
Hi!

I feel I am bumping into a problem that my lack of knowledge in the field has created.
Basically, I don't understand how to deploy an application.

Consider the hello application contained in the distribution: http://amber-lang.net/documentation.html#A-first-application
How can I deploy it? The tutorial does not say much about this important step.

Simply changing:
        <script src="../../js/amber.js" type="text/javascript"></script>
        ...
        loadAmber({
            files: ['HelloApp.js'],
            prefix: 'projects/hello/js', // path for js files i think
            ready: function() {
              $(function() {
                smalltalk.Hello._new()._begin();
              });
        }});
        ...
for:
        <script src="js/amber.js" type="text/javascript"></script>
        ...
        loadAmber({
            files: ['HelloApp.js'],
            prefix: 'projects/hello/js', // path for js files i think
            ready: function() {
              $(function() {
                smalltalk.Hello._new()._begin();
              });
        }, deploy: true});
        ...

does not seem to work. I put the "deployed" version on http://bergel.eu/hello and nothing happens when I click on the buttons.

What this "deploy: true" does exactly? How comes that changing src="../../js/amber.js" for src="js/amber.js" can make it work?

Help greatly appreciated

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.


Reply | Threaded
Open this post in threaded view
|

Re: deploying an application

paul-3
thanxs :-)

Am Donnerstag, 3. Mai 2012 17:20:07 UTC+2 schrieb Amber Milan Eskridge:
Closure compiler?

On Thu, May 3, 2012 at 5:16 PM, paul <[hidden email]> wrote:
Hi,
what would be the best way to minify the javascript files in deployment mode?
Any hints are welcome :-)
Kind regards,
Paul

Am Donnerstag, 19. April 2012 15:25:52 UTC+2 schrieb Alexandre.Bergel:
Hi!

I feel I am bumping into a problem that my lack of knowledge in the field has created.
Basically, I don't understand how to deploy an application.

Consider the hello application contained in the distribution: http://amber-lang.net/documentation.html#A-first-application
How can I deploy it? The tutorial does not say much about this important step.

Simply changing:
        <script src="../../js/amber.js" type="text/javascript"></script>
        ...
        loadAmber({
            files: ['HelloApp.js'],
            prefix: 'projects/hello/js', // path for js files i think
            ready: function() {
              $(function() {
                smalltalk.Hello._new()._begin();
              });
        }});
        ...
for:
        <script src="js/amber.js" type="text/javascript"></script>
        ...
        loadAmber({
            files: ['HelloApp.js'],
            prefix: 'projects/hello/js', // path for js files i think
            ready: function() {
              $(function() {
                smalltalk.Hello._new()._begin();
              });
        }, deploy: true});
        ...

does not seem to work. I put the "deployed" version on http://bergel.eu/hello and nothing happens when I click on the buttons.

What this "deploy: true" does exactly? How comes that changing src="../../js/amber.js" for src="js/amber.js" can make it work?

Help greatly appreciated

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.


Reply | Threaded
Open this post in threaded view
|

Re: deploying an application

tonytong
In reply to this post by abergel
you can try this free online service to minify js and compress css, so it will reduce the size of web page.