Friday 25 October 2019

Suggestions on how to overcome the challenges of Dynamic language

Sorry for the long title tried to make it as explanatory as possible.​I am a long time C# programmer. I have never worked on any application run on HTTP protocol but have done many networked applications in past. Currently I have an client who offered a job to port their in-house surveying system's admin panel get ported to web. So basically I need to port an .NET2 application to the web and make that web application be compatible with their already existing authentication database and all that stuff etc etc.​My problem is that even though I worked with sockets and networks in a very simplistic manner in C# I have never done ASP.NET yet alone HTTP. Now the first issue with this is that, client decided to port the application web because they have decided to not use any Windows Servers anymore. Lucky for me .Net Core supports ASP.Net but unlucky for me I hated every single thing about ASP.Net. I mean 'to me' it is disgusting... I asked them what languages would they want and client said that they want either C# with .Net Core, Django or Node.JS environment. Now c# is out of options, I hated ASP.NET. Django is... Meh in my opinion. It is a great framework but I dont like tab spacing dominating my code. I am more of a control paranoid and I want brackets. When I checked NodeJS I saw that it is a great runtime environment. It's syntax is clean and follows the same sexy principles of JavaScript. plus Node being async is just too good to pass even it only runs in single thread. It's such a powerful thing especially if you are writing an back-end which queries tons of stuff all the time.​Here is where my ACTUAL BIG problem starts:It has been little bit more than a week and I am starting to step into serious issues here and there. At first, JS being a dynamic language gave me a whole new powers. I can manipulate things like I could never done before. At the beginning this is great but as the code gets bigger and bigger and bigger and biiiiggeeerrr this starts to become a issue. Especially if you have other people coding together with you. If you have ever worked with a team you know that following a strict style in your code is really important at big projects. This is true for everything I guess. The more crowded a community the more strict rules you need. This applies everywhere. The dynamic structure of JS really started to cause serious problems for me. My coworker is changing the variable type without knowing what it was before and suddenly the JavaScript engine tries to parse a string as if it is an integer because the parser I built was specific for integers.​It is impossible for me to be the first person encountering these issues. I wanted to get the feedback of you all on how did you manage to overcome these issues. In a community discord that I am a member of I asked the same questions and people said that "TypeScript is a great solution for this but if you are writing back-end in Node TS might cause issues in your code."To me TypeScript not being able to work well with Node is not possible. It is supported by Microsoft. I dont believe it is true but I also dont want to risk it either. Can I get all of you people opinion on this?

Submitted October 26, 2019 at 01:47AM by FastFlyingTurtle

No comments:

Post a Comment