Domain: aditus.nu
Stories and comments across the archive that link to aditus.nu.
Comments · 7
-
Ah, charts in Perl...
I do most of my work in Perl, and the lack of a good chart package has been annoying for a very long time. GD::Graph will give you very basic (and not terribly ugly) line and bar charts relatively quickly, but that's about it; it's missing even rudimentary features that make it less than useful (eg error bars).
There just isn't a general purpose charting package for Perl that would even come close to JFreeChart. Grace can produce some nice results, but the Perl interface to it is just a wrapper around their terrible command line interface (maybe it's improved in the last few years, but when I tried it it was almost entirely undocumented and nigh-unusable).
So, if you want publication quality charts you basically still have to learn gnuplot, which is great, but sometimes just a little too involved.
At least this thread gives a nice summary of what the other languages have to offer: the PHP and Ruby packages aren't faring any better, but Python's matplotlib looks freaking beautiful. -
Use JPGraph insteadJPGraph uses PHP and GD, and they have dozens of very fancy graphs along with excellent documentation and code examples. You can have beautiful looking graphs in a few minutes with less than a screen full of php code.
I think it's dual licensed, with a very modest fee for commercial use.
-
How about JPGraph?
It's a very powerful set of php libraries which make it very easy to get graphs exactly how you want them, http://www.aditus.nu/jpgraph/. I've used it in a number of situations and found it extremely fast and easy to use with really professional results.
-
Re:Php in the enterprise? Scary thought.
Your arguments are great but they apply for almost every lanugage I know of.
As for frameworks look at apache. Have you seen how many frameworks it has for java? What about Swing, AWT, SWT etc? Just because they're are lots of frame works doesn't mean it bad.
I agree with your class as a static function library but that's not PHP's fault. C++, Java and Perl have the same problem. When people learn C or VB first and then go to an OO langauge they generally get it wrong.
As for bad projects I sure if you did an "Ask Slashdot" they'd be able to tell you about bad projects C, C++, Lisp, PHP, Java, J2EE, .NET, etc.
As for a standard was of seperating logic from content lots of people say that JSP isn't enough that's why you have stuff like Velocity and all the other framework template engines. If you want a template engine for php the default one is Smarty.
When it come down to it the problem you have with PHP is that it has a lot of newbie programers that use it. Which is good and bad. Try making a simple form in JSP then do the same thing in PHP. PHP is ALOT easier. That doesn't mean it's better but it does mean people with a lower skill can do it. I'm using templates for our internal site and when other people edit it half the time the escape and got back to raw PHP and it's a mess so I fix it up and it's all clean again but they just don't get it untill after I show them then it make sense and they can do it but the next time they can't figure it out so it happens again etc.
Does it mean you get lots of bad half baked libraries YES does it mean you get good libraries and frameworks YES (because more poeple start, so more people get good at it).
If you want to look at good php projects check out:
* Smarty
* Mambo
* Gallery
* phpBB
* JpGraph
* phpMyAdmin
That being said at what level do you move someone from a "HTML + PHP Hack" to a "Web Developer"?
What makes a lanuage "enterprise-ready"? Does an "enterprise" company just have to use it (IE Yahoo and PHP). Or does it have to have faetures?
Where I work we still use PROC and PIC which is a 40 year old language that doesn't have:
* Variable Names - Only numbers!
* Functions - Only GOTO and GO SUB (again numbers no names)
* All variables are global!
* No loops!
* No else - You have to use IF and GOTO!
Yet this is still being used in thousands of companies all over the world! Sure it's legacy but it's enterprise ready and still being used!
So could it be used on a massive site handling 1,000 of concurrent users? Yes, IF IT WAS DESIGNED IN THE RIGHT WAY. It wouldn't be the same design as you'd use for .NET or the same as you'd use for J2EE but it would work. It might not be the best but that depends on the problem. (Same as Clusters vs Grid)
I've ranted engough ... have fun pulling my comments to peices. -
Re:Some facts
if you want to do, for instance, something more complex like charting in a web page (well, in a
.PNG), things can get messy.
You must not have tried very hard to look for anything.
go check out jpgraph. -
JPGraph
Not yet mentioned is the very good PHP based JPGraph library. The professional version (which has a fee of 85 euro) includes an aditional module which does graphing which is demo'd here.
-
JPGraph and PHP
I've recently had to do something very similar, well okay almost identical. Interactive graphs of various types and of various data sets from a Web Based interface.
We have larges amounts of data which is very hard to interperate by a human in something like a spreadsheet. The only really feasable way to do it was graphs. Of course with the amount of data we had transmitting it to the client to do client side rendering (ie Java) is also out of the question.
In the end we settled on JPGraph with an interactive interface built using PHP. So a wizard style interface to choose the type of graph, what data to graph, how to group the data, and finally the outputted graph with the option to change all the settings.
With good indexed data making PHP generated graphs with JPGraph interactive is quite painless and very powerful.
Just one suggestion, make sure you have a way for people to save the settings of the graphs they make so they can pull em later, keeps the PHBs happy :)