Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Mister Duck
Oct 10, 2006
Fuck the goose
Quick update from WPF here.

Windows 10 Anniversary Edition is out and along with that is .NET 4.6.2 which you can see the release blog for here. WPF gets per monitor DPI support and automatic invocation of the touch keyboard (both require Win10 Anniversary Edition). Also some changes have been made internally to lessen the effect of the garbage collector on applications dealing with lots of bitmaps. So if you know anything about the MemoryPressure class, know that it's now gone so uh, I hope you guarded your private reflection.

For anyone interested in the touch keyboard support in WPF and not having your apps clobbered by the KB appearing, please take a look here at some sample code to register for notifications and some basic ways to react to occlusion by the KB.

Adbot
ADBOT LOVES YOU

Inverness
Feb 4, 2009

Fully configurable personal assistant.
Speaking of WPF, some time ago I think I asked here about the differences between WPF and Windows 10's brand of XAML.

Does anyone still have that information?

Mister Duck
Oct 10, 2006
Fuck the goose

Inverness posted:

Speaking of WPF, some time ago I think I asked here about the differences between WPF and Windows 10's brand of XAML.

Does anyone still have that information?

I don't believe the new XAML has Decorators or Markup Extensions. But I could be wrong about this. You also have x:Bind which, as I understand it, creates getters and setters at compile time for certain bindings so you don't pay the reflection penalties.

Honestly, I am not well versed in Universal apps so I don't know much more offhand. I can see if anyone has a good reference to give me when I get into work.

Portland Sucks
Dec 21, 2004
༼ つ ◕_◕ ༽つ
Is it possible to write a WPF UI for a pre-existing .net program built on winforms by just layering it on top of the existing code? I seriously don't want to rewrite 10 years of hacked together crap that no one here understands just to modernize their UI if they're going to fight me every step of the way about the fact that an entire rewrite is what they're actually asking for.

EssOEss
Oct 23, 2006
128-bit approved
That depends - if you take away the winforms part, does anything remain of the application? A lot of badly made apps just squeeze the code into random event handlers in Form1.cs through Form59.cs, which means you're poo poo out of luck.

If, however, it is a properly layered application with the business logic separated from the view then you might hahahaha who am I kidding.

Portland Sucks
Dec 21, 2004
༼ つ ◕_◕ ༽つ

EssOEss posted:

If, however, it is a properly layered application with the business logic separated from the view then you might hahahaha who am I kidding.

No, and whenever I bring up the idea of doing this it makes them give me looks like I'm about to create some unmaintainable sorcery that'll require them to sacrifice unborn children to satan.

Mr Shiny Pants
Nov 12, 2012

Portland Sucks posted:

No, and whenever I bring up the idea of doing this it makes them give me looks like I'm about to create some unmaintainable sorcery that'll require them to sacrifice unborn children to satan.

While already sacrificing unborn children..........

Cuntpunch
Oct 3, 2003

A monkey in a long line of kings

Portland Sucks posted:

Is it possible to write a WPF UI for a pre-existing .net program built on winforms by just layering it on top of the existing code? I seriously don't want to rewrite 10 years of hacked together crap that no one here understands just to modernize their UI if they're going to fight me every step of the way about the fact that an entire rewrite is what they're actually asking for.

Ok so beyond the obvious, which has been covered perfectly in the previous few posts, here's what I'd think is the bare minimum you would *still* be looking at:

You'd obviously need to redo all the interfaces. In theory you could just 'migrate' the WinForms code-behind event handlers(button clicks, etc) to WPF code-behind, but if you wanted to really get fancy you'd probably end up needing to move Command based stuff into the View Model. Speaking of, you'd probably need to migrate all the crufty random fields/properties WinForms is using *into* a ViewModel.

Regardless, it's a pretty significant project.

brap
Aug 23, 2004

Grimey Drawer
There is something for embedding WPF into winforms, though. Google it.

Cuntpunch
Oct 3, 2003

A monkey in a long line of kings

fleshweasel posted:

There is something for embedding WPF into winforms, though. Google it.

I feel by strange coincidence I *JUST* bumped into a possible use of this today. Our QA team was hunting down some weird issue with one of their CodedUI tests and I happened to notice that in our WinForms application, there was a compiler warning about some of the auto-generated CUI code surrounding a third-party tools library overwriting a Wpf control handler.

Mister Duck
Oct 10, 2006
Fuck the goose

fleshweasel posted:

There is something for embedding WPF into winforms, though. Google it.

You do not want the rabbit hole that is airspace issues due to WinFormsHost. You do not want this.

Baloogan
Dec 5, 2004
Fun Shoe
I use winformshost :shrug:

Cuntpunch
Oct 3, 2003

A monkey in a long line of kings

Mister Duck posted:

You do not want the rabbit hole that is airspace issues due to WinFormsHost. You do not want this.

That's the opposite of what was proposed :v: ElementHost is the WPF-controls-inside-WinForms equivalent, but I'm not sure it's much less of a pain.

Mister Duck
Oct 10, 2006
Fuck the goose

Cuntpunch posted:

That's the opposite of what was proposed :v: ElementHost is the WPF-controls-inside-WinForms equivalent, but I'm not sure it's much less of a pain.

Oh I read it as moving the WinForms content into WPF, sorry. Either way though, that stuff is not nice a lot of the time.


Baloogan posted:

I use winformshost :shrug:

It all works until it doesn't. Then it becomes really annoying, really fast. See this blog for a short history of .NET 4.5 where they attempted to make all the issues go away and failed to do so. You may never run into a single issue depending on your usage, but there are always corner cases lurking.

raminasi
Jan 25, 2005

a last drink with no ice
You can totally just use WPF as "like WinForms, but a better control library," though. A "WPF rewrite" doesn't necessarily entail any structural changes, afaik.

chippy
Aug 16, 2006

OK I DON'T GET IT
This is all highly speculative without knowing how the app's structured and how complex it is. If it's simple and all the logic is abstracted away into data access/service layers, it could be fairly simple.

smarion2
Apr 22, 2010
If anyone cares for the opinion of someone who's moderately skilled at programming I recently wanted to upgrade my Winform app to WPF. I kept the data layer as abstracted as Winforms would allow but ended up deciding it wasn't worth redesigning all my forms for the benefits I would get out of it.

Sure you get much more flexibility with the interface but at the end of the day I had an app that was only used in house that no outside customers would ever see. I could have completely converted the project in less than a week but I feel like what I was gaining wasn't really worth it.

If your boss is telling you that you need a more modern look to the app though it might be worth it. Do you sell the app you use? Is it just an inhouse thing? Sometimes uppermanagement doesn't realize how much work something like that could take so if you pitch it showing how many hours it could take and how much it would cost them it might not be worth it to them still.

Portland Sucks
Dec 21, 2004
༼ つ ◕_◕ ༽つ

chippy posted:

This is all highly speculative without knowing how the app's structured and how complex it is. If it's simple and all the logic is abstracted away into data access/service layers, it could be fairly simple.

It's about 30,000 lines of code total. There is tons of unused code, tons of copy pasted crap, no concept of separating the UI and logical elements, and you can find SQL queries to multiple databases that happen at every layer of the project from everything to ( select * table ) to populate the base set of data it works off of down to individual UI elements that will query the database to grab a particular date to display when a window pops up rather than going back to the original data. Its clear that multiple people who never spoke to each other have passed this thing around like a sad whore and now I, the intern who hasn't graduated yet, have been tasked with upgrading the UI into WPF however I want with little to no guidance.

Portland Sucks
Dec 21, 2004
༼ つ ◕_◕ ༽つ

smarion2 posted:

If anyone cares for the opinion of someone who's moderately skilled at programming I recently wanted to upgrade my Winform app to WPF. I kept the data layer as abstracted as Winforms would allow but ended up deciding it wasn't worth redesigning all my forms for the benefits I would get out of it.

Sure you get much more flexibility with the interface but at the end of the day I had an app that was only used in house that no outside customers would ever see. I could have completely converted the project in less than a week but I feel like what I was gaining wasn't really worth it.

If your boss is telling you that you need a more modern look to the app though it might be worth it. Do you sell the app you use? Is it just an inhouse thing? Sometimes uppermanagement doesn't realize how much work something like that could take so if you pitch it showing how many hours it could take and how much it would cost them it might not be worth it to them still.

It's all in house. Its used by our laborers on the floor (blue collar stuff) and management has decided that it'd be ~super rad~ if the program they used was touch screen based on tablets and "was more like the apps they used on their cellphones." There is a lot of idealism running rampant in this project that I'm more or less soloing and I'm just the intern who had his contract extended specifically for this one task so if I try to shut it down too much I'll more than likely find myself out of the position.

Space Whale
Nov 6, 2014
I've got a doozie. WebAPI endpoint eats an id as a param and JSON in the post body like so:

code:
 public void Post(int  someId, SomethingMetrics theMetricsOfTheSomething)
        { do things(); }
I look in Chrome and the XHR request is sending exactly what the controller expects. It has all the fields a SomethingMetrics would need.

So, I add the tracing poo poo and enable it like so in WebApiConfig:

code:
 var tracer = config.EnableSystemDiagnosticsTracing();
            tracer.IsVerbose = true;
            tracer.MinimumLevel = TraceLevel.Debug;
So then, I look at what tracer spits out for me:

Tracer posted:

Here you go!

code:
iisexpress.exe Information: 0 : [2016-08-10T17:36:27.1460491Z] Level=Info, Kind=End, Category='System.Web.Http.Filters', Id=80001dc7-0006-f700-b63f-84710c7967bb, Message='The authentication filter did not encounter an error or set a principal.', Operation=ServiceAuthenticationFilter.AuthenticateAsync
iisexpress.exe Information: 0 : [2016-08-10T17:36:27.1480491Z] Level=Info, Kind=Begin, Category='System.Web.Http.Filters', Id=80001dc7-0006-f700-b63f-84710c7967bb, Operation=ServiceAuthenticationFilter.ChallengeAsync
iisexpress.exe Information: 0 : [2016-08-10T17:36:27.1490626Z] Level=Info, Kind=End, Category='System.Web.Http.Filters', Id=80001dc7-0006-f700-b63f-84710c7967bb, Operation=ServiceAuthenticationFilter.ChallengeAsync
iisexpress.exe Information: 0 : [2016-08-10T17:36:27.1500522Z] Level=Info, Kind=Begin, Category='System.Web.Http.ModelBinding', Id=80001dc7-0006-f700-b63f-84710c7967bb, Operation=HttpActionBinding.ExecuteBindingAsync
iisexpress.exe Information: 0 : [2016-08-10T17:36:27.1520571Z] Level=Info, Kind=Begin, Category='System.Web.Http.ModelBinding', Id=80001dc7-0006-f700-b63f-84710c7967bb, Message='Binding parameter 'somethingId'', Operation=ModelBinderParameterBinding.ExecuteBindingAsync
iisexpress.exe Information: 0 : [2016-08-10T17:36:27.1530660Z] Level=Info, Kind=End, Category='System.Web.Http.ModelBinding', Id=80001dc7-0006-f700-b63f-84710c7967bb, Message='Parameter 'somethingId' bound to the value '16079'', Operation=ModelBinderParameterBinding.ExecuteBindingAsync
iisexpress.exe Information: 0 : [2016-08-10T17:36:27.1540644Z] Level=Info, Kind=Begin, Category='System.Web.Http.ModelBinding', Id=80001dc7-0006-f700-b63f-84710c7967bb, Message='Binding parameter 'somethingState'', Operation=FormatterParameterBinding.ExecuteBindingAsync
iisexpress.exe Information: 0 : [2016-08-10T17:36:27.1550657Z] Level=Info, Kind=Begin, Category='System.Net.Http.Formatting', Id=00000000-0000-0000-0000-000000000000, Message='Type='SomethingMetrics', content-type='application/json'', Operation=JsonMediaTypeFormatter.ReadFromStreamAsync
iisexpress.exe Information: 0 : [2016-08-10T17:36:27.1570782Z] Level=Info, Kind=End, Category='System.Net.Http.Formatting', Id=00000000-0000-0000-0000-000000000000, Message='Value read='WhereIWork.NameOfOurApp.Web.Models.SomethingMetrics'', Operation=JsonMediaTypeFormatter.ReadFromStreamAsync
iisexpress.exe Information: 0 : [2016-08-10T17:36:27.1600792Z] Level=Info, Kind=End, Category='System.Web.Http.ModelBinding', Id=80001dc7-0006-f700-b63f-84710c7967bb, Message='Parameter 'somethingState' bound to the value 'WhereIWork.NameOfOurApp.Web.Models.SomethingMetrics'', Operation=FormatterParameterBinding.ExecuteBindingAsync
iisexpress.exe Information: 0 : [2016-08-10T17:36:27.1610817Z] Level=Info, Kind=End, Category='System.Web.Http.ModelBinding', Id=80001dc7-0006-f700-b63f-84710c7967bb, Message='Model state is valid. Values: somethingId=16079, somethingState=WhereIWork.NameOfOurApp.Web.Models.SomethingMetrics', Operation=HttpActionBinding.ExecuteBindingAsync
iisexpress.exe Information: 0 : [2016-08-10T17:36:27.1620861Z] Level=Info, Kind=Begin, Category='System.Web.Http.Action', Id=80001dc7-0006-f700-b63f-84710c7967bb, Message='Action='Post(somethingId=16079, somethingState=WhereIWork.NameOfOurApp.Web.Models.SomethingMetrics)'', Operation=ApiControllerActionInvoker.InvokeActionAsync
iisexpress.exe Information: 0 : [2016-08-10T17:36:27.1630882Z] Level=Info, Kind=Begin, Category='System.Web.Http.Action', Id=80001dc7-0006-f700-b63f-84710c7967bb, Message='Invoking action 'Post(somethingId=16079, somethingState=WhereIWork.NameOfOurApp.Web.Models.SomethingMetrics)'', Operation=ReflectedHttpActionDescriptor.ExecuteAsync
So it says the model state is valid. Great. Except it's not. somethingState is just null/default/0 for all fields.

I showed it to the architect on the project and he just smiled and said "have fun, modelbinder sucks to debug."

What can I do?

smarion2
Apr 22, 2010
^^^ That Tracer you used maybe have recalled the results! Sorry ignore this answer I have no idea how to help you.

Portland Sucks posted:

It's all in house. Its used by our laborers on the floor (blue collar stuff) and management has decided that it'd be ~super rad~ if the program they used was touch screen based on tablets and "was more like the apps they used on their cellphones." There is a lot of idealism running rampant in this project that I'm more or less soloing and I'm just the intern who had his contract extended specifically for this one task so if I try to shut it down too much I'll more than likely find myself out of the position.

Well it sounds to me if they let the last project get that out of hand they probably aren't going to be all that picky about how you do the transition especially if they aren't giving you any guidelines and you are the sole developer. I would just take it one form at a time and clean up bits here and there where you see you can make improvements. Sometimes you will be given tasks from people who do not understand the work involved to do the project correctly. When this happens to me I do what I can to complete the project in the time allotted. I mean what else can you really do other than argue with the boss (I don't think I've ever won this battle) or do what they ask to the best of your abilities.

It would really be a great thing to have on your resume for when you graduate so if you like where you're at I'd say its worth a shot. Just make sure they know what you're dealing with and how long it will take you. I feel keeping the boss up to date with honest progress will keep the pressure off best. Good luck!

smarion2 fucked around with this message at 19:06 on Aug 10, 2016

bigmandan
Sep 11, 2001

lol internet
College Slice
I'm super new to using C# and dotNET so I'm probably wrong on this, but in some of the tutorials I'm reading there is parameter binding:

code:
[HttpPost]
public IActionResult Create([FromBody] Things something)
{
	// do the things with something
}

chippy
Aug 16, 2006

OK I DON'T GET IT

Portland Sucks posted:

It's about 30,000 lines of code total. There is tons of unused code, tons of copy pasted crap, no concept of separating the UI and logical elements, and you can find SQL queries to multiple databases that happen at every layer of the project from everything to ( select * table ) to populate the base set of data it works off of down to individual UI elements that will query the database to grab a particular date to display when a window pops up rather than going back to the original data. Its clear that multiple people who never spoke to each other have passed this thing around like a sad whore and now I, the intern who hasn't graduated yet, have been tasked with upgrading the UI into WPF however I want with little to no guidance.

You poor, poor bastard. I used to have to maintain a Winforms project like that, you're giving me flashbacks. Run away as far as you can from the WPF conversion thing. It'd probably be easier to just redo it from scratch in a sane fashion.

Space Whale
Nov 6, 2014
The reason is dumb times two.

The JSON payload in the post body for a WebAPI endpoint is apparently supposed to be an anonymous object, not called somethingMetrics (or whatever)

Also, a curly bracket missing meant that the configuration in JavaScript for my framework's Ajax call got mixed in with the post body as well.

God I hate JavaScript.

Edit: After everyone got done shuffling their feet over this someone mentioned that there's some sort of "WSDL"-ish thing someone is trying to come up with for JSON data.

