truly stand-alone applications

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

weenie
Posts: 1
Joined: Mon Sep 20, 2010 10:26 am UTC

truly stand-alone applications

Postby weenie » Mon Sep 20, 2010 10:43 am UTC

So, I've been a java programmer for most of my life. I've done some C in my early years, but I didn't really like it. However, nowadays I'm starting to get interested in making windows applications, that don't require you to install anything else besides them, so I decided to learn something C-esqe, but newer. And since I heard that C# is supposed to be pretty much like java I tried it out. Coding was pretty familiar, I could create runnable .exe files, MonoDevelop even has a visual design tool, so it was perfect. Until I ported the application on a different machine. Turns out you need .NET framework to be installed on a machine, or else nothing happens :/

Now, I know there are a few ways to compile java and c# natively, but would it be easier/cheaper for me to learn a language that doesn't have such issues, or is native compiling worth the work and money?

User avatar
Sc4Freak
Posts: 673
Joined: Thu Jul 12, 2007 4:50 am UTC
Location: Redmond, Washington

Re: truly stand-alone applications

Postby Sc4Freak » Tue Sep 21, 2010 12:23 am UTC

The .NET framework is included on every Windows machine XP and above by default. It just depends on which version you target. IIRC, XP came with 1.1 by default, Vista with 2.0, and Win7 with 3.5. Remember that there were only library differences between .NET 2.0 and 3.5 (the CLR stayed the same), so you technically don't need to install the .NET framework 3.5 to use many 3.5 features.

And even if you compile your .NET application to native code, you'll still have a dependency on the .NET framework. You can use the sgen tool to compile your application, but all that does is elide the JIT at runtime - it doesn't statically link the entire .NET framework into your application. Considering how massively large the .NET framework is (think ~10MB worth of DLLs for just the CLR and other core stuff), that's probably a good thing.

Most, if not all, languages have a dependency on some library or another. You don't get away from it even if you use C or C++, which is compiled natively. C and C++ require the C Runtime Library, which is provided by your compiler vendor. The only difference is that a CRT dll is provided on all Windows systems by default (typically msvcrt.dll). But if you use a newer compiler that wants to use a newer CRT (with more features etc.), you'll still need to install a new version of the CRT. This is why MSVC Redistributable Packages exist - they install updated versions of the CRT so your C/C++ programs can run. In C/C++ you can get around this by statically linking the CRT to your application. But that's not a good idea, you shouldn't use static linking to the CRT unless you absolutely have to.

In short, there's no getting away from it. You either develop in C/C++ and static link the CRT (which is a bad idea), or you just develop whatever you want and include the necessary libraries and redistributable packages with your application (or a web link to them at least).

User avatar
sourmìlk
If I can't complain, can I at least express my fear?
Posts: 6393
Joined: Mon Dec 22, 2008 10:53 pm UTC
Location: permanently in the wrong
Contact:

Re: truly stand-alone applications

Postby sourmìlk » Tue Sep 21, 2010 4:06 am UTC

So, for a native and OS-portable language you're pretty much going to have to go with C++. Unfortunately, creating a windowed application in C++ is far from intuitive, and so you'll have to get the hang of it. Although you can program C++ apps in Mac, you usually use objective-c, where it's actually _much_ easier to create windows. I, so far, have only really learned how to do graphical stuff in objective-c, but once you get the hang of it in C++ you can learn, say, Open GL and take that knowledge across any OS: OpenGL code is largely portable between c++ and C
Terry Pratchett wrote:The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.

bieber
Posts: 223
Joined: Thu Mar 13, 2008 12:13 am UTC

Re: truly stand-alone applications

Postby bieber » Tue Sep 21, 2010 1:46 pm UTC

sourmìlk wrote:So, for a native and OS-portable language you're pretty much going to have to go with C++. Unfortunately, creating a windowed application in C++ is far from intuitive, and so you'll have to get the hang of it. Although you can program C++ apps in Mac, you usually use objective-c, where it's actually _much_ easier to create windows. I, so far, have only really learned how to do graphical stuff in objective-c, but once you get the hang of it in C++ you can learn, say, Open GL and take that knowledge across any OS: OpenGL code is largely portable between c++ and C


Of course, if you're building a typical GUI app, OpenGL is most certainly not what you need. If you want a typical buttons-and-forms-and-so-on GUI, there's Qt for cross-platform C++ work, C# and WinForms on Windows, C and Gtk+ on Unix (it also runs on Windows and Mac, albeit not well), and of course Cocoa and ObjC on Mac.

