|
This question was asked at work yesterday, and a couple of our developers are firmly in the camp that if we were to rewrite the back-end (currently C# with WCF [gross] to handle the endpoint calls and with SQL Server, no ORM, just using Dapper) they would write it in Node with TypeScript.
Conversely, I'm in the camp that if I'm writing anything on the back-end, it's going to be C# / .NET, whether it's a DLL or ASP.NET Core or a simple console app.
So what's you're take? Why would you use one vs. the other for back-end development?
Assuming your 7 year old back-end is written in .NET, if you had to rewrite it, would you switch from .NET to Node?
|
|
|
|
|
I love TypeScript. As a language, it has so much going for it but, and this is a massive but, if I were rewriting a .NET app now, I would go with .NET Core all the way. The new hosting model is faster than Node's; it runs on just about every platform you could possibly want and the new features such as Span<t> means that it can work with much lower code overhead.
|
|
|
|
|
TypeScript isn't a language as much as it is a wrapper around javascript. It's still javascript.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Can you debug typescript as typescript yet, or are you stuck trying to figure out how to map the fugly javascript that it was transpiled to back to your original code?
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
You've been able to debug TypeScript as TypeScript for a long time now.
|
|
|
|
|
cool, does it work in all browsers or need helper plugins?
Not being able to do so was the biggest downfall of the project using coffeescript I was on some years back; and when I asked about typescript a few times before I never got an answer.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Dan Neely wrote: cool, does it work in all browsers or need helper plugins?
No plugins required. I'm able to debug TypeScript in VS without problems. VSC - now there I had problems with setting up breakpoints.
|
|
|
|
|
Pete O'Hanlon wrote: and the new features such as Span<t> means that it can work with much lower code overhead.
Care to elaborate on that a bit? As in, I can understand memory overhead, so I'm curious how it can affect code overhead?
modified yesterday.
|
|
|
|
|
"We're going to stop speaking English and start speaking French."
If there is a compelling reason to do something then do it. If you're doing something simply because you fancy a change or you think other people are doing it so there has to be a reason, then you shouldn't be in charge of making technical decisions.
|
|
|
|
|
Hey, we finally agree on something. 
|
|
|
|
|
Even with TypeScript, you're still dealing with the Highly Cursed Number type for arithmetic. There is neither checked arithmetic nor unchecked , only cursed , and it is up to you to force it to do the right thing.
|
|
|
|
|
I'd stick with C# . And don't rewrite at all without good reason.
Sadly, where I am now, we're beginning to rewrite all the SSIS (ptui) we've been working on since 2011 in Ab Initio, for no good reason, except for maybe because it costs more and therefore must be better. 
|
|
|
|
|
What's their reason for switching to Node?
Node is JavaScript, which is awful, and TypeScript just makes it look more like C#
It kind of depends on your environment though.
Personally, I'm using Microsoft all the way down, so switching out anything would make it harder to integrate with everything else.
For example, if you're using Jenkins instead of Azure DevOps, C# integration is a lot harder to begin with and switching to JavaScript may make certain tasks easier.
One reason I'd use Node over .NET Core is to re-use code between a back-end and a front-end (website).
This is actually a scenario that came up recently for a web app we wanted to do with instant front-end calculations that we also had to do back-end for an initial generation for the data.
Node would probably also be a better fit if your data is unstructured (with a MongoDB database, for example).
Using Node could be a hiring decision if you can get plenty of JavaScript developers (because everyone knows JS), but no C# developers.
Other than that I have no reason to use Node instead of .NET Core, they're both multi-platform and lightning fast.
It even seems .NET Core is sometimes even faster than Node!
Node invites the horror that is npm with 10.000+ files in 40 MB for a single package into your back-end
However, why not use microservices and use both where they best fit?
|
|
|
|
|
|
Our current ASP.Net WebForms code base requires asmx files so we can communicate with our DAL from javascript.
Our new MVC5 code base is all C#, and we're moving as far away from using javascript (in any of its evil forms) as we can. We also implemented a new DAL that is more generic than the existing one.
We're not using any ORM beyond the EF stuff that comes with your typical MVC project template. To be honest, we'd REALLY like to get rid of EF altogether, but we don't really have time to work on that aspect of the code.
It's hard to decide which I hate more - javascript, or EF.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
modified yesterday.
|
|
|
|
|
From an architecture and design standpoint, I'd first look at the team and their core skills. The platform I chose would heavily depend on what my developers were used to coding, and could be productive in.
That's one of the primary considerations of any platform or stack, assuming they meet functional requirements.
So if it were me, again, I'd start there.
From there, most of the rest is dev fodder, that really people will tend to holy roll over.
What's important at the end of the day, is can it meet the requirements necessary to build your app?
And so if it were me, I'd go back to the design phase, mock up some overall system diagrams, and flow, maybe come up with a preliminary SBD, and then match it against the various offerings.
Whichever comes up strongest in helping the app fulfill it's behavioral requirements is what I'd go with, in the context of the given team's skillset
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
I would do a lot more who/what/why discovery before choosing either - why are we rewriting, why do we need to do the whole thing, what skill sets do we have, what is our hosting story, what is the budget etc.
|
|
|
|
|
Marc Clifton wrote: Assuming your 7 year old back-end is written in .NET, if you had to rewrite it, would you switch from .NET to Node? I would oppose a rewrite even. You can replace parts of it, but you don't abandon the applications that make money.
Marc Clifton wrote: So what's you're take? Why would you use one vs. the other for back-end development? If developing for a Rich UI, I will want to provide a Rich UI - not a simplistic website, but a UI that supports Windows color scheme's, resizing of panels, resizing of columns, and would always use the Common Controls (nearly unchanged still, since Win3).
Installed this "Slack" desktop application, and it is unintuitive and bloody ugly, does not support high-contrast color schemes, and is an insult to development in general.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Although I've a better system, as well, my primary work PC is a refurbished Dell Optiplex of some sort which came with a video card for direct HDMI. I did upgrade it from 4GB to 8GB (DDR2 !) which did make a difference but I wonder if there's any reason to upgrade.
Why? It's main use is to connect to a VM "at work" and from there, another hop to my desktop. So I sit back in a recliner with a 49" monitor I can almost touch with my toes and tap away on my (non-gamer) wireless keyboard/mouse (recently upgraded to Logitech MK710).
Considering the path between me and my work-box (Xeon 32GB and something like 8 3.5GHz cores) - and that it does all the real work (and reaches out even more hops to the server farm, as needed) is there any sensible reason to upgrade anything, except, perhaps, a more comfortable recliner?
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
No amount of hardware (at either end) will overcome/improve your internet bandwidth. Leave your hardware alone. It actually comes down to how much you want to pay for your internet connection.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Basically fits with my minimalist philosophy (I'm a card-carrying minimalist).
I was just curious if anyone else could see what I couldn't.
As for internet bandwidth - the hype of the millennium (for now). My provider keeps incrementing mine up (and of course, encourages me to upgrade). 15->25->100->200 Mbs. I allow this because my cost has actually gone down.
But when I streamed at 15Mbs all was OK - didn't improve at 25Mbs, or 100 or 200. I try to explain to people that (unless they're sharing with an entire fraternity or something) they've no use for that speed because internet traffic and data rates from most sources won't be supplying data at that rate as they've lots of other users to service.
Some are touting their 1GB/s options - my entire company connects two offices (about 450 users) with a 1GB line. To what use can a family of 2-6 have for it, except to say their bandwidth is bigger than than neighbors?
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
It's much easier to enjoy the favor of both friend and foe, and not give a damn who's who. -- Lon Milo DuQuette
|
|
|
|
|
/ravi
|
|
|
|
|
W∴ Balboos wrote: is there any sensible reason to upgrade anything do you have to get up to make tea/coffee?
if so there's something to upgrade... your wife buy a robot (or two, one for you, one for the wife).
this internet has become nothing but fake news.
... time to fix it, time to get back to the fax!
|
|
|
|
|
Well - I actually do get up for some of that stuff - keeps my legs from getting cramped or going into full atrophy.
On the other hand, I have a (rolling) coffee table next to me in easy reach whereon I keep my coffee and, if early enough, some Trader Joe's Dunkers (plain back). Occasionally some spring rolls or a knish.
Still, there's always room for improvement.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|