Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
The first bad step was Microsoft inventing Razor. Intermixing code and view is always a bad idea, but Razor just hasn't nearly enough options to apply templates to different kinds of data without manual intervention. Plus the view can directly access any layer in the system without ever thinking about separation. Want your view to authenticate users? Yes, why not. Want your view to load and store data? Yes, go ahead! You can do whatever you want. Obviously your views will never work in any different framework, but who cares honestly?
No, the growth has now also reached backend programming, where C# will only allow you to work with ridiculously overcomplicated code to access it. Not only do you not know which object and property along the graph actually exists, but JSON only has some vague idea of what it's type could be. And due to the lack of a standardized API, you can only step from one property to another, being ever so careful never to encounter an unexpected object or even a null, lest you want your whole website to become a single error message. Plus the Newtonsoft.Json library is a fucking mess due to the guys there thinking they had to somehow reinvent the wheel - fucking JObject and JToken and whatnot. Compare a property to null and it doesn't equal. Try to cast it to a type, still get a fucking exception for trying to cast a null to an actual type. No wonder, the API completely changes when you cast a dynamic JObject to just a JObject. Use the generic API and call Value<T>() you say? That also throws a fucking exception. Cast it with Value<object>() perhaps? Guess what, it now turned into a JValue, and it is STILL NOT NULL. I swear this library only exists to annoy programmers into quitting their jobs, and the only job it had was to parse a practically logic-less string into a usable data structure. I had to attach a debugger because the code is so incoherent that you cannot deduce what is going on just from looking at it. Seven levels of nested ifs deep, and you're still prone to fucking up with an exception just because a user clicks the wrong button in the backend.
Someone needs a beer :)
Can’t really blame Umbraco, Microsoft or the tech-community for not sticking to 15-20 years old tech. Feel free to use what ever you want and think what ever you want but not sure if your post here provides any value.
Looks like you forgot to read the Json.NET documentation before using it. Here is the link: https://www.newtonsoft.com/json/help/html/Introduction.htm
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted