|
Yeah I thought about WPF. Being a web guy, I like declarative UIs too. But, in the interest of cross platform I'd doubt that's ever gonna be ported since it'll be a cold day in hell before MS uses OGL for a rendering pipeline.
Then again we have SQL Server on Linux now, so who knows.
Jeremy Falcon
|
|
|
|
|
Do I sense some ego here? If the app was successful in WinForm for 8 years, it may be in the right platform. I don't look at any applications and question they should all be in the web platform or cross platforms. The app's platform depends on its purpose. I'm having to rewrite web-based applications into desktop, and yes it is rewritten in Winform, and some from desktop to web. Unless the application has broad customer base where it may specifically call for cross platform, stay where it is safe.
|
|
|
|
|
Jeremy Falcon wrote: he main app in question that I'd be working on is an 8 year old product based on WinForms. If you're tasked with writing new UI components, you could build them in WPF and host them in the existing WinForms app.
FWIW, I'm in the process of porting this[^] WinForms app (30K lines of code) to Android, and later iOS. I'm using Xamarin to build a native UI and 99% of the business and persistence layer has been portable without any changes. One of the huge wins using Xamarin is that a user can take their desktop database file and plop it onto their Android device (and vice-versa) with no problems. (In reality, they don't have oto do this manually. I've written a cloud backend that lets them sync their data between the desktop and mobile versions of the app.)
I'm a big fan of WinForms and Xamarin and not ashamed to say it. The productivity gains are awesome.
/ravi
|
|
|
|
|
Ravi Bhavnani wrote: If you're tasked with writing new UI components, you could build them in WPF and host them in the existing WinForms app. That's a thought, although it would be nice to find something cross platform. Anyway, this is all food for thought. I don't have the job yet, and if I get it there are things taking a higher priority for the moment. But I do like knowing my options.
Ravi Bhavnani wrote: FWIW, I'm in the process of porting this[^] WinForms app (30K lines of code) That's cool man. I remember this app. It's neat.
Ravi Bhavnani wrote: I'm a big fan of WinForms and Xamarin and not ashamed to say it. The productivity gains are awesome. I'm just fishing for options to know what's out there. It's not so much about shame as it's just seeing what's out there. So many tech people insult every decision ever made to try and sound smart; that's not what I'm doing. Just wanna know what's out there.
Jeremy Falcon
|
|
|
|
|
Ravi - I'd love to hear how truly "cross platform" your Xamarin application is. Are you able to run on Windows / Mac / Android / iPhone / Linux ?
My understanding is the C# business logic translates, but not the UI or XAML. Can you confirm from your experiences?
<hr>
"Qulatiy is Job #1"
|
|
|
|
|
The C# business logic and persistence layer is almost 100% cross-platform compliant, thanks to Xamarin, which means I don't have to do much more than smoke testing on the Android port, since the codebase is mature and has an existing suite of tests.
The Android UI is a brand new effort and isn't cross-platform, because I decided I want to learn Android from the ground up before I consider using Xamarin Forms as an abstraction layer. If I decide to port my app to iOS (likely), I will first write a native iOS client for the same reason.
I'm only considering Windows, Android and iOS as target platforms.
/ravi
|
|
|
|
|
If you don't mind my asking, how do you connect the compiled Xamarin C# code to the UI layer in Android? Do you connect the layers like you might with a DLL resource in windows?
<hr>
"Qulatiy is Job #1"
|
|
|
|
|
Since both the Android UI layer and the legacy business logic and persistence layers are all written in C#, there's nothing special I need to do. I chose to put all the code in a single assembly (the Android executable) for now. When I (eventually) get around to building the iOS app, I'll move the non-UI code to a separate assembly that will be consumed by both flavors of the app.
/ravi
|
|
|
|
|
Much thanks!
<hr>
"Qulatiy is Job #1"
|
|
|
|
|
No problem. Happy to chat offline if you have more questions. You can find me on LinkedIn.
/ravi
|
|
|
|
|
Ravi Bhavnani wrote: FWIW, I'm in the process of porting this[^] WinForms app (30K lines of code) to Android, and later iOS. I'm using Xamarin to build a native UI and 99% of the business and persistence layer has been portable without any changes. I would consider it a great goodness if you were to publish CP articles, or blog, about the process, the hurdles, the "gotchas," etc.
So far, I've read mainly negative articles and posts about using Xamarin Forms.
thanks. Bill
«While I complain of being able to see only a shadow of the past, I may be insensitive to reality as it is now, since I'm not at a stage of development where I'm capable of seeing it. A few hundred years later another traveler despairing as myself, may mourn the disappearance of what I may have seen, but failed to see.» Claude Levi-Strauss (Tristes Tropiques, 1955)
|
|
|
|
|
Hi Bill,
I'm using Xamarin.Android and not Xamarin.Forms to port my app. I used XF to build the Android half of an Android/iOS prototype about 3 years ago and found it to be quite powerful at the time, but haven't touched it since.
/ravi
|
|
|
|
|
Quote: So, my question is, if I wanted to write a Microsoft-backed thick client application in C# that's possibly cross platform... what options do I have? I know Xamarin is one. Is that the only one?
Cross Platform in a business depends on business decisions....winforms is pretty mature and has a historical component source as in third party controls and components...so its a good think if you can flex ... cross platform there is WinForms | Mono[^]
Caveat Emptor.
"Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long
|
|
|
|
|
abmv wrote: Cross Platform in a business depends on business decisions.... That's a given. And having been involved with the business for years in my career, this is something I already know. However, it's up to the tech people to know about the tech that's out there, so we can communicate this to the business to help them make a better decision. Thus, I'm fishing for info.
abmv wrote: winforms is pretty mature and has a historical component source as in third party controls and components VB6 is also mature. Doesn't mean I'd use it 10 years from now.
abmv wrote: so its a good think if you can flex ... cross platform there is WinForms | Mono[^]
My understanding of this is it's not feature complete. Granted, I've never used Mono WinForms so maybe things have changed. It's worth looking into again no less. Thanks.
Jeremy Falcon
|
|
|
|
|
VB6 actually is not used much...
Considering the amalgamation and proliferation of JavaScript there is something interesting called Electron | Build cross platform desktop apps with JavaScript, HTML, and CSS.[^] that could be a basis for architecture modern apps while maintaining less or more build complexity.
Rather just code for MAC and iphones .. haaa..
Caveat Emptor.
"Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long
|
|
|
|
|
abmv wrote: VB6 actually is not used much... That's my point.
abmv wrote: Considering the amalgamation and proliferation of JavaScript there is something interesting called Electron | Build cross platform desktop apps with JavaScript, HTML, and CSS.[^] that could be a basis for architecture modern apps while maintaining less or more build complexity. Going web is something I've strongly considered. I'm just fishing for options.
Jeremy Falcon
|
|
|
|
|
electron is not web, but a cross platform desktop application framework. Visual Studio Code uses electron.
|
|
|
|
|
I'm fully aware of that. But thanks for stating the obvious.
Jeremy Falcon
|
|
|
|
|
Here, instead of saying "going web" let's say "going with web technologies."
Jeremy Falcon
|
|
|
|
|
Wellllll....(deep subject, I know)
I've hosted Chromium in a WinForm app, which is quite interesting actually -- you can call into C#, and the C# can call into the Javascript.
Why? Well, you end up with a "thick-client" that can easily be turned into a web app, particularly if you don't have any C# calls, or you've abstracted them in the Javascript so that they're easily replaced with by AJAX calls to a server.
I know, it's a crazy idea, but since I won't touch WPF, don't really want to learn Xamarin/XAML, Qt, GTK+, wxWidgets all suck, and I do enough web development nowadays anyways, it makes more sense for me, particularly since I can also leverage some really nice web-based UI components.
|
|
|
|
|
As a web guy myself, I love that idea. But if I get this role, I think I'll be the only web guy there. So in an effort to play with the team that may not be viable. Granted all this of this down the road anyway, it's a low priority for now and for good reasons they said in the interview. However, I'm totally inline with the web vibe you're thinking man.
Jeremy Falcon
|
|
|
|
|
Personally, I love WinForms!
No HTML/CSS or XAML mess! Just grab a control, drop it on the screen and IT JUST WORKS!
You may want to add a third party control library such as DevExpress or Telerik to make it better looking, get more features and make it even easier to develop.
Sure, it doesn't scale as well and it's not really multi-platform, but if your customers use Windows desktops that isn't really an issue.
I'm not really sure about Microsoft alternatives, but I know they used Electron[^] for Visual Studio Code.
Yeah, it features all of that awful HTML and CSS and it even adds JavaScript to make it worse, but at least it's "modern" multi-platform desktop development.
It's what all the cool desktop developers use
|
|
|
|
|
Sander Rossel wrote: No HTML/CSS or XAML mess! Just grab a control, drop it on the screen and IT JUST WORKS! Aw come one man, you don't like having to install 500 npm packages for hello world?
Sander Rossel wrote: I'm not really sure about Microsoft alternatives, but I know they used Electron[^] for Visual Studio Code. That's cool. Didn't know this. At first glance it reminds me of Adobe Flex rehashed. I reckon if Slack and MS and Atom all use it though, it'll be around for a while. Thanks for the tip.
Jeremy Falcon
|
|
|
|
|
I got started in my programming career on the old VC++ and then migrated to WinForms C#. I heartily agree with this post. Back then, the UI was not complicated, and all the stuff that is a PITA to do in JavaScript seemed to be so easily abstracted out. GUI Programming then was fun; now it's like getting a tooth removed.
|
|
|
|
|
I like Winforms. It seems a good match with the Windows UI. It seems odd that MS have left it fallow - what else would they like us to use? We could use WPF but that isn't updated before. Given that Windows' success is on the top of desktop apps - why wouldn't Microsoft want to give us a first class, up-to-date framework for it? What would be the downside?
|
|
|
|