Standalone Desktop Application - desktop

I have been tasked with the creation of a desktop application within some very rigid constrains. The first version of the application was quite small, only intended for some specific tasks, but it seems like the application was quite liked, so I've been asked to improve it a lot.
The initial app I created was made as a hta with heavy doses of javascript and jquery, using a XML to store information (through MSXML2.3.0), but the increased amount of data makes me think it won't be able to keep up with the requirements, so I wanted to remake the application on a more solid base. Of course, I'd rather keep the interface more or less consistent with what I've already shown, and I'd prefer not having to rewrite all the code.
The restrictions are as follows:
-Desktop application. I cannot develop a web application, as not a single target computer has a solid internet connection.
-No need of installation (copying and pasting the folder should work, and should keep all the data consistent).
-Should be relatively multi plataform. The only information I have about the target machines is that all of them have a windows XP OS or newer, a MS Office 2003 suite or newer, and some kind of PDF reader.
-Should be able to embed and show different file types, such as diferent image formats, pdfs, and office documents. That said, for office documents, as long as I can link to the document and open it by instanciating a common MS Word/Excel/wathever app, it should be good enough, although interoperativity with the suite would be great.
I've been searching through the net, and I've found some interesting options, but I'm not sure about them.
On one side, I think XML won't be able to keep up, although I suppose I could make it work if I distribute the data through several xml files. I've been reading about open source embedded databases, such as SQLite, and it looks like this could work.
On the other side, I feel like the hta basis I'm using isn't going to work that well if the application keeps growing. I've checked lots of alternatives, but all of them give me some problems.
Cappuccino or Chromeless looks like good ideas, but both of them require a certain degree of HTML5, which is something I can't be sure the machine's browser will support enough. Also, NativeHost for Cappuccino seems to work only on Mac OSX. Xul looks interesting, but unusable.
Another option I've found is porting the app to Qt, but I don't know how hard would be porting the app to Qts, and it looks like I can only use the ActiveX needed for the embedding of MS Office applications with a proprietary license. Although that's comparatively less important, but I'm sure in the future I'll want to include those features.
That's how I stand. Do you think keeping the hta + XML architecture (or any variation thereof) could still work? Do any of the alternatives I've mentioned be viable? Do you know any other alternative?

Related

Is it an efficient method to use a framework to code a single interactive webpage in python?

This is an open source contributor project for Wikidata's Chronic Pain project.
I would like to create a webpage that :
Have inputboxes where the user select several wikipedia page titles (with suggestions)
Can also take these parameters via the URL
Get items metadata from Wikidata.
Makes a SPARQL request to gather scholarly articles.
Render data from Wikidata and Wikipedia, linking to various wiki pages.
The webpage will be hosted on Wikimedia fundation server. I have access to a linux container as well as a Jupyter Notebook (not sure this one is suitable for this project). It has to be coded in Python 3 since I will use Pywikibot framework to interact with Wikidata.
I'm new to programming so that I don't really know what is the best approach. I heard that it was difficult to code webpages in Python without using a framework like Django. However this page is very simple so that it may not be the most efficient to deploy Django for this ?
NB : your question is bordering on "primarily opinion based" (which doesn't mean it's a bad question by itself but that answers might be more, well, opinions than hard facts).
This being said, "a single interactive page" doesn't mean the server code behind is just loading a static html file and sending it to the client. For example, the main UI part of our product is, technically speaking, "a single interactive page", but this "single" page is full react app and is backed by a dedicated API with a dozen entry points, which the dispatch to a whole load of backend code including database access, celery tasks etc. It would of course be technically possible to code all this with only pure wsgi or even plain old cgi code, but well, it could also be possible to write it directly in C or even assembly and no one would ever consider this a viable solution.
To make a long story short: do not even waste your time trying to code this project with plain wsgi (and let's not talk cgi), you will end up reinventing the squared wheel and everyone will hate you for this (stakeholders because you'll never deliver a robust, working product in due time and budget, and other devs because they'll now have to port the whole darn thing to a stable, mature and maintained framework). Now if Django appears to be overkill for this project there are much lighter frameworks like flask. Actually both are the "industry standard" and safe choices.

Link C++ library to html front end

I do computational research with a C++/CUDA library that does intensive number crunching. Recently I was thinking to set up a little showcase of my library on my webpage where people could work interactively with the library and see the results (plots, animations, etc.) in real time.
I have very limited html and website creating expertise. Are there libraries out there to link the html front-end to the C++/CUDA back-end? I'm developing in Linux environment but obviously I'd like my webpage to be accessed by anyone independent of their OS and/or browser.
So after a little bit of research I found the Wt library which is written in C++ and used for webpage development. Based on the information on their homepage, it seems to be exactly what I'm looking for:
Typical use scenarios:
High performance, complex web applications which are fully personalized (and thus cannot benefit from caching), fully Ajax enabled and at the same time entirely accessible and Search Engine Optimized.
Web-based GUIs for embedded systems benefit from the low footprint of a C++ web application server.
Web-based GUIs that require integration with (existing) C++ libraries, for example for scientific or engineering applications, or existing C++ desktop applications
I did something like this. To do this, I used a simple library I wrote called jrb_node at https://github.com/kennethho/jrb_node
There are other libraries like cppnetlib http://cpp-netlib.org/
Basically you make a small http server that based on the request will perform some computation and return the results as an http response. You can then combine that with javascript and Ajax if you want to make it more interactive.
An alternative to consider is to use WebCL. CUDA is pretty similar to OpenCL and it should be pretty easy to convert your code to the latter. If you have other C++ code, that might be a bit of problem though.
Do you want to run CUDA on server (e.g. the users will input the parameters, push a button and your server will do number crunching) or on client (e.g. it will be user GPU that does computations)?
For server-side you should be able to use pretty much any server technology - PHP, JSP, etc. They all provide a way to integrate to "native code".
For client-side you will not be able to do with just HTML - you need to use some "fat client" technology - e.g. ActiveX, Java applet. I do not know if Silverlight or Flash have access to native code. IMHO, you might as well just write a Qt application and put a download link on your site.

How to create a login application with Visual Basic (using WebHttpRequest)

Hei there, I'm not experienced at all in C++ as I need to start learning year the next year at my university, though, I've been creating a browser based game and I'm looking for someone to transform it into pc app.
Though, I'm wondering how to make that application send a http request via POST to a file on my webserver with the username / pw.
After all the tutotials I've been reading, I concluded that none worth spending my time with, because they all based on own database, and I'm looking for one that connects to a maestro server and requests the data from there.
This may not be the answer you are looking for, but you may consider two alternatives to a more pure C++ application.
If you already have a working browser game, try to take that same code and put the html/javascript/whatever in a file and give the file a ".hta" extention. It basically opens inside a browser to run your files, but it acts more like an application from the user's viewpoint. (And, as much as I hate Windows, they're pretty fun to create if I may say so). However, your source code with this option is easily read because it can be renamed to a text file (or html file).
You could use Visual C++ (or VB.net, which you have tagged to the question, as well as "Visual" C#) to create an application which mostly consists of a browser view. It could be a "standalone" application (however would rely completely on the .Net framework - may or may not be what you want) that basically accomplishes the same as the option above, but adds that you can "hide" your files inside your application.
Using the two above alternatives, you could make an application relatively quickly that would load your files, which I assume you have already created. Note that neither of the above alternatives will work on anything other than Windows OS's.
If the two above alternatives are not what you want, or if you have questions about either one, I'd be glad to attempt to help.
I've been able to find a friend that would do it in Delphi because I wouldn't want users to download net framework just for this ap.
So the program that would fit most for any apps is Delphi Prism XE (even if it's an addon of Visual Studio)

Web Developer curious about developing for the Android

Hey there,
So I've been heavily focused on design/development using web technology for the last few years (php/mysql, javascript, etc), and I'm a bit hesitant to start learning C++.. At the same time, I see it as a potentially enjoyable learning experience.
To keep things brief, right now I'm developing an online app that plots out certain locations on a map, and you can sort through these locations and do a bunch of other nifty things..sorry to be vague. The point is: I don't see any real advantages of making this an actual "app" when the entire functionality of the app itself can do quite fine through the modern mobile browser..
Not to mention that, by living in a browser, it's much less proprietary
So, my question is: Is there any way to make a simple app that's basically porting the user to my site? I guess it'd be convenient that as an app, the user has a nice little icon to click on when they do need to access it..
Android development relies heavily on Java. So you are all ready on the right track.
However if you just want to make an app that brings people to your website, running javascript I am guessing, this is easy to do with android.
Android supports the webkit browser and has a view group called WebView. Your app can be nothing more than a shortcut on a desktop that opens a webview directly pointed to your website. It could add other options to point to other parts of your website like bookmarks.
WebView webview = new WebView(this);
setContentView(webview);
weview.getSettings().setJavaScriptEnabled(true);
webview.loadUrl("yoursiteurlgoeshere);
A lot of apps on the market are actually based around a WebView. There are other classes that allow you more control over the view, like whether links are opened in the webview or in a new browser, or whether the user is allowed to use the resize options, etc.
Welcome to Android.
There is a massive article on exactly this type of idea. It discusses a number of different things and is well worth the read if you are indeed interested in making a cross-phone web-app. It talks about an html5 facility in the works for creating such a thing as you describe, but it isn't quite universal yet.
Here is an article on making an iphone app in html5.
You can also use phonegap to port your design to andorid.
also, check out a jquery plugin calld jqtouch if you are interseted in developing touch capable applications quickly.
If you are worried about speed and the issue of internet connectivity, you can use html5 local storage features which are available on both android and itouch. Ibm has a great series on these issues and part 2 covers local storage.
No. The problem with web technology on a mobile device is the delay. You are far away from the server, so a lot of the things you can easily do with a normal client creates a very bad user experience on a mobile device. The roundtrip time is simply too large. You have to move much more functionality to the client. This client is also less powerfull, and tends to have limits on caching large elements
How is this related to C++?
There is also a C++ API which is only recently available. Google calls it the NDK (Native Development Kit). Information about it can be found here: http://developer.android.com/sdk/ndk/index.html
I personally haven't developed using the NDK. The only real reason someone would really need to would be to write a high-performance application that can't stand the overhead of the Java JVM--which is getting more and more rare these days IMO.
As far as creating a simple app with a web container in it, see Phobos' response. That is exactly how I'd do it personally.

Choosing Cross-Platform GUI Toolkit for Desktop App With WebServices

For a current project, we're designing a client desktop application that parses text files and interfaces with a web based database.
So far we've split the project into parts:
(Third-Party Program) -> (Our Desktop Client) -> (Our Parsing Library #1 and #2) -> (Our Web Server) -> (Our Verification Library) -> (Our Database)
We've hit confusion when it comes to choosing the correct way (and the best language) to make these pieces work together.
The third-party program's output is a simple text file, and we're just parsing it into a SQL-esque format for insertion into our database after verifying the numbers are in a certain range.
The first question we have is regarding the client language itself. We're planning on writing the parser libraries in C++ as they're just mostly text management. Our desktop client needs to be cross-platform for Windows and Mac. Currently we're leaning towards writing this in Java using Swing and the JNI. However, we realize there's a lot of hate for Java and that we'd have to worry about bundling in the JRE.
Is Java a good choice in this situation? Our other options seem to be writing this also in C++ using something like Qt for the GUI, or going platform specific and writing the windows version in .NET and then a Mac specific version. Our Windows community is the vast majority of users.
Our second issue is connecting this client with our web server. Originally we were just going to use an http POST to upload the file. We could also FTP the file which seems like overkill. We started to explore web services but were not sure if a web service could handle large amounts of text data.
Is there an easier way to do this? Everything is text, so it's no problem to send them in chunks or one giant string. If we go the web services route, will that effect our language choice for the desktop client?
There are definitely hundreds of ways to handle something like this, but most of these concepts are new for us. Any suggestions would be greatly appreciated.
Qt is an excellent choice and as it's native C++ it will be easy to integrate with your parsers too. Why write two versions when a single Qt version will run fine on both platforms with native look and feel? Depending on the license you choose you can even statically link Qt if you're concerned about deployment complexity.
A web service would generally have no problem handling large amounts of text and pretty much any language will interact with it easily assuming basic network I/O functionality. Depending on the language you will probably be able to find libraries that do most of the work for you, assuming it's not already supported natively.
As you say, there are many different ways to do what you want to achieve. There is no right or wrong way but obviously some designs will suit your needs better than others.