Reputation
1,468
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
5 8
Newest
 Critic
Impact
~21k people reached

Jan
7
answered Is it possible to protect client side algorithms 100%?
Dec
24
comment JavaScript strict mode compatibility
@Izkata - In strict mode, this === undefined in a regular function call. That is different than this === window in a regular function call in non-strict mode. I'm just pointing outa difference between strict mode and non-strict mode. Perhaps you didn't know that Javascript changes the value of this when you make a regular function call.
Dec
3
comment What exactly is the meaning of “node” in Document Object Model (DOM)?
See here: stackoverflow.com/questions/9979172/…
Nov
19
comment how can I minimize my ajax calls to the server while creating a dashboard
Yeah, if you have buggy code, you app won't work - all you have to do is write code that works. There's no inherent reliability issue with distributing data to different parts of your app without making separate Ajax calls. If you are implementing it like a cache, then you may need to implement cache expiration so you get fresh results when you want fresh results.
Nov
19
comment how can I minimize my ajax calls to the server while creating a dashboard
You can minimize the number of Ajax calls by supporting on your server one Ajax call that retrieves all the info you need so only one roundtrip is needed to fetch all the data. If you need to share this info among completely separate modules, then you will have to make something like one central data manager which the modules will get their data from and the one central data manager will actually get the data or return the cached data.
Nov
10
answered How to debug minified javascript on production?
Sep
2
awarded  Yearling
Aug
25
comment What is the “best practice” for converting an external API's data structure?
Again, this is too generic a question. The app should structure its data in what makes the most sense for the app. There are many considerations that go into determining what makes the most sense. How the data must be organized for communicating with an API is only one of those considerations. How the data is used within the app is likely more important, but is just yet another consideration. How the data is stored persistently (if stored persistently) is yet another consideration, security might be another consideration and so on...
Aug
25
comment What is the “best practice” for converting an external API's data structure?
What do you mean "where it should be handled"? The consumer of the API constructs the arguments to an API function themselves. The implementor of the API processes the arguments as the specific implementation sees fit. I guess I don't understand what question you're asking. I'm thinking you need to provide an explicit example that shows several options you might be asking about.
Aug
25
comment What is the “best practice” for converting an external API's data structure?
This seems like far too generic a question. The right structure for sending data to an API depends upon a whole lot of things that are specific to the data, the application, how the data is normally consumed, how the data is transmitted and the specific API function, etc... For example, a Javascript API takes arguments and objects with properties, but a REST API requires most things in string form which may mean JSON.
May
30
revised Image caching when rendering the same images on different pages
Fix spelling in title
May
30
answered Image caching when rendering the same images on different pages
May
30
suggested approved edit on Image caching when rendering the same images on different pages
May
12
comment JavaScript strict mode compatibility
The only case I can think of is if you're relying on something that is only true in strict mode (such as this === undefined in a regular function call) or relying on something causing an error in strict mode that doesn't cause an error in non-strict mode. Other than those odd things, yes you are correct that strict mode is more restrictive so normal code written in strict mode should work fine in non-strict mode.
May
5
comment How to make your JavaScript private?
If you want to require login for every user of your webpage, this will keep people who don't have the login credentials from using your website.
May
4
comment How to make your JavaScript private?
node.js has absolutely nothing to do with this. All node.js code can be kept private, just like server-side code in PHP, Java, C#, C++, etc...
May
4
comment How to make your JavaScript private?
It's even worse than that. They don't have to change your client-side javascript. They can just issue their own Ajax command to your server.
May
4
comment How to make your JavaScript private?
Yes, anyone can see your jQuery in the browser. But, it can use Ajax to call server side functions that operate your mysql database. Your server side code can be private, not your client-side code.
May
4
comment How to make your JavaScript private?
It sounds like you don't understand that node.js runs on the server and the browser javascript runs on the client. You can't mix the two. You can use any server-side language you want (Python, C++, Java, javascript, PHP, etc...). Only javascript runs in the browser. You can make ajax calls from browser to server if you want.
May
4
comment How to make your JavaScript private?
Can you ask a more specific question? I've written javascript for both browser and node.js.