Skip to main content
Commonmark migration
Source Link

Can I use any Mathematica functionality that I want?

 

Yes. Almost all of Mathematica's computational functions can be incorporated into CDFs. However, in files saved straight out of Mathematica 8 for the free CDF Player, some functionality is not available: non-numeric input fields, dialog windows, and data import and export (except from Wolfram-curated data sources, e.g. ChemicalData, CountryData, and WordData). Please contact us about activating higher-level application content in CDFs.

Can I use any Mathematica functionality that I want?

 

Yes. Almost all of Mathematica's computational functions can be incorporated into CDFs. However, in files saved straight out of Mathematica 8 for the free CDF Player, some functionality is not available: non-numeric input fields, dialog windows, and data import and export (except from Wolfram-curated data sources, e.g. ChemicalData, CountryData, and WordData). Please contact us about activating higher-level application content in CDFs.

Can I use any Mathematica functionality that I want?

Yes. Almost all of Mathematica's computational functions can be incorporated into CDFs. However, in files saved straight out of Mathematica 8 for the free CDF Player, some functionality is not available: non-numeric input fields, dialog windows, and data import and export (except from Wolfram-curated data sources, e.g. ChemicalData, CountryData, and WordData). Please contact us about activating higher-level application content in CDFs.

replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

Edit: I just learned that there is another distinction, since the browser plugin will behave differently when it is embedded in html or running in a "full screen" mode which will fill the full browser window. The difference is that in the latter it can show the docked cell to let the user allow "dynamic content for potential dangerous code" while it can't do so in the embedded mode. If the user allows dynamic content then some of the restrictions of the browser-plugin are released, but I think there will still be some more than with the standalone player. There is a workaround which allows for that docked cell to appear even in when the cdf is embedded in html, which was obviously uncovered herehere, but that might have problems with resizing (and probably other) and is not officially supported, so could even go away with future versions. In any case, the difference seems again not be within the CDF document but in by which program and how it is shown.

For the Needs restriction I think the point is that it's not possible to read external files in the free CDF-Player from CDF-documents created from a normal Mathematica, and thus it's not possible to load an external package file in the free CDF-Player from such a CDF-document. I don't have seen any restrictions concerning anything related to the name spaces (Contexts) so I think as long as you manage to get the initialization right (so that all dynamic content will work correctly) the symbols used can live in any namespace you want. It's just not that easy to achieve this, as has been discussed in e.g. this postthis post (which I think you know about), and in some cases the SaveDefinition option probably isn't getting things right, too.

Edit: I just learned that there is another distinction, since the browser plugin will behave differently when it is embedded in html or running in a "full screen" mode which will fill the full browser window. The difference is that in the latter it can show the docked cell to let the user allow "dynamic content for potential dangerous code" while it can't do so in the embedded mode. If the user allows dynamic content then some of the restrictions of the browser-plugin are released, but I think there will still be some more than with the standalone player. There is a workaround which allows for that docked cell to appear even in when the cdf is embedded in html, which was obviously uncovered here, but that might have problems with resizing (and probably other) and is not officially supported, so could even go away with future versions. In any case, the difference seems again not be within the CDF document but in by which program and how it is shown.

For the Needs restriction I think the point is that it's not possible to read external files in the free CDF-Player from CDF-documents created from a normal Mathematica, and thus it's not possible to load an external package file in the free CDF-Player from such a CDF-document. I don't have seen any restrictions concerning anything related to the name spaces (Contexts) so I think as long as you manage to get the initialization right (so that all dynamic content will work correctly) the symbols used can live in any namespace you want. It's just not that easy to achieve this, as has been discussed in e.g. this post (which I think you know about), and in some cases the SaveDefinition option probably isn't getting things right, too.

Edit: I just learned that there is another distinction, since the browser plugin will behave differently when it is embedded in html or running in a "full screen" mode which will fill the full browser window. The difference is that in the latter it can show the docked cell to let the user allow "dynamic content for potential dangerous code" while it can't do so in the embedded mode. If the user allows dynamic content then some of the restrictions of the browser-plugin are released, but I think there will still be some more than with the standalone player. There is a workaround which allows for that docked cell to appear even in when the cdf is embedded in html, which was obviously uncovered here, but that might have problems with resizing (and probably other) and is not officially supported, so could even go away with future versions. In any case, the difference seems again not be within the CDF document but in by which program and how it is shown.

For the Needs restriction I think the point is that it's not possible to read external files in the free CDF-Player from CDF-documents created from a normal Mathematica, and thus it's not possible to load an external package file in the free CDF-Player from such a CDF-document. I don't have seen any restrictions concerning anything related to the name spaces (Contexts) so I think as long as you manage to get the initialization right (so that all dynamic content will work correctly) the symbols used can live in any namespace you want. It's just not that easy to achieve this, as has been discussed in e.g. this post (which I think you know about), and in some cases the SaveDefinition option probably isn't getting things right, too.

added some information I just learned from the CDF workshop
Source Link
Albert Retey
  • 23.8k
  • 61
  • 105

Actually this is just meant as a side note to your own answer, but it became too long for a comment. As you can guess I'm interested in this myself and have done some testing, most of what I mentioned is from that experience. It has been reported that there would be differences in what the player would allow depending on whether Mathematica is installed or not. I don't believe that this is true, at least not by design, but as of now this is one of the things I have not explicitly checked..

  1. CDF as a format
  2. restrictions of the Wolfram Player Pro (called Mathematica Player Pro for vs. 6 and 7)
  3. restrictions of the free CDF-Player
  4. restrictions of the browser plugin (full window mode)
  5. restrictions of the browser plugin (embedded cdf in html)
  6. restrictions of the pre version 8 Mathematica Reader
  7. restrictions of the demonstration site

