968 reputation
46
bio website
location
age
visits member for 3 years, 2 months
seen Nov 22 at 17:02

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.
May
4
comment How to make your JavaScript private?
node.js does not run in a browser. It runs on a server or desktop computer somewhere and usually loads scripts locally. Those scripts can be kept locally because they are never served to a browser.
May
4
answered How to make your JavaScript private?
May
1
comment Should we use any JS framework which makes HTML as scripting language
I guess it is unclear what you are asking then. It sounds like you don't like the thought of a template language that allows you to put some generation logic in with your HTML. But, I'll bow out of the conversation now.
May
1
comment Should we use any JS framework which makes HTML as scripting language
Yes, that is my point. But, in my example, JS would be building HTML for presentation which you seemed to think was a bad thing. In some cases, a server-style template language might even be used in the client. I'm just trying to explain that life is not always as simple as plain HTML served from a server.
May
1
comment Should we use any JS framework which makes HTML as scripting language
Imagine the case where the user in the browser is browsing data and they wish to drill down to see finer and finer views of some piece of data. It can often be advantageous to not serve a new page everytime they ask to see something else, but to instead issue an ajax call, receive some data, turn that data into the appropriate presentation and then add that to the current view in the browser.
Apr
22
comment Javascript: Anonymous functions
@Ruina - I'm not the person who asked the question - perhaps you meant to address your comment to the OP.
Apr
22
comment Javascript: Anonymous functions
@AdamZuckerman - the term "anonymous function" is used all the time to describe a particular construct in javascript. You can argue whether it is technically anonymous or not (it isn't callable by name outside of it's context so that make it anonymous to me), but that's what it is called in the javascript community. The wikipedia definition I linked above describes it pretty well.
Apr
22
comment Javascript: Anonymous functions
en.wikipedia.org/wiki/Anonymous_function
Apr
22
comment Javascript: Anonymous functions
First off, that's a pretty crummy definition of an anonymous function.
Apr
8
comment How to store progress of abstract events?
Usually, this involves storing a list of transactions, where each transaction contains enough information to fully catalog what happened. In your case, it would be something like the action, the item, the source player, the destination player (if more than one player is involved) and then any other meta data needed to describe the transaction. Usually, you would make each operation in the room be a function and each function is then responsible for recording the transaction that represents what it just carried out and obviously updating the player statuses.
Nov
1
comment Adding a callback to a function?
No. A callback being passed to a function will only be useful if it is actually known by the function and then used by the function. So, the function's code HAS to be modified in order to use the callback. You can only use deferreds if the function was already written to work with deferreds.
Oct
16
comment Single Page Web Application and Requiring JavaScript
Do people really think it's worth it to try to make the functionality of your site work without javascript in this day and age? That's a lot of extra work. Is that extra work really justified in the amount of additional viewers you'll have versus spending that same amount of time on additional functionality for your site?
Oct
15
comment Technique to deal with occasionally blocking json api?
But, if that's the case, does the 2nd request that is started after the first request fails to finish quickly actually finish before the 1st request does? If it's just overhead to re-establish connectivity, it seems like the 2nd one can't finish before the first one does.
Oct
15
comment Technique to deal with occasionally blocking json api?
The best course of action actually depends upon why things get slow sometimes and what is causing that. Even if you can't fix that, knowing why it does that would give you a better idea on how to adapt.
Oct
15
comment Technique to deal with occasionally blocking json api?
See the rest of my comment. Blindly retrying things because they are slow can lead to more trouble.