Server side chart/graph library?
Hi! Can you recommend any good server side Perl or Perl-bound graph/chart plotting library. I've got experience with gd but I remember struggling with unicode and antialiasing and there's been no new version since 2007. I'm wondering if anything more modern is around. Cheers! Jerome. -- Jerome Eteve. http://libsquare.net
Re: Server side chart/graph library?
On Thu, Jan 06, 2011 at 11:54:39AM +, J??r??me Et??v?? wrote: I've got experience with gd but I remember struggling with unicode and antialiasing and there's been no new version since 2007. I'm wondering if anything more modern is around. Imager does many of the same things as GD but more niftily. R
Re: Server side chart/graph library?
Roger Burton West wrote: On Thu, Jan 06, 2011 at 11:54:39AM +, J??r??me Et??v?? wrote: Unicode woes abound :-/ I've got experience with gd but I remember struggling with unicode and antialiasing and there's been no new version since 2007. I'm wondering if anything more modern is around. Imager does many of the same things as GD but more niftily. There's also Image::Imlib2. I think when I was weighing those two up a few years ago I ended up going with Imager, but I can't now remember why. Matt
Re: Server side chart/graph library?
On 6 Jan 2011, at 12:02, Roger Burton West wrote: On Thu, Jan 06, 2011 at 11:54:39AM +, J??r??me Et??v?? wrote: I've got experience with gd but I remember struggling with unicode and antialiasing and there's been no new version since 2007. I'm wondering if anything more modern is around. Imager does many of the same things as GD but more niftily. R I used to quite like GD - but now I've just read the Imager::Cookbook. Chris.
Re: Server side chart/graph library?
I'm a bit confused GD (and all the others mentioned) are a bit low level for charting/graphing. I've used Chart (which builds on top of GD) in the past, but have not played with this stuff for a few years. However could the OP confirm if he is after a charting solution, or something that is lower level image manipulation. Nigel. -- [ Nigel Metheringham nigel.methering...@intechnology.com ] [ - Comments in this message are my own and not ITO opinion/policy - ]
Re: Server side chart/graph library?
Hi, Yep, charting is what I need (as I don't really feel rolling my own charting lib on top of any low level one :) ). J. On 6 January 2011 12:33, Nigel Metheringham nigel.methering...@dev.intechnology.co.uk wrote: I'm a bit confused GD (and all the others mentioned) are a bit low level for charting/graphing. I've used Chart (which builds on top of GD) in the past, but have not played with this stuff for a few years. However could the OP confirm if he is after a charting solution, or something that is lower level image manipulation. Nigel. -- [ Nigel Metheringham nigel.methering...@intechnology.com ] [ - Comments in this message are my own and not ITO opinion/policy - ] -- Jerome Eteve. http://libsquare.net
Re: Server side chart/graph library?
On Thu, 2011-01-06 at 13:10 +, Jérôme Etévé wrote: Yep, charting is what I need (as I don't really feel rolling my own charting lib on top of any low level one :) ). I find GD::Graph works well for me.
Re: Server side chart/graph library?
On 6 January 2011 13:33, Jason Clifford ja...@ukfsn.org wrote: On Thu, 2011-01-06 at 13:10 +, Jérôme Etévé wrote: Yep, charting is what I need (as I don't really feel rolling my own charting lib on top of any low level one :) ). Not sure exactly what your after.. but... SVG::TT::Graph produces SVG files ( http://leo.cuckoo.org/projects/SVG-TT-Graph/ - examples), you can then use http://xmlgraphics.apache.org/batik/ to convert to .png/pdf etc if you like. Or use Google's Graph API: http://code.google.com/apis/chart/ HTH Leo
Re: Server side chart/graph library?
On Thursday 06 January 2011 13:45:12 Leo Lapworth wrote: Or use Google's Graph API: http://code.google.com/apis/chart/ This, via URI::GoogleChart, can make things dead simple, e.g.: use URI::GoogleChart; my $chart_uri = URI::GoogleChart-new(lines, 300, 100, data = [45, 80, 55, 68], ); print qq[img src=$chart_uri ... /]; Flot (http://code.google.com/p/flot/) is a quite nice Javascript solution, if you're happy to shove data to the client and let it handle rendering the graph. For graphs actually generated on the server as an image and sent to the client, I've used GD::Graph in the past, and it's done the trick. Cheers Dave P -- David Precious dav...@preshweb.co.uk http://blog.preshweb.co.uk/www.preshweb.co.uk/twitter www.preshweb.co.uk/linkedinwww.preshweb.co.uk/facebook www.preshweb.co.uk/identicawww.lyricsbadger.co.uk Programming is like sex. One mistake and you have to support it for the rest of your life. (Michael Sinz)
Re: Recommendation for simple Web Frameworks
On 6 January 2011 20:04, Simon Wistow si...@thegestalt.org wrote: Before I write my own (or repurpose one of the hundred previosu ones I've written) does anyone have any recommendations? http://perldancer.org/ http://search.cpan.org/~beppu/Squatting/ http://mojolicious.org/ My feeling is that Dancer probably suits your stated requirements best. You get nice simple request routing, and the other stuff is better done using Plack middleware. /joel
Recommendation for simple Web Frameworks
So, it's been a while since I've done any kind of web stuff in Perl (although I was sitting behind Tatsuhiko when he was building the first Plack stuff so I'm at least aware of that). I want to build a web site. In Perl. It needs to be dynamic but it's unlikely to need a database - it will however be pulling data from another data store and putting stuff into job queues. In short - I don't really need the CRUD stuff from a framework, I really just need the url based dispatch. I played around with Catalyst (which I'm familiar with from 6A) but it felt like it was a bit of a sledgehammer and that it was (not unreasonably) tied to an ORM. Before I write my own (or repurpose one of the hundred previosu ones I've written) does anyone have any recommendations? Running under Plack/PSGI[*] seems like a good idea so let's make that a requirement (although it seems like writing a Plack binding for anything takes 3 lines of code and magically makes your system run 30 times faster and gives you free unicorn ponies every hour on the hour to boot). Some sort of authentication/role system would be nice too. OAuth support too. Can these be done via Plack middleware maybe? It looks like it. Is there a good doc / tutorial / pop-up book somewhere that I should be reading to bring me back up to speed? Cheers! Simon
Re: Recommendation for simple Web Frameworks
On Thu, Jan 6, 2011 at 11:17, Joel Bernstein j...@fysh.org wrote: On 6 January 2011 20:04, Simon Wistow si...@thegestalt.org wrote: Before I write my own (or repurpose one of the hundred previosu ones I've written) does anyone have any recommendations? [...] My feeling is that Dancer probably suits your stated requirements best. You get nice simple request routing, and the other stuff is better done using Plack middleware. *nod* Of all the light-weight frameworks, Dancer was the nicest to work with when I went through to evaluate them for pretty much exactly the use-case described. Daniel -- ✉ Daniel Pittman dan...@rimspace.net ⌨ dan...@rimspace.net (XMPP) ☎ +1 503 893 2285 ♻ made with 100 percent post-consumer electrons
Re: Recommendation for simple Web Frameworks
On 06/01/11 19:17, Joel Bernstein wrote: On 6 January 2011 20:04, Simon Wistowsi...@thegestalt.org wrote: Before I write my own (or repurpose one of the hundred previosu ones I've written) does anyone have any recommendations? http://perldancer.org/ I've been using Dancer to stitch together a fairly simple web front end to a heavier backend app, and also for an intranet reporting app. The docs are a bit sparse, but improving all the time and they did an advent calendar that gives you a good overview: http://advent.perldancer.org/2010 I've had no trouble understanding the code when trying to figure out how things work. The routing is simple enough, and it's easy to set up sessions, json responses for ajax-based services, REST via plugins etc. Has a Dancer::Test module too. The current 1.2 release is supposedly going to be kept stable through its lifetime. It hooks into plack simply enough and the starman server is supposed to provide good performance (it's certainly more than good enough for me). The plack debug plugin is handy, and there are some dancer-specific extensions for it. http://search.cpan.org/dist/Starman/ http://search.cpan.org/dist/Plack-Middleware-Debug/ http://search.cpan.org/search?query=plack+debug+dancermode=all -- Richard Huxton Archonet Ltd
Re: Recommendation for simple Web Frameworks
On Thu, Jan 6, 2011 at 8:04 PM, Simon Wistow si...@thegestalt.org wrote: So, it's been a while since I've done any kind of web stuff in Perl (although I was sitting behind Tatsuhiko when he was building the first Plack stuff so I'm at least aware of that). I want to build a web site. In Perl. It needs to be dynamic but it's unlikely to need a database - it will however be pulling data from another data store and putting stuff into job queues. In short - I don't really need the CRUD stuff from a framework, I really just need the url based dispatch. I played around with Catalyst (which I'm familiar with from 6A) but it felt like it was a bit of a sledgehammer and that it was (not unreasonably) tied to an ORM. Before I write my own (or repurpose one of the hundred previosu ones I've written) does anyone have any recommendations? Running under Plack/PSGI[*] seems like a good idea so let's make that a requirement (although it seems like writing a Plack binding for anything takes 3 lines of code and magically makes your system run 30 times faster and gives you free unicorn ponies every hour on the hour to boot). Some sort of authentication/role system would be nice too. OAuth support too. Can these be done via Plack middleware maybe? It looks like it. This is a recurring theme (for example: http://twitter.com/#!/clkao/status/27613002311 ) - I remember Tatsuhiko recommended against making it in middleware (http://groups.google.com/group/psgi-plack/browse_thread/thread/af584fff9a6629aa) - but maybe we could have something that is not a middleware - but is still reusable between frameworks? I am thinking about writing something that I could use in WebNano and ideally I would do something reusable. By the way - if you don't mind using something still very minimalistic - then you might try WebNano. At the core it is just 250 lines of code and really few dependencies implementing Namespace Matching (think Catalyst :Local dispatching) for PSGI/Plack based applications. Cheers, Zbigniew
Re: Recommendation for simple Web Frameworks
On Thu, Jan 06, 2011 at 07:04:13PM +, me said: Before I write my own (or repurpose one of the hundred previosu ones I've written) does anyone have any recommendations? Thanks, Dancer looks perfect. Is there a good rule of thumb with these things as to whether something should go in the middleware or not. My instinct would be: anything that requires application logic or config (like knowing how to connect to the datastore) should be in the app whereas stuff like, say, gzipping should be in the middleware with any blurry lines (OAuth support for example) handled using callbacks. Sounds about right?
Re: Recommendation for simple Web Frameworks
On Thu, Jan 6, 2011 at 9:39 PM, Simon Wistow si...@thegestalt.org wrote: On Thu, Jan 06, 2011 at 07:04:13PM +, me said: Before I write my own (or repurpose one of the hundred previosu ones I've written) does anyone have any recommendations? Thanks, Dancer looks perfect. Is there a good rule of thumb with these things as to whether something should go in the middleware or not. My instinct would be: anything that requires application logic or config (like knowing how to connect to the datastore) should be in the app whereas stuff like, say, gzipping should be in the middleware with any blurry lines (OAuth support for example) handled using callbacks. You can use App config in middlewares if you apply them in the application code (right before returning the callback). In Nblog I for serving the static files from location that is in the application config I use Plack::App::File (and combine it with my own application using Plack::App::URLMap) - in principle I could use any middleware in the same way. Is that too convoluted? -- Zbigniew Lukasiak http://brudnopis.blogspot.com/ http://perlalchemy.blogspot.com/
Re: Recommendation for simple Web Frameworks
On Thu, Jan 06, 2011 at 08:39:06PM +, me said: with any blurry lines (OAuth support for example) handled using callbacks. Actually, since I'm being lazy - is there a good guide or an example for doing OAuth under Plack / Dancer / Plack+Dancer? I note that there's https://github.com/hidek/Plack-Middleware-Auth-OAuth/ via http://blog.plackperl.org/2010/04/hideks-plack-middleware-auth-oauth-at-master---github.html which is bit short on documentation and also claims to be on CPAN but doesn't seem to actually, you know, be there (and the test has spelling based syntax error in it, neither of which inspire confidence) and Plack::Middleware::Auth::OAuth2::ProtectedResource which is also somewhat short on documentation. There's also this http://advent.perldancer.org/2010/17 but that's authenticating a user against Twitter using OAuth Simon
Re: Recommendation for simple Web Frameworks
On Thursday 06 January 2011 19:04:13 Simon Wistow wrote: I want to build a web site. In Perl. It needs to be dynamic but it's unlikely to need a database - it will however be pulling data from another data store and putting stuff into job queues. In short - I don't really need the CRUD stuff from a framework, I really just need the url based dispatch. I played around with Catalyst (which I'm familiar with from 6A) but it felt like it was a bit of a sledgehammer and that it was (not unreasonably) tied to an ORM. I was going to step in with a somewhat biased recommendation of Dancer, but I'm happy to see that it's already been recommended :) Actually, since I'm being lazy - is there a good guide or an example for doing OAuth under Plack / Dancer / Plack+Dancer? Not that I'm aware of, but there should really! I think there needs to be a Dancer::Plugin::Auth::OAuth - I'll try to get round to writing one as soon as I have a chance, but there's a fair chance someone else might well do it in the meantime. By the way, you'll find the Dancer dev team (and some users, too :) ) on IRC in #dancer on irc.perl.org if you want to ask questions quickly. Cheers Dave P (bigpresh) -- David Precious dav...@preshweb.co.uk http://blog.preshweb.co.uk/www.preshweb.co.uk/twitter www.preshweb.co.uk/linkedinwww.preshweb.co.uk/facebook www.preshweb.co.uk/identicawww.lyricsbadger.co.uk Programming is like sex. One mistake and you have to support it for the rest of your life. (Michael Sinz)