Desktop application for PC or MAC - wpf

I've had a quick look on the interweb and can't seem to easily find the answer to my question which is, what do I need to do differently to make a desktop application, WPF, function on both PC and MAC environments? I suppose I could buy a mac and try to run an app I've written but seems a bit expensive?
There are comments that WPF on mac is a no-go. I could convert to Silverlight with some effort but my question now is what would you develop a desktop app in for both PC and MAC, my guess is poor old WinForms? If so would the pitfalls simply be directory structure / accessing logged in user from WIN32 API commands, et cetera?

You can't run WPF on a mac.
The best you can get is Silverlight and its suitability depends on your needs.
Do you need OS level access?

As Scartag says, WPF is not compatible with OS X. However you might to consider Mono, which allows you to write cross-platform applications in C#. There are several GUI toolkits to choose from, but none are implementations of WPF. Further info on Mono/WPF can be found here.

Related

WPF or Silverlight which one has the upper hand?

I am Really confused by reading some articles about Silverlight. Whether I should concentrate on WPF or Silverlight or Both?.
It's like asking Web or Desktop : Which one has upper hand?
Silverlight (Web) and WPF (Desktop) Both are similar. But both have their separate workplaces.
You cannot have a Windows Calculator, Task Manager or MS Word (please don't mention google docs) applications on web like they are on desktop. And same thing applies for web applications.
So, it depends on what platform you want to work on.
I dont think its difference between Web and Desktop. Silverlight is still pretty limited by platform it can run on and still requires some local runing process, even in the sandbox.
I think difference here is features vs availability. WPF can give you features of whole .NET framework, total acess to users's computer and some features that are not available in SL. SL on the other hand allows you to run your app on some different systems (Windows, Mac and there is limited support for Linux-based systems), distribution is much easier thanks to web deployment and whole application can be part of your web ecosystem.
Iam personaly for WPF, but thanks to this whole web and cloud-hype in the last years, SL is getting much more attention from side of MS and developers in general.
Reading these questions and their answers may give you some insight into this:
Definitive source(s) for the difference between Silverlight and WPF
https://stackoverflow.com/questions/1254937/wpf-vs-silverlight
What is the difference between WPF and Silverlight?
I totally agree with decyclone, it depends on which platform you want to work. If you have prior experience Asp.net/We applications Silverlight is the way whereas if you have worked in WinForms/Windows applications then WPF is the way to go.
But yes most of the concepts in both SL and WPF are similar; so once you have good understanding of those concepts, you work in either without much problem.
If we ignore the platform then WPF is having the upper hand as WPF is kind of superset of SL.
Have a look at this SO question too -
Learn Silverlight or WPF first?

VS Studio 2008 VB.Net Winform - can it be run on a MAC?

Our company has a handful of Mac users. I recently built a Winform application and now my main user is using a Mac. Is it possible to run this application on a Mac? What would have to be done to convert it? If it is too much, I may just rebuild it is asp.net as a web application.
Thanks in advance!
JCC
Maybe. Many .Net programs can be compiled with mono as well, winforms usually is not a problem, but some libraries (e. g. MS Office libraries for editing Excel files). I am not sure about VB, as mono coders mostly use C#, but you can analyse your code with the Mono Migration Analyzer for portability to mono.
Depending a bit on features and controls used, it may run on Mono. Since you can run Mono on Windows as well it's rather easy to download and test it.
Your basic options are (from least intrusive to most intrusive, from the point of view of a Mac user):
Convert it to a web app.
Run it on a Terminal Server and have them use Remote Desktop.
Run the application in a virtual machine (VMWare or Parallels) that is running Windows.
Try to get it running under Mono.
If there isn’t a strong reason for it to be a desktop application, you really should be thinking in terms of web apps for new applications—at least, that’s an unwritten rule where I work.

WinForms vs GtkSharp with Mono

When developing with Mono for an app to be run on Windows and Mac OSX (and maybe Linux) which would you suggest, WinForms or GtkSharp for the GUI and why?
Specific examples and success/horror stories would be much appreciated.
Cross platform development is a nice idea, but to be completely honest I have never seen an application that looks really good outside of its native environment. That is why I think, that if you really want to offer good user experience you should use native toolkits on all platforms that you want to support.
Of course, if you just want a proof of concept, then WinForms on a Mac (or Linux) are alright but if you want an application that competes against other native solution then you really should consider writing a separate native frontend for each supported platform.
A good example how that was done is MindManager from Mindjet. Their Mac version is a full, from scratch rewrite of the interface. The result is an application that gives Mac users the experience that they learned to expect on their platform.
So, back to Mono. There are Cocoa bindings in Mono. Personally, I have never tried using them, but if you want to target Macs with your application, they are certainly worth a look. It would be really great if they could be regarded as a valid choice for UI development on a Mac.
When deciding whether or not to use a cross-platform architecture, gague your requirements of having a tight UI against agility toward change and development time. Using a platform-specific UI framework is (almost) always going to give you better looking and better performing results than you'll get from a cross-platform one.
GtkSharp requires X11 on Mac OS X. Mac users will find that off-putting. I haven't tried Winforms on OS X, but mono's Linux winforms support was pretty immature (buggy) and slow. I don't think there is a mature .net GUI toolkit for OS X at this point, at least nothing at the level of Swing or SWT.
What platform will most of the users of your app have? If most of the users will be Windows users, use Winforms, but if most of the users will be Linux users, use Gtk#. I wouldn't know which one works best on OSX.
Read this article also: http://www.mono-project.com/Gui_Toolkits

Winforms for Mono on Mac, Linux and PC (Redux)

(I asked this question in another way, and got some interesting responses but I'm not too convinced.)
Is Mono's GtkSharp truly cross-platform? It seems to be Gnome based... how can that work with PC and Mac?
Can someone give me examples of a working Mac/PC/Linux app that is written with a single codebase in Microsoft .Net?
Realize this is now an old question, but Banshee fits the bill for being a cross-platform application that uses GTK#. It runs on Max, Linux and Windows.
http://banshee.fm/download/
Plastic SCM is supported on Windows, Linux, Solaris, and Mac OS X. The link includes screenshots on Windows and Linux.
The best example of a Gtk# app that runs on both Windows and Linux may be Medsphere's OpenVista. Granted, its not an app that many people need to run, but it is a very professional, polished, open-source Gtk# application. It shows how a professional Gtk# app can be written.
http://medsphere.org/community/project/openvista-cis
Gtk# is cross platform. However the only platform where it looks nice is Linux/BSD running GNOME. If possible somehow, separate frontend and backend and develop separate user interfaces for Linux, Windows and OS X. Even wx, which does a really good job in looking okay on all three platforms, has its limits.
Working Mac/PC/Linux app in Gtk#? Tomboy runs on all three I think.
It would be more correct to say that GNOME is GTK-based than it is to say that GTK is GNOME based. GTK is a toolkit that GNOME sits on top of, and you can get GTK for several platforms, including Windows. That's how GIMP works on Windows: you install GTK first.

Mobile devices for developers

I need to develop some programs for mobile devices but haven't decided the platform to build upon. I'm looking for Palm or Pocket PC devices that have Touch screen and Wi-Fi connection and are cheep because I'll need to buy several of them.
I don't really need camera, mp3 players, video players, pdf readers or anything else since the apps are going to be simple data collection to feed via wireless to a server database.
I'm proficient with C and C#. I could learn Java if I had to.
What devices do you recommend? Linux devices maybe?
PS: Changed the title because I don't want a flamewar between platforms. Please, don't answer with Windows Mobile sucks/rules. I'm looking for devices instead.
Thanks
Windows Mobile
It supports C#, and Visual Studio comes with the mobile SDK. So if you know C# you probably already have the tools you need. And in spite of the iPhone/iPodTouch buzz, the Windows Mobile deployment is still 10X greater.
In order of preference
Neo Freerunner
Maemo & the N800 (cheap)
Beagleboard
If you are comfortable with Visual Studio then programming for windows mobile is extremely easy. The SDK for mobile comes with emulators for all the latest and popular versions of windows mobile- and you can even debug on teh device itself using a USB cable.
On windows mobile you have a choice: Develop a .Net application or develop native (likely MFC based). Either one gives you a great development environment.
As far as iPhone development goes- you would need an apple computer to install and use iPhone SDK- and you can't run an iPhone app on your phone. You would have to go through the process of getting it registered with iTunes for you to install your own apps on your own phone!
When I first started playing with mobile development I had a few questions:
Can I develop using my favorite IDE- Visual Studio. Will it be as easy as developing a desktop app: yes.
Will I be able to access the internet from my application without 'unlocking' or in some other way enabling the phone that was not intended by the service provider? yes.
Will I be able to access device specific functionality such as GPS easily? Is there good support for doing so within the API? Yes.
You should probably target the Windows Mobile platform. The Palm platform is rather archaic and no longer widely used. The development environment is also rather spartan, while Microsoft has full IDEs available for Windows Mobile development. You might also consider the iPhone/iPod touch platform - I have a feeling the number of devices will multiply at an exponential rate and I've heard that developing applications is much easier due to the completeness of the system stack.
You should probably at least evaluate the Apple iPod Touch. It certainly meets your basic "touch screen + WiFi" spec, and your users presumably won't object to all the the other nice features that will come along for the ride.
I don't know what your cutoff for "cheap" is, but $299 for the base model seems pretty reasonable for a high-quality touch screen and WiFi in a pocketable device.
Windows Mobile and CE used to suck, really, really badly. These days however it's definitely passable and worth checking out, especially if you code C#.
Just remember that it is the baby brother of the full framework and has nowhere near enough toys and throws a lot of NotImplementedExceptions. :)
Blackberry publishes its SDK on its web site. Its apps run J2ME, so with some Java experience it shouldn't be too difficult to get started. They also give you an emulator. Disclaimer: I have no experience in writing Blackberry apps, but I looked into it once.
I would not recommend a PalmOS based handset. I have written code for PalmOS and it's about as painful as writing raw Win32 code in C. Since Palm has switched its high end handsets to Windows Mobile, PalmOS will just remain stagnant and only run on the slower, less capable hardware.
If I were to write a mobile app, I'd agree that Windows Mobile is worth checking out.
It all depends on the users who you are targeting at, If you are looking for a wide market then you should be fine with J2ME/Blackberry . However most of them lack the touchscreen and wifi features ( The HTC range of phones [WIFI/TouchScreen/Windows Mobile] have a JVM built with it),so it would work on most of the Windows devices also.
If you are making a more niche product, moving with the current buzz 'iphone' will be good . Windows Mobile is also worth checking out
The best option here would be the Neo Freerunner, with that device you can build a dedicated unit were every aspect is made especially for you're needs. The Freerunner is WiFi enabled, and has a touch interface. If you use the Qt SDK, a lot of the work is already done for you. It comes complete with emulator, as a Live linux cd. You can run in a WM, such as wmplayer. Everything is included.
I'm not gonna lie, it will take tweaking. But the final product would be really nice and intuitive.
Looking at Windows Mobile devices, your requirement of touchscreen pretty much sets your pricing at the higher end of the spectrum. You'll get those things you say you don't need just because of that.
Here's expansys's selection of touchscreens.
Mobdeal is a handy one too as that effectively filters all phones by features.
I've developed against the HTC TYTN 2, HTC Touch Diamond and randomly a PSION Teklogix Ikon
There's generally very little difference between these models, some manufacturers have SDKs that can help sometimes.
I think your cheapest option will probably be something like getting HTC TYTN 2s on ebay. They're pretty old now (hence cheap) but have Wifi, camera, touchscreen, qwerty keypad all the things you seem to be after.
you can target iPhone "touch" platform with Apple's iPhone SDK. the development environment requires a Mac, but you can get the entire IDE + tool chain + excellent debugging and profiling tools for free. And the free documentation is top notch.
As a registered iPhone developer, it is free (no cost) to target the simulator, which is sufficient for most learning and development you'll likely need to up front.
To target the actual hardware device (and up to and including release/selling your app on the Apple's AppStore) is only $99/yr. If you got an iPod Touch for your hardware target, most of the SDK applies and you are not tied into a service contract for an iPhone.
iPhone app development environment is in Objective-C, but it is a really productive, object-oriented environment so do not concerned that that may be a language you are unfamiliar with.
If you decide that your mobile app(s) would be better suited as webapps, the iPhone/iPod touch platform again is an industry leader in this space, and you have the additional benefit or being able to target other mobile platforms (and not necessarily be tied to one mobile SDK).

Resources