Kết hợp độc đáo javascript

Vì một tổ hợp duy nhất cũng có thể loại trừ một phần tử khỏi tập hợp giải pháp nên số lượng lựa chọn bằng số phần tử + 1

Số lượng kết hợp duy nhất có thể được hình thành từ nhiều bộ mẫu của chúng tôi được tính như sau

Các kết hợp duy nhất

= [A's = 3 + 1] * [B's = 2 + 1] * [C's = 2 + 1]
=
= 36

Biểu diễn MultiSet bằng JavaScript

JavaScript đại diện cho các mảng theo cách khác với ngôn ngữ khác

Một multiset thường được biểu diễn bằng Array. Theo cuốn sách "JavaScript the Good Part" - Chapter 8, JavaScript cung cấp một đối tượng có một số đặc điểm giống như mảng. Nó chuyển đổi các chỉ số mảng thành các chuỗi được sử dụng để tạo các thuộc tính. Nó chậm hơn đáng kể so với một mảng thực, nhưng nó có thể thuận tiện hơn khi sử dụng. "

Một "Mảng" trong JavaScript có thể chứa bất kỳ hỗn hợp giá trị nào, kể cả một mảng khác. Một phần tử mới có thể được thêm vào cuối một mảng bằng cách gán cho mảng chiều dài hiện tại của mảng[array. chiều dài] = 'phần tử'; . đẩy ['phần tử'];

Khi khai báo mảng, tốt nhất nên dùng array = []; . nguyên mẫu so với một đối tượng theo nghĩa đen gọi đối tượng. nguyên mẫu

Chúng tôi sẽ sử dụng các mảng riêng biệt để lưu trữ các phần tử và số lượng tương ứng

var arrElements = ['A', 'B', 'C'];
var arrRequired = [3, 2, 2];

            We will create a routine to calculate the number of unique combinations
            using arrRequired.

            Then we will use a multi-level for loop to iterate over arrElements
            and print the unique combinations to the screen.
            

Chúng tôi sử dụng một vòng lặp FOR đơn giản để in các kết hợp duy nhất ra màn hình

                var i;
                for [i=0; i < arrElements.length; i +=1]{
                    document.writeln[arrElements[i]];
                    }
            

Số lượng kết hợp duy nhất có thể nhiều và có thể nhiều hơn số lượng bạn cần cho ứng dụng của mình

In các kết hợp độc đáo từ MultiSet

Chúng tôi sẽ sử dụng JavaScript để hiển thị các kết hợp độc đáo

Một hạn chế thực tế

Số lượng kết hợp duy nhất có thể được tạo từ MultiSet có thể tăng nhanh và có thể dẫn đến tràn. Nếu có thể, chúng ta có thể thiết kế một ràng buộc để giới hạn số phần tử được hiển thị

Nếu chúng ta muốn xác định sự kết hợp tốt nhất của các vết cắt có thể được thực hiện từ một chiều dài vật liệu nhất định

Nút. js tỏa sáng trong các ứng dụng web thời gian thực sử dụng công nghệ đẩy qua WebSocket. Các kết nối hai chiều, thời gian thực của nút—nơi mỗi máy khách và máy chủ có thể bắt đầu giao tiếp—cho phép trao đổi dữ liệu tự do hơn

Qua

Tomislav Capan

Tomislav là Kiến trúc sư giải pháp, nhà phát triển và tư vấn kỹ thuật được AWS chứng nhận với hơn 10 năm kinh nghiệm. Tomislav có bằng thạc sĩ về máy tính

CHIA SẺ

CHIA SẺ

Đọc bản tiếng Tây Ban Nhabagaimana tips mengatasi wanita frigid

cintalauraramarimari

A great introduction to find out what it is JavaScript and once the answer to from bagaimana tips mengatasi wanita frigid

Đa-ni-ên

Noob questions. Um, isn't the ease with which you can move request data [i. e. untrusted data] into database [where data is assumed to be trusted] a big hazard? How do you ensure that you never forget to inspect every piece of incoming data when it arrives, before you start trusting it? Generally, I would assume something as popular as Node. js would have thought of this, but I remember back when Rails had blanket model update. That changed real quick when Github's use of this "feature" was exploited [fortunately, by a whitehat]. Also, of course, just because you add a conversion speed bump does not mean that people won't make mistakes, but at least they're more likely to give it some thought, which probably means they're going to make less mistakes

Đa-ni-ên

Noob questions. Um, isn't the ease with which you can move request data [i. e. untrusted data] into database [where data is assumed to be trusted] a big hazard? How do you ensure that you never forget to inspect every piece of incoming data when it arrives, before you start trusting it? Generally, I would assume something as popular as Node. js would have thought of this, but I remember back when Rails had blanket model update. That changed real quick when Github's use of this "feature" was exploited [fortunately, by a whitehat]. Also, of course, just because you add a conversion speed bump does not mean that people won't make mistakes, but at least they're more likely to give it some thought, which probably means they're going to make less mistakes

Q

I don't understand the angst against using an ORM. Were you in a proper environment where concerns were separated? The ones bashing ORM just sound like they don't know what they're doing or how to engineer proper software. Why on earth would I want to go from writing software in Java/C#/_whatever_ to drop into SQL where it is hard to version, properly test, and can apparently cause severe brain damage? Everything is a double edged sword - an implementation or a convention like using an ORM over raw SQL really doesn't matter. Depending on the situation raw SQL might be best. it might be better to use a NoSQL store. maybe an ORM is fine. Usually, from my experience, I can tell you that an ORM is better for a lot of reasons, and they have been relayed by M. I spent the time to write my own libraries to abstract vendor specific implementations and you need to create your own mappings. You can easily spawn from a certain state or use existing data structures. It took time to write my libraries and it was not easy at all to do it but it was well worth my time to do it since I can now reuse my libraries. Is it the BEST? I don't know. I like it but I certainly won't go around to arbitrary technical articles that have nothing to do about SQL and post something like "Yes this technology is good but stay away from raw SQL. " I just don't see a need to be bashing anything here, especially an ORM when the article is exclusively about JS and NodeJS

Q

I don't understand the angst against using an ORM. Were you in a proper environment where concerns were separated? The ones bashing ORM just sound like they don't know what they're doing or how to engineer proper software. Why on earth would I want to go from writing software in Java/C#/_whatever_ to drop into SQL where it is hard to version, properly test, and can apparently cause severe brain damage? Everything is a double edged sword - an implementation or a convention like using an ORM over raw SQL really doesn't matter. Depending on the situation raw SQL might be best. it might be better to use a NoSQL store. maybe an ORM is fine. Usually, from my experience, I can tell you that an ORM is better for a lot of reasons, and they have been relayed by M. I spent the time to write my own libraries to abstract vendor specific implementations and you need to create your own mappings. You can easily spawn from a certain state or use existing data structures. It took time to write my libraries and it was not easy at all to do it but it was well worth my time to do it since I can now reuse my libraries. Is it the BEST? I don't know. I like it but I certainly won't go around to arbitrary technical articles that have nothing to do about SQL and post something like "Yes this technology is good but stay away from raw SQL. " I just don't see a need to be bashing anything here, especially an ORM when the article is exclusively about JS and NodeJS

Michael

Probably one of the main points of this article, that gives Node is supposed scalability, is the offloading to a Queue or Service Bus that leads to asynchronous processing. That is a well proven architectural pattern, available in many languages, is especially used in CQRS [Command Query Responsibility Segregation] with Event Sourcing, is very well suited to be used by technologies such . Net Reactive Extensions that provide considerably greater functionality and flexibility than Node. Asynchronous programming and handling its pitfalls has been around without Node for years, if you had knowledge of enterprise development. As for the hate against ORMs. you guys crticising it seem to be moving from front-end development into an area where you have no knowledge or expertise in OO, BDD, TDD or any other proven Enterprise level methodology. No concept of integration other than Twitter feeds. No experience of complex Workflow or scalable caching. This is one of the dangers - you know JavaScript, and a bit of SQL. So everything else is superfluous - until you need it, such as the attempts to bring an element of type checking to JavaScript. Seriously, each technology has its place, but there is no one size fits all approach. Appreciate the strengths of each technology, and use them where appropriate

Michael

Probably one of the main points of this article, that gives Node is supposed scalability, is the offloading to a Queue or Service Bus that leads to asynchronous processing. That is a well proven architectural pattern, available in many languages, is especially used in CQRS [Command Query Responsibility Segregation] with Event Sourcing, is very well suited to be used by technologies such . Net Reactive Extensions that provide considerably greater functionality and flexibility than Node. Asynchronous programming and handling its pitfalls has been around without Node for years, if you had knowledge of enterprise development. As for the hate against ORMs. you guys crticising it seem to be moving from front-end development into an area where you have no knowledge or expertise in OO, BDD, TDD or any other proven Enterprise level methodology. No concept of integration other than Twitter feeds. No experience of complex Workflow or scalable caching. This is one of the dangers - you know JavaScript, and a bit of SQL. So everything else is superfluous - until you need it, such as the attempts to bring an element of type checking to JavaScript. Seriously, each technology has its place, but there is no one size fits all approach. Appreciate the strengths of each technology, and use them where appropriate

Reo

Great introduction to node. js. Thanks, i samo naprjed

Reo

Great introduction to node. js. Thanks, i samo naprjed

Richard Bellantoni

Because they suck for a complex application. Sure if your scenario where you spent all this time trying to make the ORM work the way you need it to, you could have just put that same effort into writing the SQL properly and making sure it's organized etc and you would be further along in the project and have more control over the application. ORM's are great at saving time on a small to medium scale project, but once you delve into more complex and larger applications, you're going to spend either A. ] A lot of time coding to make the ORM work the way you need it or B. ] Just decide to write the SQL yourself because the time it takes to make the tool work how you need it just isn't worth it

Richard Bellantoni

Because they suck for a complex application. Sure if your scenario where you spent all this time trying to make the ORM work the way you need it to, you could have just put that same effort into writing the SQL properly and making sure it's organized etc and you would be further along in the project and have more control over the application. ORM's are great at saving time on a small to medium scale project, but once you delve into more complex and larger applications, you're going to spend either A. ] A lot of time coding to make the ORM work the way you need it or B. ] Just decide to write the SQL yourself because the time it takes to make the tool work how you need it just isn't worth it

sinta maharani

JavaScript is better than some of the other programming languages. therefore cara menghilangkan gatal keputihan better fit with JavaScript

sinta maharani

JavaScript is better than some of the other programming languages. therefore cara menghilangkan gatal keputihan better fit with JavaScript

naseya10

Great, informative article. Thanks for sharing this. Unlockpwd

naseya10

Great, informative article. Thanks for sharing this. Unlockpwd

Eric Elliott

Pot, meet kettle. Đó có thể là những vấn đề nan giải nếu bất kỳ vấn đề nào trong số đó là sự thật. None of them are. 1. a] JavaScript is all JIT these days and delivers 1-2x native code performance [faster than any other dynamic language I'm aware of]. b] Non-blocking by default can deliver orders-of-magnitude improvements in code efficiency - transparently. 2. Hầu như tất cả các trình soạn thảo hiện đại đều hỗ trợ suy luận kiểu cho JS. ESLint, Closure Compiler, and a number of other options offer sophisticated static analysis capabilities. TypeScript even offers a nice structural type system. 3. The opposite of modular is a tightly coupled monolith. That's a bad idea in ANY language. 4. "if all you are doing is waiting for some other IO bound process" - Non-blocking by default means you're NEVER waiting for some other IO bound process. That's why Node delivers such huge improvements on resource utilization. 5. 2006 called. They want their language-snob attitude back. The days when serious engineers considered JS to be a toy are long since over. JS powers sophisticated enterprise applications at just about every fortune 500 today. Additional point. JS is the only language with fully native support for isomorphic code [meaning you reuse most of your application on both servers and clients]. You can write JS ONCE, and it will power the server, the web browser, and mobile devices including iOS and Android. See React Native. https. //leanpub. com/learn-javascript-react-nodejs-es6/

Eric Elliott

Pot, meet kettle. Đó có thể là những vấn đề nan giải nếu bất kỳ vấn đề nào trong số đó là sự thật. None of them are. 1. a] JavaScript is all JIT these days and delivers 1-2x native code performance [faster than any other dynamic language I'm aware of]. b] Non-blocking by default can deliver orders-of-magnitude improvements in code efficiency - transparently. 2. Hầu như tất cả các trình soạn thảo hiện đại đều hỗ trợ suy luận kiểu cho JS. ESLint, Closure Compiler, and a number of other options offer sophisticated static analysis capabilities. TypeScript even offers a nice structural type system. 3. The opposite of modular is a tightly coupled monolith. That's a bad idea in ANY language. 4. "if all you are doing is waiting for some other IO bound process" - Non-blocking by default means you're NEVER waiting for some other IO bound process. That's why Node delivers such huge improvements on resource utilization. 5. 2006 called. They want their language-snob attitude back. The days when serious engineers considered JS to be a toy are long since over. JS powers sophisticated enterprise applications at just about every fortune 500 today. Additional point. JS is the only language with fully native support for isomorphic code [meaning you reuse most of your application on both servers and clients]. You can write JS ONCE, and it will power the server, the web browser, and mobile devices including iOS and Android. See React Native. https. //leanpub. com/learn-javascript-react-nodejs-es6/

M

1] 1-2x native code performance? Do the electrons run faster on node code? Not a good start. 2] Type inference is mapping variable declarations to types without explicit syntax, i. e. , a] it requires actual types, and b] compilers enforce type safety, not editors. And you can dress it up any way you want, but there is no way to enforce sophisticated state analysis with slop-tastic dictionaries of whatever stored in strings & functional delegates. Also, Typescript is not Javascript, it is Javascript with a half-assed type system pasted on top. Even Google is abandoning Js for Typescript in Angular 2. 0 Why? Because Google has decided that an untyped system is insufficient for serious work. But is that type system anywhere near as sophisticated as a compiled language? Nope, not even close. 3] You are misunderstanding what I was characterizing as "modular design". The alternative is not monolithic code, but encapsulation, specialization via inheritance [or prototyping], polymorphism, and externalizing dependencies via IoC. The alternative is SOLID, i. e. , modern Object Orientation. 4] Your process may not be waiting, but your customers are waiting for the callback. My point is that being able to serve more requests doesn't do you any good if every served request then has to wait on yet another operation. In the end, somewhere somehow, you will eventually be going to a disk or waiting for IO, because that's where the information the customer wants lives. 5] I didn't say that JavaScript was a toy language, I said that most JavaScript developers are well-meaning, cut and paste amateurs, and they will invade the ranks of node. js developers as it becomes more popular. I'll take a strong type system over "full native support" [that's not native] for "isometric" code that can run on clients or servers [you say that like that's a good thing] any day. Wow, Js trên Android và iOS. I guess the days of Apple adding another strongly typed, native language for iOS are over Obviously you've never heard of Mono, the cross platform . Net that compiles and runs on every major OS, produces native runtimes for all three major mobile platforms, and runs on everything from beowulf clusters to wearable devices. This is why we don't respect you. You don't know or understand anything that came before, or anything outside of your javascript bubble. You don't solve any problems that weren't solved before, but yet you're convinced you have all the answers. That seems to be a common theme with anyone whose education system stressed self-esteem over critical thinking

M

1] 1-2x native code performance? Do the electrons run faster on node code? Not a good start. 2] Type inference is mapping variable declarations to types without explicit syntax, i. e. , a] it requires actual types, and b] compilers enforce type safety, not editors. And you can dress it up any way you want, but there is no way to enforce sophisticated state analysis with slop-tastic dictionaries of whatever stored in strings & functional delegates. Also, Typescript is not Javascript, it is Javascript with a half-assed type system pasted on top. Even Google is abandoning Js for Typescript in Angular 2. 0 Why? Because Google has decided that an untyped system is insufficient for serious work. But is that type system anywhere near as sophisticated as a compiled language? Nope, not even close. 3] You are misunderstanding what I was characterizing as "modular design". The alternative is not monolithic code, but encapsulation, specialization via inheritance [or prototyping], polymorphism, and externalizing dependencies via IoC. The alternative is SOLID, i. e. , modern Object Orientation. 4] Your process may not be waiting, but your customers are waiting for the callback. My point is that being able to serve more requests doesn't do you any good if every served request then has to wait on yet another operation. In the end, somewhere somehow, you will eventually be going to a disk or waiting for IO, because that's where the information the customer wants lives. 5] I didn't say that JavaScript was a toy language, I said that most JavaScript developers are well-meaning, cut and paste amateurs, and they will invade the ranks of node. js developers as it becomes more popular. I'll take a strong type system over "full native support" [that's not native] for "isometric" code that can run on clients or servers [you say that like that's a good thing] any day. Wow, Js trên Android và iOS. I guess the days of Apple adding another strongly typed, native language for iOS are over Obviously you've never heard of Mono, the cross platform . Net that compiles and runs on every major OS, produces native runtimes for all three major mobile platforms, and runs on everything from beowulf clusters to wearable devices. This is why we don't respect you. You don't know or understand anything that came before, or anything outside of your javascript bubble. You don't solve any problems that weren't solved before, but yet you're convinced you have all the answers. That seems to be a common theme with anyone whose education system stressed self-esteem over critical thinking

Eric Elliott

This reply just strikes me as willful ignorance. 1. Really? Rather than investigate and learn the truth, you just want to ridicule the answer? I'm not taking the bait. Watch Brendan Eich's Fluent talks if you're interested in actually learning something. 2. I know what types and type inference are, and I know the benefits of static types. I've been in this game since before JavaScript was invented. TypeScript is a superset of JavaScript that compiles to JS & allows for sophisticated static analysis. It's structural type system is better than the type system Java had back when I was coding in Java, and it's much better [as in more reliable and flexible] than C and C++. 3. "encapsulation, specialization via inheritance [or prototyping], polymorphism, and externalizing dependencies via IoC" - these are all forms of modularity, and JavaScript modules provide viable alternatives to all of them - and in the case of class inheritance, it's far superior. See https. //medium. com/javascript-scene/the-two-pillars-of-javascript-ee6f3281e7f3 4. "your customers are waiting for the callback. " Fortunately, that's where the performance I talked about in point 1 shines. JS provides efficient utilization of I/O resources. In fact, dealing with I/O bottlenecks is the entire reason that Node was invented. I've ported several large production projects from PHP and Ruby to Node, and seen dramatic reductions in response times, both average response times and response time ranges - and since a typical Node app utilizes a small fraction of the memory required for C# applications, your customer I/O competes less with the RAM paging you might experience with a compiled C# application. 5. "you say that like that's a good thing" I've seen objectively measurable increases in team velocity ranging from 40% - 60% improvements. Believe it or not, it's a fact, and being more able to adapt to changing needs and experiment more [particularly in the UI layer] delivers very real business value. Why do you think so many enterprise organizations are adopting Node? It's not because some dev prefers JS. It's because they ran the tests themselves and figured out it's a huge win. "Obviously you've never heard of Mono, the cross platform . Net that compiles and runs on every major OS" Yeah, I have - what I haven't heard of is Mono delivering anywhere near the value that Node delivers in enterprise production. Got a good article on that? 'Cause a quick Google search isn't turning up much. Check out this awesome result in the top 3 of the SERP. http. //www. quora. com/Why-isnt-C-with-Mono-popular-for-enterprise-applications-on-Linux-servers . but a quick Google search for Enterprise Node. js delivers quite a bit. Here are the top 3 search results I see. http. //blog. risingstack. com/node-js-is-enterprise-ready/ https. //www. joyent. com/nodejs-support https. //www. centurylinkcloud. com/blog/post/node-js-is-taking-over-the-enterprise-whether-you-like-it-or-not/ There's really no contest here

Eric Elliott

This reply just strikes me as willful ignorance. 1. Really? Rather than investigate and learn the truth, you just want to ridicule the answer? I'm not taking the bait. Watch Brendan Eich's Fluent talks if you're interested in actually learning something. 2. I know what types and type inference are, and I know the benefits of static types. I've been in this game since before JavaScript was invented. TypeScript is a superset of JavaScript that compiles to JS & allows for sophisticated static analysis. It's structural type system is better than the type system Java had back when I was coding in Java, and it's much better [as in more reliable and flexible] than C and C++. 3. "encapsulation, specialization via inheritance [or prototyping], polymorphism, and externalizing dependencies via IoC" - these are all forms of modularity, and JavaScript modules provide viable alternatives to all of them - and in the case of class inheritance, it's far superior. See https. //medium. com/javascript-scene/the-two-pillars-of-javascript-ee6f3281e7f3 4. "your customers are waiting for the callback. " Fortunately, that's where the performance I talked about in point 1 shines. JS provides efficient utilization of I/O resources. In fact, dealing with I/O bottlenecks is the entire reason that Node was invented. I've ported several large production projects from PHP and Ruby to Node, and seen dramatic reductions in response times, both average response times and response time ranges - and since a typical Node app utilizes a small fraction of the memory required for C# applications, your customer I/O competes less with the RAM paging you might experience with a compiled C# application. 5. "you say that like that's a good thing" I've seen objectively measurable increases in team velocity ranging from 40% - 60% improvements. Believe it or not, it's a fact, and being more able to adapt to changing needs and experiment more [particularly in the UI layer] delivers very real business value. Why do you think so many enterprise organizations are adopting Node? It's not because some dev prefers JS. It's because they ran the tests themselves and figured out it's a huge win. "Obviously you've never heard of Mono, the cross platform . Net that compiles and runs on every major OS" Yeah, I have - what I haven't heard of is Mono delivering anywhere near the value that Node delivers in enterprise production. Got a good article on that? 'Cause a quick Google search isn't turning up much. Check out this awesome result in the top 3 of the SERP. http. //www. quora. com/Why-isnt-C-with-Mono-popular-for-enterprise-applications-on-Linux-servers . but a quick Google search for Enterprise Node. js delivers quite a bit. Here are the top 3 search results I see. http. //blog. risingstack. com/node-js-is-enterprise-ready/ https. //www. joyent. com/nodejs-support https. //www. centurylinkcloud. com/blog/post/node-js-is-taking-over-the-enterprise-whether-you-like-it-or-not/ There's really no contest here

M

1, yes, I'm mocking your evidently accidental claim that JavaScript makes electrons run faster, or even as fast as native, because it's patent nonsense. Not only is that impossible, it ignores one of node. js' acknowledged weaknesses. It sucks on compute intensive operations, because it's single threaded, which means compute intensive operations block execution. duh. 2. Your knowledge of Java does not qualify you to understand what a competent type system is. Java's generics are a largely useless, johnny come lately me-too feature when compared against to C# generics because they suffer from run-time erasure, in other words, the generic type safety and reflection only works at compile time, because at run time, everything is cast to an object. So when you are going on about static analysis, you are effectively trying to claim it's as good as compile time + run time type reflection, which is very far from the truth. 3. Meh. Chopping up everything into discrete functions is a form of modularity too, but it's vastly inferior to SOLID, which was my point in the first place. And while prototype based inheritance is interesting, it's hardly better than real inheritance, which permits far more flexible arrangements. 4. I don't see how it's impressive to speed up a Ruby app, or refactor some craptastic PHP into something faster. Your memory overhead claims are equally baseless. I can run micro. Net on a watch or on an arduino device. tôi có thể viết. Net that runs very well on an under-powered phone. Look at the memory chrome consumes for an SPA, or try to run a complex javascript app on a tablet, and then tell me how "lightweight" JavaScript is. 5. The lack of a proper separation of concerns [which is the cause of most maintainability problems] is the number one issue I encounter at enterprise scaled customers, and an impressive team velocity is always how they got there. Why do I think a number of organizations are choosing node? Because typically a mediocre, over-sized team of moderate competence f'd up the previously shiny new thing that was supposed to solve all their problems, so they want to believe the hype that the problem is not them, but their previous technology choices

M

1, yes, I'm mocking your evidently accidental claim that JavaScript makes electrons run faster, or even as fast as native, because it's patent nonsense. Not only is that impossible, it ignores one of node. js' acknowledged weaknesses. It sucks on compute intensive operations, because it's single threaded, which means compute intensive operations block execution. duh. 2. Your knowledge of Java does not qualify you to understand what a competent type system is. Java's generics are a largely useless, johnny come lately me-too feature when compared against to C# generics because they suffer from run-time erasure, in other words, the generic type safety and reflection only works at compile time, because at run time, everything is cast to an object. So when you are going on about static analysis, you are effectively trying to claim it's as good as compile time + run time type reflection, which is very far from the truth. 3. Meh. Chopping up everything into discrete functions is a form of modularity too, but it's vastly inferior to SOLID, which was my point in the first place. And while prototype based inheritance is interesting, it's hardly better than real inheritance, which permits far more flexible arrangements. 4. I don't see how it's impressive to speed up a Ruby app, or refactor some craptastic PHP into something faster. Your memory overhead claims are equally baseless. I can run micro. Net on a watch or on an arduino device. tôi có thể viết. Net that runs very well on an under-powered phone. Look at the memory chrome consumes for an SPA, or try to run a complex javascript app on a tablet, and then tell me how "lightweight" JavaScript is. 5. The lack of a proper separation of concerns [which is the cause of most maintainability problems] is the number one issue I encounter at enterprise scaled customers, and an impressive team velocity is always how they got there. Why do I think a number of organizations are choosing node? Because typically a mediocre, over-sized team of moderate competence f'd up the previously shiny new thing that was supposed to solve all their problems, so they want to believe the hype that the problem is not them, but their previous technology choices

Eric Elliott

1. I think you misunderstood my meaning. JS runs 1-2x SLOWER than native -- much better perf than any other dynamic language I know of. It's fast enough to run AAA game engines like Unreal Engine and Unity in stunning quality at 60+ fps. 2. I actually think that a good native type tool would be a good addition to JavaScript, but only if they're user-definable structural types. That said, JavaScript does support static analysis via type inference, and there are a number of ways to provide type hints for dev tools. In addition, JavaScript also has an impressive array of runtime analysis tools. 3. "hầu như không tốt hơn thừa kế thực sự, cho phép sắp xếp linh hoạt hơn nhiều. " Wrong. https. //medium. com/javascript-scene/the-two-pillars-of-javascript-ee6f3281e7f3 4. My apologies. I was not aware of micro. Net. JavaScript also runs as-is on low-powered devices including Arduino, Tessel, and a number of others. Node works great on most of them. If that's not small enough, you can create a custom Node compile, drop features, even swap out the V8 engine for a different JS engine if you need to. You can also restrict yourself to using tiny JS libraries [of which there are many on npm] to keep your codebase compact. 5. ". they want to believe the hype that the problem is not them, but their previous technology choices. " That might explain an experiment or two, but the Node takeover is much more than that. We're rapidly replacing apps in a variety of languages with Node. Having worked at a fortune 500 during the transition to Node, I can tell you our justifications. We did experimental ports to Node, found. 1. that the app was faster and more reliable, delivering huge wins in both average response time, and the number of requests we could serve with the same machine, and 2. The developers were more productive for a variety of reasons, including the fact that JavaScript specialists could more easily work on both sides of the stack without context switching, and a lot of code could be shared in both the server and the client. Those advantages have real, measurable influences on the company's bottom line. That's why Node is taking over at both startups and enterprise companies

Eric Elliott

1. I think you misunderstood my meaning. JS runs 1-2x SLOWER than native -- much better perf than any other dynamic language I know of. It's fast enough to run AAA game engines like Unreal Engine and Unity in stunning quality at 60+ fps. 2. I actually think that a good native type tool would be a good addition to JavaScript, but only if they're user-definable structural types. That said, JavaScript does support static analysis via type inference, and there are a number of ways to provide type hints for dev tools. In addition, JavaScript also has an impressive array of runtime analysis tools. 3. "hầu như không tốt hơn thừa kế thực sự, cho phép sắp xếp linh hoạt hơn nhiều. " Wrong. https. //medium. com/javascript-scene/the-two-pillars-of-javascript-ee6f3281e7f3 4. My apologies. I was not aware of micro. Net. JavaScript also runs as-is on low-powered devices including Arduino, Tessel, and a number of others. Node works great on most of them. If that's not small enough, you can create a custom Node compile, drop features, even swap out the V8 engine for a different JS engine if you need to. You can also restrict yourself to using tiny JS libraries [of which there are many on npm] to keep your codebase compact. 5. ". they want to believe the hype that the problem is not them, but their previous technology choices. " That might explain an experiment or two, but the Node takeover is much more than that. We're rapidly replacing apps in a variety of languages with Node. Having worked at a fortune 500 during the transition to Node, I can tell you our justifications. We did experimental ports to Node, found. 1. that the app was faster and more reliable, delivering huge wins in both average response time, and the number of requests we could serve with the same machine, and 2. The developers were more productive for a variety of reasons, including the fact that JavaScript specialists could more easily work on both sides of the stack without context switching, and a lot of code could be shared in both the server and the client. Those advantages have real, measurable influences on the company's bottom line. That's why Node is taking over at both startups and enterprise companies

Kesava Velugubantla

especially with edge it is really handy

Kesava Velugubantla

especially with edge it is really handy

pawan kumar

Thanks Tamisalv I was looking for quick reference read for understanding node. js và tại sao các dự án có thể sử dụng nó. Reading this gave me a better understanding of advantages of this this technology and also when one might use it. Cheers

pawan kumar

Thanks Tamisalv I was looking for quick reference read for understanding node. js và tại sao các dự án có thể sử dụng nó. Reading this gave me a better understanding of advantages of this this technology and also when one might use it. Cheers

Jay

"After over 20 years of stateless-web based on the stateless request-response paradigm, we finally have web applications with real-time, two-way connections. " As a result we have webpages which take longer to load nowadays when we have Internet speeds in the order of megabytes per second, than back in the day when our speeds were in the order of bytes per second but our webpages were plain simple HTML. Nowadays we have webpages which load halfway and then stop, which crash at the slightest network error i. e. dynamic IP address reassigning, or a momentary lapse in the WiFi signal forcing you to reload the whole page, whereas browsers are designed to gracefully handle those errors or resume once the network connection is restored, buggy Javascript scripts don't handle errors as well

Jay

"After over 20 years of stateless-web based on the stateless request-response paradigm, we finally have web applications with real-time, two-way connections. " As a result we have webpages which take longer to load nowadays when we have Internet speeds in the order of megabytes per second, than back in the day when our speeds were in the order of bytes per second but our webpages were plain simple HTML. Nowadays we have webpages which load halfway and then stop, which crash at the slightest network error i. e. dynamic IP address reassigning, or a momentary lapse in the WiFi signal forcing you to reload the whole page, whereas browsers are designed to gracefully handle those errors or resume once the network connection is restored, buggy Javascript scripts don't handle errors as well

adroittech

I only have 1 question here with your statement. "It's structural type system is better than the type system Java had back when I was coding in Java, and it's much better [as in more reliable and flexible] than C and C++. " I can not take that. How? can you examplify? Some Facts [with obviously answer in no] - Why did Node inventor used V8 engine which was made in C++ to power node, if the js type system was so flexible and much better? - Can nodejs decode vp8 codec video by itself as efficiently as C/C++? - Could you build nodejs on top of pure javascript instead of C++? - Is there any such thing as pure javascript? You really have to understand my friend that it is a type system that can take advantage of underlying hardware and makes your program efficient at CPU and memory. Strongly typed C++ can solve any problem, even build node js. Node shines at non-blocking i/o and that is about it, it can not do anything else. Yes you can chop-off node code and make it work on micro devices but will it be efficient and make sense? Can you make product like node where you have to code in C++, yes you can but it would not make sense as power of C/C++ in not in web, its optimizations and hardware. It not like non-blocking I/O is something new, we have had that in many technologies including java, . Net, basic, python and perl, this is very old. The only reason why this thing is in limelight is it has enabled millions of frontend javascript developers, who do not understand pointers and bash about C++, to write server code, which is simply overwhelming, that's why the buzz. And about "Node in particular are actually very well suited to handle distributed computation", why on earth one would write such a statement? Node is not made for computation. it can not compute as efficiently as C/C++/Java. Period. With all due respect, lets not bring C++ in picture here, there is simply no practical comparison at all, or it will be very touchy

adroittech

I only have 1 question here with your statement. "It's structural type system is better than the type system Java had back when I was coding in Java, and it's much better [as in more reliable and flexible] than C and C++. " I can not take that. How? can you examplify? Some Facts [with obviously answer in no] - Why did Node inventor used V8 engine which was made in C++ to power node, if the js type system was so flexible and much better? - Can nodejs decode vp8 codec video by itself as efficiently as C/C++? - Could you build nodejs on top of pure javascript instead of C++? - Is there any such thing as pure javascript? You really have to understand my friend that it is a type system that can take advantage of underlying hardware and makes your program efficient at CPU and memory. Strongly typed C++ can solve any problem, even build node js. Node shines at non-blocking i/o and that is about it, it can not do anything else. Yes you can chop-off node code and make it work on micro devices but will it be efficient and make sense? Can you make product like node where you have to code in C++, yes you can but it would not make sense as power of C/C++ in not in web, its optimizations and hardware. It not like non-blocking I/O is something new, we have had that in many technologies including java, . Net, basic, python and perl, this is very old. The only reason why this thing is in limelight is it has enabled millions of frontend javascript developers, who do not understand pointers and bash about C++, to write server code, which is simply overwhelming, that's why the buzz. And about "Node in particular are actually very well suited to handle distributed computation", why on earth one would write such a statement? Node is not made for computation. it can not compute as efficiently as C/C++/Java. Period. With all due respect, lets not bring C++ in picture here, there is simply no practical comparison at all, or it will be very touchy

Eric Elliott

You may be interested in this. https. //medium. com/javascript-scene/what-is-webassembly-the-dawn-of-a-new-era-61256ec5a8f6

Eric Elliott

You may be interested in this. https. //medium. com/javascript-scene/what-is-webassembly-the-dawn-of-a-new-era-61256ec5a8f6

Ken Kopelson

Actually, Javascript in the V8 server engine is QUITE fast. The statement that Javascript is not fast is outdated. You combine Node with Chrome and you get a very fast environment. If you understand how Node works, it has an event loop that processes all code that is ready to run. So, you call a function that has a blocking database call inside and a callback when finished, it allows the the function to be called, which returns immediately allowing you to get on with other things while the database call is being processed. So you aren't "hurry-up and waiting" as you suppose. You get on with other things, and once the database call finishes, execution will continue to the callback which is invoked after the database call returns. So, you get the same basic abilities as a multi-threaded environment without all the extra overhead incurred by thread-state swapping. Because you don't get "time slicing" you have to be careful that no piece of code takes too long to run, and if it does, you just break it up using packages like "async". I come from a long C, C++, Delphi, Java background, having mastered the multi-threaded paradigm, and I can state assuredly that the Node single-threaded async paradigm is super cool, fast, and highly scalable. IF YOU KNOW WHAT YOU'RE DOING. But that's the same for any of the other technologies as well. None of these technologies are for neophytes

Ken Kopelson

Actually, Javascript in the V8 server engine is QUITE fast. The statement that Javascript is not fast is outdated. You combine Node with Chrome and you get a very fast environment. If you understand how Node works, it has an event loop that processes all code that is ready to run. So, you call a function that has a blocking database call inside and a callback when finished, it allows the the function to be called, which returns immediately allowing you to get on with other things while the database call is being processed. So you aren't "hurry-up and waiting" as you suppose. You get on with other things, and once the database call finishes, execution will continue to the callback which is invoked after the database call returns. So, you get the same basic abilities as a multi-threaded environment without all the extra overhead incurred by thread-state swapping. Because you don't get "time slicing" you have to be careful that no piece of code takes too long to run, and if it does, you just break it up using packages like "async". I come from a long C, C++, Delphi, Java background, having mastered the multi-threaded paradigm, and I can state assuredly that the Node single-threaded async paradigm is super cool, fast, and highly scalable. IF YOU KNOW WHAT YOU'RE DOING. But that's the same for any of the other technologies as well. None of these technologies are for neophytes

M

A complex application is precisely where well tailored Domain objects and properly decoupled subsystems are most necessary. If you are spending all your time trying to get the ORM to work you should either learn that ORM better or get another ORM. I would assume the former goes without saying so if you are still fighting your ORM it's time to choose one that just works

M

A complex application is precisely where well tailored Domain objects and properly decoupled subsystems are most necessary. If you are spending all your time trying to get the ORM to work you should either learn that ORM better or get another ORM. I would assume the former goes without saying so if you are still fighting your ORM it's time to choose one that just works

M

Excepting your last comment that these technologies are not for neophytes, I think you are ignoring the last two paragraphs you were responding to. Even the founder of node. js says to avoid compute intensive operations. Yes, V8 speeds up javascript, but that doesn't solve the problem of a compute intensive operation or IO dependent operations blocking a single thread. You then respond that node. js is non-blocking and therefore it can be awaited. Great, I got that, sure, but what are you waiting on? Some code that isn't written in node. js apparently, [so much for the claimed benefit of "one true language to rule them all"], because your single threaded node. js process is happily moved on to something else until the callback. So, node. js works great just as long as you can rely on other processes handling the workload that is blocking [like waiting for IO], or another instance of single threaded node. js, that will [if written "correctly"] undoubtable kick the can down the road to yet another process. And that's the issue. there are a limited subset of stuff done in programs that can be executed in parallel/out of order, and/or doesn't rely on blocking operations. Đa luồng phức tạp hơn và có một số chi phí hoạt động mỗi khi có chuyển đổi ngữ cảnh, nhưng điều đó có nghĩa là có thể ném nhiều lõi hơn vào các đơn vị công việc có thể song song hóa và thậm chí các hoạt động rời rạc có thể được xử lý bởi các luồng khác nhau. In a "node. js solves everything" world, you are either relying on something not written in node. js or waiting for your single threaded node. js application to finish up all the stuff that must be done, one way or another

M

Excepting your last comment that these technologies are not for neophytes, I think you are ignoring the last two paragraphs you were responding to. Even the founder of node. js says to avoid compute intensive operations. Yes, V8 speeds up javascript, but that doesn't solve the problem of a compute intensive operation or IO dependent operations blocking a single thread. You then respond that node. js is non-blocking and therefore it can be awaited. Great, I got that, sure, but what are you waiting on? Some code that isn't written in node. js apparently, [so much for the claimed benefit of "one true language to rule them all"], because your single threaded node. js process is happily moved on to something else until the callback. So, node. js works great just as long as you can rely on other processes handling the workload that is blocking [like waiting for IO], or another instance of single threaded node. js, that will [if written "correctly"] undoubtable kick the can down the road to yet another process. And that's the issue. there are a limited subset of stuff done in programs that can be executed in parallel/out of order, and/or doesn't rely on blocking operations. Đa luồng phức tạp hơn và có một số chi phí hoạt động mỗi khi có chuyển đổi ngữ cảnh, nhưng điều đó có nghĩa là có thể ném nhiều lõi hơn vào các đơn vị công việc có thể song song hóa và thậm chí các hoạt động rời rạc có thể được xử lý bởi các luồng khác nhau. In a "node. js solves everything" world, you are either relying on something not written in node. js or waiting for your single threaded node. js application to finish up all the stuff that must be done, one way or another

Ken Kopelson

You know what? You seem to just like spouting on about something you are clearly not qualified to speak about. You obviously have never built anything serious in Node. js. Well, I have, and I can tell you that it works great if you actually program it correctly. That means you use things like job queues, you use the clustering that Node provides, you make sure you do everything with callbacks and promises, you use "async" and "setImmediate" to properly share the processor between code that is waiting and code can now execute, you make sure UI code has priority over CPU intensive code, etc. For example, I wrote an "async" heap sort algorithm that works great, sorting massive lists while not blocking for any appreciable amount of time. I also have a 5000 line heuristic algorithm that is quite complex that I split up so that the main loops are executed using async constructs. I then have these executed from a job queue called "Kue" that allows for efficient use of all cores, no threads, great UI response time, and complex calculation jobs being executed in the background using all available processor power. This is ALL done in javascript with excellent performance in both CPU intensive tasks and response to front-end data requests. In other words mate, the UI is super responsive, and the background processing [complex heuristic calculation] performed quickly and very responsively. This is all done with a single language for both backend and front end, which is a huge deal when it comes to system architecture

Ken Kopelson

You know what? You seem to just like spouting on about something you are clearly not qualified to speak about. You obviously have never built anything serious in Node. js. Well, I have, and I can tell you that it works great if you actually program it correctly. That means you use things like job queues, you use the clustering that Node provides, you make sure you do everything with callbacks and promises, you use "async" and "setImmediate" to properly share the processor between code that is waiting and code can now execute, you make sure UI code has priority over CPU intensive code, etc. For example, I wrote an "async" heap sort algorithm that works great, sorting massive lists while not blocking for any appreciable amount of time. I also have a 5000 line heuristic algorithm that is quite complex that I split up so that the main loops are executed using async constructs. I then have these executed from a job queue called "Kue" that allows for efficient use of all cores, no threads, great UI response time, and complex calculation jobs being executed in the background using all available processor power. This is ALL done in javascript with excellent performance in both CPU intensive tasks and response to front-end data requests. In other words mate, the UI is super responsive, and the background processing [complex heuristic calculation] performed quickly and very responsively. This is all done with a single language for both backend and front end, which is a huge deal when it comes to system architecture

Jacob Ross

Why are they not for "neophytes"? Is it alcoholic?

Jacob Ross

Why are they not for "neophytes"? Is it alcoholic?

Jacob Ross

tôi đồng ý. Most times that I think an ORM is inadequate for complex queries, I write out raw SQL, later to find out the ORM has an "app for that". I like using an ORM as much as possible, but I won't spend too much time making it work for me, otherwise, as M said, I'll find another ORM

Jacob Ross

tôi đồng ý. Most times that I think an ORM is inadequate for complex queries, I write out raw SQL, later to find out the ORM has an "app for that". I like using an ORM as much as possible, but I won't spend too much time making it work for me, otherwise, as M said, I'll find another ORM

JF80

Sounds like the words from a "Michael" I know. ;] I agree with your last statement. "each technology has it place". But why do you assume all Node developers are front-end developers with no back-end knowledge? Why is it NOT possible for these developers to make a scalable solution? Like or not Node is being used in Enterprise today and will continue to be adopted

JF80

Sounds like the words from a "Michael" I know. ;] I agree with your last statement. "each technology has it place". But why do you assume all Node developers are front-end developers with no back-end knowledge? Why is it NOT possible for these developers to make a scalable solution? Like or not Node is being used in Enterprise today and will continue to be adopted

TerraT

Javascript là một lựa chọn ngôn ngữ kém để phát triển doanh nghiệp/phức hợp. It is messy, difficult to read, difficult to organise, doesn't support an entire raft of OO paradigms that save a lot of code repetition and provide readable abstraction, predominantly gives run time errors, no AOP, no by convention, no reflection, no generics/templates, no precision of scope, no rich low level processing, and it is not type safe. We are stuck with it in the browser, and frankly it is only inertia and legacy support that means it is still used there. Lẽ ra nó phải đi theo con đường của khủng long 10 năm trước. Động lực chính để tránh xa các ngôn ngữ kịch bản là chúng là cơn ác mộng bảo trì và dẫn đến các ứng dụng đầy bùn có lỗi liên tục không thể theo dõi được. Mới chỉ 10 năm ngắn ngủi kể từ khi chúng tôi thở phào nhẹ nhõm khi sự phát triển nghiêm túc không còn là ngôn ngữ kịch bản và ở đây chúng tôi đang làm lại điều đó mà không muốn học hỏi từ quá khứ, tin chắc rằng đây là "mới và tiên tiến", đúng hơn là . Nó sẽ kết thúc giống như lần trước, bị bàn tán với sự ghê tởm như asp cổ điển và perl cgi. Tôi chỉ có thể kết luận rằng các nhà phát triển ủng hộ nó bây giờ chỉ là không có mặt để chứng kiến ​​​​sự sụp đổ của lần cuối cùng này. Mọi thế hệ nhà phát triển mới đều tin chắc rằng họ đã khám phá ra "sự thật", những người trong chúng ta, những người đã chứng kiến ​​chu kỳ đau đớn này chỉ có thể ngồi lại và lắc đầu không thể tin được. Thật không may, bạn không thể dạy kinh nghiệm, đó là điều bạn phải học một cách khó khăn. Chắc chắn nếu bạn là một người nghiệp dư và không biết gì khác thì bằng mọi cách, nhưng bất kỳ ai đang cố gắng làm một công việc chuyên nghiệp cần phải để yên vấn đề này và ngừng đưa ra các lựa chọn công nghệ theo chủ nghĩa dân túy mà không xem xét kết quả. Nếu bạn không thể tự mình đánh giá những hạn chế lâu dài của một công nghệ thì bạn không nên làm việc trong lĩnh vực phát triển. Các nhà phát triển cần ngừng trẻ con như vậy, hành động như một lũ fan boy si mê, đây là một công việc nghiêm túc, không phải trò chơi

TerraT

Javascript là một lựa chọn ngôn ngữ kém để phát triển doanh nghiệp/phức hợp. It is messy, difficult to read, difficult to organise, doesn't support an entire raft of OO paradigms that save a lot of code repetition and provide readable abstraction, predominantly gives run time errors, no AOP, no by convention, no reflection, no generics/templates, no precision of scope, no rich low level processing, and it is not type safe. We are stuck with it in the browser, and frankly it is only inertia and legacy support that means it is still used there. Lẽ ra nó phải đi theo con đường của khủng long 10 năm trước. Động lực chính để tránh xa các ngôn ngữ kịch bản là chúng là cơn ác mộng bảo trì và dẫn đến các ứng dụng đầy bùn có lỗi liên tục không thể theo dõi được. Mới chỉ 10 năm ngắn ngủi kể từ khi chúng tôi thở phào nhẹ nhõm khi sự phát triển nghiêm túc không còn là ngôn ngữ kịch bản và ở đây chúng tôi đang làm lại điều đó mà không muốn học hỏi từ quá khứ, tin chắc rằng đây là "mới và tiên tiến", đúng hơn là . Nó sẽ kết thúc giống như lần trước, bị bàn tán với sự ghê tởm như asp cổ điển và perl cgi. Tôi chỉ có thể kết luận rằng các nhà phát triển ủng hộ nó bây giờ chỉ là không có mặt để chứng kiến ​​​​sự sụp đổ của lần cuối cùng này. Mọi thế hệ nhà phát triển mới đều tin chắc rằng họ đã khám phá ra "sự thật", những người trong chúng ta, những người đã chứng kiến ​​chu kỳ đau đớn này chỉ có thể ngồi lại và lắc đầu không thể tin được. Thật không may, bạn không thể dạy kinh nghiệm, đó là điều bạn phải học một cách khó khăn. Chắc chắn nếu bạn là một người nghiệp dư và không biết gì khác thì bằng mọi cách, nhưng bất kỳ ai đang cố gắng làm một công việc chuyên nghiệp cần phải để yên vấn đề này và ngừng đưa ra các lựa chọn công nghệ theo chủ nghĩa dân túy mà không xem xét kết quả. Nếu bạn không thể tự mình đánh giá những hạn chế lâu dài của một công nghệ thì bạn không nên làm việc trong lĩnh vực phát triển. Các nhà phát triển cần ngừng trẻ con như vậy, hành động như một lũ fan boy si mê, đây là một công việc nghiêm túc, không phải trò chơi

adroittech

Chúa ơi. Eric. Bạn có thật không? . NÓ Ở TRÊN PLAIN C/C++. http_parcer là thư viện C++. libuv là một thư viện C++ khác và quan trọng nhất trong xương sống của nodejs, làm cho nodejs không đồng bộ, hướng sự kiện và không chặn. Bản thân Javascript là một cơ thể không có linh hồn và sự sống. JAVASCRIPT chỉ là một kịch bản mà bạn sử dụng để viết kịch bản logic của mình. Một ngày nào đó nếu smeoene port lua với libs này, anh ấy sẽ không cần Javascript để viết mã. tương tự cho python, v.v. Nhưng thực tế cơ bản vẫn giữ nguyên. NÓ LÀ mã C++ tạo nên nodejs, không phải javascript quá nhanh. trên thực tế, javascript chậm nhất trong tất cả các ngôn ngữ kịch bản. Vì vậy, đừng tự tâng bốc bản thân khi tin rằng chỉ có java-script là tuyệt vời còn những thứ khác thì tệ hại. Và đừng xúc phạm C/C++ nếu bạn không có kiến ​​thức về nó. Vì vậy, một lần nữa, tôi mong bạn rút lại lời nói của mình. "Hệ thống kiểu Javascript tốt hơn C++". [Javascript không có hệ thống kiểu. và nếu bạn vẫn tin rằng nó có, thì bạn đang ở trong một lĩnh vực rất sai lầm, hãy xây dựng một số giàn giáo] Ngoài ra, các công ty này không chọn nodejs vì lý do bạn đã đề cập. Điều này có thể ở hầu hết các ngôn ngữ. Lý do tại sao các công ty chọn nodejs là vì họ có sẵn các lập trình viên javascript, hàng triệu và không thể làm mã c ++/java, để làm phía máy chủ vì nó rẻ hơn. Một lý do khác -> hệ sinh thái của nó. Một lý do khác -> Việc tiến hành kiểm tra tải trong nodejs dễ dàng hơn nhiều so với các tập lệnh khác. Liên kết bạn đã đề cập là công việc dự định sẽ được bắt đầu. Tại sao bạn không đề nghị họ viết trình biên dịch hợp ngữ web này trong nodejs chứ không phải c/C++/assembly vì theo bạn điều đó tốt hơn. Thôi nào anh bạn, làm sao bạn có thể so sánh Nodejs [Công nghệ] với C++ [ngôn ngữ], chúng không cùng đẳng cấp. C++ làm cho nút có thể, không phải ngược lại

adroittech

Chúa ơi. Eric. Bạn có thật không? . NÓ Ở TRÊN PLAIN C/C++. http_parcer là thư viện C++. libuv là một thư viện C++ khác và quan trọng nhất trong xương sống của nodejs, làm cho nodejs không đồng bộ, hướng sự kiện và không chặn. Bản thân Javascript là một cơ thể không có linh hồn và sự sống. JAVASCRIPT chỉ là một kịch bản mà bạn sử dụng để viết kịch bản logic của mình. Một ngày nào đó nếu smeoene port lua với libs này, anh ấy sẽ không cần Javascript để viết mã. tương tự cho python, v.v. Nhưng thực tế cơ bản vẫn giữ nguyên. NÓ LÀ mã C++ tạo nên nodejs, không phải javascript quá nhanh. trên thực tế, javascript chậm nhất trong tất cả các ngôn ngữ kịch bản. Vì vậy, đừng tự tâng bốc bản thân khi tin rằng chỉ có java-script là tuyệt vời còn những thứ khác thì tệ hại. Và đừng xúc phạm C/C++ nếu bạn không có kiến ​​thức về nó. Vì vậy, một lần nữa, tôi mong bạn rút lại lời nói của mình. "Hệ thống kiểu Javascript tốt hơn C++". [Javascript không có hệ thống kiểu. và nếu bạn vẫn tin rằng nó có, thì bạn đang ở trong một lĩnh vực rất sai lầm, hãy xây dựng một số giàn giáo] Ngoài ra, các công ty này không chọn nodejs vì lý do bạn đã đề cập. Điều này có thể ở hầu hết các ngôn ngữ. Lý do tại sao các công ty chọn nodejs là vì họ có sẵn các lập trình viên javascript, hàng triệu và không thể làm mã c ++/java, để làm phía máy chủ vì nó rẻ hơn. Một lý do khác -> hệ sinh thái của nó. Một lý do khác -> Việc tiến hành kiểm tra tải trong nodejs dễ dàng hơn nhiều so với các tập lệnh khác. Liên kết bạn đã đề cập là công việc dự định sẽ được bắt đầu. Tại sao bạn không đề nghị họ viết trình biên dịch hợp ngữ web này trong nodejs chứ không phải c/C++/assembly vì theo bạn điều đó tốt hơn. Thôi nào anh bạn, làm sao bạn có thể so sánh Nodejs [Công nghệ] với C++ [ngôn ngữ], chúng không cùng đẳng cấp. C++ làm cho nút có thể, không phải ngược lại

oberona

"Động lực chính để tránh xa các ngôn ngữ kịch bản là chúng là cơn ác mộng bảo trì và dẫn đến các ứng dụng đầy bùn" - bạn có thể làm rõ ý của mình bằng ngôn ngữ kịch bản không và "các nhà phát triển nghiêm túc" đã chuyển sang ngôn ngữ thay thế nào trong hơn mười năm qua . Ngược lại, Python là ngôn ngữ chính xác của tôi vì khả năng bảo trì của nó. Những lời chỉ trích của bạn về js là đúng, nhưng tôi không thể thấy cách chúng áp dụng trên toàn bộ vũ trụ ngôn ngữ kịch bản

oberona

"Động lực chính để tránh xa các ngôn ngữ kịch bản là chúng là cơn ác mộng bảo trì và dẫn đến các ứng dụng đầy bùn" - bạn có thể làm rõ ý của mình bằng ngôn ngữ kịch bản không và "các nhà phát triển nghiêm túc" đã chuyển sang ngôn ngữ thay thế nào trong hơn mười năm qua . Ngược lại, Python là ngôn ngữ chính xác của tôi vì khả năng bảo trì của nó. Những lời chỉ trích của bạn về js là đúng, nhưng tôi không thể thấy cách chúng áp dụng trên toàn bộ vũ trụ ngôn ngữ kịch bản

TerraT

Well I define scripting languages as runtime compilation languages, but there is a lot of overlap these days. I prefer the reassurance of compile time verification of at least coding accuracy but that is not the only factor. The depth of invasion into the inner workings of the compiler that tend to be exposed by compiled languages these days allow for a whole range of design constructs and patterns that allow programming to be more "intelligent", I just don't find this level of sophistication in the scripting languages I have used. It is a severe limitation for serious enterprise development. ORMs are an ugly approach to data access on relational databases, but you would probably have to be a database developer to realise why. Data design and Program design have different constraints, ORMs do either an injustice or have to be modified so much that they provide no productivity. There are many issues such as security, isolation, atomic operations that ORMs break, and remember a database is a living system and may require changes in between code releases as a matter of course. ORMs are a blunt tool if you want real performance from your database and want high concurrency without locking. Its a detailed subject I could probably write a book on it, so sorry if this isn't conclusive enough for you. Can't say much about Python other than I have heard good things in general. I'm the other end of the market on . Net, I crucify the open source guys next door in productivity and my defect level is about 1% of theirs. I think you need a large system before it makes significant differences, as you need to invest in framework and substrate to get the main benefits back, its "mass coding" that is the enemy here. When you have over a 100,000 code files you need a higher level of maintainability as it is simply beyond human capability to do it file by file [and certainly beyond maintenance budgets]. By making core services that consume code as content you can achieve a high level of quality while keeping everything granular and ensuring release are small and targeted rather than entire system drops. Each to their own, but if you are an IT pro you must have seen the millions of script based systems festering away in businesses because no one can find anything or understand how it works. It's such a common complaint I should think it doesn't need justifying

TerraT

Well I define scripting languages as runtime compilation languages, but there is a lot of overlap these days. I prefer the reassurance of compile time verification of at least coding accuracy but that is not the only factor. The depth of invasion into the inner workings of the compiler that tend to be exposed by compiled languages these days allow for a whole range of design constructs and patterns that allow programming to be more "intelligent", I just don't find this level of sophistication in the scripting languages I have used. It is a severe limitation for serious enterprise development. ORMs are an ugly approach to data access on relational databases, but you would probably have to be a database developer to realise why. Data design and Program design have different constraints, ORMs do either an injustice or have to be modified so much that they provide no productivity. There are many issues such as security, isolation, atomic operations that ORMs break, and remember a database is a living system and may require changes in between code releases as a matter of course. ORMs are a blunt tool if you want real performance from your database and want high concurrency without locking. Its a detailed subject I could probably write a book on it, so sorry if this isn't conclusive enough for you. Can't say much about Python other than I have heard good things in general. I'm the other end of the market on . Net, I crucify the open source guys next door in productivity and my defect level is about 1% of theirs. I think you need a large system before it makes significant differences, as you need to invest in framework and substrate to get the main benefits back, its "mass coding" that is the enemy here. When you have over a 100,000 code files you need a higher level of maintainability as it is simply beyond human capability to do it file by file [and certainly beyond maintenance budgets]. By making core services that consume code as content you can achieve a high level of quality while keeping everything granular and ensuring release are small and targeted rather than entire system drops. Each to their own, but if you are an IT pro you must have seen the millions of script based systems festering away in businesses because no one can find anything or understand how it works. It's such a common complaint I should think it doesn't need justifying

TerraT

P. S. I think "serious developers" have migrated to either Java, C# or back to C++ [along with their associated web techs etc]. I wasn't really intending to be derogatory but these three probably account for 90% of all commercial development atm. C# wins out on the commercial front for me solely on Microsoft's considerable ongoing investment and new found modernist approach. C++ is not very productive and Java is really starting to look a little dated. Still I work in all three and they get the job done, each have their place

TerraT

P. S. I think "serious developers" have migrated to either Java, C# or back to C++ [along with their associated web techs etc]. I wasn't really intending to be derogatory but these three probably account for 90% of all commercial development atm. C# wins out on the commercial front for me solely on Microsoft's considerable ongoing investment and new found modernist approach. C++ is not very productive and Java is really starting to look a little dated. Still I work in all three and they get the job done, each have their place

TerraT

P. P. S. "Python is my go-to language precisely for its maintainability". What do you consider maintainability? It is often not what people think it is [or is not as simple as they think]. It encompasses the cost of change and that is the primary cost on the business for a living project. Example. I have a service with 1000 public methods and the business asks me to de-prioritise all calls that take over 2 seconds. If I have to modify any of the code in those 1000 calls then my code has seriously poor maintainability. What I should be making is one code change in my service substrate pipeline. I should not even be modifying the substrate I should be probably writing a statistics module and a de-prioritise module for that substrate loaded in a separate dll that can be loaded dynamically. Now my testing is isolated to just this dll [reverse harness testing] and when ready for release I can add this dll and maybe make one small config change, that's it, no regression testing and no risk to existing code, so no production bugs in the service methods. So many typical code bases would require all 1000 methods to be altered or at least marked for an AOP operation. Enterprise design requires upfront anticipation of future "crazy" business requests. I find with most scripting languages and even with Java that finding insertion angles later on is nearly impossible. Even if I have a complete mare in C# I can emit the code directly into the methods using reflection, I have never seen this level of access on a scripting language and even if it was there it would be dangerous code to emit into runtime compiled operations [because I am literally changing the operations content so I would need to test the result of each]. This is just one example I could probably come up with 100s. I'm a technical architect [framework and substrate] so it is my place to "save" my devs from backing themselves into a corner. If I do a good job I can reduce the coding and testing effort to 1% of a "mass coded" system. There is a whole other level of development that most devs will never see or appreciate, this means they are never equipped to make the most appropriate technology choices

TerraT

P. P. S. "Python is my go-to language precisely for its maintainability". What do you consider maintainability? It is often not what people think it is [or is not as simple as they think]. It encompasses the cost of change and that is the primary cost on the business for a living project. Example. I have a service with 1000 public methods and the business asks me to de-prioritise all calls that take over 2 seconds. If I have to modify any of the code in those 1000 calls then my code has seriously poor maintainability. What I should be making is one code change in my service substrate pipeline. I should not even be modifying the substrate I should be probably writing a statistics module and a de-prioritise module for that substrate loaded in a separate dll that can be loaded dynamically. Now my testing is isolated to just this dll [reverse harness testing] and when ready for release I can add this dll and maybe make one small config change, that's it, no regression testing and no risk to existing code, so no production bugs in the service methods. So many typical code bases would require all 1000 methods to be altered or at least marked for an AOP operation. Enterprise design requires upfront anticipation of future "crazy" business requests. I find with most scripting languages and even with Java that finding insertion angles later on is nearly impossible. Even if I have a complete mare in C# I can emit the code directly into the methods using reflection, I have never seen this level of access on a scripting language and even if it was there it would be dangerous code to emit into runtime compiled operations [because I am literally changing the operations content so I would need to test the result of each]. This is just one example I could probably come up with 100s. I'm a technical architect [framework and substrate] so it is my place to "save" my devs from backing themselves into a corner. If I do a good job I can reduce the coding and testing effort to 1% of a "mass coded" system. There is a whole other level of development that most devs will never see or appreciate, this means they are never equipped to make the most appropriate technology choices

Josh Morgan

Interesting article, I've got quite a bit of experience in other realms but I'm somewhat new to Node. js. There's a few things I'd like to clear up. Flash cũng luôn không đồng bộ, nó chỉ mô phỏng các luồng giống như âm thanh giống như nút thực hiện bằng cách sử dụng hàng đợi sự kiện. However, I believe it is technical ignorance to claim that trusting thread management to a 3rd or 4th generation language would be better than trusting a well-tuned JRE or operating system optimized for it's multi-core chipset. How exactly do you think threads work in the lower levels anyway? It isn't some "magic", the only way to get true simultaneous code execution is via multiple processors, something you simply can't accomplish with a single thread. It's also a mistake to say that a new "event" does not add memory or clock cycles taken to a stack just because said events are managed by an interpreted scripting language rather than optimized, compiled C++. I'd bet my lunch that a well-written multi-threaded web application written in C or C++ will blow away any node. js app performance-wise, and that's even without getting into servers and their current multi-core processor architecture. If you've got a quad or 8-core server running a single node thread. you're only firing on one piston [quite ironic that Google calls their engine "V8" when considering such a fact]. Another thing to realize is that while Flash [or even Java applets] ran in their own runtimes, so does node -- it's just hidden to the user. That is nothing more than "good" [perhaps hostile?] business moves on Google's part. Lets be honest here, if all browsers came with Flash automatically installed on them, and Apple actually supported Flash on their mobile devices, node probably wouldn't even exist today. I have other concerns about security. Nó có loại bảo vệ nào chống lại kịch bản chéo trang và các cuộc tấn công khác? . ]. Không có cảnh báo nào về bảo mật hoặc loại kết nối mà cửa sổ trình duyệt của tôi đang mở ra, chỉ phù hợp với hoạt động kinh doanh P2P của nó. phe hacker của tôi có thể có một ngày thực sự hay với những loại "tính năng" đó. Tôi nghi ngờ những thứ đó đã được thử nghiệm nhiều, điều đó có nghĩa là có rất nhiều chỗ cho lỗi và ở đâu có nhiều chỗ cho lỗi thì cũng có rất nhiều chỗ cho lỗ hổng. Nhưng này, ít nhất toàn bộ ngăn xếp của bạn đều ở cùng một ngôn ngữ. Có nghĩa là bạn có thể thuê những nhà phát triển ít kinh nghiệm hơn với số tiền ít hơn, phải không?

Josh Morgan

Interesting article, I've got quite a bit of experience in other realms but I'm somewhat new to Node. js. There's a few things I'd like to clear up. Flash cũng luôn không đồng bộ, nó chỉ mô phỏng các luồng giống như âm thanh giống như nút thực hiện bằng cách sử dụng hàng đợi sự kiện. However, I believe it is technical ignorance to claim that trusting thread management to a 3rd or 4th generation language would be better than trusting a well-tuned JRE or operating system optimized for it's multi-core chipset. How exactly do you think threads work in the lower levels anyway? It isn't some "magic", the only way to get true simultaneous code execution is via multiple processors, something you simply can't accomplish with a single thread. It's also a mistake to say that a new "event" does not add memory or clock cycles taken to a stack just because said events are managed by an interpreted scripting language rather than optimized, compiled C++. I'd bet my lunch that a well-written multi-threaded web application written in C or C++ will blow away any node. js app performance-wise, and that's even without getting into servers and their current multi-core processor architecture. If you've got a quad or 8-core server running a single node thread. you're only firing on one piston [quite ironic that Google calls their engine "V8" when considering such a fact]. Another thing to realize is that while Flash [or even Java applets] ran in their own runtimes, so does node -- it's just hidden to the user. That is nothing more than "good" [perhaps hostile?] business moves on Google's part. Lets be honest here, if all browsers came with Flash automatically installed on them, and Apple actually supported Flash on their mobile devices, node probably wouldn't even exist today. I have other concerns about security. Nó có loại bảo vệ nào chống lại kịch bản chéo trang và các cuộc tấn công khác? . ]. Không có cảnh báo nào về bảo mật hoặc loại kết nối mà cửa sổ trình duyệt của tôi đang mở ra, chỉ phù hợp với hoạt động kinh doanh P2P của nó. phe hacker của tôi có thể có một ngày thực sự hay với những loại "tính năng" đó. Tôi nghi ngờ những thứ đó đã được thử nghiệm nhiều, điều đó có nghĩa là có rất nhiều chỗ cho lỗi và ở đâu có nhiều chỗ cho lỗi thì cũng có rất nhiều chỗ cho lỗ hổng. Nhưng này, ít nhất toàn bộ ngăn xếp của bạn đều ở cùng một ngôn ngữ. Có nghĩa là bạn có thể thuê những nhà phát triển ít kinh nghiệm hơn với số tiền ít hơn, phải không?

iwebworld

Bài viết hay về Node JS, bạn có thể học Node JS trực tuyến tại http. //iwebworld. thông tin hoặc gửi email iwebworldinfo@gmail. com

iwebworld

Bài viết hay về Node JS, bạn có thể học Node JS trực tuyến tại http. //iwebworld. thông tin hoặc gửi email iwebworldinfo@gmail. com

Avinash Shah

Bạn có thể loại bỏ tất cả các cạm bẫy của JS bằng cách sử dụng siêu bộ của nó hay còn gọi là TypeScript

Avinash Shah

Bạn có thể loại bỏ tất cả các cạm bẫy của JS bằng cách sử dụng siêu bộ của nó hay còn gọi là TypeScript

đi trốn

Tl;dr Sử dụng nút để xử lý nặng IO và ủy quyền xử lý chuyên sâu CPU cho một cụm nút công nhân chuyên dụng [cơ sở dữ liệu cũ, xử lý phương tiện, v.v.]. Đây không hẳn là thông tin mới. Tôi đã đề cập lại chủ đề này vào năm '12. http. //lập trình viên. giao dịch cổ phiếu. com/a/179499/1256 Lý tưởng nhất là các máy chủ HTTP và API hầu như không trạng thái [không bao gồm quản lý phiên] và dùng một lần. Chúng chỉ là một đường dẫn chức năng chuyển dữ liệu thô thành các biểu diễn tiêu hao. Bằng cách đó, các máy chủ dễ dàng cung cấp/hủy một cách linh hoạt để đáp ứng tính chất đột biến của nhu cầu. Tôi không chắc tại sao rất nhiều người bình luận lại tranh cãi kịch liệt ủng hộ kiến ​​trúc máy chủ đa mục đích có thể mở rộng theo chiều dọc. Về bản chất, tỷ lệ dọc sẽ luôn có giới hạn trên được xác định bởi dung lượng phần cứng. Bất kể mã hiệu quả như thế nào. Viết lên tường. Bạn có thể chi một số tiền lớn cho phần cứng và mất ngủ khi đặt câu hỏi về tính hợp lệ của đánh giá rủi ro [hay còn gọi là WAG] của bạn. Vào cuối ngày, kim loại trần là một tài sản cố định. Trường hợp tốt nhất, nó đáp ứng nhu cầu dự kiến ​​và biện minh cho chi phí. Trường hợp xấu nhất, nó có giá cao hơn giá trị của nó hoặc thiếu khả năng đáp ứng nhu cầu. Ngoài ra, bạn có thể sử dụng điện toán phân tán và tự động hóa cơ sở hạ tầng để phát triển/thu hẹp tương ứng với nhu cầu. Đối với những người đang chiến đấu trong các cuộc chiến tôn giáo về ngôn ngữ nào là tốt nhất, nút. C#. java. Ai quan tâm. Cả 3 đều cho phép lập trình 'kiểu chức năng'. Cả 3, hỗ trợ xử lý không đồng bộ [nguyên bản hoặc thông qua tiện ích mở rộng]. Tất cả 3 có thể được quản lý thông qua cung cấp. Cả 3 đều hoàn toàn hợp lệ để xây dựng cơ sở hạ tầng phân phối. Việc chọn sử dụng công cụ nào phụ thuộc vào chất lượng của các công cụ, liệu công cụ đó có được sử dụng để mở rộng cơ sở hạ tầng hiện có hay không và nhận thức của khách hàng. Xây dựng bất cứ thứ gì bạn giỏi xây dựng. Nếu bạn thực sự giỏi; . BTW, cảm ơn tác giả. Thật tuyệt khi thấy ai đó viết một bài viết toàn diện [và chủ yếu là khách quan] về chủ đề này

đi trốn

Tl;dr Sử dụng nút để xử lý nặng IO và ủy quyền xử lý chuyên sâu CPU cho một cụm nút công nhân chuyên dụng [cơ sở dữ liệu cũ, xử lý phương tiện, v.v.]. Đây không hẳn là thông tin mới. Tôi đã đề cập lại chủ đề này vào năm '12. http. //lập trình viên. giao dịch cổ phiếu. com/a/179499/1256 Lý tưởng nhất là các máy chủ HTTP và API hầu như không trạng thái [không bao gồm quản lý phiên] và dùng một lần. Chúng chỉ là một đường dẫn chức năng chuyển dữ liệu thô thành các biểu diễn tiêu hao. Bằng cách đó, các máy chủ dễ dàng cung cấp/hủy một cách linh hoạt để đáp ứng tính chất đột biến của nhu cầu. Tôi không chắc tại sao rất nhiều người bình luận lại tranh cãi kịch liệt ủng hộ kiến ​​trúc máy chủ đa mục đích có thể mở rộng theo chiều dọc. Về bản chất, tỷ lệ dọc sẽ luôn có giới hạn trên được xác định bởi dung lượng phần cứng. Bất kể mã hiệu quả như thế nào. Viết lên tường. Bạn có thể chi một số tiền lớn cho phần cứng và mất ngủ khi đặt câu hỏi về tính hợp lệ của đánh giá rủi ro [hay còn gọi là WAG] của bạn. Vào cuối ngày, kim loại trần là một tài sản cố định. Trường hợp tốt nhất, nó đáp ứng nhu cầu dự kiến ​​và biện minh cho chi phí. Trường hợp xấu nhất, nó có giá cao hơn giá trị của nó hoặc thiếu khả năng đáp ứng nhu cầu. Ngoài ra, bạn có thể sử dụng điện toán phân tán và tự động hóa cơ sở hạ tầng để phát triển/thu hẹp tương ứng với nhu cầu. Đối với những người đang chiến đấu trong các cuộc chiến tôn giáo về ngôn ngữ nào là tốt nhất, nút. C#. java. Ai quan tâm. Cả 3 đều cho phép lập trình 'kiểu chức năng'. Cả 3, hỗ trợ xử lý không đồng bộ [nguyên bản hoặc thông qua tiện ích mở rộng]. Tất cả 3 có thể được quản lý thông qua cung cấp. Cả 3 đều hoàn toàn hợp lệ để xây dựng cơ sở hạ tầng phân phối. Việc chọn sử dụng công cụ nào phụ thuộc vào chất lượng của các công cụ, liệu công cụ đó có được sử dụng để mở rộng cơ sở hạ tầng hiện có hay không và nhận thức của khách hàng. Xây dựng bất cứ thứ gì bạn giỏi xây dựng. Nếu bạn thực sự giỏi; . BTW, cảm ơn tác giả. Thật tuyệt khi thấy ai đó viết một bài viết toàn diện [và chủ yếu là khách quan] về chủ đề này

đi trốn

Có, cả hai ngôn ngữ đều hỗ trợ mở rộng theo chiều ngang với cơ sở hạ tầng quản lý tin nhắn không đồng bộ. CQRS không là gì ngoài một mẫu triển khai API. CRUD là trường hợp sử dụng điển hình [đúng như vậy] nhưng Node không tự động giàn giáo 1. 1 ánh xạ giữa DB và CRUD [xem Rails/laravel/Django để biết điều đó]. Nút hoàn toàn không phải là một khung, nó chỉ là một máy chủ HTTP. Bạn có thể tận dụng các khung [ví dụ Express] để làm cho cuộc sống dễ dàng hơn bằng cách cung cấp các giá trị mặc định lành mạnh và cấu trúc tốt hơn nhưng bạn vẫn phải chỉ định các tuyến API của mình theo cách thủ công. . Tiện ích mở rộng phản ứng ròng đã được chuyển sang JS. https. //www. npmjs. com/package/rx Trên thực tế, ngay cả LINQ cũng đã được chuyển sang JS [vâng, nghiêm túc đấy]. http. //linqjs. mật mã. com/ "Bất kỳ ứng dụng nào có thể được viết bằng Javascript, sẽ được viết bằng Javascript" - Định luật Atwood ORM chỉ là một vấn đề vì chúng yêu cầu thêm một lớp trừu tượng từ dữ liệu cơ bản. Nếu [đọc khi nào] các mô hình dữ liệu cần thay đổi để thích ứng với nhu cầu kinh doanh, cả ORM và lược đồ cơ sở dữ liệu sẽ cần được cập nhật và kiểm tra để phản ánh các thay đổi. Đó thực sự không phải là vấn đề lớn nếu có một chiến lược cập nhật tốt. Đối với phần còn lại của nhận xét của bạn, bạn sẽ làm tốt nếu thỉnh thoảng bước ra khỏi vùng an toàn của mình để xem cách phát triển JS thực sự hoạt động. 1. Các lớp JS hiện được hỗ trợ thông qua ES6 [đồng thời, phía máy khách có sẵn thông qua polyfill]. Các nguyên mẫu thực sự không khác nhiều so với các lớp về mặt đóng gói [ngoại trừ chúng linh hoạt hơn rất nhiều]. Kiểm tra kiểu tĩnh thời gian biên dịch thậm chí còn được hỗ trợ thông qua TypeScript/Dart nếu đó là thứ làm nổi thuyền của bạn, thì đó không phải là mặc định. 2. TDD/BDD không phải là một tính năng dành riêng cho các ngôn ngữ được gõ tĩnh. Có rất nhiều khung thử nghiệm tuyệt vời có sẵn trong JS [cả phía máy chủ/phía máy khách]. Chọn sở thích của bạn, thử nghiệm đơn vị [Mocha], thử nghiệm đơn vị theo hành vi [Chai], thử nghiệm api [SuperTest] và thử nghiệm tích hợp liên tục [TravisCI và nhiều thử nghiệm khác] đều được sử dụng rộng rãi trong cộng đồng. JSUnit [JS tương đương với JUnit/NUnit] thậm chí có sẵn nếu bạn bỏ lỡ kiểm tra đơn vị trong Java/. BỌC LƯỚI. Nếu bất cứ điều gì, thử nghiệm là một yêu cầu cơ bản của bất kỳ ứng dụng JS không tầm thường nào được đưa vào sản xuất vì bạn không có trình kiểm tra loại thời gian biên dịch để nắm trong tay. 3. Quy trình làm việc phức tạp? . Thực thi kiểu, linting, tạo tài liệu, giàn giáo, triển khai bằng một cú nhấp chuột, dịch ngôn ngữ, gói, xây dựng phân phối, quản lý gói/phụ thuộc, quản lý phát hành, v.v. 4. . co rúm lại. nếu bạn chỉ dựa vào hệ thống kiểm tra kiểu tĩnh thời gian biên dịch để xác thực đầu vào của người dùng, thì bạn đang làm sai. Xây dựng một lớp dữ liệu bằng bất kỳ ngôn ngữ nào đều yêu cầu các ràng buộc ở trên và ngoài những gì mà các loại mặc định cung cấp. Vì vậy, dù bằng cách nào, bạn sẽ phải mở rộng các mô hình dữ liệu của mình bằng các kiểm tra xác thực tùy chỉnh. Phần thú vị về việc xử lý xác thực trong JS là bạn có thể sử dụng cùng một quy trình để kiểm tra đầu vào của người dùng trên cả phía máy khách/máy chủ. Ít trùng lặp nỗ lực hơn FTW. Trái ngược với những gì bạn nghĩ. Javascript thực sự là cách tiếp cận 'một kích thước phù hợp với tất cả' nếu bạn thích sử dụng nó như vậy. Nghiêm túc mà nói, bạn thậm chí có thể biên dịch C/C++ trực tiếp sang javascript bằng asm. js. Điều đó có nghĩa là bạn phải sử dụng nó? . Bất kỳ nhà phát triển nào có một chút ý thức sẽ không có lỗi với bạn khi chọn C #, đó là một ngôn ngữ tuyệt vời. Tôi có kinh nghiệm viết mã bằng nhiều ngôn ngữ, bao gồm xây dựng các ứng dụng máy tính để bàn không tầm thường bằng C#. Được lựa chọn, tôi muốn sử dụng Javascript hơn. Sự pha trộn của các ràng buộc lỏng lẻo hơn và các phong cách chức năng/mệnh lệnh/nguyên mẫu cho phép mức độ sáng tạo mà tôi chưa từng trải nghiệm trong bất kỳ ngôn ngữ nào khác. Các công cụ tuyệt vời, hệ thống mô-đun tuyệt vời và bản thân ngôn ngữ đang trở nên tốt hơn đáng kể với mỗi bản cập nhật

đi trốn

Có, cả hai ngôn ngữ đều hỗ trợ mở rộng theo chiều ngang với cơ sở hạ tầng quản lý tin nhắn không đồng bộ. CQRS không là gì ngoài một mẫu triển khai API. CRUD là trường hợp sử dụng điển hình [đúng như vậy] nhưng Node không tự động giàn giáo 1. 1 ánh xạ giữa DB và CRUD [xem Rails/laravel/Django để biết điều đó]. Nút hoàn toàn không phải là một khung, nó chỉ là một máy chủ HTTP. Bạn có thể tận dụng các khung [ví dụ Express] để làm cho cuộc sống dễ dàng hơn bằng cách cung cấp các giá trị mặc định lành mạnh và cấu trúc tốt hơn nhưng bạn vẫn phải chỉ định các tuyến API của mình theo cách thủ công. . Tiện ích mở rộng phản ứng ròng đã được chuyển sang JS. https. //www. npmjs. com/package/rx Trên thực tế, ngay cả LINQ cũng đã được chuyển sang JS [vâng, nghiêm túc đấy]. http. //linqjs. mật mã. com/ "Bất kỳ ứng dụng nào có thể được viết bằng Javascript, sẽ được viết bằng Javascript" - Định luật Atwood ORM chỉ là một vấn đề vì chúng yêu cầu thêm một lớp trừu tượng từ dữ liệu cơ bản. Nếu [đọc khi nào] các mô hình dữ liệu cần thay đổi để thích ứng với nhu cầu kinh doanh, cả ORM và lược đồ cơ sở dữ liệu sẽ cần được cập nhật và kiểm tra để phản ánh các thay đổi. Đó thực sự không phải là vấn đề lớn nếu có một chiến lược cập nhật tốt. Đối với phần còn lại của nhận xét của bạn, bạn sẽ làm tốt nếu thỉnh thoảng bước ra khỏi vùng an toàn của mình để xem cách phát triển JS thực sự hoạt động. 1. Các lớp JS hiện được hỗ trợ thông qua ES6 [đồng thời, phía máy khách có sẵn thông qua polyfill]. Các nguyên mẫu thực sự không khác nhiều so với các lớp về mặt đóng gói [ngoại trừ chúng linh hoạt hơn rất nhiều]. Kiểm tra kiểu tĩnh thời gian biên dịch thậm chí còn được hỗ trợ thông qua TypeScript/Dart nếu đó là thứ làm nổi thuyền của bạn, thì đó không phải là mặc định. 2. TDD/BDD không phải là một tính năng dành riêng cho các ngôn ngữ được gõ tĩnh. Có rất nhiều khung thử nghiệm tuyệt vời có sẵn trong JS [cả phía máy chủ/phía máy khách]. Chọn sở thích của bạn, thử nghiệm đơn vị [Mocha], thử nghiệm đơn vị theo hành vi [Chai], thử nghiệm api [SuperTest] và thử nghiệm tích hợp liên tục [TravisCI và nhiều thử nghiệm khác] đều được sử dụng rộng rãi trong cộng đồng. JSUnit [JS tương đương với JUnit/NUnit] thậm chí có sẵn nếu bạn bỏ lỡ kiểm tra đơn vị trong Java/. BỌC LƯỚI. Nếu bất cứ điều gì, thử nghiệm là một yêu cầu cơ bản của bất kỳ ứng dụng JS không tầm thường nào được đưa vào sản xuất vì bạn không có trình kiểm tra loại thời gian biên dịch để nắm trong tay. 3. Quy trình làm việc phức tạp? . Thực thi kiểu, linting, tạo tài liệu, giàn giáo, triển khai bằng một cú nhấp chuột, dịch ngôn ngữ, gói, xây dựng phân phối, quản lý gói/phụ thuộc, quản lý phát hành, v.v. 4. . co rúm lại. nếu bạn chỉ dựa vào hệ thống kiểm tra kiểu tĩnh thời gian biên dịch để xác thực đầu vào của người dùng, thì bạn đang làm sai. Xây dựng một lớp dữ liệu bằng bất kỳ ngôn ngữ nào đều yêu cầu các ràng buộc ở trên và ngoài những gì mà các loại mặc định cung cấp. Vì vậy, dù bằng cách nào, bạn sẽ phải mở rộng các mô hình dữ liệu của mình bằng các kiểm tra xác thực tùy chỉnh. Phần thú vị về việc xử lý xác thực trong JS là bạn có thể sử dụng cùng một quy trình để kiểm tra đầu vào của người dùng trên cả phía máy khách/máy chủ. Ít trùng lặp nỗ lực hơn FTW. Trái ngược với những gì bạn nghĩ. Javascript thực sự là cách tiếp cận 'một kích thước phù hợp với tất cả' nếu bạn thích sử dụng nó như vậy. Nghiêm túc mà nói, bạn thậm chí có thể biên dịch C/C++ trực tiếp sang javascript bằng asm. js. Điều đó có nghĩa là bạn phải sử dụng nó? . Bất kỳ nhà phát triển nào có một chút ý thức sẽ không có lỗi với bạn khi chọn C #, đó là một ngôn ngữ tuyệt vời. Tôi có kinh nghiệm viết mã bằng nhiều ngôn ngữ, bao gồm xây dựng các ứng dụng máy tính để bàn không tầm thường bằng C#. Được lựa chọn, tôi muốn sử dụng Javascript hơn. Sự pha trộn của các ràng buộc lỏng lẻo hơn và các phong cách chức năng/mệnh lệnh/nguyên mẫu cho phép mức độ sáng tạo mà tôi chưa từng trải nghiệm trong bất kỳ ngôn ngữ nào khác. Các công cụ tuyệt vời, hệ thống mô-đun tuyệt vời và bản thân ngôn ngữ đang trở nên tốt hơn đáng kể với mỗi bản cập nhật

đi trốn

Tải tệp lên. http. //howtonode. org/really-simple-file-uploads "Tất cả các hoạt động I/O được xử lý bởi Node. js đang sử dụng nhiều luồng nội bộ; . " http. // stackoverflow. com/a/22981768/290340 Libuv sử dụng nhóm luồng để xử lý các hoạt động I/O [tệp, ổ cắm, v.v.] theo cách không đồng bộ. Trong đó hầu hết các ngôn ngữ bị chặn theo mặc định trong các hoạt động I/O nặng của CPU, thì Node không. Nó chỉ kích hoạt một sự kiện khi thao tác I/O hoàn thành trên worker thread. Thư mục hoạt động. https. //github. com/gheeres/node-activedirectory https. //github. com/auth0/hộ chiếu-windowsauth

đi trốn

Tải tệp lên. http. //howtonode. org/really-simple-file-uploads "Tất cả các hoạt động I/O được xử lý bởi Node. js đang sử dụng nhiều luồng nội bộ; . " http. // stackoverflow. com/a/22981768/290340 Libuv sử dụng nhóm luồng để xử lý các hoạt động I/O [tệp, ổ cắm, v.v.] theo cách không đồng bộ. Trong đó hầu hết các ngôn ngữ bị chặn theo mặc định trong các hoạt động I/O nặng của CPU, thì Node không. Nó chỉ kích hoạt một sự kiện khi thao tác I/O hoàn thành trên worker thread. Thư mục hoạt động. https. //github. com/gheeres/node-activedirectory https. //github. com/auth0/hộ chiếu-windowsauth

đi trốn

Điểm khác biệt là Node mặc định là không đồng bộ Vì vậy, số lượng nhà phát triển thực hiện lập trình không đồng bộ bằng các ngôn ngữ khác là thiểu số nên họ không được đại diện nhiều. "Tôi không thể đưa ra bất kỳ lý do chính đáng nào để sử dụng nó ở phía máy chủ có lợi cho các ngôn ngữ có sẵn khác. " Không nói dối đâu, lúc đầu sử dụng Node là. Thách thức để nói ít nhất. Làm quen với async-by-default không phải là một quá trình chuyển đổi dễ dàng. Phần hay của Node là, trọng tâm chính của nền tảng là xây dựng máy chủ/máy khách để hệ sinh thái có rất nhiều công cụ mạnh mẽ để làm bất cứ điều gì liên quan đến phát triển web. ". có thư viện, công cụ và tài nguyên tiêu chuẩn tốt hơn. "Tôi không chắc điều gì đã cho bạn ấn tượng đó. Nó không sử dụng cách tiếp cận thư viện lớp cơ sở nguyên khối-mọi thứ và nhà bếp. Bản thân lõi rất nhỏ nhưng đó là một lợi ích vì nó nhẹ hơn nhiều khi triển khai. Nó cũng bao gồm một trình quản lý gói rất mạnh mẽ, đầy đủ tính năng theo mặc định, do đó bạn sẽ phải thêm các phụ thuộc mà dự án của bạn cần. NPM [Trình quản lý gói nút] có hơn 200 nghìn gói và đang tiếp tục tăng. Vì phần lớn các mô-đun được phát triển độc lập với lõi, chúng lặp lại và cải thiện nhanh hơn nhiều so với các thư viện lõi tương đương trong các ngôn ngữ khác. Các phụ thuộc được quản lý cục bộ trên cơ sở từng dự án trong gói. tập tin json. Thông thường, việc tác giả mô-đun yêu cầu gói của họ phải được cài đặt trên toàn cầu là một hình thức tồi. Việc cài đặt các gói cục bộ sẽ ngăn xung đột phiên bản ở cấp độ toàn cầu và đảm bảo rằng -- khi bạn cài đặt một gói -- mọi thứ cần thiết để sử dụng mô-đun đều được bao gồm. Thoạt nhìn, nó có vẻ không hiệu quả vì nhiều phụ thuộc có thể có các bản sao của cùng một phụ thuộc phụ [hoặc phụ phụ thuộc, v.v.] nhưng so với chi phí bao gồm một thư viện tiêu chuẩn lớn, dung lượng lưu trữ là không đáng kể. Quy trình làm việc để thiết lập một dự án là. - sao chép nguồn - chạy 'npm install' NPM sẽ tự động tải xuống và cài đặt tất cả các phụ thuộc [bao gồm sub-deps, sub-sub-deps, v.v.]. Vì các phụ thuộc [và các phiên bản cụ thể của chúng] được xác định rõ ràng trong cấu hình, nên bạn không cần kiểm tra chúng trong kiểm soát nguồn. Ngoài ra, với ES6 [bao gồm trình tải mô-đun ES6 mới] sắp được phát hành, một JSPM mới [Trình quản lý gói JavaScript] đã được tạo để quản lý các phụ thuộc javascript phía máy khách. Nhập mô-đun trong trình duyệt cuối cùng đã được chính thức hóa trong thông số ngôn ngữ, vì vậy Bower và nhiều tiêu chuẩn giả tải mô-đun [ví dụ: AMD, CommonJS, UMD] sẽ biến mất

đi trốn

Điểm khác biệt là Node mặc định là không đồng bộ Vì vậy, số lượng nhà phát triển thực hiện lập trình không đồng bộ bằng các ngôn ngữ khác là thiểu số nên họ không được đại diện nhiều. "Tôi không thể đưa ra bất kỳ lý do chính đáng nào để sử dụng nó ở phía máy chủ có lợi cho các ngôn ngữ có sẵn khác. " Không nói dối đâu, lúc đầu sử dụng Node là. Thách thức để nói ít nhất. Làm quen với async-by-default không phải là một quá trình chuyển đổi dễ dàng. Phần hay của Node là, trọng tâm chính của nền tảng là xây dựng máy chủ/máy khách để hệ sinh thái có rất nhiều công cụ mạnh mẽ để làm bất cứ điều gì liên quan đến phát triển web. ". có thư viện, công cụ và tài nguyên tiêu chuẩn tốt hơn. "Tôi không chắc điều gì đã cho bạn ấn tượng đó. Nó không sử dụng cách tiếp cận thư viện lớp cơ sở nguyên khối-mọi thứ và nhà bếp. Bản thân lõi rất nhỏ nhưng đó là một lợi ích vì nó nhẹ hơn nhiều khi triển khai. Nó cũng bao gồm một trình quản lý gói rất mạnh mẽ, đầy đủ tính năng theo mặc định, do đó bạn sẽ phải thêm các phụ thuộc mà dự án của bạn cần. NPM [Trình quản lý gói nút] có hơn 200 nghìn gói và đang tiếp tục tăng. Vì phần lớn các mô-đun được phát triển độc lập với lõi, chúng lặp lại và cải thiện nhanh hơn nhiều so với các thư viện lõi tương đương trong các ngôn ngữ khác. Các phụ thuộc được quản lý cục bộ trên cơ sở từng dự án trong gói. tập tin json. Thông thường, việc tác giả mô-đun yêu cầu gói của họ phải được cài đặt trên toàn cầu là một hình thức tồi. Việc cài đặt các gói cục bộ sẽ ngăn xung đột phiên bản ở cấp độ toàn cầu và đảm bảo rằng -- khi bạn cài đặt một gói -- mọi thứ cần thiết để sử dụng mô-đun đều được bao gồm. Thoạt nhìn, nó có vẻ không hiệu quả vì nhiều phụ thuộc có thể có các bản sao của cùng một phụ thuộc phụ [hoặc phụ phụ thuộc, v.v.] nhưng so với chi phí bao gồm một thư viện tiêu chuẩn lớn, dung lượng lưu trữ là không đáng kể. Quy trình làm việc để thiết lập một dự án là. - sao chép nguồn - chạy 'npm install' NPM sẽ tự động tải xuống và cài đặt tất cả các phụ thuộc [bao gồm sub-deps, sub-sub-deps, v.v.]. Vì các phụ thuộc [và các phiên bản cụ thể của chúng] được xác định rõ ràng trong cấu hình, nên bạn không cần kiểm tra chúng trong kiểm soát nguồn. Ngoài ra, với ES6 [bao gồm trình tải mô-đun ES6 mới] sắp được phát hành, một JSPM mới [Trình quản lý gói JavaScript] đã được tạo để quản lý các phụ thuộc javascript phía máy khách. Nhập mô-đun trong trình duyệt cuối cùng đã được chính thức hóa trong thông số ngôn ngữ, vì vậy Bower và nhiều tiêu chuẩn giả tải mô-đun [ví dụ: AMD, CommonJS, UMD] sẽ biến mất

TerraT

Như đã nói ở trên, các ngôn ngữ OO hiện đại có rất nhiều tùy chọn để chính thức hóa và kiểm soát mã của bạn cũng như các giải pháp mà các ngôn ngữ kịch bản không có. Đó chỉ là sự thật đơn giản, không có sự kìm kẹp nào có thể thay đổi được điều đó. Quan điểm của tôi là có rất nhiều nhà phát triển chọn công nghệ theo mức độ phổ biến hơn là sự phù hợp, đó là điều khiến họ hâm mộ các chàng trai. Công cụ phù hợp cho công việc phù hợp, áp dụng trong mọi giao dịch ngoại trừ phát triển phần mềm. Nhưng đó có lẽ là do hầu hết các nhà phát triển không phải là "Người thợ" thực thụ, mà là "Người tự làm" được tôn vinh hơn. Ngành công nghiệp đầy những người nghiệp dư, những người thậm chí không biết đủ để biết rằng họ không biết gì. Họ nghĩ bởi vì họ có thể viết câu lệnh if và vòng lặp while nên họ giỏi. công nghệ

TerraT

Như đã nói ở trên, các ngôn ngữ OO hiện đại có rất nhiều tùy chọn để chính thức hóa và kiểm soát mã của bạn cũng như các giải pháp mà các ngôn ngữ kịch bản không có. Đó chỉ là sự thật đơn giản, không có sự kìm kẹp nào có thể thay đổi được điều đó. Quan điểm của tôi là có rất nhiều nhà phát triển chọn công nghệ theo mức độ phổ biến hơn là sự phù hợp, đó là điều khiến họ hâm mộ các chàng trai. Công cụ phù hợp cho công việc phù hợp, áp dụng trong mọi giao dịch ngoại trừ phát triển phần mềm. Nhưng đó có lẽ là do hầu hết các nhà phát triển không phải là "Người thợ" thực thụ, mà là "Người tự làm" được tôn vinh hơn. Ngành công nghiệp đầy những người nghiệp dư, những người thậm chí không biết đủ để biết rằng họ không biết gì. Họ nghĩ bởi vì họ có thể viết câu lệnh if và vòng lặp while nên họ giỏi. công nghệ

đi trốn

Các hoạt động I/O cấp hệ thống [chẳng hạn như tệp, ổ cắm] trong Nút được xử lý bởi libuv sử dụng nhóm luồng nền. Sự khác biệt là, luồng chính có thể kích hoạt và quên tác vụ đối với luồng nền và luồng nền sẽ thông báo cho luồng chính [thông qua kích hoạt một sự kiện] khi thao tác hoàn tất. Ngay cả khi xử lý luồng nền, thực hiện nhiều thao tác I/O cũng không mở rộng tốt. Đối với các tác vụ sử dụng nhiều CPU trong thời gian dài [mã hóa hình ảnh/phim cũ], việc giảm tải các tác vụ cho các nút worker vẫn được ưu tiên hơn. Trong hầu hết các ngôn ngữ, các thao tác I/O được xử lý theo cách đồng bộ, vì vậy nếu chúng yêu cầu được thực hiện trên luồng chính, chúng sẽ chặn thực thi cho đến khi hoàn thành. Lý do bạn không thấy một khoảng dừng đáng chú ý trong giao diện người dùng khi điều này xảy ra là do giao diện người dùng không đồng bộ/dựa trên sự kiện và chạy trên một chuỗi tách biệt với ngữ cảnh chính

đi trốn

Các hoạt động I/O cấp hệ thống [chẳng hạn như tệp, ổ cắm] trong Nút được xử lý bởi libuv sử dụng nhóm luồng nền. Sự khác biệt là, luồng chính có thể kích hoạt và quên tác vụ đối với luồng nền và luồng nền sẽ thông báo cho luồng chính [thông qua kích hoạt một sự kiện] khi thao tác hoàn tất. Ngay cả khi xử lý luồng nền, thực hiện nhiều thao tác I/O cũng không mở rộng tốt. Đối với các tác vụ sử dụng nhiều CPU trong thời gian dài [mã hóa hình ảnh/phim cũ], việc giảm tải các tác vụ cho các nút worker vẫn được ưu tiên hơn. Trong hầu hết các ngôn ngữ, các thao tác I/O được xử lý theo cách đồng bộ, vì vậy nếu chúng yêu cầu được thực hiện trên luồng chính, chúng sẽ chặn thực thi cho đến khi hoàn thành. Lý do bạn không thấy một khoảng dừng đáng chú ý trong giao diện người dùng khi điều này xảy ra là do giao diện người dùng không đồng bộ/dựa trên sự kiện và chạy trên một chuỗi tách biệt với ngữ cảnh chính

đi trốn

Không có gì ngăn cản bạn hiển thị API dưới dạng microservice. WebKit chỉ cho phép bạn chạy ứng dụng khách JS gốc. Tôi có thể sai nhưng theo những gì tôi hiểu, không giống như trình duyệt, ứng dụng khách webkit không được hộp cát nghiêm ngặt để bạn có thể thực hiện các cuộc gọi hệ thống [ví dụ: mở/lưu tệp mà không cần người dùng nhập]

đi trốn

Không có gì ngăn cản bạn hiển thị API dưới dạng microservice. WebKit chỉ cho phép bạn chạy ứng dụng khách JS gốc. Tôi có thể sai nhưng theo những gì tôi hiểu, không giống như trình duyệt, ứng dụng khách webkit không được hộp cát nghiêm ngặt để bạn có thể thực hiện các cuộc gọi hệ thống [ví dụ: mở/lưu tệp mà không cần người dùng nhập]

TerraT

Tôi nghĩ rằng bạn đã đưa ra quan điểm của tôi cho tôi, nói ra những điều vô nghĩa thiếu suy nghĩ, cảm xúc, với rất ít sự thật, từ một tâm trí quá cuồng tín về một thứ mà nó thậm chí không thể nhìn thấy những thất bại của nó. Có vẻ như bạn đã đưa ra một vài giả định hợp lý về những gì tôi biết và không biết, tôi đã làm Javascript được 20 năm, tôi biết những hạn chế của nó, tôi có thể làm việc hiệu quả với hơn 30 ngôn ngữ, tôi sử dụng những gì phù hợp, . Bạn cần trưởng thành hoặc tìm một ngành mới để làm việc. Những người như bạn là vấn đề với Phát triển phần mềm, không biết gì về những người thậm chí không thể tạo ra một trường hợp cho một công nghệ, chứ đừng nói đến việc sử dụng một công nghệ. Vui lòng tránh xa bàn phím và giúp đỡ phần còn lại của chúng tôi

TerraT

Tôi nghĩ rằng bạn đã đưa ra quan điểm của tôi cho tôi, nói ra những điều vô nghĩa thiếu suy nghĩ, cảm xúc, với rất ít sự thật, từ một tâm trí quá cuồng tín về một thứ mà nó thậm chí không thể nhìn thấy những thất bại của nó. Có vẻ như bạn đã đưa ra một vài giả định hợp lý về những gì tôi biết và không biết, tôi đã làm Javascript được 20 năm, tôi biết những hạn chế của nó, tôi có thể làm việc hiệu quả với hơn 30 ngôn ngữ, tôi sử dụng những gì phù hợp, . Bạn cần trưởng thành hoặc tìm một ngành mới để làm việc. Những người như bạn là vấn đề với Phát triển phần mềm, không biết gì về những người thậm chí không thể tạo ra một trường hợp cho một công nghệ, chứ đừng nói đến việc sử dụng một công nghệ. Vui lòng tránh xa bàn phím và giúp đỡ phần còn lại của chúng tôi

đi trốn

Bạn có sử dụng kiểm soát phiên bản với quy trình làm việc tiêu chuẩn [quy trình làm việc Gitflow cũ] nơi các nhà phát triển thực hiện thay đổi trên các nhánh tính năng và mã được đánh giá ngang hàng trước khi được hợp nhất không? . Tất cả các ví dụ có sẵn trực tuyến đều bị hỏng khá nhiều nên tôi đã theo dõi quá trình phát triển dự án trên Github. Tỷ lệ mà các nhà phát triển cốt lõi đang đạt được trên cơ sở mã thực sự đáng chú ý. Điều tuyệt vời hơn nữa là mọi PR đều được kiểm tra đơn vị và kiểm tra tích hợp liên tục đủ tốt để mọi bản phát hành được đảm bảo hoạt động đầy đủ [theo như họ đã triển khai cho đến nay]

đi trốn

Bạn có sử dụng kiểm soát phiên bản với quy trình làm việc tiêu chuẩn [quy trình làm việc Gitflow cũ] nơi các nhà phát triển thực hiện thay đổi trên các nhánh tính năng và mã được đánh giá ngang hàng trước khi được hợp nhất không? . Tất cả các ví dụ có sẵn trực tuyến đều bị hỏng khá nhiều nên tôi đã theo dõi quá trình phát triển dự án trên Github. Tỷ lệ mà các nhà phát triển cốt lõi đang đạt được trên cơ sở mã thực sự đáng chú ý. Điều tuyệt vời hơn nữa là mọi PR đều được kiểm tra đơn vị và kiểm tra tích hợp liên tục đủ tốt để mọi bản phát hành được đảm bảo hoạt động đầy đủ [theo như họ đã triển khai cho đến nay]

đi trốn

Làm theo những gì Tracker1 đang nói. Linting tương đương với việc kiểm tra thời gian biên dịch trong JS. Tôi thậm chí còn sử dụng tiện ích mở rộng Sublime hiển thị lỗi kẻ nói dối trực tiếp trong trình soạn thảo khi tôi đang viết mã. Nếu bạn muốn kiểm tra chặt chẽ hơn, bạn có thể thêm trình kiểm tra kiểu, chẳng hạn như 'bán tiêu chuẩn', đảm bảo kiểu mã trên cơ sở toàn dự án. Điều đó có nghĩa là dấu cách không phải tab, thụt lề 2 dấu cách, hàm nhất quán, dấu ngoặc nhọn, v.v. Kiểm tra kiểu tốt cho các lỗi bề ngoài [biến chưa khởi tạo cũ, nhánh chết, giá trị không hợp lệ] nhưng cuối cùng bạn sẽ phải xác minh mã không có lỗi logic thông qua kiểm tra đơn vị, kiểm tra tích hợp liên tục, kiểm tra api

đi trốn

Làm theo những gì Tracker1 đang nói. Linting tương đương với việc kiểm tra thời gian biên dịch trong JS. Tôi thậm chí còn sử dụng tiện ích mở rộng Sublime hiển thị lỗi kẻ nói dối trực tiếp trong trình soạn thảo khi tôi đang viết mã. Nếu bạn muốn kiểm tra chặt chẽ hơn, bạn có thể thêm trình kiểm tra kiểu, chẳng hạn như 'bán tiêu chuẩn', đảm bảo kiểu mã trên cơ sở toàn dự án. Điều đó có nghĩa là dấu cách không phải tab, thụt lề 2 dấu cách, hàm nhất quán, dấu ngoặc nhọn, v.v. Kiểm tra kiểu tốt cho các lỗi bề ngoài [biến chưa khởi tạo cũ, nhánh chết, giá trị không hợp lệ] nhưng cuối cùng bạn sẽ phải xác minh mã không có lỗi logic thông qua kiểm tra đơn vị, kiểm tra tích hợp liên tục, kiểm tra api

đi trốn

Nút sử dụng I/O dựa trên sự kiện không đồng bộ thông qua libuv [bao gồm một nhóm luồng dành riêng cho các yêu cầu I/O]. Luồng chính hoàn toàn không bị chặn trong quá trình hoạt động I/O. Nó hoạt động giống như cách cụm ngoại trừ nó được tích hợp vào Node. Kiểm tra một trong những bài thuyết trình trên libuv để biết thêm chi tiết

đi trốn

Nút sử dụng I/O dựa trên sự kiện không đồng bộ thông qua libuv [bao gồm một nhóm luồng dành riêng cho các yêu cầu I/O]. Luồng chính hoàn toàn không bị chặn trong quá trình hoạt động I/O. Nó hoạt động giống như cách cụm ngoại trừ nó được tích hợp vào Node. Kiểm tra một trong những bài thuyết trình trên libuv để biết thêm chi tiết

đi trốn

Hiệu suất khôn ngoan, PayPal dường như nghĩ những điều tốt về Node http. //đồng ghi chú. blogspot. com/2013/12/paypals-node js-vs-java-benchmark. html Để bảo mật, mô-đun 'cors' có thể cắm vào Express và có thể được sử dụng cho tất cả các nội dung kiểm soát CORS thông thường. Mô-đun 'mũ bảo hiểm' -- cũng có thể cắm vào Express -- hiển thị một bộ nhỏ các tính năng để bảo vệ chống lại những người dùng độc hại bao gồm bảo vệ tập lệnh chéo trang bổ sung. Tôi không chắc mình có gọi một nhà phát triển Fullstack JS là 'thiếu kinh nghiệm' hay không. Có một sự hiểu biết vững chắc về nhiều lĩnh vực trong một hệ sinh thái phát triển không ngừng phát triển thật khó chịu. bạn biết đấy, "10 năm kinh nghiệm so với 1 năm kinh nghiệm 10 lần"

đi trốn

Hiệu suất khôn ngoan, PayPal dường như nghĩ những điều tốt về Node http. //đồng ghi chú. blogspot. com/2013/12/paypals-node js-vs-java-benchmark. html Để bảo mật, mô-đun 'cors' có thể cắm vào Express và có thể được sử dụng cho tất cả các nội dung kiểm soát CORS thông thường. Mô-đun 'mũ bảo hiểm' -- cũng có thể cắm vào Express -- hiển thị một bộ nhỏ các tính năng để bảo vệ chống lại những người dùng độc hại bao gồm bảo vệ tập lệnh chéo trang bổ sung. Tôi không chắc mình có gọi một nhà phát triển Fullstack JS là 'thiếu kinh nghiệm' hay không. Có một sự hiểu biết vững chắc về nhiều lĩnh vực trong một hệ sinh thái phát triển không ngừng phát triển thật khó chịu. bạn biết đấy, "10 năm kinh nghiệm so với 1 năm kinh nghiệm 10 lần"

Josh Morgan

Nút. js thậm chí đã không tồn tại được 10 năm [thật buồn cười khi tôi đã thấy các bài đăng công việc thực sự yêu cầu 10 năm kinh nghiệm với nó]. Tôi hiểu rằng việc theo kịp sự phát triển của công nghệ là một thách thức và sau 20 năm nữa, tôi có thể nói với bạn rằng vào thời điểm bạn hoàn toàn cảm thấy thoải mái với bất kỳ "full stack" nào thì nó sẽ ít liên quan hơn vì công nghệ luôn phát triển. Sẽ không có gì thay đổi được điều đó, đó chỉ là cách mọi thứ vận hành. Tuy nhiên, bạn không thể thực sự có bánh của bạn và ăn nó ở đó. Công nghệ mới ít được thử nghiệm hơn và do đó kém an toàn hơn, nhưng công nghệ cũ hơn không có nhiều tính năng. Luôn luôn có một sự đánh đổi ở đó. Bất cứ ai tuyên bố khác đang bán cho bạn thứ gì đó

Josh Morgan

Nút. js thậm chí đã không tồn tại được 10 năm [thật buồn cười khi tôi đã thấy các bài đăng công việc thực sự yêu cầu 10 năm kinh nghiệm với nó]. Tôi hiểu rằng việc theo kịp sự phát triển của công nghệ là một thách thức và sau 20 năm nữa, tôi có thể nói với bạn rằng vào thời điểm bạn hoàn toàn cảm thấy thoải mái với bất kỳ "full stack" nào thì nó sẽ ít liên quan hơn vì công nghệ luôn phát triển. Sẽ không có gì thay đổi được điều đó, đó chỉ là cách mọi thứ vận hành. Tuy nhiên, bạn không thể thực sự có bánh của bạn và ăn nó ở đó. Công nghệ mới ít được thử nghiệm hơn và do đó kém an toàn hơn, nhưng công nghệ cũ hơn không có nhiều tính năng. Luôn luôn có một sự đánh đổi ở đó. Bất cứ ai tuyên bố khác đang bán cho bạn thứ gì đó

Anil Verma

Tôi được bán trên Node. JS [nếu ứng dụng của bạn đang xây dựng các ứng dụng mạng có khả năng mở rộng cao], Node. JS là con đường để đi vào năm 2015. Không có thắc mắc tại sao rất nhiều công ty mới thành lập và các tập đoàn lớn đang áp dụng nó. C ++, Java, Ruby và Python có vị trí của chúng trong các lĩnh vực tương ứng. Các công ty và sản phẩm mới sẽ được xây dựng trên nhiều ngôn ngữ. Tôi dự đoán việc áp dụng ROR sẽ vẫn cao trong những năm tới để xây dựng các ứng dụng web [đơn giản vì các nhà phát triển ROR dễ dàng có sẵn và thời gian đưa ra thị trường quá ngắn]. Bài báo xuất sắc mặc dù Tomislav

Anil Verma

Tôi được bán trên Node. JS [nếu ứng dụng của bạn đang xây dựng các ứng dụng mạng có khả năng mở rộng cao], Node. JS là con đường để đi vào năm 2015. Không có thắc mắc tại sao rất nhiều công ty mới thành lập và các tập đoàn lớn đang áp dụng nó. C ++, Java, Ruby và Python có vị trí của chúng trong các lĩnh vực tương ứng. Các công ty và sản phẩm mới sẽ được xây dựng trên nhiều ngôn ngữ. Tôi dự đoán việc áp dụng ROR sẽ vẫn cao trong những năm tới để xây dựng các ứng dụng web [đơn giản vì các nhà phát triển ROR dễ dàng có sẵn và thời gian đưa ra thị trường quá ngắn]. Bài báo xuất sắc mặc dù Tomislav

Daniel Jawna

rất đúng. Công việc của tôi là bảo trì các ứng dụng cũ, thường là truy cập SQL Server dB's + ms hoặc giao diện người dùng php. Những thứ này thường được làm bởi "cháu trai giỏi máy tính". Không có khóa ngoại, nhưng chức năng ngày + giờ tùy chỉnh. bài viết của bạn là tâm trạng của tôi chính xác

Daniel Jawna

rất đúng. Công việc của tôi là bảo trì các ứng dụng cũ, thường là truy cập SQL Server dB's + ms hoặc giao diện người dùng php. Những thứ này thường được làm bởi "cháu trai giỏi máy tính". Không có khóa ngoại, nhưng chức năng ngày + giờ tùy chỉnh. bài viết của bạn là tâm trạng của tôi chính xác

JPoet

Tôi thấy Java rất kém hiệu quả và rất tốn kém đối với nhiều công việc tẻ nhạt ở mức độ thấp. C ++ dành cho các lập trình viên có thể xử lý truy cập/con trỏ bộ nhớ. Hầu hết các lập trình viên của công ty không thể. Ngày trước, bạn có PL/1 và C cho kỹ sư phần mềm và COBOL cho lập trình viên công nghệ thông tin

JPoet

Tôi thấy Java rất kém hiệu quả và rất tốn kém đối với nhiều công việc tẻ nhạt ở mức độ thấp. C ++ dành cho các lập trình viên có thể xử lý truy cập/con trỏ bộ nhớ. Hầu hết các lập trình viên của công ty không thể. Ngày trước, bạn có PL/1 và C cho kỹ sư phần mềm và COBOL cho lập trình viên công nghệ thông tin

joselie castañeda

cảm ơn. điều này rất hữu ích vì tôi sẽ tạo một ứng dụng doanh nghiệp tính toán nặng. tôi nghĩ tôi sẽ thử nút. js trên ứng dụng khác. bây giờ, tôi sẽ sử dụng ruby ​​​​trên đường ray

joselie castañeda

cảm ơn. điều này rất hữu ích vì tôi sẽ tạo một ứng dụng doanh nghiệp tính toán nặng. tôi nghĩ tôi sẽ thử nút. js trên ứng dụng khác. bây giờ, tôi sẽ sử dụng ruby ​​​​trên đường ray

Túlio Spuri

Khi bài báo này được viết?

Túlio Spuri

Khi bài báo này được viết?

vũ khí

Bài báo tuyệt vời

vũ khí

Bài báo tuyệt vời

Olivier

Cảm ơn vì bài viết này, tôi nghĩ rằng lập luận về cùng một ngôn ngữ cho front và dev là điều tồi tệ nhất mà tôi có thể nghe hoặc đọc. Có tổ chức và mã hóa tốt với js là những điều khủng khiếp hơn xuất hiện trong một nhóm. Tôi làm việc từ năm ngoái trong dự án phụ trợ và đôi khi điều này sẽ được mã hóa với khung trưởng thành như django, mất quá nhiều thời gian để hiểu hàng trăm lỗi. Nơi mongodb cảm thấy mát mẻ? . Tôi thực sự nghĩ rằng nút js là một trò đùa lớn và không hay lắm. Trình quản lý gói cung cấp cho chúng tôi một số gói thú vị để vá và ẩn mặt xấu của nút nhưng không có gì để làm về địa ngục gọi lại. Cuối cùng, mã trông giống như một hộp cát lớn hơn tôi không muốn mở tệp để gỡ lỗi hoặc thêm một số dòng mã. Vì vậy, kết luận của tôi là dành cho ứng dụng nhỏ tại sao không nhưng đối với dự án lớn và phát triển không sử dụng cũng như nodejs và mongodb. Trân trọng

Olivier

Cảm ơn vì bài viết này, tôi nghĩ rằng lập luận về cùng một ngôn ngữ cho front và dev là điều tồi tệ nhất mà tôi có thể nghe hoặc đọc. Có tổ chức và mã hóa tốt với js là những điều khủng khiếp hơn xuất hiện trong một nhóm. Tôi làm việc từ năm ngoái trong dự án phụ trợ và đôi khi điều này sẽ được mã hóa với khung trưởng thành như django, mất quá nhiều thời gian để hiểu hàng trăm lỗi. Nơi mongodb cảm thấy mát mẻ? . Tôi thực sự nghĩ rằng nút js là một trò đùa lớn và không hay lắm. Trình quản lý gói cung cấp cho chúng tôi một số gói thú vị để vá và ẩn mặt xấu của nút nhưng không có gì để làm về địa ngục gọi lại. Cuối cùng, mã trông giống như một hộp cát lớn hơn tôi không muốn mở tệp để gỡ lỗi hoặc thêm một số dòng mã. Vì vậy, kết luận của tôi là dành cho ứng dụng nhỏ tại sao không nhưng đối với dự án lớn và phát triển không sử dụng cũng như nodejs và mongodb. Trân trọng

kinh tế trâu bò

Đây là một nhận xét khá thiếu thông tin vì ES6 vẫn hoạt động tốt như một năm trước. Bên cạnh OO từ ES6, còn có TypeScript bổ sung thêm OO cấp doanh nghiệp hơn và có thể thực thi kiểu gõ tĩnh cho JavaScript. Thích. NET được biên dịch thành clr thô, TypeScript cũng có thể được "phiên mã" thành Javascript thô. Hiện tại, NodeJS cho phép thực hiện gần như tất cả những điều này với việc sử dụng tài nguyên máy chủ thậm chí còn tốt hơn và không bị khóa hệ điều hành. Hãy nghĩ đến việc cắt giảm chi phí cơ sở hạ tầng của bạn hơn 2000% vì bạn thực sự không cần phải mở rộng quy mô theo chiều dọc hoặc trả tiền cho những chi phí đó. NET trên mỗi nút quy mô. Ngay cả khi bạn đang đi theo con đường Mono, lol. Tôi sẽ để bạn tự nghiên cứu cách so sánh đó. Các công ty công nghệ tài chính như Paypal biết một hoặc hai điều về tải cũng đang vui vẻ làm những điều tuyệt vời với nút, vì vậy tôi thực sự nghi ngờ nhận xét này của bạn xuất phát từ kiến ​​thức về những gì hệ sinh thái NodeJS thực sự cung cấp cho sản phẩm táo bạo được xây dựng . Ngoài ra, bất kể bạn có thể có ý kiến ​​cá nhân nào về ORM, thực tế hợp lý của tất cả là ORMS sử dụng nhiều tài nguyên bộ nhớ hơn mức cần thiết để chạy phụ trợ. Họ cũng đánh vào nguồn dữ liệu của bạn nhiều hơn mức cần thiết. Bạn cũng đã nói điều gì đó liên quan đến bộ nhớ đệm và ORM mà tôi đoán bạn đang đề cập đến bộ nhớ đệm cấp ORM [e. g. Bộ đệm L1/2 trong chế độ Ngủ đông]. Tôi hy vọng bạn hiểu rằng bạn KHÔNG THỰC SỰ CẦN ORM để thực hiện bộ nhớ đệm cho bạn. Bạn có thể làm điều này bằng cách sử dụng các công cụ tách rời hiệu quả và đẹp mắt. và tại đó linh hoạt hơn. Điều quan trọng cần ghi nhớ là ngay cả bây giờ, vẫn có người bảo vệ Fortran là công cụ thực sự duy nhất để xây dựng phần mềm. Mọi thứ di chuyển khá nhanh trong ngành này. Niềm tự hào là điều dễ hiểu, nhưng lời khuyên của tôi dành cho bạn là hãy tham gia vào ít nhất 1 thế giới công nghệ mới nhiều nhất là vài năm một lần. Bạn sẽ ở lại có liên quan và cảm ơn tôi sau

kinh tế trâu bò

Đây là một nhận xét khá thiếu thông tin vì ES6 vẫn hoạt động tốt như một năm trước. Bên cạnh OO từ ES6, còn có TypeScript bổ sung thêm OO cấp doanh nghiệp hơn và có thể thực thi kiểu gõ tĩnh cho JavaScript. Thích. NET được biên dịch thành clr thô, TypeScript cũng có thể được "phiên mã" thành Javascript thô. Hiện tại, NodeJS cho phép thực hiện gần như tất cả những điều này với việc sử dụng tài nguyên máy chủ thậm chí còn tốt hơn và không bị khóa hệ điều hành. Hãy nghĩ đến việc cắt giảm chi phí cơ sở hạ tầng của bạn hơn 2000% vì bạn thực sự không cần phải mở rộng quy mô theo chiều dọc hoặc trả tiền cho những chi phí đó. NET trên mỗi nút quy mô. Ngay cả khi bạn đang đi theo con đường Mono, lol. Tôi sẽ để bạn tự nghiên cứu cách so sánh đó. Các công ty công nghệ tài chính như Paypal biết một hoặc hai điều về tải cũng đang vui vẻ làm những điều tuyệt vời với nút, vì vậy tôi thực sự nghi ngờ nhận xét này của bạn xuất phát từ kiến ​​thức về những gì hệ sinh thái NodeJS thực sự cung cấp cho sản phẩm táo bạo được xây dựng . Ngoài ra, bất kể bạn có thể có ý kiến ​​cá nhân nào về ORM, thực tế hợp lý của tất cả là ORMS sử dụng nhiều tài nguyên bộ nhớ hơn mức cần thiết để chạy phụ trợ. Họ cũng đánh vào nguồn dữ liệu của bạn nhiều hơn mức cần thiết. Bạn cũng đã nói điều gì đó liên quan đến bộ nhớ đệm và ORM mà tôi đoán bạn đang đề cập đến bộ nhớ đệm cấp ORM [e. g. Bộ đệm L1/2 trong chế độ Ngủ đông]. Tôi hy vọng bạn hiểu rằng bạn KHÔNG THỰC SỰ CẦN ORM để thực hiện bộ nhớ đệm cho bạn. Bạn có thể làm điều này bằng cách sử dụng các công cụ tách rời hiệu quả và đẹp mắt. và tại đó linh hoạt hơn. Điều quan trọng cần ghi nhớ là ngay cả bây giờ, vẫn có người bảo vệ Fortran là công cụ thực sự duy nhất để xây dựng phần mềm. Mọi thứ di chuyển khá nhanh trong ngành này. Niềm tự hào là điều dễ hiểu, nhưng lời khuyên của tôi dành cho bạn là hãy tham gia vào ít nhất 1 thế giới công nghệ mới nhiều nhất là vài năm một lần. Bạn sẽ ở lại có liên quan và cảm ơn tôi sau

biên tập

Tôi thực sự muốn có thể dùng thử Node. js nhưng thật khó để có được một cái gì đó đang chạy. Cài đặt một ứng dụng "đơn giản" luôn dẫn đến một danh sách những việc bạn cần làm, cài đặt toàn cầu [không phải lúc nào cũng có thể], chỉnh sửa tệp, cố gắng tìm hiểu ý nghĩa của các nhà phát triển chết tiệt trong các hướng dẫn ít ỏi của họ. Nó sẽ nhanh chóng trở nên tồi tệ nếu bạn làm sai một điều nhỏ nhất. Nếu nó tuyệt vời như vậy, tại sao không ai tìm ra cách tạo các trình cài đặt đơn giản với thứ này?

biên tập

Tôi thực sự muốn có thể dùng thử Node. js nhưng thật khó để có được một cái gì đó đang chạy. Cài đặt một ứng dụng "đơn giản" luôn dẫn đến một danh sách những việc bạn cần làm, cài đặt toàn cầu [không phải lúc nào cũng có thể], chỉnh sửa tệp, cố gắng tìm hiểu ý nghĩa của các nhà phát triển chết tiệt trong các hướng dẫn ít ỏi của họ. Nó sẽ nhanh chóng trở nên tồi tệ nếu bạn làm sai một điều nhỏ nhất. Nếu nó tuyệt vời như vậy, tại sao không ai tìm ra cách tạo các trình cài đặt đơn giản với thứ này?

Alexis Menest

Ghost blogging platform https. //github. com/TryGhost/Ghost/blob/master/package. json

Alexis Menest

Ghost blogging platform https. //github. com/TryGhost/Ghost/blob/master/package. json

David

Yeah it would be nice with a date. I assume they don't show it because they know how biased people are towards new information — but it doesn't make much sense to hide it in an article about a fast growing technology

David

Yeah it would be nice with a date. I assume they don't show it because they know how biased people are towards new information — but it doesn't make much sense to hide it in an article about a fast growing technology

Samuel_Ogden

Would node be a bad idea for something like 9gag. com then? Would you need to do any image manipulation on a different server to prevent blocking?

Samuel_Ogden

Would node be a bad idea for something like 9gag. com then? Would you need to do any image manipulation on a different server to prevent blocking?

chaitanya

Hey Tomislav, Great article. I wanted to know that if suppose I want to get external hardware output in my app, e. g, scanner or e-signature [if user is doing e-signature or getting scanned copy from scanner], then can i get directly in my app? it will be like an api call as we do in Java

chaitanya

Hey Tomislav, Great article. I wanted to know that if suppose I want to get external hardware output in my app, e. g, scanner or e-signature [if user is doing e-signature or getting scanned copy from scanner], then can i get directly in my app? it will be like an api call as we do in Java

Misha R

TypeScript is syntactic sugar wrapper on top of standard JavaScript and compiles into standard JavaScript. It is invented to make the code maintainable and allows it to be used more like a real programming language. Given that you have to use JS where appropriate it makes writing it more familiar to real programmers and makes it maintainable. That said, anything JS and Node is appropriate for thin, lightweight web apps that need to be put together quickly and efficiently, for which things like ASP. NET, JSP, Ruby etc are a bit of overkill. Believing that one can not use the new magic Node for everything just because one guy can write front and back end is amateurish

Misha R

TypeScript is syntactic sugar wrapper on top of standard JavaScript and compiles into standard JavaScript. It is invented to make the code maintainable and allows it to be used more like a real programming language. Given that you have to use JS where appropriate it makes writing it more familiar to real programmers and makes it maintainable. That said, anything JS and Node is appropriate for thin, lightweight web apps that need to be put together quickly and efficiently, for which things like ASP. NET, JSP, Ruby etc are a bit of overkill. Believing that one can not use the new magic Node for everything just because one guy can write front and back end is amateurish

ellisgl

Đóng gói một ngôn ngữ bằng một ngôn ngữ khác mà bạn phải dịch sẽ thêm chi phí. Also there are things that don't translate, just in real life translating between language, you loose something. In this case you loose speed [having to translate from one to the other], and optimization, because of reason one. ORM's don't do it all. In the beginning, I was for ORMs, then I dove deep into it and you end up with "How do I do this?", "Oh you can't easily, you have to do 10 other queries", or you end up with stuff that just seems like it should work well, but you end up wrecking the performance. ORMs are for simple "Select blah blah from table where x = y". The only small redeeming factor of some ORMs are that they will convert their language to which ever DB. But if you are paid to work on a enterprise level application, you are only dealing with 1 - 3 databases, which are for used for separate things. If you have 500 employees and 10,000 customers, the ORM might be bottle neck

ellisgl

Đóng gói một ngôn ngữ bằng một ngôn ngữ khác mà bạn phải dịch sẽ thêm chi phí. Also there are things that don't translate, just in real life translating between language, you loose something. In this case you loose speed [having to translate from one to the other], and optimization, because of reason one. ORM's don't do it all. In the beginning, I was for ORMs, then I dove deep into it and you end up with "How do I do this?", "Oh you can't easily, you have to do 10 other queries", or you end up with stuff that just seems like it should work well, but you end up wrecking the performance. ORMs are for simple "Select blah blah from table where x = y". The only small redeeming factor of some ORMs are that they will convert their language to which ever DB. But if you are paid to work on a enterprise level application, you are only dealing with 1 - 3 databases, which are for used for separate things. If you have 500 employees and 10,000 customers, the ORM might be bottle neck

Nils Orbat

Hey, is there a library/tool you used to creste the graphics ?

Nils Orbat

Hey, is there a library/tool you used to creste the graphics ?

Praveen kumar Pamani

Thank you for this article , I would suggest this article if people want to know what is node and what can we do with nodejs

Praveen kumar Pamani

Thank you for this article , I would suggest this article if people want to know what is node and what can we do with nodejs

dohkoo

Great article, thanks for the overview. http. //www. steshadoku. com

dohkoo

Great article, thanks for the overview. http. //www. steshadoku. com

subkuchsell. com

thanks for great article really very helpful to understand the node. js subkuchsell. com

subkuchsell. com

thanks for great article really very helpful to understand the node. js subkuchsell. com

Tomislav Capan

Yes, this is true, article was authored and published in August 2013. [sorry for such a late confirmation, haven't seen this earlier]

Tomislav Capan

Yes, this is true, article was authored and published in August 2013. [sorry for such a late confirmation, haven't seen this earlier]

golfman484

In what universe can Mongo DB be referred to as an Object DB? It doesn't support inheritance. It's a Document Oriented DB not an Object Oriented DB. I just don't want any of the kiddies to get confused

golfman484

In what universe can Mongo DB be referred to as an Object DB? It doesn't support inheritance. It's a Document Oriented DB not an Object Oriented DB. I just don't want any of the kiddies to get confused

golfman484

We switched to one language for backend and UI but we decided to keep the language that runs lightning bolt fast at runtime and has type safety and supports standard ORMs with lazy loading etc. , We didn't want to throw all those things away, which is what you have to do when you go with a JS solution on your backend. Java on the backend is a no brainer [so long as you don't over engineer and over complicate your app with memory and CPU sapping Spring]. The key to using Java for the UI is use a Java framework that does all the JS for you - so you can live in a world devoid of having to deal with JS and stick with compiled, typesafe, enterprise suitable code. This solution is also scalable - J2SE has supported clustering for nearly two decades now. One such Java UI framework that covers all our JS needs and gives us all the 'partial updates' goodness with an AJAX event driven model with websockets option is Wicket

golfman484

We switched to one language for backend and UI but we decided to keep the language that runs lightning bolt fast at runtime and has type safety and supports standard ORMs with lazy loading etc. , We didn't want to throw all those things away, which is what you have to do when you go with a JS solution on your backend. Java on the backend is a no brainer [so long as you don't over engineer and over complicate your app with memory and CPU sapping Spring]. The key to using Java for the UI is use a Java framework that does all the JS for you - so you can live in a world devoid of having to deal with JS and stick with compiled, typesafe, enterprise suitable code. This solution is also scalable - J2SE has supported clustering for nearly two decades now. One such Java UI framework that covers all our JS needs and gives us all the 'partial updates' goodness with an AJAX event driven model with websockets option is Wicket

Rumana Amin

Hi Tomislav, your article is really nice and informative. It helped me a lot to understand Node. js and it's uses

Rumana Amin

Hi Tomislav, your article is really nice and informative. It helped me a lot to understand Node. js and it's uses

WarrEagle

The simple answer is do not use Node. js for that. What part of that are you missing? You want to serve GEO data coordinates to 500K connected clients?. easy. Do a massive JOIN statement across a million rows on a RDBS? You're screwed. Surgeons do not work with chainsaws. Neither should programmers

WarrEagle

The simple answer is do not use Node. js for that. What part of that are you missing? You want to serve GEO data coordinates to 500K connected clients?. easy. Do a massive JOIN statement across a million rows on a RDBS? You're screwed. Surgeons do not work with chainsaws. Neither should programmers

golfman484

