为什么 Angular 使我逃离 Web 开发 已翻译 14%

oschina 投递于 11/08 14:31 (共 14 段)
阅读 64
收藏 0
0
加载中

辨别公司是否已开始堕落的最可靠方法之一是,衡量随着时间推移其产品所提供的可用性的衍生。 像苹果这样的公司在发布 iPhone 时平均产品可用性大幅上升,并在一段时间里持续增加,但最终在他们开始取消 3.5mm 插孔等重要手机功能时达到稳定。 通常而言,大多数公司都经历过这种可用性的S曲线或抛物曲线:前者通常找到自己的不足,然后弥补,即使在没有创新的情况下依然产生不错的盈利;后者则未能理解他们的产品,把事情搞砸,搞崩溃,最后毁掉。

chasehong
chasehong
翻译于 11/12 14:29
0

Angular. 这个名字对舌头充满敌意。它发音很缓慢。/’eŋgjəlɚ/。喉咙扭曲成可怕的外星形状,它意味着丑陋,尖锐和虚假。

所有人都压倒性地将相同的三个单词与相同的三个形状相关联。

本文,我将以各种方式说明我的心灵受到的不可逆转的创伤。由于各种混乱 —— 谷歌的创意:ANGULAR 网络开发框架。

溪边九节
溪边九节
翻译于 11/12 10:49
0

The Documentation

Have you ever had a brilliant idea for a weekend project, started it Saturday afternoon, and then steadily come to realize the project would take at least six months to fully implement? Google had a moment like that when they set out to document the inner workings of the ANGULAR WEB DEVELOPMENT FRAMEWORK. They then drip-fed an intern nothing but espresso for weeks until she had a Hello World code-along project that they were able to pass off as a complete documentation of their entire stack.

None of the errors you will encounter while building a WEB APPLICATION on the ANGULAR WEB DEVELOPMENT FRAMEWORK will be listed in this documentation. Indeed, very few of the design patterns or core concepts you will require will be present here, either. If you want to learn how to actually build a dangerous tool with ANGULAR, you will need to purchase an online course (I can recommend Maximillian Schwarzmueller’s comprehensive Complete Guide, which saved my job) that will reveal to you all of the Gotcha! moments and snare traps that await the naȉf who believes they can simply start writing Javascript like a React or Vue developer.

还没有人翻译此段落
我来翻译

Angular’s actual documentation is more of a function, which I will pseudocode below.

This neat little script is only 5MB after Angular compiles it.

Notice anything? Yes, that’s right: when bugfixing in ANGULAR, you need to specifically exclude the phrase `angularjs` from every one of your searches. You can’t append a 2, or a 7, or hope that Just `“ANGULAR”` will suffice to exclude the ill-fated first edition of this comprehensive software development stack. Needless to say this alone starts to grate after a while.

还没有人翻译此段落
我来翻译

But then you get around to reading enough of these Stack Overflow “solutions” to people’s problems, and it begins to dawn on you that between the code you write and the code that runs in the browser, there isn’t just a compiler that will handily break all of your CSS for you, there’s a bona fide black box that demands you format your application in exactly such a way or else the entire thing will fail silently or worse, spit out an incorrect error message. You literally cannot trust anything that the ANGULAR WEB DEVELOPMENT FRAMEWORK tells you about what you have done wrong because not even it knows how its own system works. Did you declare an `EntryComponent` in the `Module` it’s intended to lazy-load into rather than the root `Module` where it loses all benefits of lazy-loading? Nein! Did you try to use Two-Way Data Binding™ rather than an arcane daisy-chain of `EventEmitter`s and `Subscription`s and `Service`s? Verboten!

已有 1 人翻译此段(待审批)
我来翻译

The entire ANGULAR WEB DEVELOPMENT experience is like this. You run at full speed into a brick wall enough times, and eventually you learn to creep around at a snail’s pace, groping pathetically for any arbitrary obstacles that the FRAMEWORK might throw in your way. There is little in the world more frustrating than attempting to operate this monstrous and moody contraption that the allegedly smartest corporation in the world managed to excrete.

Imagine a car whose hood never opens, and whose dashboard says only DASHBOARD in blinding lights that don’t switch off. The car cannot be repaired once broken; it can only be replaced or modified from the outside in. It guzzles gas even when it’s not turned on. No service manual exists. If you want to know how it works, here’s the 5,280-page assembly guide. Good luck.

已有 1 人翻译此段(待审批)
我来翻译

The “Architecture”

ANGULAR is slow. Writing apps takes a long time and the apps you create function very sluggishly once your app gets more complicated than `Hello World`. This would be acceptable if the ANGULAR FRAMEWORK conferred any benefits to the user or the programmer, such as failing gracefully in the event of a runtime error, or compiling quickly, or providing an increase to app security. But ANGULAR possesses none of these. In fact, it collapses into a wailing heap at the mere mention of an `Uncaught TypeError`.

Basically the only way to understand what Angular is actually doing is to read the millions of lines of source code the devs happily provide on GitHub. Since nobody actually does that, ANGULAR WEB DEVELOPERS typically settle for learning one or two design patterns that they know will not explode, and building an entire application out of them. Like a submarine built out of increasingly large doctor’s office inflatable gloves. It could probably work, given an endless supply of gloves and toddlers. Your only other option is to immerse yourself in the nonsensical, arbitrary madness that awaits the developer who attempts to learn how ANGULAR “works”.

已有 1 人翻译此段(待审批)
我来翻译

I’ll tell you how it works. Your Components talk to your Services which relay data to your other Injectables via the Modules that your app Imports. What’s unclear about that? If you need clarification, go review the Material Design guidelines. They’ve got Components for everything you need to build. And keep your designs pixel perfect, please. It ought to be easy to do, since Material and Angular are designed by Google to supposedly work together nicely. And it will look and feel great when the padding on each list item eats up a third of the webpage, and opening a dropdown menu takes all of sixteen seconds. Don’t you feel freed from the constraints of an arbitrary and underdeveloped Internet?

Not a single part of ANGULAR’s design makes your code run faster. It increases only three things: complexity bloat, the time it takes to complete a simple feature, and — if you can somehow avoid driving yourself insane writing this spaghetti day in and day out — job security for you and your team. But be warned: the ANGULAR WEB DEVELOPMENT FRAMEWORK won’t do you any favors when a deadline is approaching.

还没有人翻译此段落
我来翻译

The ANGULAR WEB DEVELOPMENT Experience

Open up your IDE of choice, coder! Enter your IntelliJ IDEA License Key to begin. A License Key is required to continue. Thank you for entering your License Key. Please select the Type Script “Linter” you would like to use to “Lint” your Type Script Code. The ANGULAR WEB DFGHSDFG FGSGDFSFDS runs Type Script, which is Java Script with Types. That makes it Good. You must use an IDE that is compatible with Type Script. Type Script will occasionally update. This will break your code and the code in your dependencies. This is expected. Rejoice in the time you are paid to pick through worming function calls! This is living!

Do not be alarmed if your dependency libraries occasionally issue breaking changes after altering a single property on a class you never use. You can just add a manual file editing step to every build process. Or you could freeze the library at a compatible version and lose all future improvements. Thank you for choosing Type Script and ANGULAR.

还没有人翻译此段落
我来翻译

ANGULAR will helpfully mix fake HTML ELEMENTS into your real HTML ELEMENTS because the entire app is getting shredded to pieces by their AHEAD OF TIME COMPILER anyway, so what does it matter if they pollute a correct specification with a capricious impostor? When composing an HTML FILE, please remember to use the ANGULAR-specific markup language, which includes DIRECTIVES for making your code even more interesting to debug. You can even write your own ANGULAR DIRECTIVES if you’d like to further obfuscate the purpose of the characters you type. The most toothsome feature of all this advanced ANGULAR-flavored HTML is that tracing errors to their source is exponentially more difficult than it is in almost any other library, framework, or coding environment in living memory. They will literally feed you the wrong error message. You can search for a missing closing tag for days before you realize that the actual error was buried somewhere deep in the conditionals and mysterious imported directives, and to attempt to explain it to an outsider would inspire either a look of horror, or one of pity. Oh, also you can’t write same-page anchor links anymore because that functionality was too helpful. Enjoy trying to manually scroll with The Java Script!

还没有人翻译此段落
我来翻译
本文中的所有译文仅用于学习和交流目的,转载请务必注明文章译者、出处、和本文链接。
我们的翻译工作遵照 CC 协议,如果我们的工作有侵犯到您的权益,请及时联系我们。
加载中

评论(0)

返回顶部
顶部