Sử dụng bộ nhớ javascript

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

Daniel

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

Daniel

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. Those may be intractable problems if any of them were true. 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. Almost all modern editors support type inference for 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. Those may be intractable problems if any of them were true. 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. Almost all modern editors support type inference for 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 on android and 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 on android and 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. đại số. com/Tại sao-không-C-với-Mono-phổ biến-cho-doanh nghiệp-ứng dụng-trên-máy chủ Linux. nhưng tìm kiếm nhanh trên Google cho Enterprise Node. js cung cấp khá nhiều. Đây là 3 kết quả tìm kiếm hàng đầu mà tôi thấy. http. //Blog. tăng chồng. com/node-js-is-enterprise-ready/ https. //www. hân hoan. com/nodejs-hỗ trợ 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. đại số. com/Tại sao-không-C-với-Mono-phổ biến-cho-doanh nghiệp-ứng dụng-trên-máy chủ Linux. nhưng tìm kiếm nhanh trên Google cho Enterprise Node. js cung cấp khá nhiều. Đây là 3 kết quả tìm kiếm hàng đầu mà tôi thấy. http. //Blog. tăng chồng. com/node-js-is-enterprise-ready/ https. //www. hân hoan. com/nodejs-hỗ trợ 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. Tôi có thể chạy micro. Net on a watch or on an arduino device. I can write . 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. Tôi có thể chạy micro. Net on a watch or on an arduino device. I can write . 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. "hardly better than real inheritance, which permits far more flexible arrangements. " 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. "hardly better than real inheritance, which permits far more flexible arrangements. " 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 and why projects might use it. 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 and why projects might use it. 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

Tôi chỉ có 1 câu hỏi ở đây với tuyên bố của bạn. "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

Tôi chỉ có 1 câu hỏi ở đây với tuyên bố của bạn. "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. Multi-threading is more complicated and has some overhead every time there is a context switch, but it means that more cores can be thrown at parallelizable units of work, and even discrete operations can be handled by the different threads. 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. Multi-threading is more complicated and has some overhead every time there is a context switch, but it means that more cores can be thrown at parallelizable units of work, and even discrete operations can be handled by the different threads. 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

I agree. 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

I agree. 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 is a poor choice of language for enterprise/complex development. 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. In all rights it should have gone the way of the dinosaurs 10 years ago. The main driver to move away from scripting languages was that they were a maintenance nightmare and led to ball of mud applications that had constant bugs that couldn't be tracked. It has only been a short 10 years since we breathed a huge sigh of relief when serious development moved off of scripting languages and here we are doing it again unwilling to learn from the past, convinced that this is "new and cutting edge", rather than just old, tired and regurgitated. It will end up the same way as it did last time, being talked about with disgust like classic asp and perl cgi. I can only conclude the developers championing it now were just not around to see the fallout of this last time around. Every new generation of developer is convinced they have discovered "the truth", those of us who have seen this cycle of pain just have to sit back and shake our heads in disbelief. Unfortunately you can't teach experience, it is something you have to learn the hard way. Sure if you are an amateur and know nothing else then by all means, but anyone trying to do a professional job needs to leave this alone and stop making populist technology choices without considering the outcomes. If you can't evaluate the long term limitations of a technology for yourself you shouldn't be working in development. Developers need to stop being so childish, acting like a bunch of deluded fan boys, this is a serious business, not a game

TerraT

Javascript is a poor choice of language for enterprise/complex development. 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. In all rights it should have gone the way of the dinosaurs 10 years ago. The main driver to move away from scripting languages was that they were a maintenance nightmare and led to ball of mud applications that had constant bugs that couldn't be tracked. It has only been a short 10 years since we breathed a huge sigh of relief when serious development moved off of scripting languages and here we are doing it again unwilling to learn from the past, convinced that this is "new and cutting edge", rather than just old, tired and regurgitated. It will end up the same way as it did last time, being talked about with disgust like classic asp and perl cgi. I can only conclude the developers championing it now were just not around to see the fallout of this last time around. Every new generation of developer is convinced they have discovered "the truth", those of us who have seen this cycle of pain just have to sit back and shake our heads in disbelief. Unfortunately you can't teach experience, it is something you have to learn the hard way. Sure if you are an amateur and know nothing else then by all means, but anyone trying to do a professional job needs to leave this alone and stop making populist technology choices without considering the outcomes. If you can't evaluate the long term limitations of a technology for yourself you shouldn't be working in development. Developers need to stop being so childish, acting like a bunch of deluded fan boys, this is a serious business, not a game

adroittech

OMG. Eric . Are you for real? Do you even know how Nodejs works? Did you even try to look at backbone of Nodejs? Just download yourself a source-code and checkout. IT IS IN PLAIN C/C++. http_parcer is C++ lib. libuv is another and single most important C++ library in nodejs backbone which makes nodejs async, event driven and non blocking. Javascript by itself is body without a soul and life. JAVASCRIPT is just a script that you use to script your logic. One day if smeoene ports lua with this libs, he will not need Javascript to code. same for python etc. But the basic fact remains the same. IT IS C++ code that makes what nodejs is, not that javascript is too fast. in fact javascript is slowest in all of the scripting language. So don't flatter yourself in believing that just java-script is great and other things are shit. And do not insult C/C++ if you have no knowledge of it. So, again, i urge you to take back your words. "Javascript type system is better then C++". [Javascript has no type system. and if you still believe that it has one, you are in a very wrong field, go build some scaffolding] Also, these companies are not choosing nodejs for the reason you mentioned. This is possible in almost all languages. The reason why companies are choosing nodejs is that, they get ready made javascript coders, which are in millions and can not do c++/java code, to do server side because it is cheaper. Another reason -> its ecosystem. Yet another reason -> Its lot easier to conduct load tests in nodejs than other scripts. Liên kết bạn đã đề cập là công việc dự định sẽ được bắt đầu. Why do not you suggest them that please write this web-assembly compiler in nodejs rather than c/c++/assembly because according to you that is superior. C'Mon man, how can you compare Nodejs [A technology] with a C++ [language] they are not in the same league. C++ makes node possible, its not visa versa

adroittech

OMG. Eric . Are you for real? Do you even know how Nodejs works? Did you even try to look at backbone of Nodejs? Just download yourself a source-code and checkout. IT IS IN PLAIN C/C++. http_parcer is C++ lib. libuv is another and single most important C++ library in nodejs backbone which makes nodejs async, event driven and non blocking. Javascript by itself is body without a soul and life. JAVASCRIPT is just a script that you use to script your logic. One day if smeoene ports lua with this libs, he will not need Javascript to code. same for python etc. But the basic fact remains the same. IT IS C++ code that makes what nodejs is, not that javascript is too fast. in fact javascript is slowest in all of the scripting language. So don't flatter yourself in believing that just java-script is great and other things are shit. And do not insult C/C++ if you have no knowledge of it. So, again, i urge you to take back your words. "Javascript type system is better then C++". [Javascript has no type system. and if you still believe that it has one, you are in a very wrong field, go build some scaffolding] Also, these companies are not choosing nodejs for the reason you mentioned. This is possible in almost all languages. The reason why companies are choosing nodejs is that, they get ready made javascript coders, which are in millions and can not do c++/java code, to do server side because it is cheaper. Another reason -> its ecosystem. Yet another reason -> Its lot easier to conduct load tests in nodejs than other scripts. Liên kết bạn đã đề cập là công việc dự định sẽ được bắt đầu. Why do not you suggest them that please write this web-assembly compiler in nodejs rather than c/c++/assembly because according to you that is superior. C'Mon man, how can you compare Nodejs [A technology] with a C++ [language] they are not in the same league. C++ makes node possible, its not visa versa

oberona

"The main driver to move away from scripting languages was that they were a maintenance nightmare and led to ball of mud applications" -- could you clarify what you mean by scripting languages, and what replacements "serious developers" migrated to over the past ten years? I was pleased to see a reference to Django in the article and have not run across maintainability issues caused by the use of Python, SQL, or ORMs in general. On the contrary, Python is my go-to language precisely for its maintainability. Your criticisms of js are spot on, but I can't see how they apply across the entire universe of scripting languages

