On Sat, Mar 5, 2011 at 11:04 PM, Tom de Koning wrote:
>
> Hi all,
>
> I have been working with JS for quite a while, but coming from a .Net
> background. I was wondering if it is possible to do something like
> this in JavaScript:
>
> var expected = 5;
>
> var result = sut.somemethod(param1);
> re
if you have something were you have that much control you should take a look on
how other systems like YUI and labjs (i guess) declare dependencies
and make your system to read them and include them in the right order. i would
really like to hear on this matter because when packages get too big i
On Sat, Mar 5, 2011 at 2:01 PM, fernando trasvina wrote:
> In my process i configure one file that has the list of the files on the
> packages.
>
> in the company i currently work we use ruby
>
> so we have a yaml file as the config file for jammit (the gem that packages
> the files)
Thanks for
Hi all,
I have been working with JS for quite a while, but coming from a .Net
background. I was wondering if it is possible to do something like
this in JavaScript:
var expected = 5;
var result = sut.somemethod(param1);
result.shouldEqual(expected);
Now, the key thing is that I'd like to have
In my process i configure one file that has the list of the files on the
packages.
in the company i currently work we use ruby
so we have a yaml file as the config file for jammit (the gem that packages the
files)
we list all the files and its dependencies manually (this file is only updated
On Sat, Mar 5, 2011 at 1:20 PM, fernando trasvina wrote:
> yes that could be one idea i think that some of of the previously posted
> libraries are good doing that, but i would go with a minifier on the server
> rather than downloading files separately
> you can even mix the files to create dif
yes that could be one idea i think that some of of the previously posted
libraries are good doing that, but i would go with a minifier on the server
rather than downloading files separately
you can even mix the files to create different packages for special needs you
may have.
On Mar 5, 2011,
I meant 20kb and I was thinking of minified js only
On 5 Mar 2011, at 20:56, Peter Michaux wrote:
> On Sat, Mar 5, 2011 at 10:38 AM, Rob Griffiths wrote:
>
>> I tend to pack together files if they are < 2k its not worth the overhead of
>> a http request to load each file separately.
>
> Would
On Sat, Mar 5, 2011 at 10:38 AM, Rob Griffiths wrote:
> I tend to pack together files if they are < 2k its not worth the overhead of
> a http request to load each file separately.
Wouldn't the cutoff be much higher than 2 kB? Given the size of image
files that are probably in the page, I'd think
On Sat, Mar 5, 2011 at 12:32 PM, Jarek Foksa wrote:
> What's wrong with my original loadScript() function? I was scratching
> my head for several hours but I still don't get it why it doesn't work
> correctly on Safari.
What's happening is that when scripts are dynamically injected, browsers
do
> you can do that trough ajax, using a wait function to load the
> scripts in order, but going other way with this.
I could read the files in proper order with XMLHttpRequest(), then
merge them into one variable and finally print them between
tags. Is that what you meant?
var mergedScripts = "";
Hi All,
Lately I've been thinking about my client-side development
environment, the organization of the source files, how the files are
built (e.g. concatenated and minified) and how I specify which files
will be concatenated together during the build. Also the same for CSS
files and joining image
Hi,
Patrick Mueller of IBM has an interesting blogpost on "bind".
http://pmuellr.blogspot.com/2010/06/bind-considered-harmful.html
--
С уважением, Иван
04.03.2011, в 14:14, Jarek Foksa написал(а):
> Woah, thanks for fast replies. I wasn't aware that there are so many
> ways to do this in JS.
You might try
LABjs http://labjs.com/
or
HeadJS http://headjs.com/
Both are script loaders, and handle order or loading and execution of
external script files.
of course if you control the external javascript files, it would be much
better to concatenate the files together, unless of course they
Jarek,
If you are using PHP on your server you my be interested in Minify
I have recently started using Minify -> http://code.google.com/p/minify/ which
helps to group (package) sets of js files for specific functionality and also
minify for performance sake too. (Less http requests and sma
you can do that trough ajax, using a wait function to load the scripts in
order, but going other way with this.
why do you load files that way if I may ask?
that approach is kinda slow if you know you need those scripts why don't you
use one js packager
On Mar 5, 2011, at 11:46 AM, Jarek Foks
i would go to not aliasing the "this" variable unless you want a closure to
have access to the original this, like when passing a function to an event
handler
other than that it seems that you are making up a generalization based on fear.
On Mar 5, 2011, at 10:47 AM, Michael Haufe (TNO) wrote:
Let's say that I have four scripts: init.js, script-1.js, script-2.js
and script-3.js. Only init.js is declared in XHTML file, the other
three scripts are loaded from init.js. The code for each file is as
follows:
init.js
function loadScript(url
An alternative is not to write code that way to begin with so there
won't be an issue with shadowing and extraneous function objects:
function Dialog(width){
this._width = width;
}
Dialog.prototype = {
constructor : Dialog,
setWidth : function(width){
this._width = width;
}
On Sat, Mar 5, 2011 at 4:56 PM, אריה גלזר wrote:
> I like $this personally - it is closest to original meaning, and has an
> additional bonus that some editors (such as vim) highlight it properly
>
And I'd immediately think it would a jquery|framework object. We're not
doing php...
(I prefer `t
I like $this personally - it is closest to original meaning, and has an
additional bonus that some editors (such as vim) highlight it properly
On Sat, Mar 5, 2011 at 3:34 PM, Lasse Reichstein wrote:
> On Thu, 03 Mar 2011 20:08:33 +0100, Jarek Foksa
> wrote:
>
> When writing constructor functio
On Thu, Mar 3, 2011 at 5:16 PM, Busticated wrote:
> Hi all -
> I'm hoping to get some pointers on how I can track down the cause
> of gui slowness in IE9 RC. Some quick background: The app is fairly JS-
> heavy... lot's of ajax and fancy gui interactions... i'm using jquery
> (1.4.4 at the mome
On Thu, 03 Mar 2011 20:08:33 +0100, Jarek Foksa
wrote:
When writing constructor functions it's very convenient to create "var
self = this" assignment so that we could easily access other
properties and methods even if default context has changed, for
example:
var Dialog = function() {
var
What I usually look for in the Profile:
- Identify functions with biggest excl. time and try to optimize them
- Same for functions that are executed a lot of times
- Identify functions with a big difference between total time and
excl. time. It usually means that the function is doing something
co
24 matches
Mail list logo