Message Boards Message Boards

How can I write and deploy a GUI DB application with Mathematica?

Posted 10 years ago

Mathematica has pretty nice support for reactive GUI creation and database connectivity. It seems that it would be suitable for writing database front-ends, especially those involving a lot of computation, graphs etc. Sadly, I've failed to identify a reasonable way to deploy such applications. If it's a bad idea to try using Mathematica for writing such applications, please tell me. Otherwise I'd like pointers as to a reasonable deployment strategy. Here is a list of the options I've considered and why I consider them unreasonable or problematic.

1) Write the application using Mathematica. To deploy, let every client install Mathematica, get a copy the notebook and run the application using Mathematica. This would be pretty hefty priced, since there would be a license fee for every single client using nothing from Mathematica except running this application. Maybe not unreasonable, but if there are better ways I'd like to know.

2) Write the application in Mathematica, then deploy using the CDF technology. Numerous sources indicate the CDF player for security reasons is unable to read or write external files. I suppose connecting to external, custom data sources is likewise restricted. I'm trying to deploy an application, not deliver a document, and since CDF is a "computable document format" I should probably take a hint. A database application not able to connect to it's data source is unreasonable. Also, having an application require the user to "allow unsafe whatever" every time it starts is, if not unreasonable, at least a major nuisance.

3) Write the application using Wolfram programming cloud. I've failed to build user interfaces using this product. Wolfram support tell me that "Mathematica Online, which is a Beta product, does not support the function Dynamic yet. Some Mathematica functionality is only supported in Wolfram Desktop systems as of now." Building Mathematica GUI without Dynamic is what I consider unreasonable. Also, I'm not exactly sure to what extent database connectivity is supported in Mathematica Online or Wolfram Programming Cloud (they are essentially the same product, right?)

4) Write the application using webMathematica. Haven't tried it, but is there any reason to believe it would work better than programming cloud?

5) Use the wolfram language server-side, but not for client GUI. This is probably viable, but would be a sad choice if you like the Mathematica GUI and graphs. Especially since the technology is there. Again, I don't know if the area of DB front-ends simply isn't targeted by Wolfram, but I assume there are countless other areas where you'd have the need to deploy a computing application with both GUI and file/data access. Delivering a top-notch product with [insert your favorite Wolfram sales video] and not providing a reasonable way for deploying applications, is what I consider unreasonable.

POSTED BY: M G
6 Replies
Posted 10 years ago

M G,

The most appropriate solution for your scenario is where you, the developer, purchases an Enterprise version of Wolfram Mathematica, develops your database gui/dashboard in a notebook, and generate Enterprise CDF documents from that notebook. Your users will then use the free Wolfram CDF Player and the EnterpriseCDF file to interact with the databases.

EnterpriseCDFs are a special version of CDF documents that allow database-connectivity functionality (DatabaseLink functions). See this comparison chart for details (the page is for Wolfram CDF Player Pro software, but contains the info you need):

https://www.wolfram.com/player-pro/how-player-pro-compares.html

Regards,

Igor

POSTED BY: Igor A

M G, When I read this I conclude you need a fast frontend interface (Dynamics, etc) and access to a external database for pushing and pulling data. The CDF reader will provide you the frontend speed and the URLFetch command enables you to access databases (for example MongoDB with Restheart API)

Posted 10 years ago

Thank you!

POSTED BY: M G
Posted 10 years ago

I think that there is one possibility missing in your list: If you need to access a database (engine) which can't be accessed by an API over http you could to buy a license of CDF Player Pro per seat (roughly priced a little lower than 10% compared to a full commercial mathematica license, probably cheaper if you buy many). You can think of that as a "Runtime Environment" of Mathematica, it will allow to run notebooks, CDF documents and packages with no restrictions applied, that means you can use DatabaseLink` to access the database and will not have any restrictions on inputfields (in CDF Player I think you can only have numeric inputfields). If you have a huge number of users, you can also consider the Enterprise version of Mathematica which lets you create CDF-Documents which are signed in such a way that they work in a free CDF Player as if that would be a CDF Player Pro. You should be aware of the fact that it needs some expertice to deploy your application in a way that non-Mathematica users can easily use them with that constellation (it's not really difficult but it is a little hard to find all relevant stuff in the documentation).

Whether or not Mathematica is a good choice for such an application depends on a lot of factors and it is certainly not possible to answer that questiong without having much more information. There are certainly good alternatives but my experience is that the main factor about success/failure of such projects is whether the authors/developers, operators (IT personal) and users support/accept the chosen technology. If someone in that chain dislikes the choice and wants to to proof his point, the project will fail. Unfortunatly Mathematica and CDF Players are not very well known as a platform among most of these groups so it will ususally take some effort to convince everyone in that chain that it is a good choice. I honestly would hope that WRI would show more effort to change that situation, but for the moment much of that burdon will be on your shoulders...

POSTED BY: Albert Retey

Igor,
Thanks for your remark on the Enterprise CDF. If I understand correctly you can generate CDF player pro versions (free player plus enterprise CDF file) for every user of your application. So itÂ’s like having an unlimited amount of player pro licenses available without having to manage licenses.
The ability to use JDBC is an advantage because native sql for your database local or in the cloud can be used (no urlfetch or json needed). The distribution of enterpriseCDF is only internally allowed. Is internally also my company and my customers?
check this video starting 16.38 on EnterpriseCDF http://www.wolfram.com/broadcast/video.php?sx=cdf&v=798

Posted 10 years ago

Pieter,

I'm not familiar with the exact licensing details for deployment of EnterpriseCDF externally and what "externally" really means. For that you'd have to review this (http://www.wolfram.com/cdf/adopting-cdf/licensing-options.html) and likely talk to someone at Wolfram.

My generic understanding is that If I create an EnterpriseCDF file, I can distribute it to anyone within my corporation. I can also distribute it to the public/my customers if it's available for free. If I want to sell my CDF file, then it's a different type of licensing agreement. You'll have to check though, as I'm not certain.

Igor

PS: Note a distinction. Your statement " CDF player pro versions (free player plus enterprise CDF file)" is not correct.

"Wolfram CDF Player Pro" is a different software. It's in between "Wolfram CDF Player" and "Mathematica." FreeCDF and EnterpriseCDF are licensing models for .CDF files.

POSTED BY: Igor A
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract