Flex Builder Profiling: can you programmatically start/stop profiling? - apache-flex

I just got Flex Builder Professional for the profiling support, and although I can make the profiler work, I am having trouble isolating samples to just a section of my code. Trying to click "clear profiling data" and "stop collecting" in the UI just isn't cutting it.
I'd like to be able to, in my code, do something like:
startProfiling();
// do stuff
stopProfiling();
and have that "snapshot" of profiling data visible in the UI.
I can't find any information on this online at all. I know about flash.sampler.* but I don't know how to make flex builder and flash.sampler talk to each other.
This is a pretty routine way to trigger profiler data collection, and I am very frustrated trying to find a solution and hoping someone else has already figured it out.

So you checked out the flash.sampler APIs? When you hook up the profiler it is probably calling startSampling automatically. Have you tried calling pauseSampling from your app and then calling startSampling when you want just your stuff collected?

I don't believe this is possible. The profile in flex is like the debugger. You have to hook up to a specific instance of it and profile the application from start to finish. Here is a link that talks more about the Flex 3 profiler and might give you some more information on a different way to achieve what you are looking for.
http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Performance_and_Memory_Profiling

Related

Writing web forms filler/submitter with QT C++

I'm scratching my head on how to accomplish the following task: I need to write a simple web forms filler/submitter with QT C++, it does the following:
1) Loads page url
2) Fills in form fields
3) Submits the form
Sounds easy, but I'm a web developer and can't find the way how to make QT accomplish the task, I only managed to load url with QWebView object using WebKit, have no idea what to do next, how to fill in fields and submit forms. Any hints, tutorials, videos? I appreciate this.
QWebElement class does all the work, just reading through the class documentation gave me a full idea on how to accomplish my task. Thanks to eveyrone for suggestions.
The best solution would be to write the logic in JavaScript that does what you want and then inject it into the page using QWebFrame::evaluateJavaScript() after it finishes loading.
There's also another way to do this; involving the document tree traversal API that's been available in QtWebKit since 4.6: QWebElement. You'd basically process the form pretty much the same as you would do in JavaScript, except that here the API is different and more limited. It's C++ though and might be a little bit faster. I guess, this approach might be less attractive for you, given you're a web developer and probably already know JavaScript.

Logging a user session for playback

Running an MVC2 site against IIS7 and would like to capture more detail of how users traverse the site - ideally to the point of being able to replay even the duration between mouse clicks - feedback of where people pause and/or backtrack.
I could do this with flash but that's no longer an option. Now it's just IIS7 via asp.net f4. IIS7 _should be able to provide this via 3rd party extensions - especially for this sort of niche need. I'm willing to consider client-side .net components but this sure seems to be the responsibility of the server.
[opps...does this belong on serverfault?]
thx
justSteve. Here is a solution that we have used:
http://www.seevolution.com/
I don't think that it gives time between clicks, but it does give very detailed tracking considering it's price (I don't know if that's an issue). We have really liked it. Fantastic detail.
You could also roll your own solution. Using jQuery and the $(document).click() function, you can log when they click, and the points on the screen. Then every couple of minutes, serialize it and fire it off to the server. You can get extremely fine-grained detail that way. The nice thing with seevolution is that they've done all of the work for you already, but it probably isn't as detailed as you would like.
JMax
Maybe not the "in-house" solution you're after but we are about to implement SessionCam at my company, which seems like a pretty good match for what you're looking for. Not having actually finished implementing it yet, I can't vouch for it in terms of quality at this point - but the description of the product certainly matches.
You aren't going to be able to capture the level of detail you need using a solely server-side solution. There needs to be a degree of client-side work - whether it's in flash or javascript - to capture things such as where the mouse is hovering (for heatmaps etc).
I personally haven't used this product, but a friend of mine spoke highly of it.
Clicktale

Off the shelf Data Entry Forms for asp.net?

I've got an asp.net application where each client will have their own data entry forms. I'm a bit tired of reinventing this wheel. Does anyone have any good experience with an "off the shelf" component for rapidly building such forms?
The component will need to fit within an existing asp.net site and support layout of the fields, not just "dumping" the fields on the page. The data needs to go back to a database for querying (but can use it's own schema) and some light level of workflow needs to be supported (mostly around completion status). Infopath is a non-starter due to its requirements for sharepoint etc, but if you're thinking along those lines, you have some idea of what I'm looking for. The system must be open for modification as I'm sure we won't be able to find something that does everything we need.
Doesn't matter if it is OSS or commericial.
Thanks!
We've used FeedBack Server here in the past and it worked out pretty good.
Microsoft lightswitch.
Telerik widgets in a web page.

Help with Music Video App.. Filtering data lists and "Next Video" button function

I have two lists.. I need help filtering one list when an "Artist" is selected in the other..
I also want to play the next video when the "Next Video" button is selected..
Here is a link to an example with a few videos.. http://www.yourtimeisborrowed.com/bin-release/gg.html
View source is enabled so feel free to grab the code..
I will be adding a full tutorial section on how to build this app step by step using Flash Catalyst and Flash BUilder.. Thats what I'm working on now but really would love some help on this filtering issue as it's out of my league..
Anyhow, I'm not just taking, I plan on giving back in a major way..
So if the "evangalists" aren't too busy with their datagrids I'd appreciate some help showing the true power and ease of use that the Adobe Framework is capable of..
In the context of Flex, you wouldn't be filtering a list; you'd be filtering that list's dataProvider. There is a lot of code to sort through, I don't have time to try to decompile your application.
I strongly suggest that for your dataProviders, you use one of the CollectionClasses, either ArrayCollection or XMLListCollection. Then you can make use of the built in filtering.
If you google on filtering Flex Collections quite a few blog posts come up, here is one that looked solid:
http://www.devshed.com/c/a/XML/Flex-Array-Collection-Sort-and-Filtering/
Here is the Adobe docs on the same thing:
http://livedocs.adobe.com/flex/3/html/help.html?content=about_dataproviders_4.html
I think I demo this The Flex Show screecast on collection classes:
http://www.theflexshow.com/blog/index.cfm/2008/10/29/The-Flex-Show--Fifteen-Minutes-With-Flex--Episode-9--Collection-Classes
If you can provide a stripped down sample that demonstrate the problem; please update the question and let me know.

how to design a game web app?

i know vb.net, but have had no experience at all with web programming. i need to make a web app that can run in a browser where there is a board game and pieces that you can move around. can someone help me get started? are there any examples in asp.net?
i need something like this:
http://www.hallofbrightcarvings.com/game/grid
i don't know what language this is built in, but i would much prefer vb.net. i would like the pieces to be pictures instead of text. please help get started.
I have a very basic example of moving pieces around a grid written in javascript.
You can see it in action here and if you take a look at the source you can see it's done with jquery mostly. Feel free to take a prod around, I haven't updated that version in a long time but hopefully you might find it useful.
I think ASP.NET can do very little for you according to what you described. What you need is either Flash or Javascript skills.
Let's decompose this, you need two things if you want to make the whole thing yourself
Client Side: Flash, SilverLight, JAVA
Server Side:PHP, ASP.net, Java
As you know vb.net and want to work with asp.net, so I recommand to use Silverlight.
How complex can this be?
Depends on what you want to build, if you want to build a Mafia war games, then you'll need to work the user interface and it'll be very hard. Also the server side will be important as you need to handle registration and relation between different players.
If you specify more your question, you could get better answers.
The example you cited above is fully client-side, which means the code all sits on the browser and the server doesn't do anything to enable the grid. So if you did a "Save As" of that page on your computer, you could run it offline.
You should use the view source functionality of your browser on the page you cited, and look at how it's built. It's done using HTML, CSS and javascript. Use w3schools to get yourself started on those three matters.
If you really need to code it using vb.net, I don't know of any way that allows drag-and-drop for web forms. I'd be interested to know though. Ajax and .net drag-and-drop should be keywords for you to look into.
To do this on the web, you'd probably want to divide the project into two components: Client-side and server-side.
On the server-side, you'll want to use language like PHP, Python or ASP.NET. I think ASP.NET has some way to use VB.NET, so that would be a good choice for you to minimize the number of new things you need to learn.
Client-side is going to be the big hurdle. There's basically two different approaches to take here:
HTML+CSS+Javascript, using HTTP callbacks (ie, AJAX) to communicate with the server.
Flash using Flex (I think HTTP calls is probably the easiest way to talk to your server here as well.)
For a game like that, I would think that Flash is probably the best way to go. It will be easier to do graphics and sounds, and it'll run the same in every browser that has Flash support.

Resources