Why exactly does this not exist yet? Is there an easy to use tool I could just grab via NuGet (or whatever) to generate a json model based on a .cs file?

Also, how DOES one debug the deserializer?

Space Whale fucked around with this message at 21:17 on Aug 10, 2016

GoodCleanFun
Jan 28, 2004

v posted:

It's about 30,000 lines of code total. There is tons of unused code, tons of copy pasted crap, no concept of separating the UI and logical elements, and you can find SQL queries to multiple databases that happen at every layer of the project from everything to ( select * table ) to populate the base set of data it works off of down to individual UI elements that will query the database to grab a particular date to display when a window pops up rather than going back to the original data. Its clear that multiple people who never spoke to each other have passed this thing around like a sad whore and now I, the intern who hasn't graduated yet, have been tasked with upgrading the UI into WPF however I want with little to no guidance.

Doing this any other way than a full rewrite is an awful idea. This is a great opportunity to drop a ton of technical debt and introduce maintainability if you can get the time needed. Not sure if you have any experience with WPF/MVVM, but this is how I would proceed.

To start, identify the important functionality. Hopefully there are users who can speak to the functionality. If not you'll be stuck digging through the mess yourself to figure out exactly what the program does.

Then find all the interaction with outside resources whether that be database, file-system, etc. Build models for all of this stuff.

