views:

92

answers:

2

Hey everyone.

I want to develop an application that does a bunch of cool stuff. The first thing that I need in it is to get information about the page a person is browsing. With that said, I need for example to know how long a user stayed in a page and where was the scrollbar. While getting that data, It's all saved to a database.

The thing is, I prefer doing that in Flash [although I have no experience in it] over Ajax since I want to hide the code - which as far as I know not possible in Javascript/Ajax.

So, can I do all that in Flash? - Read the content of the page, get the status of the scroll bar..

Plus, I then need to go threw the gathered information that is saved in the database. Since there could be many calculations i thought C++ .Net is better than PHP [which I know better].

Is that all possible or am I just crazy? :) Thanks ahead.

+1  A: 

Server side

I think it doesn't matter whether you'll use PHP/C++/Java/Ruby/Python/whatever... each of these is fast enough to do complex calculations, especially if we talk about pure math.

So if PHP is what you know the best, then it's obvious to use it.

Client side

Flash is pretty cool for animations and others visual effects, but for things like scroll position, time spend on website JavaScript is just better. It doesn't require third-parties plugins, it's integrated with DOM. Personally I just thing JavaScript is the most proper tool for this task.

Crozin
I'm not sure I buy the client side answer. Both technologies will clearly do what he's asking, so what does "integrated with DOM" have to do with it? He'd be better off making the decision based on whether he wants the user to be looking at HTML content or Flash content, surely.
fenomas
A: 

I vote for JavaScript, you can do in JS all that you mention, using the DOM, and it has not a proprietary license.
Although you cannot compile JS code, obfuscation tools offers a decent level of protection. Closure is worth of mention too, YUY minifier etc.
Also check this ready made JS heatmap.
I advise against using C++ for server side programming. You'll be better off with Ruby/PHP etc.

clyfe