Edit: I just learned that there is another distinction, since the browser plugin will behave differently when it is embedded in html or running in a "full screen" mode which will fill the full browser window. The difference is that in the latter it can show the docked cell to let the user allow "dynamic content for potential dangerous code" while it can't do so in the embedded mode. If the user allows dynamic content then some of the restrictions of the browser-plugin are released, but I think there will still be some more than with the standalone player. There is a workaround which allows for that docked cell to appear even in when the cdf is embedded in html, which was obviously uncovered here, but that might have problems with resizing (and probably other) and is not officially supported, so could even go away with future versions. In any case, the difference seems again not be within the CDF document but in by which program and how it is shown.

I think it's worth repeating here that you will need to enclose all code ("function definitions") and all data that is used by the dynamic content in the CDF document for it to work in the free CDF Player or the browser plugin. Only when shown in the Wolfram Player Pro or Mathematica, code and data could come in separate files as well. Edit: I just learned that Import will actually work for nonlocal url's, so it should be possible to load data from a public webserver with the CDF-Player and even the browser plugin, but probably not for every format that Mathematica supports. But it's definitely not supposed to be possible to load data from a local filesystem, neither in the standalone version nor the browser plugin.

During my tests I was trying to get as far as I could in deploying an application in the free CDF player. The following is what I managed to do, some of it is still worth improving and the whole example is morejust a proof of concept, but I think it shows that one can do a lot more in the free CDF player than is obvious at first sight.

As I said, thismuch is just deduced from my experiments, sosome I learned from the CDF-Workshop and the documentation. Anyway I'm glad to hear about any corrections or improvements to these statements.

Actually this is just meant as a side note to your own answer, but it became too long for a comment. As you can guess I'm interested in this myself and have done some testing, most of what I mentioned is from that experience. It has been reported that there would be differences in what the player would allow depending on whether Mathematica is installed or not. I don't believe that this is true, but as of now this is one of the things I have not explicitly checked.

  1. CDF as a format
  2. restrictions of the Wolfram Player Pro (called Mathematica Player Pro for vs. 6 and 7)
  3. restrictions of the free CDF-Player
  4. restrictions of the browser plugin
  5. restrictions of the pre version 8 Mathematica Reader
  6. restrictions of the demonstration site

I think it's worth repeating here that you will need to enclose all code ("function definitions") and all data that is used by the dynamic content in the CDF document for it to work in the free CDF Player or the browser plugin. Only when shown in the Wolfram Player Pro or Mathematica, code and data could come in separate files as well.

During my tests I was trying to get as far as I could in deploying an application in the free CDF player. The following is what I managed to do, some of it is still worth improving and the whole example is more a proof of concept, but I think it shows that one can do a lot more in the free CDF player than is obvious at first sight.

As I said, this is just deduced from my experiments, so I'm glad to hear about any corrections or improvements to these statements.

Actually this is just meant as a side note to your own answer, but it became too long for a comment. As you can guess I'm interested in this myself and have done some testing, most of what I mentioned is from that experience. It has been reported that there would be differences in what the player would allow depending on whether Mathematica is installed or not. I don't believe that this is true, at least not by design, but as of now this is one of the things I have not explicitly checked..

  1. CDF as a format
  2. restrictions of the Wolfram Player Pro (called Mathematica Player Pro for vs. 6 and 7)
  3. restrictions of the free CDF-Player
  4. restrictions of the browser plugin (full window mode)
  5. restrictions of the browser plugin (embedded cdf in html)
  6. restrictions of the pre version 8 Mathematica Reader
  7. restrictions of the demonstration site

Edit: I just learned that there is another distinction, since the browser plugin will behave differently when it is embedded in html or running in a "full screen" mode which will fill the full browser window. The difference is that in the latter it can show the docked cell to let the user allow "dynamic content for potential dangerous code" while it can't do so in the embedded mode. If the user allows dynamic content then some of the restrictions of the browser-plugin are released, but I think there will still be some more than with the standalone player. There is a workaround which allows for that docked cell to appear even in when the cdf is embedded in html, which was obviously uncovered here, but that might have problems with resizing (and probably other) and is not officially supported, so could even go away with future versions. In any case, the difference seems again not be within the CDF document but in by which program and how it is shown.

I think it's worth repeating here that you will need to enclose all code ("function definitions") and all data that is used by the dynamic content in the CDF document for it to work in the free CDF Player or the browser plugin. Only when shown in Wolfram Player Pro or Mathematica, code and data could come in separate files as well. Edit: I just learned that Import will actually work for nonlocal url's, so it should be possible to load data from a public webserver with the CDF-Player and even the browser plugin, but probably not for every format that Mathematica supports. But it's definitely not supposed to be possible to load data from a local filesystem, neither in the standalone version nor the browser plugin.

During my tests I was trying to get as far as I could in deploying an application in the free CDF player. The following is what I managed to do, some of it is still worth improving and the whole example is just a proof of concept, but I think it shows that one can do a lot more in the free CDF player than is obvious at first sight.

As I said, much is just deduced from my experiments, some I learned from the CDF-Workshop and the documentation. Anyway I'm glad to hear about any corrections or improvements to these statements.

Source Link
Albert Retey
  • 23.8k
  • 61
  • 105
Loading