Lastly, check out Josh Smith as he is one of the best resources for WPF/MVVM (https://msdn.microsoft.com/en-us/magazine/dd419663.aspx) which his ideally how you should design the app if using WPF.

ljw1004
Jan 18, 2005

rum

Portland Sucks posted:

It's all in house. Its used by our laborers on the floor (blue collar stuff) and management has decided that it'd be ~super rad~ if the program they used was touch screen based on tablets and "was more like the apps they used on their cellphones." There is a lot of idealism running rampant in this project that I'm more or less soloing and I'm just the intern who had his contract extended specifically for this one task so if I try to shut it down too much I'll more than likely find myself out of the position.

We've heard three very different project proposals in this thread...

[1] Make the UI nicer (probably "flat") and usable with touch and tablet
[2] Put in a WPF front-end
[3] Re-architect the app with clean architecture

It sounds like management and users want [1] and will be happy with it, and they won't care about [2] or [3].

Are there ways to achieve [1] incrementally? I've not done much WinForms myself, only the underlying win32. But everything is possible with win32 so I have to believe it's also possible for WinForms. Maybe you could do it by buying something like https://www.componentone.com/Studio/Utilities/TouchToolkitWinForms


If you opt for [3], I think you should try it incrementally and independently of WPF. Take a look at this open source project: https://github.com/ActiveDevelop/MvvmForms -- it's created by Microsoft MVP Klaus Loeffelman who's company specializes in migrations of huge legacy WinForms/VB6 apps.

If you opt for [2], I'd try to do it incrementally. I'd start with the existing app, migrate a small chunk codebehind over to MvvmForms, migrate the small affected set of forms over to WPF, and go from there. In my opinion, WPF won't deliver you the nice UI that management+users want. All it does is give a great big ugly weird UI which you have to be a design expert to coax anything nice-looking out of it. (or switch over to "Metro" UWP/XAML which is like WPF but where the built in default styles at least look good).

Portland Sucks
Dec 21, 2004
༼ つ ◕_◕ ༽つ
Thanks for all the feedback goons. I spent a few weeks figuring out the MVVM design pattern and feel somewhat comfortable proceeding with what I think is going to end up as a rebuild of the application using WPF/MVVM as the base. I think the part that I'm not coping with at the moment is that unlike school, my employer is obviously not out to design projects that are within my comfort zone of being able to complete on my own. I just keep looking for reasons to throw up my hands and say "I can't do this find someone else", but I know it'll be something great to throw on my resume at the end of the day and will probably give me more valuable experience in the field than I could find anywhere else at the moment.

I just really hate the person who wrote all this lovely code. I hate them so much and I hate their code and I hate winforms. I'm just a gigantic ball of hate.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Space Whale posted:

The reason is dumb times two.

The JSON payload in the post body for a WebAPI endpoint is apparently supposed to be an anonymous object, not called somethingMetrics (or whatever)

Yeah, people usually just begin a JSON document with a {, so a bunch of code is going to expect an anonymous object.

quote:

Also, a curly bracket missing meant that the configuration in JavaScript for my framework's Ajax call got mixed in with the post body as well.

God I hate JavaScript.

If your config files are eval'ed JS, the problem is above the JS in your program structure.

quote:

Edit: After everyone got done shuffling their feet over this someone mentioned that there's some sort of "WSDL"-ish thing someone is trying to come up with for JSON data.

Why exactly does this not exist yet? Is there an easy to use tool I could just grab via NuGet (or whatever) to generate a json model based on a .cs file?

http://json-schema.org/ exists, but it's kinda weird because it kind of goes against the ~spirit~ of JSON, if you want to buy into the existance of such a thing, because it was never supposed to be rigidly structured like XML.

GoodCleanFun
Jan 28, 2004

Portland Sucks posted:

Thanks for all the feedback goons. I spent a few weeks figuring out the MVVM design pattern and feel somewhat comfortable proceeding with what I think is going to end up as a rebuild of the application using WPF/MVVM as the base. I think the part that I'm not coping with at the moment is that unlike school, my employer is obviously not out to design projects that are within my comfort zone of being able to complete on my own. I just keep looking for reasons to throw up my hands and say "I can't do this find someone else", but I know it'll be something great to throw on my resume at the end of the day and will probably give me more valuable experience in the field than I could find anywhere else at the moment.

I just really hate the person who wrote all this lovely code. I hate them so much and I hate their code and I hate winforms. I'm just a gigantic ball of hate.

Your point about valuable experience is exactly right. If you complete a re-architecture from winforms to wpf/mvvm you will be a huge step ahead of the game.

Do not underestimate the amount of work this will be though. Sounds like it would take someone familiar with all of this tech a few months.

Portland Sucks
Dec 21, 2004
༼ つ ◕_◕ ༽つ

GoodCleanFun posted:

Your point about valuable experience is exactly right. If you complete a re-architecture from winforms to wpf/mvvm you will be a huge step ahead of the game.

Do not underestimate the amount of work this will be though. Sounds like it would take someone familiar with all of this tech a few months.

Well my contract is until the end of April right now and his hopes are that I have something up and running by the end of the year, and that I can spent the rest of the time testing and debugging it with the people who will actually be using it. I have literally no idea how to estimate time requirements at this point so I just nodded and said I'll see what I can do.

brap
Aug 23, 2004

Grimey Drawer
I can sympathize when people throw up their hands and say we should rewrite the whole thing, but I think I'm with Joel Spolsky when I say that in general full rewrites don't pay off, and you can't convince your employer or customer to sign on for it anyway, so you might as well figure out how to go for incremental improvements.

smarion2
Apr 22, 2010

Portland Sucks posted:

Well my contract is until the end of April right now and his hopes are that I have something up and running by the end of the year, and that I can spent the rest of the time testing and debugging it with the people who will actually be using it. I have literally no idea how to estimate time requirements at this point so I just nodded and said I'll see what I can do.

Just remember its important to be honest and upfront to management. Nothing too terrible can happen as long as they are aware of the progress you're making and get the results the promise to return. Don't pretend everything is fine if you are behind as things can spiral out of control pretty quickly. 4 months goes fast when you have to learn as you go. I was just in that situation with having to build an app from scratch but I'm very glad I took the journey as I learned SO MUCH from the experience. I learned what to do and better what NOT to do. Looking back at the project (especially some of the first things I implemented) are not perfect but got the job done. It's kinda cool in a way because if i rewrote it all into WPF now I know I could do so much better. I'm excited for you, don't hesitate to post if you need help or get stuck, I wish I found this thread before I finished my app!

TheBlackVegetable
Oct 29, 2006

Portland Sucks posted:

Well my contract is until the end of April right now and his hopes are that I have something up and running by the end of the year, and that I can spent the rest of the time testing and debugging it with the people who will actually be using it. I have literally no idea how to estimate time requirements at this point so I just nodded and said I'll see what I can do.

If there's one thing I always wish I had done better throughout every project, it's keeping better track of the work done and to be done. I would recommend not worrying so much about estimating time and instead just try and make sure that everything you do and need to do is kept in a central list (e.g. JIRA, TFS or other issue tracker), and keep adding to and updating the list as you go.

Rewriting an existing application from scratch would be an excellent learning experience, but it will get out of control and compound in difficulty without good task management.

epswing
Nov 4, 2003

Soiled Meat

Portland Sucks posted:

Well my contract is until the end of April right now and his hopes are that I have something up and running by the end of the year, and that I can spent the rest of the time testing and debugging it with the people who will actually be using it. I have literally no idea how to estimate time requirements at this point so I just nodded and said I'll see what I can do.

https://medium.com/outsystems-engineering/the-hack-for-surviving-the-second-system-syndrome-a8c75c6a68f5#.7rgcul6ie

There's an article with some tips on surviving the "second system syndrome". The key insight being "if you're going to start over from scratch, just rebuild the functionality you had before, instead of thinking you can rebuild the old system AND add all sort of new bells and whistles at the same time".

mortarr
Apr 28, 2005

frozen meat at high speed

Portland Sucks posted:

I just really hate the person who wrote all this lovely code. I hate them so much and I hate their code and I hate winforms. I'm just a gigantic ball of hate.

Which ever path you take, the next person to touch your code is probably going to think this about whatever you write. What's worse, is if you get made permanent, you'll be the one hating your own code :-)

Not sure what your decision on incremental change vs full scale re-write, but I think going through an incremental brownfields-type renewal will put you in much better standing to future employers than writing something new from scratch.

RICHUNCLEPENNYBAGS
Dec 21, 2010

Portland Sucks posted:

Thanks for all the feedback goons. I spent a few weeks figuring out the MVVM design pattern and feel somewhat comfortable proceeding with what I think is going to end up as a rebuild of the application using WPF/MVVM as the base. I think the part that I'm not coping with at the moment is that unlike school, my employer is obviously not out to design projects that are within my comfort zone of being able to complete on my own. I just keep looking for reasons to throw up my hands and say "I can't do this find someone else", but I know it'll be something great to throw on my resume at the end of the day and will probably give me more valuable experience in the field than I could find anywhere else at the moment.

I just really hate the person who wrote all this lovely code. I hate them so much and I hate their code and I hate winforms. I'm just a gigantic ball of hate.

I'd really recommend reading up on MVP a bit. It's a pattern that makes Winforms development totally bearable if you stick to it. And refactoring this app into MVP is going to be way easier than reimplementing it from scratch.

Portland Sucks
Dec 21, 2004
༼ つ ◕_◕ ༽つ

epalm posted:

https://medium.com/outsystems-engineering/the-hack-for-surviving-the-second-system-syndrome-a8c75c6a68f5#.7rgcul6ie

There's an article with some tips on surviving the "second system syndrome". The key insight being "if you're going to start over from scratch, just rebuild the functionality you had before, instead of thinking you can rebuild the old system AND add all sort of new bells and whistles at the same time".

oh god this is my management in a nutshell right now. my way to cope with it was to put a blank piece of paper thumb nailed to the wall with "WISH LIST" written on top of it and I just told them to go ham whenever they had a crazy idea that seemed really cool but was obviously not part of the core functionality of the program. I was pretty clear that I had zero intentions of doing any of it.

Asymmetrikon
Oct 30, 2009

I believe you're a big dork!
Getting started with .NET Core, and I'm not sure how to use System.Data.SqlClient. It looks like it should be available, but when I run "dotnet run" it tells me that there isn't a namespace Data in System. Do I have to include something else to get it to work?

Gravity Pike
Feb 8, 2009

I find this discussion incredibly bland and disinteresting.
I work at a primarily Java/*nix shop, and I've been asked to CR a bunch of .NET/C# code that we've outsourced to a contractor. Does anyone know of an IDE that'll run on OSX and take care of basic stuff like meta-click on methods to find implementations? The code is all windows-logging specific stuff, so there's no chance of it working under mono, but I'd like to at least be able to read the code without booting into a different operating system.

Adbot
ADBOT LOVES YOU

ljw1004
Jan 18, 2005

rum

Asymmetrikon posted:

Getting started with .NET Core, and I'm not sure how to use System.Data.SqlClient. It looks like it should be available, but when I run "dotnet run" it tells me that there isn't a namespace Data in System. Do I have to include something else to get it to work?

You have to add a reference to the NuGet package System.Data.SqlClient.


(How did I know this? In the next version of Visual Studio it's going to suggest adding the NuGet package right there when you click the lightbulb. I do my .NETCore coding in Visual Studio for this kind of help. Also, bitter experience tells me that in .NETCore I often have to search around to find the NuGet package that contains a given API, and this was the first NuGet package I tried based on the name...)

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply