JavaScript, WPF and UWP thoughts
So, recently I did some UWP work for my wife's application and got back to some outstanding work I'd promised my brother all the while sharpening my TypeScript skills during the day.
Every programming language, when you're in the zone with it, it changes the way you think about coding. This can be infuriating. But, it can also be insightful. If there is one thing that TS and JavaScript coding has done to my thought process it is that it makes me look at every need for a new control as a chance to build one myself.
In the past I only did this with WPF and Silverlight when there was truly nothing out there that did what I needed and I was convinced I would never find one.
While coding JavaScript I've simply given up on finding controls that are A) half-decent, B) play nice with your chosen collection of frameworks and C) after all of that still work the way you want them too. If this wasn't for my day job, I'd have walked away long ago from these controls (and this language entirely). Since that isn't an option, I've spent a lot of time building my own funky controls. Often using something else as a base... but then, semantically, even if I'm going to the absurd lengths of drawing basic shapes I'm still using a set of base controls.
Back to WPF. Was looking for a half decent scheduler. My needs were stupidly simple (day view only, single template, potentially overlapping). Would settle for more advanced if I could find it. Closest I got was SyncFusion without going paid. I dumped HOURS into this professionally built scheduler control. And it still didn't look or work the way I wanted. I got frustrated, left it alone and finally came back again yesterday. Had wiped my laptop recently, so SF was uninstalled. Deleted all of the references, took one quick last look at the internet and said "Fuck it, I'll write my own".
In an amount of time less than I spent researching scheduler controls, let alone trying to make other free and open source examples actually work, I have already built one successfully. So, what I thought I'd never say; "Thank you JavaScript".
BUT... while I'm thankful for that, I still think JavaScript is silly. Firstly, my ongoing experiences have done NOTHING to convince me that HTML/JS are truly cross platform in any reliable fashion,. Using DOM for coding LoB Mobile Applications is insanity. And loosely typed variables still make JavaScript idiotic at the best of times. Even with TypeScript, the "any" type is still everywhere and you can still end up (accidentally) with an object where you expect to find a bool for example and spend massive amounts of time figuring out why your IF statements don't work as expected and then figuring out where the variable assignment got messed up.
The kicker? Everything not only compiles, but also runs without ANY ERRORS AT ALL. This wasn't me it happened too, but I wasted a solid half hour trying to help someone else find it. And, it was in exactly the sort of place ANY JS dev could have hit it; the response of an AJAX call to someone else's RESTful endpoint. 2 points of failure which a JS dev has no control over.
Lastly, on UWP, read some Reddit articles which recapped what I had said about it. Universal Apps are a great low friction way to target multiple device types. If you don't say it can't run on another device, it simply will. Depending on the app it may look like crap and you may need to write some responsive layout for it. But, that, conceptually, is becoming the norm everywhere anyway. And, I think the breadth of the Microsoft ecosystem mean it *should* be compelling for hobbyists and companies looking at a second platform. I won't hold my breath there.
And finally, had a blast with that control. Another great thing about WFP and custom controls (for me and the like minded); a great chance to show off that I'm still pretty darn good at math problems and fun algorithms.
Every programming language, when you're in the zone with it, it changes the way you think about coding. This can be infuriating. But, it can also be insightful. If there is one thing that TS and JavaScript coding has done to my thought process it is that it makes me look at every need for a new control as a chance to build one myself.
In the past I only did this with WPF and Silverlight when there was truly nothing out there that did what I needed and I was convinced I would never find one.
While coding JavaScript I've simply given up on finding controls that are A) half-decent, B) play nice with your chosen collection of frameworks and C) after all of that still work the way you want them too. If this wasn't for my day job, I'd have walked away long ago from these controls (and this language entirely). Since that isn't an option, I've spent a lot of time building my own funky controls. Often using something else as a base... but then, semantically, even if I'm going to the absurd lengths of drawing basic shapes I'm still using a set of base controls.
Back to WPF. Was looking for a half decent scheduler. My needs were stupidly simple (day view only, single template, potentially overlapping). Would settle for more advanced if I could find it. Closest I got was SyncFusion without going paid. I dumped HOURS into this professionally built scheduler control. And it still didn't look or work the way I wanted. I got frustrated, left it alone and finally came back again yesterday. Had wiped my laptop recently, so SF was uninstalled. Deleted all of the references, took one quick last look at the internet and said "Fuck it, I'll write my own".
In an amount of time less than I spent researching scheduler controls, let alone trying to make other free and open source examples actually work, I have already built one successfully. So, what I thought I'd never say; "Thank you JavaScript".
BUT... while I'm thankful for that, I still think JavaScript is silly. Firstly, my ongoing experiences have done NOTHING to convince me that HTML/JS are truly cross platform in any reliable fashion,. Using DOM for coding LoB Mobile Applications is insanity. And loosely typed variables still make JavaScript idiotic at the best of times. Even with TypeScript, the "any" type is still everywhere and you can still end up (accidentally) with an object where you expect to find a bool for example and spend massive amounts of time figuring out why your IF statements don't work as expected and then figuring out where the variable assignment got messed up.
The kicker? Everything not only compiles, but also runs without ANY ERRORS AT ALL. This wasn't me it happened too, but I wasted a solid half hour trying to help someone else find it. And, it was in exactly the sort of place ANY JS dev could have hit it; the response of an AJAX call to someone else's RESTful endpoint. 2 points of failure which a JS dev has no control over.
Lastly, on UWP, read some Reddit articles which recapped what I had said about it. Universal Apps are a great low friction way to target multiple device types. If you don't say it can't run on another device, it simply will. Depending on the app it may look like crap and you may need to write some responsive layout for it. But, that, conceptually, is becoming the norm everywhere anyway. And, I think the breadth of the Microsoft ecosystem mean it *should* be compelling for hobbyists and companies looking at a second platform. I won't hold my breath there.
And finally, had a blast with that control. Another great thing about WFP and custom controls (for me and the like minded); a great chance to show off that I'm still pretty darn good at math problems and fun algorithms.
Comments
Post a Comment