whitefish
whitefish on Hacker News
Posted by
whitefish on Thursday February 15, 2018 @07:01PM
from the nytimes.com dept.
On the one hand I am glad they are continuing to enhance TypeScript. On the other hand I am concerned that TypeScript is becoming a very bloated language. If you have seen the latest edition of Stroustrup’s C++ Programming Language book you know what a bloated language looks like. Is that where TypeScript is headed?
Programming languages are not like your Word or Excel where more features is better. Some programming language designers take pride in how small the language is, for example Kernighan and Ritchie. I worry that as long as Microsoft has Program Managers and Development Leads assigned to TypeScript and their job performance is measured by the number of features they add, TypeScript is going to get more and more bloated with obscure features.
If that’s bizarre consider the fact that Microsoft does credit check on employees every two years, as a condition of employment, and you can be fired if something really bad shows up. This is for employees that work in the Azure division and the purpose is to reassure customers who host their data on Azure.
Sorry, that’s not making sense. In the MVC I am used to there’s only one controller active at one time and that controller owns the entire screen.
If your model layer objects are firing events you have problems already because it obscures the call graph. I try to avoid that style. The controller should update the model objects, then if a view update is needed it should be triggered by the controller not the model layer object.
Can you put a breakpoint in the template?
In .tsx templates you can.
Templates frequently need loops and conditionals. In the case of .tsx this logic is in TyprScipt so you can debug it just like any other TypeScript. In the case of Angular such logic is written in an undebuggable custom syntax.
So basically you prefer something more along the lines of Model View Controller. Me too. When React was first released it was advertised as “the ‘V’ in MVC”. Unfortunately the developer community took it in a different direction.
Have you considered using MVC? It works well. Search the complementary tools page of React.
JSX standard is independent of React and can be used with Web Components. Also, HTML import is unnecessary to use Web Components. The key technologies in Web Components are ShadowDOM and Custom Elements.
Which Javascript MVC framework did you use? Some people who used Angular hated it and conclude that MVC is horrible. No, Angular is horrible, not MVC.
None of these problems are unique to web development. How do you solve these problems in iOS? In iOS you use MVC, and the Application object holds the state as a tree. MVC has a better solution to all these problems.
Redux is unnecessary complexity. Anyone considering it, please do yourself a favor: check out an MVC framework and see how simple it is. Remember, when React first came out they described at as "React is the V in MVC." Adopt MVC in your project and watch your productivity soar.
Note: Some people believe that MVC implies two-way data binding. This is false.
Real estate agents (in the USA at least)
This will lower salaries in India for IT professionals. As a result outsourcing to India will become more attractive.
Should hospitals such as UK's NHS and other such organizations use dumb terminals (or chromebooks) instead of Windows? That way data is centralized on servers where it is easy to backup and harder for hackers to hold to ransom.
Routers can and should be independent of View technology. Here's one that works well for React but is independent of React:
https://github.com/Rajeev-K/mvc-router
The MVC model is well-understood, and does not require Redux. MVC does not imply two-way data binding, btw.
Posted by
whitefish on Sunday May 07, 2017 @10:52AM
from the ask-hn dept.
This blog post says as a Software Engineer working in the US you should have $4 Million in savings to have the same income, in retirement, as a fresh software engineer.http://chase-seibert.github.io/blog/2014/01/01/saving-for-retirement-as-a-software-engineer.htmlHow much have you saved for retirement, and at what age?
Who here is old enough to remember Larry Ellison's Network Computer? Chromebook is the realization of Larry Ellison's vision.
Back in the mid 90's Larry Ellison said, "we need computers that do less, not more". He was widely ridiculed at that time. Now we know he was right.
Those who think React + ReactRouter + Redux is too complex -- you're right. But there is an easier way to use React: MVC. React is the V in MVC.
https://github.com/Rajeev-K/mvc-router
Note that using MVC does not imply 2-way binding!
You can use JSX for Web Components too, see:
https://github.com/wisercoder/uibuilder
There is no need for a complex framework like React. Web Components + JSX is better than React. Why use a proprietary framework with patent issues when you could be using a standards based solution instead?
I'd like to see React support shadow-dom and web components. Not holding my breath however, since Facebook considers web components to be a "competing technology".
Unlike real web components, React components are brittle since React does not have the equivalent of Shadow DOM.
No. With 8 bit you had to execute multiple instructions to add two numbers. Same with 16 bit. This problem went away with 32 bit. Adding more bits beyond 32 does not bring proportional benefits because the numbers we deal with fit in 32 bit.
Couldn't you say this about the software industry in general? In the 90's I used to have a Sun workstation on my desk. It ran the powerful Solaris operating system, but had just 16MB of RAM! Today you need 1GB of RAM to run an OS comfortably. My question: what does modern Linux do that Solaris from the 90's did not, that it requires 50x more memory?