writing an abstract code for windows and the web? - windows

I hope this isn't a stupid question:
I wonder if there’s a way to build a web client and a windows desktop client (that looks the same and offer the same features) with the same code (not just same language), at least till a certain point - in other words, having an abstract code that will fit the web server and windows?
Thanks!

You should take a look at Adobe's FLEX, you can have same classes/layout for both web apps (run under Flash) and desktop app (run under AIR). The only difference will be in the main file, you will have one for each flash and air app. (The rest of code will can be compiled into one SWF, also have in mind that you should use same functionalities for both web and desktop )

I believe Java can do what you want, with minor modifications to have it run as a full-blown desktop application vs a Java applet.
One thing you'll need to do, is ensure that for the app, your main function is very small (ie, only call the main JFrame or whatever), and replicate that simple call in the applet code.
For the differences between the two, see for example, here and here. You'll need exactly one tiny source file that's different for the applet vs application.

Real Studio will also let you do this to some extent. Newer versions can create web applications and desktop applications. Non-UI code can be shared with web and desktop apps. The UI code will have to be different, though.

Related

what is the development tool of this GUI

I have a light/simple app (Winodws GUI), I want to know what is the development tool of this app? most of the app's files are as bellow.
I am newer to app development, I expected to know like "this app is developed by WPF&C#, Electron&Js, Qt&C++" this message. I am not sure if this message could be idenfied from the files shown
btw, there is an .exe with them
It is impossible to say exactly because these libraries are pretty common.
msvcp140 implies that the base is C++ developed with Visual Studio 2015 or later.
d3d* means something there is using Direct3D as well (could be Chromium). EGL/GLES is more graphics stuff, probably used by Chromium.
The presence of Chrome* means it is either using Chromium to display some web content or the entire app is HTML/Javascript based like Electron.
You should inspect the .exe in a hex editor. And a strings tool.
Use something like WinSpy to inspect the main application window. What is the class name?

Fastest/easiest way to build a WebKit based Windows application?

I am a web developer. I don't know how to build native Windows applications. I recently built a Mac desktop application (using MacRuby) which is a WebKit wrapper around one of my web applications. I'd like to do the same thing for Windows (preferably in Ruby, but whatever is easiest).
Since this is not the core of the application, I'd rather not spend a lot of time trying to build and maintain it. I just need a Windows application that can:
Open a specific website on application launch using an embedded WebKit WebView
Trigger Growl notifications via JavaScript (with some sort of named bridge)
What is the easiest, fastest, cleanest way to do this?
Update: So far I've come across some frameworks like Qt and Awesomium. I don't know how these frameworks compare to other options available, so if you have any opinions or advice, I would appreciate it.
Check out http://appjs.org/ it's built with NodeJS at its core! And it uses chromium webkit at it's core :D
Well, this is a very old question, but if you are still interested...
I'd recommend Qt. There are some very good books available with a lot of boilerplate code and wizard-type tools. You will be able to find example code demonstrating the embedded Webkit that you can modify to suit your needs. It is free and redistribution is free (last I knew). You won't have to know anything about native Windows development, nor even use any native Windows dev tools.
Good luck!

Develop application for windows without any depedendency

I need to create an application for all versions of windows (XP, Vista, 7) without the need to install .NET or other 3rd party tools.
The application needs to download files asynchronous which are received in a json format and display a html page which can communicate with the application using javascript.
Is there a way to do that using an advanced IDE like Visual Studio but without requiring anything besides the application exe?
Are there any open source alternatives?
Thank you.
Look into the WebBrowser control. It's basically an Internet Explorer control you can embed in your application, and it has an interface that allows all sorts of manipulations. And given Internet Explorer is always a part of windows, it'll always be available without further installations.
Using the control requires some work. You can start by looking at Using the WebBrowser control, simplified. It uses MFC, but you can use the control with plain C++ as well.
The way I'd use it is push as many complicated tasks as possible to the browser control, and run them using JavaScript. A-synchronously downloading JSON is a pain in C++, but a no-brainer in JS. So you can basically divide your logic between C++ and JavaScript, and figure out some interface (by using, say, the DOM).

Cross-platform HTML application options

I'd like to develop a stand-alone desktop application targeting Windows (XP through 7) and Mac (Tiger through Snow Leopard), and if possible iPhone and Android. In order to make it all work with as much common code as possible (and because it's the only thing I'm good at), I'd like to handle the main logic with HTML and JS. Using Adobe AIR is a possibility. And I think I can do this with various application wrappers, using .NET for Windows XP, Objective C for iPhone, Java for Android and native "widget" platform support for Mac and Windows Vista & 7 (though I'd like to keep the widget in the foreground, so the Mac dashboard isn't ideal). Does anyone have any suggestions on where to start? The two sticking points are:
I'll certainly need some form of persistent storage (cookies perhaps) to keep state between sessions
I'll also probably need access to remote data files, so if I use AJAX and the hosting HTML file resides on the device, it will need to be able to do cross-domain requests. I've done this on the iPhone without any problems, but I'd be surprised if this were possible on other platforms.
For me, Android and iPhone will be the easiest to handle, and it looks like I can use Adobe AIR to handle the rest. But I wanted to know if there are any other alternatives. Does anyone have any suggesions?
You might be interested in Appcelerator's Titanium. It's an alternative to Adobe AIR that lets you build native mobile and desktop apps using HTML and JS (with the WebKit rendering engine, so you can take full advantage of HTML5 and CSS3). It also satisfies your two sticking points:
SQLite is available for persistence storage.
There are no restrictions on cross-domain requests.
I used Titanium Desktop for a recent project and it was a relatively smooth development process. It's also open source so you have access to the full application at all times.
Check it out and let me know if it works for you.
You can create a desktop application with HTML, CSS & Javascript using either of the following two frameworks
TideSDK
AppJS
For mobile you can use the similar HTML and Javascript using PhoneGap

How to embed a web browser control in a cross-platform application?

I need to write quickly this application: a simple window that wraps
a web browser control, that runs html pages.
The Browser UI (e.g. Navigation buttons) should be suppressed.
As a .net developer, I would embed the WebBrowser OCX in a Windows Form.
But this has to run on Mac as well!
I found the following cross-platform candidates.
Which one would you choose (in terms of simplicity, stableness, community support, etc.):
wxWidgets: http://www.kirix.com/labs/wxwebconnect.html
QT: http://www.youtube.com/watch?v=Ee8eRwjbcFk&feature=related
MONO: http://www.mono-project.com/WebBrowser
Why not to use embedded Webkit?
QtWebkit:
The Qt port of WebKit currently compiles and runs on Linux (including Maemo), Windows, Mac OS X and Symbian.
Click here for build instructions.
A very simple test browser is built along with the port.
Since you have (assumption made from your post) .Net experience I'd go with Mono.
Have you considered Adobe AIR?
http://www.adobe.com/products/air/
Mono is probably the best choice if you're primarily a .NET developer and don't care very much about making a well-integrated Mac app (one that behaves like a Mac app in all the many ways Mac users expect). Given your problem space, that sounds like where you are. That said, pay special attention to this limitation from the WebBrowser page if it applies to your problem:
The Mono Webbrowser currently lacks
support for window.external, the
bridge that allows Javascript code
embedded in the browser to communicate
with the managed world using the
ObjectForScripting.
QT is very well established, and a great platform if you want to develop this in C++. Remember that there are licensing fees if this is a commercial app.
I've played a bit with wxWidgets. It's big advantage here is that it's probably going to be the smallest distribution, since you only have to include what you need. If all you need is the web browser, I'd look at this, but in my experience it's hard to make wxWidgets programs look good or act correctly on Mac (or on Windows for that matter).
Another option may be to write it as a Java app using the Eclipse Standard Widget Toolkit. This includes a browser control that embeds IE, Safari or Firefox, depending on the current platform, and generally behaves well on OS X.

Resources