User avatar
sourmìlk
If I can't complain, can I at least express my fear?
Posts: 6393
Joined: Mon Dec 22, 2008 10:53 pm UTC
Location: permanently in the wrong
Contact:

Re: truly stand-alone applications

Postby sourmìlk » Tue Sep 21, 2010 4:16 pm UTC

bieber wrote:
sourmìlk wrote:So, for a native and OS-portable language you're pretty much going to have to go with C++. Unfortunately, creating a windowed application in C++ is far from intuitive, and so you'll have to get the hang of it. Although you can program C++ apps in Mac, you usually use objective-c, where it's actually _much_ easier to create windows. I, so far, have only really learned how to do graphical stuff in objective-c, but once you get the hang of it in C++ you can learn, say, Open GL and take that knowledge across any OS: OpenGL code is largely portable between c++ and C


Of course, if you're building a typical GUI app, OpenGL is most certainly not what you need. If you want a typical buttons-and-forms-and-so-on GUI, there's Qt for cross-platform C++ work, C# and WinForms on Windows, C and Gtk+ on Unix (it also runs on Windows and Mac, albeit not well), and of course Cocoa and ObjC on Mac.


Pfft, yeah, but who just wants to build interfaces. If you're only building a form or something there's no reason not to do it web-based.
Terry Pratchett wrote:The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.