oberona

"The main driver to move away from scripting languages was that they were a maintenance nightmare and led to ball of mud applications" -- could you clarify what you mean by scripting languages, and what replacements "serious developers" migrated to over the past ten years? I was pleased to see a reference to Django in the article and have not run across maintainability issues caused by the use of Python, SQL, or ORMs in general. On the contrary, Python is my go-to language precisely for its maintainability. Your criticisms of js are spot on, but I can't see how they apply across the entire universe of scripting languages

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 was always async as well, it merely emulated threads much like it sounds like node does by using an event queue. 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 hiệu suất khôn ngoan và thậm chí không cần truy cập vào máy chủ và kiến ​​trúc bộ xử lý đa lõi hiện tại của chúng. 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. What kind of protection does it have against cross-site scripting and other attacks? Earlier today I stumbled across a TOR/Bittorrent client that ran in my browser window, and after opening it my computer wouldn't shut down nicely [it scares me to think what it could have been seeding. ]. No warnings about security or what types of connections my browser window was opening up, just went along with it's P2P business. the hacker side of me could have a real hay day with those kind of "features". I doubt that kind of stuff has been tested much either which means there's a lot of room for bugs, and where there's a lot of room for bugs there's a lot of room for vulnerabilities. But hey, at least your entire stack is all in the same language. Means you can hire less experienced developers for less money, right? ;]

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 was always async as well, it merely emulated threads much like it sounds like node does by using an event queue. 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 hiệu suất khôn ngoan và thậm chí không cần truy cập vào máy chủ và kiến ​​trúc bộ xử lý đa lõi hiện tại của chúng. 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. What kind of protection does it have against cross-site scripting and other attacks? Earlier today I stumbled across a TOR/Bittorrent client that ran in my browser window, and after opening it my computer wouldn't shut down nicely [it scares me to think what it could have been seeding. ]. No warnings about security or what types of connections my browser window was opening up, just went along with it's P2P business. the hacker side of me could have a real hay day with those kind of "features". I doubt that kind of stuff has been tested much either which means there's a lot of room for bugs, and where there's a lot of room for bugs there's a lot of room for vulnerabilities. But hey, at least your entire stack is all in the same language. Means you can hire less experienced developers for less money, right? ;]

iwebworld

Good Article for Node JS, you can learn Node JS online in http. //iwebworld. info or send a email iwebworldinfo@gmail. com

iwebworld

Good Article for Node JS, you can learn Node JS online in http. //iwebworld. info or send a email iwebworldinfo@gmail. com

Avinash Shah

You could remove all the pitfalls of JS by using the its superset aka TypeScript

Avinash Shah

You could remove all the pitfalls of JS by using the its superset aka TypeScript

evanplaice

Tl;dr Use node for IO-heavy processing and delegating CPU-intensive processing to a cluster of specialized worker nodes [ex database, media processing, etc]. This isn't exactly new information. I covered this topic back in '12. http. //programmers. stackexchange. com/a/179499/1256 Ideally, the HTTP and API servers should be mostly stateless [excl session management] and disposable. They're just a functional pipeline that translates the raw data into consumable representations. That way, the servers are easy to provision/destroy dynamically to meet the spikey nature of demand. I'm not sure why so many of the commenters are vehemently arguing in favor of multi-purpose vertically-scalable server architectures. By nature, vertical scaling will always have an upper limit predicated by hardware capacity. No matter how efficient the code is. The writing is on the wall. You can spend a fortune on hardware and lose sleep questioning the validity of your risk assessment [aka WAG]. Vào cuối ngày, kim loại trần là một tài sản cố định. Best case, it meets expected demand and justifies the cost. Worst case, it either costs more than it's worth or lacks the capacity to meet demand. Alternatively, you can embrace distributive computing and automate the infrastructure to grow/contract relative to demand. For the people fighting religious wars over which language is best, node . C# . java. Who cares. All 3 allow 'functional-style' programming. All 3, support async processing [natively or through extensions]. All 3 can be managed via provisioning. All 3 are perfectly valid for building distributive infrastructure. Choosing which one to use depends on the quality of the tools, whether or not it will be used to extend existing infrastructure, and the perception of the client. Build whatever you're good at building. If you're really good; build whatever is easiest to implement, support, and generate the most profit [or save the most on cost]. BTW, kudos to the author. It's nice to see somebody do a comprehensive [and mostly objective] writeup on this topic

evanplaice

Tl;dr Use node for IO-heavy processing and delegating CPU-intensive processing to a cluster of specialized worker nodes [ex database, media processing, etc]. This isn't exactly new information. I covered this topic back in '12. http. //programmers. stackexchange. com/a/179499/1256 Ideally, the HTTP and API servers should be mostly stateless [excl session management] and disposable. They're just a functional pipeline that translates the raw data into consumable representations. That way, the servers are easy to provision/destroy dynamically to meet the spikey nature of demand. I'm not sure why so many of the commenters are vehemently arguing in favor of multi-purpose vertically-scalable server architectures. By nature, vertical scaling will always have an upper limit predicated by hardware capacity. No matter how efficient the code is. The writing is on the wall. You can spend a fortune on hardware and lose sleep questioning the validity of your risk assessment [aka WAG]. Vào cuối ngày, kim loại trần là một tài sản cố định. Best case, it meets expected demand and justifies the cost. Worst case, it either costs more than it's worth or lacks the capacity to meet demand. Alternatively, you can embrace distributive computing and automate the infrastructure to grow/contract relative to demand. For the people fighting religious wars over which language is best, node . C# . java. Who cares. All 3 allow 'functional-style' programming. All 3, support async processing [natively or through extensions]. All 3 can be managed via provisioning. All 3 are perfectly valid for building distributive infrastructure. Choosing which one to use depends on the quality of the tools, whether or not it will be used to extend existing infrastructure, and the perception of the client. Build whatever you're good at building. If you're really good; build whatever is easiest to implement, support, and generate the most profit [or save the most on cost]. BTW, kudos to the author. It's nice to see somebody do a comprehensive [and mostly objective] writeup on this topic

evanplaice

Yes, both languages support horizontal scaling with asynchronous message management infrastructure. CQRS is nothing but an API implementation pattern. CRUD is the typical use case [as it should be] but Node doesn't automagically scaffold 1. 1 mappings between DB and CRUD [see rails/laravel/django for that]. Node isn't a framework at all, it's just a HTTP server. You can leverage frameworks [ex Express] to make life easier by providing sane defaults and better structure but you still have to manually specify your API routes. . Net Reactive Extensions have been ported to JS. https. //www. npmjs. com/package/rx In fact, even LINQ has been ported to JS [yes, seriously]. http. //linqjs. codeplex. com/ "Any application that can be written in Javascript, will be written in Javascript" - Atwood's Law ORMs are only an issue because they require an additional layer of abstraction from the underlying data. If [read when] the data models need to change to adapt to business demands, both the ORM and the database schema will need to be updated and tested to reflect the changes. Which is not really a big deal if there's a good update strategy in place. As for the rest of your comment, you'd do well if you stepped out of your comfort zone once in a while to see how JS development really works. 1. JS classes are currently supported now via ES6 [also, available client-side via polyfills]. Prototypes really aren't much different than classes in terms of encapsulation [except they're a lot more flexible]. Compile-time static type checking is even supported via TypeScript/Dart if that's what floats your boat, it's just not the default. 2. TDD/BDD isn't a feature exclusive to statically typed languages. There are a lot of great testing frameworks available in JS [both server/client-side]. Choose your flavor, unit testing [Mocha], behavior driven unit testing [Chai], api testing [SuperTest], and continuous integration testing [TravisCI, and many others] are all used extensively throughout the community. JSUnit [the JS equivalent of JUnit/NUnit] is even available if you miss unit testing in Java/. NET. If anything, testing is a basic requirement of any non-trivial JS app that goes into production because you don't have a compile-time type checker to hold your hand. 3. Complex workflow? Seriously? So, you've never heard of NPM scripting, grunt, gulp? Automating any-and-everything in JS is pretty easy. Style enforcement, linting, documentation generation, scaffolding, one-click-deployment, language transpilation, bundling, distribution building, package/dependency management, release management, etc. 4. . cringe. if you rely on the compile-time static type checking system alone to validate user input, you're doing it wrong. Building a data layer in any language requires constraints above-and-beyond what the default types provide. So, either way you'll have to extend your data models with custom validation checks. The cool part about handling validation in JS is you can use the same routines to check user input on both the client/server-side. Ít trùng lặp nỗ lực hơn FTW. Contrary to what you think. Javascript really is a 'one size fits all' approach if you prefer to use it as such. Seriously, you can even compile C/C++ directly to javascript using asm. js. Does that mean you have to use it? Of course not. Any developer with a speck of sense wouldn't fault you for choosing C#, it's a great language. I have experience writing code in many languages, including building non-trivial desktop applications in C#. Given a choice, I'd prefer to use Javascript. The mix of, looser constraints and functional/imperative/prototype styles allow for a level of creativity I haven't experienced in any other language. The tools are great, the module system is amazing, and the language itself is getting substantially better with each update

evanplaice

Yes, both languages support horizontal scaling with asynchronous message management infrastructure. CQRS is nothing but an API implementation pattern. CRUD is the typical use case [as it should be] but Node doesn't automagically scaffold 1. 1 mappings between DB and CRUD [see rails/laravel/django for that]. Node isn't a framework at all, it's just a HTTP server. You can leverage frameworks [ex Express] to make life easier by providing sane defaults and better structure but you still have to manually specify your API routes. . Net Reactive Extensions have been ported to JS. https. //www. npmjs. com/package/rx In fact, even LINQ has been ported to JS [yes, seriously]. http. //linqjs. codeplex. com/ "Any application that can be written in Javascript, will be written in Javascript" - Atwood's Law ORMs are only an issue because they require an additional layer of abstraction from the underlying data. If [read when] the data models need to change to adapt to business demands, both the ORM and the database schema will need to be updated and tested to reflect the changes. Which is not really a big deal if there's a good update strategy in place. As for the rest of your comment, you'd do well if you stepped out of your comfort zone once in a while to see how JS development really works. 1. JS classes are currently supported now via ES6 [also, available client-side via polyfills]. Prototypes really aren't much different than classes in terms of encapsulation [except they're a lot more flexible]. Compile-time static type checking is even supported via TypeScript/Dart if that's what floats your boat, it's just not the default. 2. TDD/BDD isn't a feature exclusive to statically typed languages. There are a lot of great testing frameworks available in JS [both server/client-side]. Choose your flavor, unit testing [Mocha], behavior driven unit testing [Chai], api testing [SuperTest], and continuous integration testing [TravisCI, and many others] are all used extensively throughout the community. JSUnit [the JS equivalent of JUnit/NUnit] is even available if you miss unit testing in Java/. NET. If anything, testing is a basic requirement of any non-trivial JS app that goes into production because you don't have a compile-time type checker to hold your hand. 3. Complex workflow? Seriously? So, you've never heard of NPM scripting, grunt, gulp? Automating any-and-everything in JS is pretty easy. Style enforcement, linting, documentation generation, scaffolding, one-click-deployment, language transpilation, bundling, distribution building, package/dependency management, release management, etc. 4. . cringe. if you rely on the compile-time static type checking system alone to validate user input, you're doing it wrong. Building a data layer in any language requires constraints above-and-beyond what the default types provide. So, either way you'll have to extend your data models with custom validation checks. The cool part about handling validation in JS is you can use the same routines to check user input on both the client/server-side. Ít trùng lặp nỗ lực hơn FTW. Contrary to what you think. Javascript really is a 'one size fits all' approach if you prefer to use it as such. Seriously, you can even compile C/C++ directly to javascript using asm. js. Does that mean you have to use it? Of course not. Any developer with a speck of sense wouldn't fault you for choosing C#, it's a great language. I have experience writing code in many languages, including building non-trivial desktop applications in C#. Given a choice, I'd prefer to use Javascript. The mix of, looser constraints and functional/imperative/prototype styles allow for a level of creativity I haven't experienced in any other language. The tools are great, the module system is amazing, and the language itself is getting substantially better with each update

evanplaice

Upload Files. http. //howtonode. org/really-simple-file-uploads "All the I/O operations is handled by Node. js is using multiple threads internally; it's the programming interface to that I/O functionality that's single threaded, event-based, and asynchronous. " http. //stackoverflow. com/a/22981768/290340 Libuv uses a thread-pool to handle I/O operations [files, sockets, etc] in an asynchronous manner. Where most languages block by default during CPU-heavy I/O operations, Node doesn't. It simply fires an event when the I/O operation completes on the worker thread. Active Directory. https. //github. com/gheeres/node-activedirectory https. //github. com/auth0/passport-windowsauth

evanplaice

Upload Files. http. //howtonode. org/really-simple-file-uploads "All the I/O operations is handled by Node. js is using multiple threads internally; it's the programming interface to that I/O functionality that's single threaded, event-based, and asynchronous. " http. //stackoverflow. com/a/22981768/290340 Libuv uses a thread-pool to handle I/O operations [files, sockets, etc] in an asynchronous manner. Where most languages block by default during CPU-heavy I/O operations, Node doesn't. It simply fires an event when the I/O operation completes on the worker thread. Active Directory. https. //github. com/gheeres/node-activedirectory https. //github. com/auth0/passport-windowsauth

evanplaice

The distinction is that Node is async by default So, the number of developers doing async programming in other languages are the minority so they're not as well represented. "I can't come up with any good reason to use it on the server side in favor to other available languages. " Not gonna lie, using Node at first was. Challenging to say the least. Getting used to async-by-default is not an easy transition. The nice part Node is, the primary focus of the platform is building servers/clients so the ecosystem has a lot of powerful tools to do anything dealing with web development. ". have better standard libraries, tools and resources. " I'm not sure what gave you that impression. It doesn't use the monolithic-everything-and-the-kitchen-sink base class library approach. The core itself is very small but that's a benefit as it's much lighter to deploy. It also includes a very powerful, full-featured package manager by default so you're expected to add the dependencies your project needs. NPM [Node Package Manager] has over 200K packages and counting. Since the majority of the modules are developed independently from the core, they iterate and improve much faster than the equivalent core libraries in other languages. Dependencies are managed locally on a per-project basis in the package. json file. Typically, it's bad form for a module author to require that their package be installed globally. Installing packages locally prevents version conflicts at the global level and guarantees that -- when you install a package -- everything required to use the module is included. It may seem inefficient at first glance because many dependencies may have copies of the same sub-dependencies [or sub-subdeps, etc] but compared to the cost of including a massive standard library, the storage space is insignificant. The workflow to setup a project is. - clone the source - run 'npm install' NPM will automatically download and install all of the dependencies [incl sub-deps, sub-sub-deps, etc]. Since the dependencies [and their specific versions] are explicitly defined in the config, you don't need to check them into source control. In addition, with ES6 [incl the new ES6-module-loader] about to be released, a new JSPM [Javascript Package Manager] has been created to manage client-side javascript dependencies. Module imports in the browser have finally been formalized in the language spec, so Bower and the variety of module-loading pseudo-standards [ex AMD, CommonJS, UMD] will go away

evanplaice

The distinction is that Node is async by default So, the number of developers doing async programming in other languages are the minority so they're not as well represented. "I can't come up with any good reason to use it on the server side in favor to other available languages. " Not gonna lie, using Node at first was. Challenging to say the least. Getting used to async-by-default is not an easy transition. The nice part Node is, the primary focus of the platform is building servers/clients so the ecosystem has a lot of powerful tools to do anything dealing with web development. ". have better standard libraries, tools and resources. " I'm not sure what gave you that impression. It doesn't use the monolithic-everything-and-the-kitchen-sink base class library approach. The core itself is very small but that's a benefit as it's much lighter to deploy. It also includes a very powerful, full-featured package manager by default so you're expected to add the dependencies your project needs. NPM [Node Package Manager] has over 200K packages and counting. Since the majority of the modules are developed independently from the core, they iterate and improve much faster than the equivalent core libraries in other languages. Dependencies are managed locally on a per-project basis in the package. json file. Typically, it's bad form for a module author to require that their package be installed globally. Installing packages locally prevents version conflicts at the global level and guarantees that -- when you install a package -- everything required to use the module is included. It may seem inefficient at first glance because many dependencies may have copies of the same sub-dependencies [or sub-subdeps, etc] but compared to the cost of including a massive standard library, the storage space is insignificant. The workflow to setup a project is. - clone the source - run 'npm install' NPM will automatically download and install all of the dependencies [incl sub-deps, sub-sub-deps, etc]. Since the dependencies [and their specific versions] are explicitly defined in the config, you don't need to check them into source control. In addition, with ES6 [incl the new ES6-module-loader] about to be released, a new JSPM [Javascript Package Manager] has been created to manage client-side javascript dependencies. Module imports in the browser have finally been formalized in the language spec, so Bower and the variety of module-loading pseudo-standards [ex AMD, CommonJS, UMD] will go away

TerraT

As said above modern OO languages have a vast array of options to formalize and control your code and solutions that are lacking in scripting languages. That's just the plain truth, no amount of griping is going to change that. My point is there are a lot of developers choosing technology by popularity rather than suitability, that's what makes them fan boys. 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. But that is probably because most developers aren't true "Tradesman", more glorified "DIY'ers". The industry is full of amateurs who don't even know enough to know that they know nothing. They think because they can write an if statement and a while loop they are pros. Techno-weenies

TerraT

As said above modern OO languages have a vast array of options to formalize and control your code and solutions that are lacking in scripting languages. That's just the plain truth, no amount of griping is going to change that. My point is there are a lot of developers choosing technology by popularity rather than suitability, that's what makes them fan boys. 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. But that is probably because most developers aren't true "Tradesman", more glorified "DIY'ers". The industry is full of amateurs who don't even know enough to know that they know nothing. They think because they can write an if statement and a while loop they are pros. Techno-weenies

evanplaice

System level I/O operations [such as files, sockets] in Node are handled by libuv which does use a background thread pool. The difference is, the main thread can fire and forget the task to a background thread and the background thread will notify the main thread [via firing an event] when the operation is completed. Even with background thread processing, doing lots of I/O operations doesn't scale very well. For long-running CPU-heavy tasks [ex image/movie encoding] offloading the tasks to worker nodes is still preferable. In most languages, I/O operations are handled in a synchronous manner so if they requests are made on the main thread, they'll block execution until completed. The reason you don't see a noticeable pause in the UI when this happens is because the UI is asynchronous/event-based and runs on a thread separate from the main context

evanplaice

System level I/O operations [such as files, sockets] in Node are handled by libuv which does use a background thread pool. The difference is, the main thread can fire and forget the task to a background thread and the background thread will notify the main thread [via firing an event] when the operation is completed. Even with background thread processing, doing lots of I/O operations doesn't scale very well. For long-running CPU-heavy tasks [ex image/movie encoding] offloading the tasks to worker nodes is still preferable. In most languages, I/O operations are handled in a synchronous manner so if they requests are made on the main thread, they'll block execution until completed. The reason you don't see a noticeable pause in the UI when this happens is because the UI is asynchronous/event-based and runs on a thread separate from the main context

evanplaice

There's nothing stopping you from exposing the API as a microservice. WebKit just allows you to run a native JS client. I may be wrong but from what I understand, unlike the browser a webkit client isn't as strictly sandboxed so you can make system calls [ex to open/save files without user input]

evanplaice

There's nothing stopping you from exposing the API as a microservice. WebKit just allows you to run a native JS client. I may be wrong but from what I understand, unlike the browser a webkit client isn't as strictly sandboxed so you can make system calls [ex to open/save files without user input]

TerraT

I think you made my point for me, frothing unthinking, emotional nonsense, with very little in the way of fact, from a mind so fanatic about one thing it can't even see its failings. You seem to have made a fair few assumptions about what I do and don't know, I have been doing Javascript for 20 years, I know its short comings, I can work effectively in probably 30+ languages, I use what is appropriate, I never indicated otherwise. You need to grow up or find a new industry to work in. People like you are the problem with Software Development, know nothing nobodies who can't even make a case for a technology, let alone use one. Please stay away from the keyboard and do the rest of us a favour

TerraT

I think you made my point for me, frothing unthinking, emotional nonsense, with very little in the way of fact, from a mind so fanatic about one thing it can't even see its failings. You seem to have made a fair few assumptions about what I do and don't know, I have been doing Javascript for 20 years, I know its short comings, I can work effectively in probably 30+ languages, I use what is appropriate, I never indicated otherwise. You need to grow up or find a new industry to work in. People like you are the problem with Software Development, know nothing nobodies who can't even make a case for a technology, let alone use one. Please stay away from the keyboard and do the rest of us a favour

evanplaice

Do you use version control with a standard workflow [ex Gitflow workflow] where developers make changes on feature branches and code is peer reviewed before being merged? I've been messing around with trying to build an Angular2 website lately and the Angular2 project is still in early alpha so breaking changes are a regular [albeit unfortunate] occurrence. All of the available examples online are pretty-much broken so I've been monitoring the project development on Github. The rate that the core developers are thrashing on the codebase is truly remarkable. What's even more amazing is that every PR is unit tested and continuous integration tested well enough that every release is guaranteed to be fully functional [as far as they've implemented it so far]

evanplaice

Do you use version control with a standard workflow [ex Gitflow workflow] where developers make changes on feature branches and code is peer reviewed before being merged? I've been messing around with trying to build an Angular2 website lately and the Angular2 project is still in early alpha so breaking changes are a regular [albeit unfortunate] occurrence. All of the available examples online are pretty-much broken so I've been monitoring the project development on Github. The rate that the core developers are thrashing on the codebase is truly remarkable. What's even more amazing is that every PR is unit tested and continuous integration tested well enough that every release is guaranteed to be fully functional [as far as they've implemented it so far]

evanplaice

Following what Tracker1 is saying. Linting is the equivalent of compile-time checking in JS. I even use a Sublime extension that shows linter errors directly in the gutter of the editor as I'm writing code. If you want stricter checking you can add a style checker such as 'semistandard' which guarantees code styling on a project-wide basis. That means, spaces-not-tabs, indent 2 spaces, consistent functions, curly braces, etc. Type checking is good for superficial bugs [ex uninitialized variables, dead branches, invalid values] but eventually you'll have to verify the code doesn't have logic bugs through unit testing, continuous integration testing, api testing

evanplaice

Following what Tracker1 is saying. Linting is the equivalent of compile-time checking in JS. I even use a Sublime extension that shows linter errors directly in the gutter of the editor as I'm writing code. If you want stricter checking you can add a style checker such as 'semistandard' which guarantees code styling on a project-wide basis. That means, spaces-not-tabs, indent 2 spaces, consistent functions, curly braces, etc. Type checking is good for superficial bugs [ex uninitialized variables, dead branches, invalid values] but eventually you'll have to verify the code doesn't have logic bugs through unit testing, continuous integration testing, api testing

evanplaice

Node uses async event-based I/O via libuv [incl a thread pool reserved for I/O requests]. The main thread absolutely does not block during I/O operations. It works the same way cluster would except it's built into Node. Check out one of the presentations on libuv for more details

evanplaice

Node uses async event-based I/O via libuv [incl a thread pool reserved for I/O requests]. The main thread absolutely does not block during I/O operations. It works the same way cluster would except it's built into Node. Check out one of the presentations on libuv for more details

evanplaice

Performance wise, PayPal seems to think good things about Node http. //dongnotes. blogspot. com/2013/12/paypals-nodejs-versus-java-benchmark. html For security, the 'cors' module is pluggable to Express and can be used for all the usual CORS control stuff. The 'helmet' module -- also pluggable to Express -- exposes a small suite of features to protect against malicious users including additional cross site scripting protection. I'm not sure if I'd call a Fullstack JS dev 'inexperienced'. Having a solid understanding of multiple domains in a development ecosystem that is constantly evolving is maddening. ya know, "10 years of experience vs 1 year of experience 10 times"

evanplaice

Performance wise, PayPal seems to think good things about Node http. //dongnotes. blogspot. com/2013/12/paypals-nodejs-versus-java-benchmark. html For security, the 'cors' module is pluggable to Express and can be used for all the usual CORS control stuff. The 'helmet' module -- also pluggable to Express -- exposes a small suite of features to protect against malicious users including additional cross site scripting protection. I'm not sure if I'd call a Fullstack JS dev 'inexperienced'. Having a solid understanding of multiple domains in a development ecosystem that is constantly evolving is maddening. ya know, "10 years of experience vs 1 year of experience 10 times"

Josh Morgan

Node. js hasn't even been around for 10 years [which is funny considering I have seen job postings actually asking for 10 years experience with it]. I understand that following evolving technology is a challenge, and after 20 years I can tell you that by the time you get completely comfortable with any "full stack" it will be less relevant because technology is always advancing. Nothing will change that, it's just how things work. However, you can't really have your cake and eat it too there. Newer technology is less tested and therefore less secure, but older technology does not have as many features. There's always a trade-off there. Anybody who claims otherwise is selling you something

Josh Morgan

Node. js hasn't even been around for 10 years [which is funny considering I have seen job postings actually asking for 10 years experience with it]. I understand that following evolving technology is a challenge, and after 20 years I can tell you that by the time you get completely comfortable with any "full stack" it will be less relevant because technology is always advancing. Nothing will change that, it's just how things work. However, you can't really have your cake and eat it too there. Newer technology is less tested and therefore less secure, but older technology does not have as many features. There's always a trade-off there. Anybody who claims otherwise is selling you something

Anil Verma

I am sold on Node. JS [if your application is into building high scalability networking applications], Node. JS is the way to go in 2015. No wonder why so many startups and large corporations are adopting it. C++, Java, Ruby and Python havew their place in their respective domains. New companies and products will be getting built on wide variety of languages. I predict ROR adoption would still be high in coming years for building web applications [simply because ROR developers are easily available and time to market is so small]. Excellent article though Tomislav

Anil Verma

I am sold on Node. JS [if your application is into building high scalability networking applications], Node. JS is the way to go in 2015. No wonder why so many startups and large corporations are adopting it. C++, Java, Ruby and Python havew their place in their respective domains. New companies and products will be getting built on wide variety of languages. I predict ROR adoption would still be high in coming years for building web applications [simply because ROR developers are easily available and time to market is so small]. Excellent article though Tomislav

Daniel Jawna

So true. My job is the maintainance of legacy apps usually SQL Server dB's + ms access or php fronteds. These were usually made by "the grandson who is good with computers" Kind of guy. No foreign keys, but custom date + time functions. Your post is my sentiment exactly

Daniel Jawna

So true. My job is the maintainance of legacy apps usually SQL Server dB's + ms access or php fronteds. These were usually made by "the grandson who is good with computers" Kind of guy. No foreign keys, but custom date + time functions. Your post is my sentiment exactly

JPoet

I find Java very unproductive and very expensive for a lot of low level tedious work. C++ is for programmers who can handle memory access/pointers. Most corporate programmers cannot. Back in the day you had PL/1 and C for software engineers and COBOL for information technology programmers

JPoet

I find Java very unproductive and very expensive for a lot of low level tedious work. C++ is for programmers who can handle memory access/pointers. Most corporate programmers cannot. Back in the day you had PL/1 and C for software engineers and COBOL for information technology programmers

joselie castañeda

thanks. this is so helpful as i am going to make a heavy-computation enterprise application. i think i'll try node. js on other application. for now, i'll use ruby on rails

joselie castañeda

thanks. this is so helpful as i am going to make a heavy-computation enterprise application. i think i'll try node. js on other application. for now, i'll use ruby on rails

Túlio Spuri

When this article was written ?

Túlio Spuri

When this article was written ?

armandoali

Great article

armandoali

Great article

Olivier

Thanks for this article I think than the argument of same langage for front and dev is the worst I can liste or read. Organized à good coding with js is the more horrible things append in a team. I work since last year on backend project and where this should be coded in some times with mature framework like django it took too much time understand hundreds bugs. Where mongodb feels cool ? Never. I realy thinks than nodejs is a big joke and not So cool. The package manager give us some cool package to patch and hide the bad side of node but there is nothing to do about the callback hell. Finally the code looks like a big sand box than i hatte to open a file for debug or add some lines of code. So my conclusion is than for small app why not but for big and evolutive project not use nor nodejs and mongodb. Regards

Olivier

Thanks for this article I think than the argument of same langage for front and dev is the worst I can liste or read. Organized à good coding with js is the more horrible things append in a team. I work since last year on backend project and where this should be coded in some times with mature framework like django it took too much time understand hundreds bugs. Where mongodb feels cool ? Never. I realy thinks than nodejs is a big joke and not So cool. The package manager give us some cool package to patch and hide the bad side of node but there is nothing to do about the callback hell. Finally the code looks like a big sand box than i hatte to open a file for debug or add some lines of code. So my conclusion is than for small app why not but for big and evolutive project not use nor nodejs and mongodb. Regards

buffonomics

This is a fairly ill-informed comment as ES6 was alive and well as at a year ago. Besides the OO from ES6, there is also TypeScript which adds even more enterprise-level OO and enforcable static-typing to JavaScript. Like . NET is compiled to raw clr, TypeScript may also be "transpiled" to raw Javascript. NodeJS allows for pretty much all of this now with an even still better utilization of server resources and no OS lock-in. Think cutting your infrastructure costs by over 2000% because you really don't need to scale too vertically or pay for those . NET licenses per node of scale. Even if you were going the Mono route, lol. I'll let you research how that compares on your own. Fintech companies like Paypal that know a thing or 2 about load are happily doing great things with node as well so I highly doubt this comment of yours comes from a place of knowledge about what the NodeJS eco-system truly has to offer the enterprising product built in "this era", with a focus in micro-services [in the true-est sense of the word] and not "monolithic services" as you might be more used to. Also no matter what personal opinions you may have regarding ORMs, the logical fact of it all is that ORMS use more memory resources than is needed to run a backend. 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. You also said something regarding caching and ORMs to which I'm guessing you are referring to ORM-level caching [e. g. L1/2 Cache in Hibernate]. I hope you understand that you don't actually NEED ORMs to do your caching for you. You can do this using efficient and beautifully-decoupled tools. and at that more flexibly. It's important to keep in mind that, even now, someone out there is still defending Fortran as the one true tool to building software. Things move quite fast in this industry. The pride is understandable, but my recommendation to you is to get involved in at least 1 new technoverse every couple years at most. You'll stay relevant and thank me later

buffonomics

This is a fairly ill-informed comment as ES6 was alive and well as at a year ago. Besides the OO from ES6, there is also TypeScript which adds even more enterprise-level OO and enforcable static-typing to JavaScript. Like . NET is compiled to raw clr, TypeScript may also be "transpiled" to raw Javascript. NodeJS allows for pretty much all of this now with an even still better utilization of server resources and no OS lock-in. Think cutting your infrastructure costs by over 2000% because you really don't need to scale too vertically or pay for those . NET licenses per node of scale. Even if you were going the Mono route, lol. I'll let you research how that compares on your own. Fintech companies like Paypal that know a thing or 2 about load are happily doing great things with node as well so I highly doubt this comment of yours comes from a place of knowledge about what the NodeJS eco-system truly has to offer the enterprising product built in "this era", with a focus in micro-services [in the true-est sense of the word] and not "monolithic services" as you might be more used to. Also no matter what personal opinions you may have regarding ORMs, the logical fact of it all is that ORMS use more memory resources than is needed to run a backend. 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. You also said something regarding caching and ORMs to which I'm guessing you are referring to ORM-level caching [e. g. L1/2 Cache in Hibernate]. I hope you understand that you don't actually NEED ORMs to do your caching for you. You can do this using efficient and beautifully-decoupled tools. and at that more flexibly. It's important to keep in mind that, even now, someone out there is still defending Fortran as the one true tool to building software. Things move quite fast in this industry. The pride is understandable, but my recommendation to you is to get involved in at least 1 new technoverse every couple years at most. You'll stay relevant and thank me later

