Sign in to follow this  
renie.siqueira

Raphaël and AMD

Recommended Posts

I was doing more tests and realized that the issue is not about AMD. It's about any type of asynchonous load.

It looks like if it was loaded this way (async), some parts of modules can't guarantee load order. 

 

Below there is a simple test where is possible to see that after several attempts lib can load. And on every single attempt you get error on a new variable.

 

http://postimg.org/image/elquk3147/full/

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

Could you please provide a scaled down sample and test bed for the issue to replicate from our end, so that we can investigate more on it?

 

Also, please let us know, if this issue is any browser specific. If yes, mention the browser version details.

 

Awaiting your valuable inputs.

Share this post


Link to post
Share on other sites

Hi

 

The issue is very simple. Will try to explain here since we found a few posts here as well as in stack overflow where the replies gave a sense of lack of clarity . 

 

Script loaders like requirejs, yepnope, headjs are used to manage script dependencies, load scripts conditionally, load scripts when required or to combine dependent scripts into one for faster loading.In this example, like in ours, the chart functionality is only available to a few power users. So why load it for all users. Also the charts are only a side functionality, so it only require to be loaded if the user wants to see the chart. So we use require in this project to manage when the scripts have to be loaded with the required dependencies. And we use a lot of open source js libraries as well as a lot of our own. But for minor glitches we have got them to work.

 

As of today (version 3.4.0), trial version downloaded a few weeks back, the fusion chart does not work with require. You do not need a testbed or test script, you just need to define the dependencies in a shim in require as shown below and try to get it working.

 

 shim: {

     'fusionchart':{deps:['jquery']},
    'fusionthemes':{deps:['fusionchart']},
...
...
}

 

 

We cannot point out the issue as we only have the minified files, but one reason could be that Raphael that Fusion is dependent on is not compatible with AMD or require.

 

Script loaders (especially require) are used by a lot of people and is still on the rise. I think it is really important for a company like fusion chart to support require. So instead of asking for test scripts and beds, you should really talk to your development team as well as the management about this. We are all sure they already understand the issue or/ and will definitely close this hole for the future.

 

Regards

sharbel

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this