Dark567
First one to notify the boards of Rick and Morty Season 3
Posts: 3686
Joined: Thu Jun 25, 2009 5:12 pm UTC
Location: Everywhere(in the US, I don't venture outside it too often, unfortunately)

Re: truly stand-alone applications

Postby Dark567 » Tue Sep 21, 2010 6:40 pm UTC

sourmìlk wrote:
Pfft, yeah, but who just wants to build interfaces. If you're only building a form or something there's no reason not to do it web-based.


Man, have the times change.....

but honestly I'm not convinced this is always the case, but it probably is something like 98% of the time.
I apologize, 90% of the time I write on the Fora I am intoxicated.


Yakk wrote:The question the thought experiment I posted is aimed at answering: When falling in a black hole, do you see the entire universe's future history train-car into your ass, or not?

bieber
Posts: 223
Joined: Thu Mar 13, 2008 12:13 am UTC

Re: truly stand-alone applications

Postby bieber » Tue Sep 21, 2010 9:51 pm UTC

Dark567 wrote:
sourmìlk wrote:
Pfft, yeah, but who just wants to build interfaces. If you're only building a form or something there's no reason not to do it web-based.


Man, have the times change.....

but honestly I'm not convinced this is always the case, but it probably is something like 98% of the time.


I can only hope sourmilk was joking there. On any given day, I use an email client, an IM client, a terminal program, IDEs, an image editor, text editors, a photo manager, games, and probably a heap of other programs I can't think of off the top of my head, none of which could be even remotely adequately replaced by web apps...

User avatar
Thesh
Made to Fuck Dinosaurs
Posts: 6568
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: Colorado

Re: truly stand-alone applications

Postby Thesh » Tue Sep 21, 2010 10:05 pm UTC

bieber wrote:
Dark567 wrote:
sourmìlk wrote:
Pfft, yeah, but who just wants to build interfaces. If you're only building a form or something there's no reason not to do it web-based.


Man, have the times change.....

but honestly I'm not convinced this is always the case, but it probably is something like 98% of the time.


I can only hope sourmilk was joking there. On any given day, I use an email client, an IM client, a terminal program, IDEs, an image editor, text editors, a photo manager, games, and probably a heap of other programs I can't think of off the top of my head, none of which could be even remotely adequately replaced by web apps...


Well, most people seem to be moving from email clients to web based email (I prefer the clients myself, as I have multiple email accounts I check), but other than that I agree from the standpoint of the consumer market. The business market, however, seems to be moving more towards web based applications for anything that is multi-user.
Summum ius, summa iniuria.

User avatar
styrofoam
Posts: 256
Joined: Sat May 08, 2010 3:28 am UTC

Re: truly stand-alone applications

Postby styrofoam » Tue Sep 21, 2010 10:40 pm UTC

sourmìlk wrote:Pfft, yeah, but who just wants to build interfaces. If you're only building a form or something there's no reason not to do it web-based.

Which involves building an HTML/CSS-based interface, which isn't much easier than a QtDesigner/QSS one...
aadams wrote:I am a very nice whatever it is I am.

squareroot
Posts: 548
Joined: Tue Jan 12, 2010 1:04 am UTC
Contact:

Re: truly stand-alone applications

Postby squareroot » Wed Sep 22, 2010 1:54 am UTC

styrofoam wrote:
sourmìlk wrote:Pfft, yeah, but who just wants to build interfaces. If you're only building a form or something there's no reason not to do it web-based.

Which involves building an HTML/CSS-based interface, which isn't much easier than a QtDesigner/QSS one...

Why stop there? Let's write a server-side script and some AJAX to make it more thoroughly interactive; we could even add a database with info for IP Address that uses the interface, then there's no need for cookies, or those silly "sessions"...
<signature content="" style="tag:html;" overused meta />
Good fucking job Will Yu, you found me - __ -

User avatar
Xanthir
My HERO!!!
Posts: 5400
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: truly stand-alone applications

Postby Xanthir » Wed Sep 22, 2010 2:49 am UTC

bieber wrote:
Dark567 wrote:
sourmìlk wrote:
Pfft, yeah, but who just wants to build interfaces. If you're only building a form or something there's no reason not to do it web-based.


Man, have the times change.....

but honestly I'm not convinced this is always the case, but it probably is something like 98% of the time.


I can only hope sourmilk was joking there. On any given day, I use an email client, an IM client, a terminal program, IDEs, an image editor, text editors, a photo manager, games, and probably a heap of other programs I can't think of off the top of my head, none of which could be even remotely adequately replaced by web apps...

You're, um, joking, right?

Several of the things you list currently have multiple great web-based apps for them. Most of the others have ones of varying levels of quality, but which will get better as more browsers support some of the newer APIs brewing in standards bodies.

Probably the only thing that wouldn't be convenient to put on the web is a terminal. And even then, they do exist.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

bieber
Posts: 223
Joined: Thu Mar 13, 2008 12:13 am UTC

Re: truly stand-alone applications

Postby bieber » Wed Sep 22, 2010 3:13 am UTC

They may exist, but with the possible exception of email, none of those are going to work any where near as well as a web app as they do on the desktop. There's no way I'm going to use a web application to handle my 20+ GB of photographs, or try editing large image files while transferring a request for each operation and receiving its result over the Internet (which doesn't even take into account the suckiness of an HTML/Javascript based editing interface). And no matter how spiffy any web interface may become, they still fail completely when you don't have access to the Internet, and complete non-functionality is just a little bit of a hiccup...

User avatar
Area Man
Posts: 256
Joined: Thu Dec 25, 2008 8:08 pm UTC
Location: Local

Re: truly stand-alone applications

Postby Area Man » Wed Sep 22, 2010 3:46 am UTC

Thread title wasn't clear enough‽ ...adding a webserver+scripting and possibly a network connection doesn't aid "stand-alone" imo.

Anyway, learning a new language is not a bad idea. If you know java and C then using Qt in C++ should be rather straightforward.
As was mentioned, any exotic library dependency can be statically compiled into your app; the trade-off is binary size ... but may gain speed, too.

The OS will always have to provide some facilities (that's what it's for, after all), but you can count on a POSIX-y C runtime on any platform worth the trouble.
Bisquick boxes are a dead medium.

User avatar
sourmìlk
If I can't complain, can I at least express my fear?
Posts: 6393
Joined: Mon Dec 22, 2008 10:53 pm UTC
Location: permanently in the wrong
Contact:

Re: truly stand-alone applications

Postby sourmìlk » Wed Sep 22, 2010 5:05 am UTC

I can only hope sourmilk was joking there. On any given day, I use an email client, an IM client, a terminal program, IDEs, an image editor, text editors, a photo manager, games, and probably a heap of other programs I can't think of off the top of my head, none of which could be even remotely adequately replaced by web apps...


Most of those things have perfectly adequate (in fact, often superior) web-based alternatives. There are only a few situations where client-side things are necessary: games, photo editors, etc., but most of those involve graphics more than they involve GUIs. Looking down at my dock there are a total of maybe 3 client-based GUI-dependent apps that have no reasonable web-based alternatives
Terry Pratchett wrote:The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.

User avatar
Xanthir
My HERO!!!
Posts: 5400
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: truly stand-alone applications

Postby Xanthir » Wed Sep 22, 2010 5:14 am UTC

Area Man wrote:Thread title wasn't clear enough‽ ...adding a webserver+scripting and possibly a network connection doesn't aid "stand-alone" imo.

You can create apps that use LocalStorage, Cache Manifests, and other means to store and retrieve data. It would require no more of a network connection than any other program would - just enough to download it - after which it can run completely independent of the internet.

Scripting has nothing to do with "standalone". JS is just another programming language.

Now, a valid point is that a webapp needs a browser to run on. But browsers are *truly* ubiquitous.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

User avatar
styrofoam
Posts: 256
Joined: Sat May 08, 2010 3:28 am UTC

Re: truly stand-alone applications

Postby styrofoam » Wed Sep 22, 2010 12:43 pm UTC

sourmìlk wrote:Most of those things have perfectly adequate (in fact, often superior) web-based alternatives.

Let's list them:
email: You're right, this one works just fine online.
IM: Maybe. I kind of like having the IM client open in the systray whether the browser is open or not. Of course, it isn't useful if I'm offline
terminal: Not if you want to interact with the local system...
IDE: If you're developing web apps, then yes, a web-based one is good. If it's C or something, it'd be too ad-filled to make up for compilation.
image editor: Same with IDE on being ad-filled, and it'd be just fine drawing vector graphics, just not raster ones.
text editor: Why not? The most difficult part would be the keybindings vi&emacs are famous for not overlaping with browser ones.
photo manager: Just be careful about size...
games: Depends on the game, though WebGL is closing the gap fast...
aadams wrote:I am a very nice whatever it is I am.

User avatar
Steax
SecondTalon's Goon Squad
Posts: 3038
Joined: Sat Jan 12, 2008 12:18 pm UTC

Re: truly stand-alone applications

Postby Steax » Wed Sep 22, 2010 1:19 pm UTC

Arguably, the web is a much better-supported platform than pretty much anything else. From game consoles to handheld to desktops. Reasonably standards-compliant browsers are available in nearly all of them. Even with C or assembly, PSPs and iPhones won't be able to use them without extra work. The only downfall is the restrictions of bandwidth and how a lot of applications depend on Flash (although <canvas> support may soon change that).

For a photoshop-esque app: Pixlr Editor is pretty awesome. (No ads, and unless my connection is unusually fast, it doesn't upload local images.)

Another intriguing property of web-based applications is when the web becomes a storage media. I use google docs solely for writing out documents now. It's really useful because I can get up and start working on a document there. Later if I move around I turn up my laptop, connect it to wifi and can seamlessly continuing editing. Or, working with a co-worker, let them connect via the same wifi and work on the same document together. Or go to a coffee shop and continue there. This ability seriously boggles my mind in it's potential. Eventually, pretty much anything that I'll put up on the web sooner or later, for any purpose, I just put online anyway.
In Minecraft, I use the username Rirez.

User avatar
Sc4Freak
Posts: 673
Joined: Thu Jul 12, 2007 4:50 am UTC
Location: Redmond, Washington

Re: truly stand-alone applications

Postby Sc4Freak » Wed Sep 22, 2010 1:41 pm UTC

Please point me to the web-based equivalents of Photoshop, Outlook, Excel, and Visual Studio. And before you say it, no, Google Docs doesn't provide an Excel equivalent. Its spreadsheet capabilities are so primitive that it's useless for all but the most basic of spreadsheets.

I can't find any web-based equivalents of the big desktop software packages I use on a daily basis. There exist online image editors and IDEs for sure, but none of them are even close to reaching the level of functionality I expect from my software. Google Docs might work fine if all you want is to do some basic word processing. But if you want to do anything remotely complicated then they just fall flat. Maybe I haven't found the right web app yet, but so far I haven't seen anything to change my opinion.

Web apps are great if you want collaboration or if you want cloud-based storage/processing. If need either of those things, then great, a web-based application is probably the way to go. But if not, then placing your application on the web doesn't give you any benefits - it just a roundabout way of providing a local application. Using a remote server for stuff that I want done locally is just plain stupid. And if it doesn't actually do anything on the internet then it's not really a "web app" any more - it's just a local application which happens to run in your browser. And if that's the case, then you've just got a slower version of a local app that doesn't integrate well with the OS and which requires a browser to operate - without any of the benefits you get from being on the web!

User avatar
Thesh
Made to Fuck Dinosaurs
Posts: 6568
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: Colorado

Re: truly stand-alone applications

Postby Thesh » Wed Sep 22, 2010 2:34 pm UTC

Sc4Freak wrote:Please point me to the web-based equivalents of Photoshop, Outlook, Excel, and Visual Studio. And before you say it, no, Google Docs doesn't provide an Excel equivalent. Its spreadsheet capabilities are so primitive that it's useless for all but the most basic of spreadsheets.


For an excel/word/powerpoint/onenote equivalent:
http://en.wikipedia.org/wiki/Windows_Live_Office
Summum ius, summa iniuria.

User avatar
Steax
SecondTalon's Goon Squad
Posts: 3038
Joined: Sat Jan 12, 2008 12:18 pm UTC

Re: truly stand-alone applications

Postby Steax » Wed Sep 22, 2010 2:52 pm UTC

Sc4Freak wrote:And if that's the case, then you've just got a slower version of a local app that doesn't integrate well with the OS and which requires a browser to operate - without any of the benefits you get from being on the web!


Though, again, arguably assuming the existence of a web browser is easier than a bunch of dependencies - and chances are, as I'm sure a large portion of applications are introduced to their users via web, the rate of a user that doesn't support it is near zero. Wouldn't this fulfill the requirement of a 'Near-Truly Stand-Alone Application'?

Understandably, the requirement of an internet connection can also be tough. Many AJAX-based apps simply don't allow this yet (although, say, with Google Docs even if I disconnect it just waits for another connection before it auto-saves), though the shortcomings of being unable to load the app at all is probably worst. Some apps have found some ways around them, though. SlideRocket, IMO a truly amazing presentation web app, has an AIR applet for offline viewing. True, this makes an even more complicated dependency, but it's a step in a direction web apps should take.

For photoshop, see above.
In Minecraft, I use the username Rirez.

User avatar
Berengal
Superabacus Mystic of the First Rank
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway
Contact:

Re: truly stand-alone applications

Postby Berengal » Wed Sep 22, 2010 3:23 pm UTC

I've never seen a web-based browser...
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.

User avatar
Steax
SecondTalon's Goon Squad
Posts: 3038
Joined: Sat Jan 12, 2008 12:18 pm UTC

Re: truly stand-alone applications

Postby Steax » Wed Sep 22, 2010 3:40 pm UTC

... frames?

Well, there's this, which isn't so cool but it works. I guess if you needed it for something, you could make one?

... That's actually a pretty interesting idea.
In Minecraft, I use the username Rirez.

User avatar
Cleverbeans
Posts: 1378
Joined: Wed Mar 26, 2008 1:16 pm UTC

Re: truly stand-alone applications

Postby Cleverbeans » Wed Sep 22, 2010 7:06 pm UTC

I don't forsee a web-based equivalent for CAD systems anytime soon. Full custom control over 3D raster/vector graphics, database integration, version control, and a myriad of tools every branch of architecture/engineering with no tolerance for data loss/corruption. They're clunky and slow as, web-based... I'd hate to imagine what it would be like.
"Labor is prior to, and independent of, capital. Capital is only the fruit of labor, and could never have existed if labor had not first existed. Labor is the superior of capital, and deserves much the higher consideration." - Abraham Lincoln

User avatar
TheChewanater
Posts: 1279
Joined: Sat Aug 08, 2009 5:24 am UTC
Location: lol why am I still wearing a Santa suit?

Re: truly stand-alone applications

Postby TheChewanater » Wed Sep 22, 2010 8:16 pm UTC

Web based kernels?
ImageImage
http://internetometer.com/give/4279
No one can agree how to count how many types of people there are. You could ask two people and get 10 different answers.

User avatar
Area Man
Posts: 256
Joined: Thu Dec 25, 2008 8:08 pm UTC
Location: Local

Re: truly stand-alone applications

Postby Area Man » Thu Sep 23, 2010 1:37 am UTC

Xanthir wrote:Scripting has nothing to do with "standalone". JS is just another programming language.

No, it has limitations, by design. Server-side code is usually something heftier to do work.
And while browsers may be ubiquitous, their versions and level of js support varies, which means that to write anything significant requires either a ton of code or dependency on a lib like jquery. Something stupid like declaring a "const" can brake a page in ie.

Besides not being general-purpose enough for me is the compile-every-single-effing-time-you-load pointlessness in a standalone app.
Makes a nice plug-in for C++, though.
Bisquick boxes are a dead medium.

User avatar
MHD
Posts: 630
Joined: Fri Mar 20, 2009 8:21 pm UTC
Location: Denmark

Re: truly stand-alone applications

Postby MHD » Mon Sep 27, 2010 11:02 am UTC

GCC has a Java to Native Code compiler... In comes .jar out comes .exe
EvanED wrote:be aware that when most people say "regular expression" they really mean "something that is almost, but not quite, entirely unlike a regular expression"


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 15 guests