Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,492 members, 7,958,497 topics. Date: Wednesday, 25 September 2024 at 03:51 PM |
Nairaland Forum / Science/Technology / Programming / Javascript With NodeJS (17348 Views)
Lets Start A Real Web-deveopment Course Here Html+css+javascript+php+mysql / Which is more awesome to use for 'server-side programming', NodeJS or PHP? / Javascript In One PIX: Understand Javascript With Just A LOOK (2) (3) (4)
(1) (2) (3) (4) (5) (6) (7) (Reply) (Go Down)
Re: Javascript With NodeJS by micodon(m): 12:40pm On May 02, 2015 |
Febup: Your first line.....soooo not true |
Re: Javascript With NodeJS by Nobody: 12:51pm On May 02, 2015 |
micodon: This just shows that you only code with a language you are used to and you believe that language is better that other languages. The fact that in one language you declare your variable in a conditional statement and access it from out side of that conditional statement does not make that program better than a language like C# where you declare your variable outside a conditional statement which in itself is a scope as it has an open and close {}. Man you just believe you know all and others should just follow you like that. 1 Like |
Re: Javascript With NodeJS by micodon(m): 12:54pm On May 02, 2015 |
Febup: Again, you need to do more research. DLL hell is a windows Problem. If in this world you think it doesnt affect C#, try reading about .NET hell. Memory leak? seriously. Guy, are you sure you program? Memory leak is not a language problem. it is a programmer problem. Wanna try it in c#? Open a database result set without calling dispose when done with it. The only thing is that Visual Studio (which is not C#) will detect this. Reflection in C++? Reflex library, bro |
Re: Javascript With NodeJS by micodon(m): 12:58pm On May 02, 2015 |
Febup: I can write the above code in C# if u like. Why re u fretting? You said youve not had the need to access variables in conditional statements and i gave u a simple example. 2. Like ive said, You cant say one language is better than the other. 3. The world is reading through this thread |
Re: Javascript With NodeJS by Nobody: 1:06pm On May 02, 2015 |
micodon: Man you are just saying what you don't know. What is garbage collection for in .Net which you need for C#, the garbage collector will that care of this for you, unless you are working with unmanaged resources. Ok try doing this in C++: At run-time try to inspect by iterating over members of a type, enumerating its methods and so on. |
Re: Javascript With NodeJS by micodon(m): 1:08pm On May 02, 2015 |
...and to be fair to myself, my C# skills are much better than my C/C++ skills. There's a fundamental truth in programing: when you have good knowledge of a language, its quite easy to get the knowledge of other languages especially when they are on the same level of machine language abstraction |
Re: Javascript With NodeJS by micodon(m): 1:14pm On May 02, 2015 |
Febup: You are the one saying what you dont know. Garbage collector will only clean up garbage i.e what you no longer use. If u open a result set, and keep it open, The garbage collector will not clean it up because it ll believe that its still in use and that open result set could lead to memory leak. Or when you attach an event listener and you dont remove it when its no longer needed. The garbage collector will leave it because its attached to an element or object or watever. could lead to memory leak So Memory Leaks are from bad programming practise. it happens in all languages. ALl. it just depends on the programmer. |
Re: Javascript With NodeJS by micodon(m): 1:23pm On May 02, 2015 |
Febup: The garbage collector will only clean up garbage. when you leave a result set open, the garbage collector will not clean it up because it feels that its in use because its in use. this could lead to memory leak. When you attach an event listener and refuse to remove it when its no longer needed, the garbage collector wont clean it because its still attached. This could lead to memory leak. Memory leaks result from bad programming practise. Its a function of the programmer not on the programming language. Remember that people are reading this thread. Dont post if you are not sure Bro, dont go googling without understanding how stuff works. |
Re: Javascript With NodeJS by micodon(m): 1:31pm On May 02, 2015 |
and this is going to be my last comment here. Thanks Pcguru1 for enlightening me on some things. |
Re: Javascript With NodeJS by Nobody: 1:35pm On May 02, 2015 |
micodon: To show that you are the one fretting. This was your question: micodon: And I asked you "But why would I need to access a value in conditional statement from outside of it, I have never had the need to do so." This is correct because in C# if need to use a variable outside a conditional statement, I declare it outside of the conditional statement, so that I can access it from outside the conditional statement, but if I don't need that variable outside of the conditional statement I just send the data directly from within the conditional statement. A conditional statement is a scope in itself this shows you have limited knowledge of programming terminologies. This is why is not good to be a jack of all trade because you become master of none , which you have proved to everyone on this forum. It is better you mastered only the language, framework and tool that is needed for a web, windows or mobile application. |
Re: Javascript With NodeJS by Nobody: 1:42pm On May 02, 2015 |
micodon: Of course you will run away because you have shown everyone reading this forum that you are a jack of all trade but master of none , which you have shown here. |
Re: Javascript With NodeJS by Nobody: 2:01pm On May 02, 2015 |
micodon: This was part of the reason for creating languages like C# and Java, to take care of bad programming practices. You don't understand the meaning of managed and undamaged resources in C# and .Net if you do then you'll understand that when you work with unmanaged resources in C# then your program can have memory leak due to bad programming practices and Microsoft has giving a caution before using such: C# supports the concept of "unsafe" code for those cases in which direct memory access is absolutely critical. Source: https://msdn.microsoft.com/en-us/library/z1zx9t92.aspx |
Re: Javascript With NodeJS by Nobody: 2:03pm On May 02, 2015 |
. |
Re: Javascript With NodeJS by Nobody: 2:27pm On May 02, 2015 |
micodon: The PHP you are hyping here has no standard so you can write poorly designed code compared to the C# you are condemning that has these standards: 2000, ECMA, ISO[15] . |
Re: Javascript With NodeJS by micodon(m): 2:32pm On May 02, 2015 |
Febup: Have to comment on this. 1. First of all, you said that C# programs cant have memory leaks. Now you are saying memory leaks only occurs in unmanaged resources. This second concept is wrong. whenever you refuse to release any variable, object etc that u no longer use, a memory leak could occur. 2. Microsoft strongly discourages the use of unsafe codes. 3. when you do use unsafe codes, they cant work in an untrusted environment, namely networks 4. C# and Java cannot prevent bad programming practises |
Re: Javascript With NodeJS by Nobody: 2:46pm On May 02, 2015 |
micodon: I can rely on the information provided by Microsoft below, your information is baseless. In C# and .Net memory leak can only happen when you write your code outside of the managed environment provided by the .net framework, which Microsoft dose not recommend "The garbage collector only handles managed memory, though. There are a number of places where unmanaged memory is used in Microsoft® .NET Framework-based applications, either by the common language runtime (CLR) itself, or explicitly by the programmer when interoperating with unmanaged code." Source: https://msdn.microsoft.com/en-us/magazine/cc163491.aspx |
Re: Javascript With NodeJS by micodon(m): 2:55pm On May 02, 2015 |
im not hyping PHP. when did i do dat? im not saying c# is bad. im only saying, that there is no language that does it all. there are shortcomings here. there re strengths there. i was expecting you as a c# expert to resolve the issue of conditional variables. The reason y u cant do that is because in c#, a variable declaration is a statement not an expression, no value is returned. |
Re: Javascript With NodeJS by micodon(m): 2:58pm On May 02, 2015 |
Febup: and so, a doesnt fall within the scope of managed memory? you need to understand how garbage collection works. |
Re: Javascript With NodeJS by Nobody: 3:15pm On May 02, 2015 |
micodon: This is why C# has standards it has to follow, its not that C# cannot be designed to work that way but because it has to keep to standards to assure the companies who pay thousands of $$$$ for it that C# is following best practices, unlike your PHP that has no standard it follows. |
Re: Javascript With NodeJS by micodon(m): 3:24pm On May 02, 2015 |
Febup: What standards does C# follow. give me a link let me understand it |
Re: Javascript With NodeJS by Nobody: 3:35pm On May 02, 2015 |
C# has these standards: 2000, ECMA, ISO[15]. You will need to research about these standards yourself. |
Re: Javascript With NodeJS by Nobody: 3:38pm On May 02, 2015 |
micodon: You do not know about C# and .Net applications if not you will know that C# applications do not have issues of dll hell. |
Re: Javascript With NodeJS by Nobody: 3:58pm On May 02, 2015 |
micodon: The only time your C# code is outside the control of the .Net garbage collector is when you are using unmanaged resources, such as COM resources written in C++. You will need to declare an "Attribute" with [ComImport] on a method to use unmanaged resources this is the only time the garbage collector has no control over the resources you are using in your C# .Net application. This is what Microsoft has explained below but it appears you don't understand what they are talking about. "The garbage collector only handles managed memory, though. There are a number of places where unmanaged memory is used in Microsoft® .NET Framework-based applications, either by the common language runtime (CLR) itself, or explicitly by the programmer when interoperating with unmanaged code." Source: https://msdn.microsoft.com/en-us/magazine/cc163491.aspx |
Re: Javascript With NodeJS by Nobody: 5:26pm On May 02, 2015 |
micodon: .Net hell? Where can I read about this .Net hell? |
Re: Javascript With NodeJS by Nobody: 7:16pm On May 02, 2015 |
Re: Javascript With NodeJS by Nobody: 7:22pm On May 02, 2015 |
pcguru1: Thanks bro. Notice it says Related: "New Features in Visual Studio 2013 and .NET Framework 4.5.1" I have used .Net 1.0, 2.0, 3.5, 4.0 and 4.5, none of these versions had this issue. I'm sure is just a bug and it will be fixed soon. |
Re: Javascript With NodeJS by Nobody: 8:23pm On May 02, 2015 |
Febup: Sorry i only pasted that link i do not have such .NET experience like that only C# Knowledge |
Re: Javascript With NodeJS by Chimanet(m): 9:13am On May 03, 2015 |
micodon:@micodon, Am really impressed we have some advance JavaScript users here. I tot I was the only one doing core js stuffs .I have a MEAN app am building. Will lyk to get suggestions of free or very cheap host that are easy to work with that you have used in your app. Do you use Grunt for build? |
Re: Javascript With NodeJS by GoodBoi1(m): 2:24pm On May 03, 2015 |
We more discussiond like this in this section. Pls one of you pros should answer my question. What is the nodejs equivalent of PHP's apache? As in what web server should I use for my nodejs website for production environment? I'm trying to understand this |
Re: Javascript With NodeJS by Nobody: 2:37pm On May 03, 2015 |
GoodBoi1: Node.JS as I understand it works like a web server which you have to code with JavaScript. PHP on the other hand runs on an apache web server, You don't need to code your apache web server before you can use PHP on it. Will your production environment be on a shared hosting or do you have your own dedicated web server? |
Re: Javascript With NodeJS by GoodBoi1(m): 2:42pm On May 03, 2015 |
Febup:Shared hosting |
(1) (2) (3) (4) (5) (6) (7) (Reply)
Learn Java Programming Here Easily / How To Hack Bank Account In Nigeria In 30 Minutes / Should We Make Mobile Apps Or Web Apps For The Nigerian/African Market?
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 83 |