Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: What is your Javascript-workflow?

by LanX (Bishop)
on Apr 21, 2013 at 22:04 UTC ( #1029783=note: print w/replies, xml ) Need Help??

in reply to What is your Javascript-workflow?

It depends a lot on the nature of your JS.

you can write testsuites in JS to check the integrity and you can catch errors to generate automatic reports in error cases.

If it's a DHTML application you will need to automate a browser using selenium or imacros.

You can also send isolated JS-snippets from perl to the browser with mozrepl or WWW::Mechanize::Firefox.

As I said, it depends!

Cheers Rolf

( addicted to the Perl Programming Language)

Replies are listed 'Best First'.
Re^2: What is your Javascript-workflow?
by morgon (Curate) on Apr 21, 2013 at 22:15 UTC
    I am not talking about how to check JS.

    I am asking about an efficient workflow to deal with JS-snippets (doing ajax-stuff with jquery) that are embedded in a Perl-module.

    So mentioning mozrepl or Mech::FF is if no value to me (I know about these) unless there is a concrete way to incorporate them into a workflow.

    Of course I could try to hack something together to extract the JS from my module, send it to a browser via mozrepl and so on but I am more hoping for tools I could just use (rather then develop myself).

    A long shot, I know...

      I would look at not generating Javascript at all. Consider having all JS code static and just sending JSON data from the server. That way you can decouple JS and the server. Personally, I write the tests for the Javascript parts in perl as well, as I can conveniently supply static JSON data to the JS handler with WWW::Mechanize::Firefox.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1029783]
[sierpinski]: I've never seen $#$var before.
[LanX]: $list cops be an array ref
[LanX]: could
[LanX]: $#array gives the length
[LanX]: no sorry ...
[sierpinski]: so that would just be deferencing it...
[LanX]: the last index!
[LanX]: yes
[sierpinski]: yeah I guess $list is a reference.. yeah
[sierpinski]: why is it the last index and not the first? because the length of the array becomes the index?

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (14)
As of 2017-12-13 15:56 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (369 votes). Check out past polls.