Ed

I really wanna be able to try out Node. js but it's such a pain in the effing ass to get something running. Installing a "simple" app always turns in to a list of things you need to do, install shit globally [which is NOT always possible], edit files, try to figure out what the damn devs mean in their scant instructions. It quickly goes to shit if you do the slightest thing wrong. If it's so great why hasn't anyone figured out a way to make simple installers with this thing?

Ed

I really wanna be able to try out Node. js but it's such a pain in the effing ass to get something running. Installing a "simple" app always turns in to a list of things you need to do, install shit globally [which is NOT always possible], edit files, try to figure out what the damn devs mean in their scant instructions. It quickly goes to shit if you do the slightest thing wrong. If it's so great why hasn't anyone figured out a way to make simple installers with this thing?

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

Vâng, thật tuyệt nếu có một buổi hẹn hò. Tôi cho rằng họ không hiển thị nó vì họ biết mọi người có thành kiến ​​như thế nào đối với thông tin mới - nhưng sẽ không có ý nghĩa gì nếu che giấu nó trong một bài báo về công nghệ đang phát triển nhanh chóng

David

Vâng, thật tuyệt nếu có một buổi hẹn hò. Tôi cho rằng họ không hiển thị nó vì họ biết mọi người có thành kiến ​​như thế nào đối với thông tin mới - nhưng sẽ không có ý nghĩa gì nếu che giấu nó trong một bài báo về công nghệ đang phát triển nhanh chóng

Samuel_Ogden

Nút sẽ là một ý tưởng tồi cho một cái gì đó như 9gag. com thì sao?

Samuel_Ogden

Nút sẽ là một ý tưởng tồi cho một cái gì đó như 9gag. com thì sao?

chaitanya

Này Tomislav, Bài báo tuyệt vời. Tôi muốn biết rằng nếu giả sử tôi muốn nhận đầu ra phần cứng bên ngoài trong ứng dụng của mình, e. g, máy quét hoặc chữ ký điện tử [nếu người dùng đang thực hiện chữ ký điện tử hoặc nhận bản sao được quét từ máy quét], thì tôi có thể truy cập trực tiếp vào ứng dụng của mình không?

chaitanya

Này Tomislav, Bài báo tuyệt vời. Tôi muốn biết rằng nếu giả sử tôi muốn nhận đầu ra phần cứng bên ngoài trong ứng dụng của mình, e. g, máy quét hoặc chữ ký điện tử [nếu người dùng đang thực hiện chữ ký điện tử hoặc nhận bản sao được quét từ máy quét], thì tôi có thể truy cập trực tiếp vào ứng dụng của mình không?

Misha R

TypeScript là trình bao bọc cú pháp trên JavaScript tiêu chuẩn và biên dịch thành JavaScript tiêu chuẩn. Nó được phát minh để làm cho mã có thể bảo trì được và cho phép nó được sử dụng giống như một ngôn ngữ lập trình thực sự. Cho rằng bạn phải sử dụng JS khi thích hợp, nó làm cho việc viết nó trở nên quen thuộc hơn với các lập trình viên thực thụ và làm cho nó có thể bảo trì được. Điều đó nói rằng, mọi thứ JS và Node đều phù hợp với các ứng dụng web mỏng, nhẹ cần được kết hợp với nhau một cách nhanh chóng và hiệu quả, cho những thứ như ASP. NET, JSP, Ruby, v.v. hơi quá mức cần thiết. Tin rằng người ta không thể sử dụng Node thần kỳ mới cho mọi thứ chỉ vì một anh chàng có thể viết cả front và back end là nghiệp dư

Misha R

TypeScript là trình bao bọc cú pháp trên JavaScript tiêu chuẩn và biên dịch thành JavaScript tiêu chuẩn. Nó được phát minh để làm cho mã có thể bảo trì được và cho phép nó được sử dụng giống như một ngôn ngữ lập trình thực sự. Cho rằng bạn phải sử dụng JS khi thích hợp, nó làm cho việc viết nó trở nên quen thuộc hơn với các lập trình viên thực thụ và làm cho nó có thể bảo trì được. Điều đó nói rằng, mọi thứ JS và Node đều phù hợp với các ứng dụng web mỏng, nhẹ cần được kết hợp với nhau một cách nhanh chóng và hiệu quả, cho những thứ như ASP. NET, JSP, Ruby, v.v. hơi quá mức cần thiết. Tin rằng người ta không thể sử dụng Node thần kỳ mới cho mọi thứ chỉ vì một anh chàng có thể viết cả front và back end là nghiệp dư

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í. Ngoài ra có những thứ không dịch được, chỉ là trong cuộc sống thực, dịch giữa các ngôn ngữ, bạn mất một cái gì đó. Trong trường hợp này, bạn mất tốc độ [phải dịch từ cái này sang cái khác] và tối ưu hóa, vì lý do một. ORM không làm tất cả. Ban đầu, tôi dành cho ORM, sau đó tôi tìm hiểu sâu về nó và bạn kết thúc với câu "Tôi làm điều này như thế nào?", "Ồ, bạn không thể dễ dàng, bạn phải thực hiện 10 truy vấn khác", hoặc bạn kết thúc . ORM đơn giản là "Chọn blah blah từ bảng trong đó x = y". Yếu tố đổi thưởng nhỏ duy nhất của một số ORM là chúng sẽ chuyển đổi ngôn ngữ của chúng sang bất kỳ DB nào. Nhưng nếu bạn được trả tiền để làm việc trên một ứng dụng cấp doanh nghiệp, thì bạn chỉ đang xử lý 1 - 3 cơ sở dữ liệu, được sử dụng cho những thứ riêng biệt. Nếu bạn có 500 nhân viên và 10.000 khách hàng, ORM có thể bị tắc nghẽn

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í. Ngoài ra có những thứ không dịch được, chỉ là trong cuộc sống thực, dịch giữa các ngôn ngữ, bạn mất một cái gì đó. Trong trường hợp này, bạn mất tốc độ [phải dịch từ cái này sang cái khác] và tối ưu hóa, vì lý do một. ORM không làm tất cả. Ban đầu, tôi dành cho ORM, sau đó tôi tìm hiểu sâu về nó và bạn kết thúc với câu "Tôi làm điều này như thế nào?", "Ồ, bạn không thể dễ dàng, bạn phải thực hiện 10 truy vấn khác", hoặc bạn kết thúc . ORM đơn giản là "Chọn blah blah từ bảng trong đó x = y". Yếu tố đổi thưởng nhỏ duy nhất của một số ORM là chúng sẽ chuyển đổi ngôn ngữ của chúng sang bất kỳ DB nào. Nhưng nếu bạn được trả tiền để làm việc trên một ứng dụng cấp doanh nghiệp, thì bạn chỉ đang xử lý 1 - 3 cơ sở dữ liệu, được sử dụng cho những thứ riêng biệt. Nếu bạn có 500 nhân viên và 10.000 khách hàng, ORM có thể bị tắc nghẽn

quả cầu Nils

Này, có thư viện/công cụ nào bạn đã sử dụng để tạo đồ họa không?

quả cầu Nils

Này, có thư viện/công cụ nào bạn đã sử dụng để tạo đồ họa không?

Praveen kumar Pamani

Cảm ơn bạn vì bài viết này, tôi sẽ đề xuất bài viết này nếu mọi người muốn biết node là gì và chúng ta có thể làm gì với nodejs

Praveen kumar Pamani

Cảm ơn bạn vì bài viết này, tôi sẽ đề xuất bài viết này nếu mọi người muốn biết node là gì và chúng ta có thể làm gì với nodejs

dohkoo