You underate ORM as most of the people who have never built an OO system with a decent highly performant ORM that rocks do [and by 'decent' ORM I'm NOT referring to the ORM most people think of using, Hibernate. ]

golfman484

You underate ORM as most of the people who have never built an OO system with a decent highly performant ORM that rocks do [and by 'decent' ORM I'm NOT referring to the ORM most people think of using, Hibernate. ]

golfman484

I agree - this article and associated comments by the JS fan boys confirms my fears that most JavaScript apps must have anemic domain models [https. //martinfowler. com/bliki/AnemicDomainModel. html] that are quite trivial and virtually expression less - all the work will be done in disassociated [not encapsulated and definitely not polymorphic] business logic

golfman484

I agree - this article and associated comments by the JS fan boys confirms my fears that most JavaScript apps must have anemic domain models [https. //martinfowler. com/bliki/AnemicDomainModel. html] that are quite trivial and virtually expression less - all the work will be done in disassociated [not encapsulated and definitely not polymorphic] business logic

golfman484

I'm guessing your experience with 'ORMs' is limited to Hibernate. I had a similar experience until I thought there must be better ORMs out there - look around - others exist

golfman484

I'm guessing your experience with 'ORMs' is limited to Hibernate. I had a similar experience until I thought there must be better ORMs out there - look around - others exist

golfman484

Good points Adin - I was about to make the same ones. In regard to the article's claim that traditional frameworks "spawn a new thread for each connection [request]". So, so wrong. Must have made more than a few people livid to see such an error which either a] the author knows is clearly wrong and persists with the view or b] has never used any other backend framework and so doesn't realize that he is so wrong. The conflation of connection with request is also interesting. Does his knowledge not extend to understand the concept of connection "keep alives". A connection does not have a one to one relationship to requests as he suggests. Loại quan điểm sai lệch, méo mó này về mức độ thông minh, trưởng thành, phát triển cao của các khuôn khổ [ví dụ:. , Java/Tomcat and I'm sure . net/ASP] handle requests makes me feel like this article is tainted and not representing the truth about alternatives. In regard to moving away from the Request/Response mentality - many existing frameworks have done this also and created a component oriented architecture that supports asynchronous model based updates. eg. , Java Wicket or Angular JS. It's almost like running JS [a type unsafe, non OO language - if you're a believer that manual, self assembly 'prototype' inheritance is in the true OO spirit] on the server is not a concept that has enough merit without twisting the truth about how traditional server side frameworks work. It's like that or maybe it is that

golfman484

Good points Adin - I was about to make the same ones. In regard to the article's claim that traditional frameworks "spawn a new thread for each connection [request]". So, so wrong. Must have made more than a few people livid to see such an error which either a] the author knows is clearly wrong and persists with the view or b] has never used any other backend framework and so doesn't realize that he is so wrong. The conflation of connection with request is also interesting. Does his knowledge not extend to understand the concept of connection "keep alives". A connection does not have a one to one relationship to requests as he suggests. Loại quan điểm sai lệch, méo mó này về mức độ thông minh, trưởng thành, phát triển cao của các khuôn khổ [ví dụ:. , Java/Tomcat and I'm sure . net/ASP] handle requests makes me feel like this article is tainted and not representing the truth about alternatives. In regard to moving away from the Request/Response mentality - many existing frameworks have done this also and created a component oriented architecture that supports asynchronous model based updates. eg. , Java Wicket or Angular JS. It's almost like running JS [a type unsafe, non OO language - if you're a believer that manual, self assembly 'prototype' inheritance is in the true OO spirit] on the server is not a concept that has enough merit without twisting the truth about how traditional server side frameworks work. It's like that or maybe it is that

golfman484

Not every client who has an active session needs to be allocated their own thread - threads are shared and each user only needs a thread to service requests. Requests come in in short bursts and don't need to tie up a thread for very long if the back end code is executing in a highly optimized, compiled language and a fast database. For this reason you can't say "System A can support 10,000 threads therefore it can only support 10,000 clients". The number of clients supported is orders of magnitude greater than the number of threads available because of diversity. Most UI's, if well written, only 'phone home' to the server when absolutely necessary - not "all the time"

golfman484

Not every client who has an active session needs to be allocated their own thread - threads are shared and each user only needs a thread to service requests. Requests come in in short bursts and don't need to tie up a thread for very long if the back end code is executing in a highly optimized, compiled language and a fast database. For this reason you can't say "System A can support 10,000 threads therefore it can only support 10,000 clients". The number of clients supported is orders of magnitude greater than the number of threads available because of diversity. Most UI's, if well written, only 'phone home' to the server when absolutely necessary - not "all the time"

golfman484

It sounds like the node. js people think that JS is the only language that supports concurrency [although they promote a single threaded web server solution -WTF?] and non blocking I/O - of course it's not that case but you seem so excited about such things that I can only assume you have just discovered concepts that have existed in other languages for 2 decades or more

golfman484

It sounds like the node. js people think that JS is the only language that supports concurrency [although they promote a single threaded web server solution -WTF?] and non blocking I/O - of course it's not that case but you seem so excited about such things that I can only assume you have just discovered concepts that have existed in other languages for 2 decades or more

Tomislav Capan

Of course, you understand this is an illustration. In practice, it's a thread pool, which is limited by memory available, and is magnitudes of order less than what an event look can support. Thanks for the comment, though

Tomislav Capan

Of course, you understand this is an illustration. In practice, it's a thread pool, which is limited by memory available, and is magnitudes of order less than what an event look can support. Thanks for the comment, though

Dean Radcliffe

Damn, this is an oldie but goodie. I give talks just like this, and may borrow your slides. Theo những ý định ban đầu này của nút để thực hiện những điều tuyệt vời như ghi db theo hàng đợi và đẩy máy chủ, thật ngạc nhiên là hầu hết các ứng dụng nút ngày nay vẫn được xây dựng trên mô hình yêu cầu/phản hồi và chờ đợi ghi db một cách đồng bộ [nhưng không theo khối]

Dean Radcliffe

Damn, this is an oldie but goodie. I give talks just like this, and may borrow your slides. Theo những ý định ban đầu này của nút để thực hiện những điều tuyệt vời như ghi db theo hàng đợi và đẩy máy chủ, thật ngạc nhiên là hầu hết các ứng dụng nút ngày nay vẫn được xây dựng trên mô hình yêu cầu/phản hồi và chờ đợi ghi db một cách đồng bộ [nhưng không theo khối]

Ulyana

Nội thất tuyệt vời, cảm ơn vì bài viết. Nút. js có rất nhiều lợi thế. nó nhẹ, hiệu quả và cung cấp khả năng sử dụng Javascript trên cả giao diện người dùng và phụ trợ mở ra những khả năng mới. Tuy nhiên, nó cũng có nhược điểm bạn cần lưu ý. Chúng tôi đã cố gắng mô tả một số trong bài viết https. //www. chuyên gia mạng. co/blog/pros-cons-use-node. js-backend Ý kiến ​​​​của bạn sẽ được đánh giá cao

Ulyana

Nội thất tuyệt vời, cảm ơn vì bài viết. Nút. js có rất nhiều lợi thế. nó nhẹ, hiệu quả và cung cấp khả năng sử dụng Javascript trên cả giao diện người dùng và phụ trợ mở ra những khả năng mới. Tuy nhiên, nó cũng có nhược điểm bạn cần lưu ý. Chúng tôi đã cố gắng mô tả một số trong bài viết https. //www. chuyên gia mạng. co/blog/pros-cons-use-node. js-backend Ý kiến ​​​​của bạn sẽ được đánh giá cao

Maq Said

Điều tuyệt vời. MongoDB I have never explored. Can you tell more about it and why does it go well with Node. Js

Maq Said

Điều tuyệt vời. MongoDB I have never explored. Can you tell more about it and why does it go well with Node. Js

Misha Kov

This is exactly the article I was looking for, Examples where Node. js can be used. Thanks

Misha Kov

This is exactly the article I was looking for, Examples where Node. js can be used. Thanks

Jessica Barnes

Node.js has the concept of asynchronous execution of Input-output based events through a thread pool. And it concentrates in execution and topping well for low-CPU, highly I/O-bound operations. Just starting to work on Node.js will allow a developers to analyze how to exploit it for maximum performance.

Jessica Barnes

Node.js has the concept of asynchronous execution of Input-output based events through a thread pool. And it concentrates in execution and topping well for low-CPU, highly I/O-bound operations. Just starting to work on Node.js will allow a developers to analyze how to exploit it for maximum performance.

Janguk James Lee

This is a pretty good article motives me to take on Node. js

Janguk James Lee

This is a pretty good article motives me to take on Node. js

Magdalena Mbn

if they ca'tn learn how to handle pointers they can't program

Magdalena Mbn

if they ca'tn learn how to handle pointers they can't program

Orderama Web

TwaT - can you tell me which pub/bar you visit so I can avoid you. I wouldn't be surprised if you OrgASM when you read back your comments

Orderama Web

TwaT - can you tell me which pub/bar you visit so I can avoid you. I wouldn't be surprised if you OrgASM when you read back your comments

philippe

I'd rather have more Java to the client side than more Javascript on the server side. Refactoring Javascript is a nightmare. Bạn nào làm phần mềm 4000 - 10000 class như mình thì biết mình đang nói cái gì. I see the threading management as a plus [ if you target to run a site like Facebook otherwise you dont care. Your static content will use cloud flare are 4000 connections AT THE SAME TIME is just insane traffic so i would not compromise maintenance VS scalability ] Not valid from intranet applications at least. I curious if future version of Tomcat will use the reactor pattern, Java itself does provides support for this. You can deal with static content using Nginx which has the reactor pattern implemented https. //www. pascaldimassimo. com/2011/02/10/java-and-the-reactor-pattern Still for dynamic pages i haven't found any clues. A thread does not hold the session context so i am really skeptical about having 2Mb in there. Unless poorly coded

philippe

I'd rather have more Java to the client side than more Javascript on the server side. Refactoring Javascript is a nightmare. Bạn nào làm phần mềm 4000 - 10000 class như mình thì biết mình đang nói cái gì. I see the threading management as a plus [ if you target to run a site like Facebook otherwise you dont care. Your static content will use cloud flare are 4000 connections AT THE SAME TIME is just insane traffic so i would not compromise maintenance VS scalability ] Not valid from intranet applications at least. I curious if future version of Tomcat will use the reactor pattern, Java itself does provides support for this. You can deal with static content using Nginx which has the reactor pattern implemented https. //www. pascaldimassimo. com/2011/02/10/java-and-the-reactor-pattern Still for dynamic pages i haven't found any clues. A thread does not hold the session context so i am really skeptical about having 2Mb in there. Unless poorly coded

Cody Donelson

Event though the article is a few years old it brings up some great points about Node. js. Reading through the comments I've seen some posts about how Node. js is a wonderful thing, and others about how the leading languages are C#, Java, or Ruby. We know that JavaScript is going to offer some complexities as it relates to Object Oriented Programming, Object Relational Mapping, relational databases, and more. I think most developers/project managers are losing sight of what makes JavaScript and Node. js [as well as AngularJS] so wonderful. We were able to implement a client side language on the server side and make it do the exact same thing as any other server side language. I personally love using Node. js, although it was difficult to wrap my head around being fully immersed in a type-less language. Once I grasped the fact that the sky was the limit when it came to my objects and that I didn't have to map my objects from one type to another [like you would in C# or Java] my ability to write a code that performed quickly and effectively grew. I've recently been teaching a couple PC techs at the company I work for the ins and outs of programming. My boss is very adamant that Node. js is the way of the future [especially the deprecation of Java plug-ins within the coming years] I would tend to agree. It's lost on me as to why there's such an argument as far as objects are concerned in Node. js/JavaScript. I find it easier to use objects and I can use them more dynamically BECAUSE of JavaScript. Very soon I'll be implementing HTML properties within objects for my Express 4 applications. I've found that PUG [formerly Jade] is extremely capable of handling objects and arrays, thus, making it easier for someone to dynamically change a type, a value, or a tag, based on the object that gets sent through a GET or POST request. I believe once everyone gets on board with understanding the way Node. js operates, how you can effectively implement standards that are usually enforced in typed languages, and over the fact that Node. js has some quirks about it, will we truly be able to move forward and make this language as powerful as the languages that came before it. Lastly, I'll add that the ability to utilize Node. js virtually anywhere makes it that much better. Whether its an Express application deployed on a Linux server, an Electron application that's deployed on a terminal server, Node. js is practically a perfect fit for whatever amount of work that needs to be done

Cody Donelson

Event though the article is a few years old it brings up some great points about Node. js. Reading through the comments I've seen some posts about how Node. js is a wonderful thing, and others about how the leading languages are C#, Java, or Ruby. We know that JavaScript is going to offer some complexities as it relates to Object Oriented Programming, Object Relational Mapping, relational databases, and more. I think most developers/project managers are losing sight of what makes JavaScript and Node. js [as well as AngularJS] so wonderful. We were able to implement a client side language on the server side and make it do the exact same thing as any other server side language. I personally love using Node. js, although it was difficult to wrap my head around being fully immersed in a type-less language. Once I grasped the fact that the sky was the limit when it came to my objects and that I didn't have to map my objects from one type to another [like you would in C# or Java] my ability to write a code that performed quickly and effectively grew. I've recently been teaching a couple PC techs at the company I work for the ins and outs of programming. My boss is very adamant that Node. js is the way of the future [especially the deprecation of Java plug-ins within the coming years] I would tend to agree. It's lost on me as to why there's such an argument as far as objects are concerned in Node. js/JavaScript. I find it easier to use objects and I can use them more dynamically BECAUSE of JavaScript. Very soon I'll be implementing HTML properties within objects for my Express 4 applications. I've found that PUG [formerly Jade] is extremely capable of handling objects and arrays, thus, making it easier for someone to dynamically change a type, a value, or a tag, based on the object that gets sent through a GET or POST request. I believe once everyone gets on board with understanding the way Node. js operates, how you can effectively implement standards that are usually enforced in typed languages, and over the fact that Node. js has some quirks about it, will we truly be able to move forward and make this language as powerful as the languages that came before it. Lastly, I'll add that the ability to utilize Node. js virtually anywhere makes it that much better. Whether its an Express application deployed on a Linux server, an Electron application that's deployed on a terminal server, Node. js is practically a perfect fit for whatever amount of work that needs to be done

Gage Poon

Lightening fast, lightweight, smoother development and better performance these are some of the revolutionary changes brought by Node js in the web development field. Node js offers the freedom to creativity, abundant resources like NPM [Node Package Manager], which is a shared library of modules and tools. Additionally, web applications developed using this web development framework are more scalable. This JavaScript framework is very popular among the startups. However, big names like Netflix, Paypal, eBay, Microsoft, Uber, DivBox. in etc. are also using this feature-rich web development framework

Gage Poon

Lightening fast, lightweight, smoother development and better performance these are some of the revolutionary changes brought by Node js in the web development field. Node js offers the freedom to creativity, abundant resources like NPM [Node Package Manager], which is a shared library of modules and tools. Additionally, web applications developed using this web development framework are more scalable. This JavaScript framework is very popular among the startups. However, big names like Netflix, Paypal, eBay, Microsoft, Uber, DivBox. in etc. are also using this feature-rich web development framework

rajivkumar bonam

what is node js how to write code in node js

rajivkumar bonam

what is node js how to write code in node js

Minarchism Leads To Freedom

Great article, thanks

Minarchism Leads To Freedom

Great article, thanks

csps1343

Nice node.js tutorials, thanks for sharing.

csps1343

Nice node.js tutorials, thanks for sharing.

Rahul Raut

thank you so much. learn node //monkelite.com/what-is-node-js-learn-step-by-step/

Rahul Raut

thank you so much. learn node //monkelite.com/what-is-node-js-learn-step-by-step/

Chapter247- Software Dev

"Why The Hell Would I Use Node.js? A Case-by-Case Tutorial". Every beginner must required to read this article. It's so easy to understand main Node.Js concept and programming overviews. Hire Node js development company

Sam Watt

Wow, đây là một bài viết rất chi tiết và sâu sắc dựa trên các trường hợp. I loved reading it, and hoping to see more such articles. Thank you

ThinkStart Pvt Ltd

Useful post. Thanks you for sharing this wonderful information

w3villa

Hi, I like to read your informative blog. Thanks for sharing

Marie adams

I made several successful investments with this broker before losing 40% of my savings to the trading scam. It cost me so much money and pain to invest in an investment that was not even real. I was able to recover the majority of the funds, and we are still attempting to recover the rest. Tôi thực sự khuyên bạn nên AN TOÀN ĐỂ ĐẦU TƯ TỐT cho bất kỳ ai tham gia vào một vụ lừa đảo giao dịch trực tuyến Lừa đảo giao dịch đã thu hồi 350.000 đô la DƯỚI ĐÂY LÀ LIÊN HỆ CỦA HỌ. secure2investwell@gmail. cuộc gọi / whatsapp. +14638887391

Marie adams

Tôi đã thực hiện một số khoản đầu tư thành công với nhà môi giới này trước khi mất 40% số tiền tiết kiệm của mình vì trò lừa đảo giao dịch. Tôi đã tốn rất nhiều tiền và đau đớn khi đầu tư vào một khoản đầu tư thậm chí không có thật. Tôi đã có thể thu hồi phần lớn số tiền và chúng tôi vẫn đang cố gắng thu hồi phần còn lại. Tôi thực sự khuyên bạn nên AN TOÀN ĐỂ ĐẦU TƯ TỐT cho bất kỳ ai tham gia vào một vụ lừa đảo giao dịch trực tuyến Lừa đảo giao dịch đã thu hồi 350.000 đô la DƯỚI ĐÂY LÀ LIÊN HỆ CỦA HỌ. safe2investwell@gmail. cuộc gọi / whatsapp. +14638887391

Joshua Flynn

Viết rất tốt nhưng bạn có thể làm điều tương tự bằng cách sử dụng ngăn xếp đèn thông thường với lệnh gọi JQuery thông qua AJAX giống như tất cả các trình nhắn tin tức thời trước đây đã thực hiện mà không gặp rắc rối nào không? . Tôi đã đọc hàng trăm bài báo trên web về lý do tại sao ai đó nên sử dụng nút nhưng tất cả chúng đều đề cập đến điều gì đó có thể được thực hiện với công nghệ mà chúng tôi đã có từ những năm 90. vậy nút có gì đặc biệt mà tôi nên tìm hiểu về nó với công nghệ 30 năm tuổi đã hỗ trợ các loại ứng dụng giống như bạn đã đề cập trong bài viết này 15 năm trước khi nút xuất hiện và quay trở lại khi quay số nhanh. Vì vậy, nếu nó đủ nhanh để thực hiện điều tương tự qua kết nối quay số thì nút đã làm gì để cải thiện hệ sinh thái của internet

Chủ Đề