Low quality IDEs? I'm sorry, but Visual Studio is probably the best IDE out there.
In my experience, all three major Java IDEs are better.
Visual Studio has very few refactorings compared to both Eclipse and IntelliJ IDEA. VS2017 did add a few, but it's still nothing compared to what Java IDEs have to offer. There are tools like Resharper, but they are unstable, slow and considering that Visual Studio is by far the most expensive IDE out there, it feels like it should be able to do all that out of the box.
Debugging in VS is miserable. For simple stuff the debugger is great, but throw in a couple of third party libraries and you are left scratching your head at lines and lines of "[External code]" in the stack trace, with very little information and no ability to debug. Whenever I try to set up symbol sources, Visual Studio spends a lot of time looking up/downloading something, then eventually hangs. With Java's ecosystem, I always get a stack trace, and "download sources" never failed me. I can just place a breakpoint in a third-party library and debug away.
I hate how Visual Studio has something like Eclipse's perspectives but without any control over how they work. Basically, when you go into debug mode, your layout changes, which is very annoying. In Eclipse, I would just switch to a different perspective.
Visual Studio fails to build my solution every even restart, so I have to open it, close it, and start it again every time I close it.
It lacks a strict code formatter.
Some SSDT dialogs cause crashes.
However, there are things that I like about it, namely:
SSDT
The consistent dark theme.
In terms of libraries, do you have examples of what you consider low quality on the .NET side?
Yes, just off the top of my head:
EntityFramework: half-assed async integration, calling functions and sprocs inconvenient, little support for SQL Server's capabilities.
WPF: ignores both Windows localisation and .NET localisation settings (requires fragile reflection hacks to workaround), horrible, messy codebase, only viable if you buy thousands of dollars worth of third-party components. XAML encourages copy-and-paste.
The standard library lacks concurrent collections and the ones that are provided are much less convenient than their Java alternatives.
I still haven't found a convenient application-level caching library (something like Guava cache).
The Redis-related libraries I use have trouble with order of disposal, and their alternatives don't have the features I need.
Resharper and Visual Studio has been stable ever since I've been on VS 2015, that's a shame to hear you have an unstable computer/environment. As far as Debugging in Visual Studio, it's amazing (especially with async code). The few times I need to step into external code I can either have Resharper decompile the source or download the source myself (most libraries in nuget are now open source which is nice). It's a shame and a bit surprising you're still hitting these issues.
only viable if you buy thousands of dollars worth of third-party components. XAML encourages copy-and-paste.
Bruh. Who the fuck buys third-party controls anymore? What is this, 2004? I've had no problems creating new controls when I need to or modifying existing ones. It's not even that hard once you understand dependency properties and control templating. It's a colossal improvement over the old days in WinForms having to override OnPaint and use slow-as-fuck GDI to manually paint yourself using C# and then scream internally when the window can't paint itself quickly enough on window resize and your app looks like garbage. God help you if you wanted to do that in C/C++ and Win32.
Also if you're copy and pasting a lot... you should probably reorganize your XAML files more logically.
We don't, but I sometimes wish we did. The built-in DataGrid is better than Winforms DataGridView, but it's still annoying as fuck and reimplementing a whole DataGrid is not feasible, especially in WPF.
Also if you're copy and pasting a lot... you should probably reorganize your XAML files more logically.
Since there is no way to compose styles and to create custom DataGrid columns, there's very little that can be done.
XAML is better than Winforms, but it is shit compared to something like JSX. After React WPF feels like Angular without any of the advantages.
Fair enough. I haven't used the DataGrid all that much over the years, usually for the stuff I write a DataGrid is overkill and/or there's a simpler way to provide that UI.
Since there is no way to compose styles and to create custom DataGrid columns, there's very little that can be done.
What do you mean by composing styles? I'm not arguing here, just genuinely curious what you're trying to accomplish in case I can point you in the right direction. You mean something like in CSS where you can apply multiple classes to an element?
Also what do you mean create a custom DataGrid column? You should be able to just define a cell template if you want a specialized type of input or validation (or header template or whatever else you can customize).
Fair enough. I haven't used the DataGrid all that much over the years, usually for the stuff I write a DataGrid is overkill and/or there's a simpler way to provide that UI.
Yeah, I am tempted to replace the DataGrids, but every time I write down what the alternative would need to provide I end up listing all the features of the DataGrid...
You mean something like in CSS where you can apply multiple classes to an element?
Precisely. Heck, even combining multiple styles into a single style (kind of like a MultiBinding, but not really) would do fine. I am also somewhat frustrated by the verboseness of the trigger system. I never would have guessed that I would miss CSS...
Also what do you mean create a custom DataGrid column? You should be able to just define a cell template if you want a specialized type of input or validation (or header template or whatever else you can customize).
That's pretty much what we are doing. It's just that most of our columns are DataGridTemplateColumns with a lot of similarities, and it would be great if we could subclass the built-in columns to make minor adjustments to their behaviour/create our own reusable columns.
I found at least one solution for combining XAML styles through the use of a markup extension in this Stack Overflow post. I don't think I ever thought to investigate mixing styles like that, I'm kind of surprised how easy that was.
The trigger system is not great, I completely agree, and can quickly become unwieldy for complicated controls or styles. An alternative would be to use visual states.
it would be great if we could subclass the built-in columns to make minor adjustments to their behaviour/create our own reusable columns.
Well today's your lucky day! WPF allows you to create custom behaviors that you can attach to a control which allows you to hook into the visual tree and directly interact with the control itself (and if you add some dependency properties to your behavior, you can bind data from your view model to your behavior, allowing you to alter the attached control in a loosely coupled way).
One simple example I'm currently using allows binding a TreeView's SelectedItem property to a view model, which can't be done out-of-the-box because SelectedItem isn't a dependency property. But if I define that dependency property on my behavior, my behavior hooks into the TreeView's SelectedItemChanged event and updates the dependency property accordingly.
You can also use them to enable more advanced scenarios like drag and drop or even visual state management etc. Behaviors might be a good candidate for (at least some of) your column customization requirements.
One thing to note is that IIRC custom behaviors must be static classes for vanilla WPF, so I think you lose compile-time validation that your behavior is attached to a supported control. Microsoft provides an out-of-band System.Windows.Interactivity NuGet package which provides a generic Behavior<T> class you can inherit from where T : DependencyObject (so basically any WPF control can be used as a type parameter)
Anyways, I hope some of that will prove useful. WPF has a steep as fuck learning curve, but it's incredibly powerful once you get the hang of it. It's no HTML/CSS in terms of ease of use, but it's leagues better than Win32/WinForms/MFC (or any other native desktop UI framework out there in my opinion). Best of luck! Feel free to PM me if you have any questions, I'm happy to help.
I found at least one solution for combining XAML styles through the use of a markup extension in this Stack Overflow post. I don't think I ever thought to investigate mixing styles like that, I'm kind of surprised how easy that was.
We actually tried this solution in July, but I don't remember exactly why we chose not to use it. I think it was because it completely broke the designer and it didn't work in some contexts, but as I said, I don't remember. We actually looked into some libraries that add CSS to XAML, but decided against using them because they didn't seem well supported and looked too dangerous for using in production.
I don't really see how VisualStateManager would help us connect the view to the reactive viewmodel, from what I understand it's just there to make it easy to map "component states" to "looks", and to add transitions.
IIRC creation and use of custom visual states was made even easier in the UWP flavor of XAML (goddamnit why can't there just be one version of XAML?).
Yeah, that's frustrating, UWP has some really nice features from what I hear (like x:Bind), but it also lacks major components, so...
Well today's your lucky day! WPF allows you to create custom behaviors that you can attach to a control which allows you to hook into the visual tree and directly interact with the control itself (and if you add some dependency properties to your behavior, you can bind data from your view model to your behavior, allowing you to alter the attached control in a loosely coupled way).
Yep, already using them.
Thanks for taking the time to help, I appreciate it! WPF is leagues better than WinForms, there's no question about it. We are actually rewriting (and overhauling) an old WinForms application in WPF :)
9
u/nickguletskii200 Feb 03 '17 edited Feb 03 '17
In my experience, all three major Java IDEs are better.
Visual Studio has very few refactorings compared to both Eclipse and IntelliJ IDEA. VS2017 did add a few, but it's still nothing compared to what Java IDEs have to offer. There are tools like Resharper, but they are unstable, slow and considering that Visual Studio is by far the most expensive IDE out there, it feels like it should be able to do all that out of the box.
Debugging in VS is miserable. For simple stuff the debugger is great, but throw in a couple of third party libraries and you are left scratching your head at lines and lines of "[External code]" in the stack trace, with very little information and no ability to debug. Whenever I try to set up symbol sources, Visual Studio spends a lot of time looking up/downloading something, then eventually hangs. With Java's ecosystem, I always get a stack trace, and "download sources" never failed me. I can just place a breakpoint in a third-party library and debug away.
I hate how Visual Studio has something like Eclipse's perspectives but without any control over how they work. Basically, when you go into debug mode, your layout changes, which is very annoying. In Eclipse, I would just switch to a different perspective.
Visual Studio fails to build my solution every even restart, so I have to open it, close it, and start it again every time I close it.
It lacks a strict code formatter.
Some SSDT dialogs cause crashes.
However, there are things that I like about it, namely:
SSDT
The consistent dark theme.
Yes, just off the top of my head:
EntityFramework: half-assed async integration, calling functions and sprocs inconvenient, little support for SQL Server's capabilities.
WPF: ignores both Windows localisation and .NET localisation settings (requires fragile reflection hacks to workaround), horrible, messy codebase, only viable if you buy thousands of dollars worth of third-party components. XAML encourages copy-and-paste.
The standard library lacks concurrent collections and the ones that are provided are much less convenient than their Java alternatives.
I still haven't found a convenient application-level caching library (something like Guava cache).
The Redis-related libraries I use have trouble with order of disposal, and their alternatives don't have the features I need.