Bài viết hay, cảm ơn vì cái nhìn tổng quan. http. //www. steshadoku. com

dohkoo

Bài viết hay, cảm ơn vì cái nhìn tổng quan. 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 và nó sử dụng

Rumana Amin

Hi Tomislav, your article is really nice and informative. It helped me a lot to understand Node. js và nó sử dụng

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. This kind of skewed, twisted view of how intelligent, mature, highly evolved frameworks [eg. , 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. Nó là như vậy hoặc có thể nó là như vậy

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. This kind of skewed, twisted view of how intelligent, mature, highly evolved frameworks [eg. , 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. Nó là như vậy hoặc có thể nó là như vậy

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. Hầu hết các giao diện người dùng, nếu được viết tốt, chỉ 'điện thoại về nhà' cho máy chủ khi thực sự cần thiết - không phải "mọi lúc"

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. Hầu hết các giao diện người dùng, nếu được viết tốt, chỉ 'điện thoại về nhà' cho máy chủ khi thực sự cần thiết - không phải "mọi lúc"

golfman484

Nó giống như nút. js mọi người nghĩ rằng JS là ngôn ngữ duy nhất hỗ trợ đồng thời [mặc dù họ quảng bá giải pháp máy chủ web một luồng -WTF?] và không chặn I/O - tất nhiên không phải vậy nhưng bạn có vẻ rất hào hứng với những thứ như vậy mà tôi có thể

golfman484

Nó giống như nút. js mọi người nghĩ rằng JS là ngôn ngữ duy nhất hỗ trợ đồng thời [mặc dù họ quảng bá giải pháp máy chủ web một luồng -WTF?] và không chặn I/O - tất nhiên không phải vậy nhưng bạn có vẻ rất hào hứng với những thứ như vậy mà tôi có thể

Tomislav Capan

Tất nhiên bạn hiểu đây là hình minh họa. Trong thực tế, đó là một nhóm luồng, bị giới hạn bởi bộ nhớ khả dụng và có độ lớn theo thứ tự nhỏ hơn những gì giao diện sự kiện có thể hỗ trợ. Cảm ơn vì nhận xét, mặc dù

Tomislav Capan

Tất nhiên bạn hiểu đây là hình minh họa. Trong thực tế, đó là một nhóm luồng, bị giới hạn bởi bộ nhớ khả dụng và có độ lớn theo thứ tự nhỏ hơn những gì giao diện sự kiện có thể hỗ trợ. Cảm ơn vì nhận xét, mặc dù

Trưởng khoa Radcliffe

Chết tiệt, đây là một oldie nhưng goodie. Tôi nói chuyện như thế này, và có thể mượn slide của bạn. 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]

Trưởng khoa Radcliffe

Chết tiệt, đây là một oldie nhưng goodie. Tôi nói chuyện như thế này, và có thể mượn slide của bạn. 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 ý. We have tried to describe some in the article 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 ý. We have tried to describe some in the article 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 tôi chưa bao giờ khám phá. Bạn có thể nói thêm về nó không và tại sao nó hoạt động tốt với Node. js

Maq Said

Điều tuyệt vời. MongoDB tôi chưa bao giờ khám phá. Bạn có thể nói thêm về nó không và tại sao nó hoạt động tốt với Node. js

Misha Kov

Đây chính xác là bài viết tôi đang tìm kiếm, Ví dụ về nơi Node. js có thể được sử dụng. Cảm ơn

Misha Kov

Đây chính xác là bài viết tôi đang tìm kiếm, Ví dụ về nơi Node. js có thể được sử dụng. Cảm ơn

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

Đây là một bài viết khá hay thúc đẩy tôi tiếp nhận Node. js

Janguk James Lee

Đây là một bài viết khá hay thúc đẩy tôi tiếp nhận Node. js

Magdalena Mbn

nếu họ không thể học cách xử lý con trỏ thì họ không thể lập trình

Magdalena Mbn

nếu họ không thể học cách xử lý con trỏ thì họ không thể lập trình

web đặt hàng

TwaT - bạn có thể cho tôi biết quán rượu / quán bar nào bạn ghé thăm để tôi có thể tránh bạn không. Tôi sẽ không ngạc nhiên nếu bạn OrgASM khi bạn đọc lại bình luận của mình

web đặt hàng

TwaT - bạn có thể cho tôi biết quán rượu / quán bar nào bạn ghé thăm để tôi có thể tránh bạn không. Tôi sẽ không ngạc nhiên nếu bạn OrgASM khi bạn đọc lại bình luận của mình

philippe

Tôi muốn có nhiều Java hơn cho phía máy khách hơn là nhiều Javascript hơn cho phía máy chủ. Tái cấu trúc Javascript là một cơn ác mộng. 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ì. Tôi thấy việc quản lý luồng là một điểm cộng [nếu bạn nhắm mục tiêu chạy một trang web như Facebook thì bạn không quan tâm. Nội dung tĩnh của bạn sẽ sử dụng đám mây bùng phát là 4000 kết nối CÙNG LÚC chỉ là lưu lượng truy cập điên cuồng nên tôi sẽ không ảnh hưởng đến khả năng bảo trì VS khả năng mở rộng] Ít nhất là không hợp lệ từ các ứng dụng mạng nội bộ. Tôi tò mò liệu phiên bản tương lai của Tomcat có sử dụng mẫu lò phản ứng hay không, bản thân Java cũng cung cấp hỗ trợ cho việc này. Bạn có thể xử lý nội dung tĩnh bằng Nginx có mẫu lò phản ứng được triển khai https. //www. pascaldimassimo. com/2011/02/10/java-and-the-reactor-pattern Vẫn cho các trang động, tôi chưa tìm thấy bất kỳ manh mối nào. Một chủ đề không giữ bối cảnh phiên vì vậy tôi thực sự nghi ngờ về việc có 2Mb trong đó. Trừ khi được mã hóa kém

philippe

Tôi muốn có nhiều Java hơn cho phía máy khách hơn là nhiều Javascript hơn cho phía máy chủ. Tái cấu trúc Javascript là một cơn ác mộng. 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ì. Tôi thấy việc quản lý luồng là một điểm cộng [nếu bạn nhắm mục tiêu chạy một trang web như Facebook thì bạn không quan tâm. Nội dung tĩnh của bạn sẽ sử dụng đám mây bùng phát là 4000 kết nối CÙNG LÚC chỉ là lưu lượng truy cập điên cuồng nên tôi sẽ không ảnh hưởng đến khả năng bảo trì VS khả năng mở rộng] Ít nhất là không hợp lệ từ các ứng dụng mạng nội bộ. Tôi tò mò liệu phiên bản tương lai của Tomcat có sử dụng mẫu lò phản ứng hay không, bản thân Java cũng cung cấp hỗ trợ cho việc này. Bạn có thể xử lý nội dung tĩnh bằng Nginx có mẫu lò phản ứng được triển khai https. //www. pascaldimassimo. com/2011/02/10/java-and-the-reactor-pattern Vẫn cho các trang động, tôi chưa tìm thấy bất kỳ manh mối nào. Một chủ đề không giữ bối cảnh phiên vì vậy tôi thực sự nghi ngờ về việc có 2Mb trong đó. Trừ khi được mã hóa kém

Cody Donelson

Sự kiện mặc dù bài viết đã được vài năm nhưng nó đưa ra một số điểm tuyệt vời về Node. js. Đọc qua các bình luận, tôi đã thấy một số bài đăng về cách Node. js là một điều tuyệt vời và những điều khác về cách các ngôn ngữ hàng đầu là C#, Java hoặc Ruby. Chúng tôi biết rằng JavaScript sẽ mang đến một số phức tạp vì nó liên quan đến Lập trình hướng đối tượng, Ánh xạ quan hệ đối tượng, cơ sở dữ liệu quan hệ, v.v. Tôi nghĩ rằng hầu hết các nhà phát triển/người quản lý dự án đang đánh mất điều gì tạo nên JavaScript và Node. js [cũng như AngularJS] thật tuyệt vời. Chúng tôi có thể triển khai ngôn ngữ phía máy khách ở phía máy chủ và làm cho nó thực hiện chính xác như bất kỳ ngôn ngữ phía máy chủ nào khác. Cá nhân tôi thích sử dụng Node. js, mặc dù thật khó để tôi hoàn toàn chìm đắm trong một ngôn ngữ không có kiểu chữ. Khi tôi hiểu được thực tế rằng bầu trời là giới hạn đối với các đối tượng của tôi và tôi không phải ánh xạ các đối tượng của mình từ loại này sang loại khác [như bạn làm trong C# hoặc Java], khả năng viết mã của tôi đã thực hiện . Gần đây tôi đã dạy một vài kỹ thuật viên PC tại công ty mà tôi làm việc về lập trình. Sếp của tôi rất kiên quyết rằng Node. js là con đường của tương lai [đặc biệt là việc ngừng sử dụng các trình cắm Java trong những năm tới] Tôi có xu hướng đồng ý. Tôi không hiểu tại sao lại có một cuộc tranh luận như vậy khi có liên quan đến các đối tượng trong Node. js/JavaScript. Tôi thấy việc sử dụng các đối tượng dễ dàng hơn và tôi có thể sử dụng chúng linh hoạt hơn VÌ có JavaScript. Tôi sẽ sớm triển khai các thuộc tính HTML trong các đối tượng cho các ứng dụng Express 4 của mình. Tôi nhận thấy rằng PUG [trước đây là Jade] cực kỳ có khả năng xử lý các đối tượng và mảng, do đó, giúp ai đó dễ dàng thay đổi động loại, giá trị hoặc thẻ dựa trên đối tượng được gửi qua GET hoặc . 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 có một số điều kỳ quặc về nó, liệu chúng ta có thực sự có thể tiến lên phía trước và làm cho ngôn ngữ này trở nên mạnh mẽ như các ngôn ngữ trước nó không. Lastly, I'll add that the ability to utilize Node. js hầu như ở mọi nơi làm cho nó tốt hơn nhiều. Cho dù đó là ứng dụng Express được triển khai trên máy chủ Linux, ứng dụng Electron được triển khai trên máy chủ đầu cuối, Node. js thực tế là một sự phù hợp hoàn hảo cho bất kỳ khối lượng công việc nào cần phải hoàn thành

Cody Donelson

Sự kiện mặc dù bài viết đã được vài năm nhưng nó đưa ra một số điểm tuyệt vời về Node. js. Đọc qua các bình luận, tôi đã thấy một số bài đăng về cách Node. js là một điều tuyệt vời và những điều khác về cách các ngôn ngữ hàng đầu là C#, Java hoặc Ruby. Chúng tôi biết rằng JavaScript sẽ mang đến một số phức tạp vì nó liên quan đến Lập trình hướng đối tượng, Ánh xạ quan hệ đối tượng, cơ sở dữ liệu quan hệ, v.v. Tôi nghĩ rằng hầu hết các nhà phát triển/người quản lý dự án đang đánh mất điều gì tạo nên JavaScript và Node. js [cũng như AngularJS] thật tuyệt vời. Chúng tôi có thể triển khai ngôn ngữ phía máy khách ở phía máy chủ và làm cho nó thực hiện chính xác như bất kỳ ngôn ngữ phía máy chủ nào khác. Cá nhân tôi thích sử dụng Node. js, mặc dù thật khó để tôi hoàn toàn chìm đắm trong một ngôn ngữ không có kiểu chữ. Khi tôi hiểu được thực tế rằng bầu trời là giới hạn đối với các đối tượng của tôi và tôi không phải ánh xạ các đối tượng của mình từ loại này sang loại khác [như bạn làm trong C# hoặc Java], khả năng viết mã của tôi đã thực hiện . Gần đây tôi đã dạy một vài kỹ thuật viên PC tại công ty mà tôi làm việc về lập trình. Sếp của tôi rất kiên quyết rằng Node. js là con đường của tương lai [đặc biệt là việc ngừng sử dụng các trình cắm Java trong những năm tới] Tôi có xu hướng đồng ý. Tôi không hiểu tại sao lại có một cuộc tranh luận như vậy khi có liên quan đến các đối tượng trong Node. js/JavaScript. Tôi thấy việc sử dụng các đối tượng dễ dàng hơn và tôi có thể sử dụng chúng linh hoạt hơn VÌ có JavaScript. Tôi sẽ sớm triển khai các thuộc tính HTML trong các đối tượng cho các ứng dụng Express 4 của mình. Tôi nhận thấy rằng PUG [trước đây là Jade] cực kỳ có khả năng xử lý các đối tượng và mảng, do đó, giúp ai đó dễ dàng thay đổi động loại, giá trị hoặc thẻ dựa trên đối tượng được gửi qua GET hoặc . 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 có một số điều kỳ quặc về nó, liệu chúng ta có thực sự có thể tiến lên phía trước và làm cho ngôn ngữ này trở nên mạnh mẽ như các ngôn ngữ trước nó không. Lastly, I'll add that the ability to utilize Node. js hầu như ở mọi nơi làm cho nó tốt hơn nhiều. Cho dù đó là ứng dụng Express được triển khai trên máy chủ Linux, ứng dụng Electron được triển khai trên máy chủ đầu cuối, Node. js thực tế là một sự phù hợp hoàn hảo cho bất kỳ khối lượng công việc nào cần phải hoàn thành

Gage Poon

Nhanh như chớp, nhẹ, phát triển mượt mà và hiệu suất tốt hơn, đây là một số thay đổi mang tính cách mạng do Node js mang lại trong lĩnh vực phát triển web. Node js mang đến sự tự do sáng tạo, nguồn tài nguyên phong phú như NPM [Trình quản lý gói nút], là thư viện chia sẻ các mô-đun và công cụ. Ngoài ra, các ứng dụng web được phát triển bằng khung phát triển web này có khả năng mở rộng hơn. This JavaScript framework is very popular among the startups. However, big names like Netflix, Paypal, eBay, Microsoft, Uber, DivBox. in etc. cũng đang sử dụng khung phát triển web giàu tính năng này

Gage Poon

Nhanh như chớp, nhẹ, phát triển mượt mà và hiệu suất tốt hơn, đây là một số thay đổi mang tính cách mạng do Node js mang lại trong lĩnh vực phát triển web. Node js mang đến sự tự do sáng tạo, nguồn tài nguyên phong phú như NPM [Trình quản lý gói nút], là thư viện chia sẻ các mô-đun và công cụ. Ngoài ra, các ứng dụng web được phát triển bằng khung phát triển web này có khả năng mở rộng hơn. This JavaScript framework is very popular among the startups. However, big names like Netflix, Paypal, eBay, Microsoft, Uber, DivBox. in etc. cũng đang sử dụng khung phát triển web giàu tính năng này

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

Chế độ quân chủ dẫn đến tự do

Bài báo tuyệt vời, cảm ơn

Chế độ quân chủ dẫn đến tự do

Bài báo tuyệt vời, cảm ơn

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/

Chương 247- Nhà Phát Triển Phần Mềm

"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, this is a very detailed and insightful article based on cases. Tôi thích đọc nó, và hy vọng sẽ thấy nhiều bài báo như vậy. Cảm ơn bạn

ThinkStart Pvt Ltd

bài hữu ích. Cảm ơn bạn đã chia sẻ thông tin tuyệt vời này

w3villa

Xin chào, tôi thích đọc blog thông tin của bạn. Cám ơn vì đã chia sẻ

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

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. I was able to recover the majority of the funds, and we are still attempting to recover the rest. I highly recommend SECURE TO INVEST WELL for anyone involved in an online trading scam Trading scam $350,000 recovered BELOW IS THEIR CONTACT. secure2investwell@gmail. cuộc gọi / whatsapp. +14638887391

Joshua Flynn

Viết rất hay 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? . I have read hundreds of articles around the web about why someone should use node but they all cover something that could be done with technology we had back in the 90s. 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. So if it was fast enough to do the same thing over a dial up connection what has node done too improve the ecosystem of the internet

Chủ Đề