SolarPHP 1.0 Released 125
HvitRavn writes "SolarPHP 1.0 stable was released by Paul M. Jones today. SolarPHP is an application framework and library, and is a serious contender alongside Zend Framework, Symphony, and similar frameworks. SolarPHP has in the recent years been the cause of heated debate in the PHP community due to provocative benchmark results posted on Paul M. Jones' blog."
Symfony (Score:2)
It's called Symfony, FYI
blog (Score:4, Insightful)
Re: (Score:3, Informative)
It is being Slashdotted right now, so it's not known whether the limitation is the framework speed, the server it's on, available bandwidth, database performance, or something else.
Foghorn Leghorn Alert (Score:4, Funny)
(just a little something I picked up in Sarcasm 101)
Re: (Score:2)
Re: (Score:3, Funny)
I'm built too low. The fast ones go over my head. I got a hole in my glove. You keep pitchin' 'em and I keep missin' 'em. I gotta keep my eye on the ball. Eye. Ball. I almost had a gag.
Re: (Score:1)
Re: (Score:2)
He's running Wordpress. At least he could have of installed something other than a version of the hideous default theme that it comes with.
Re: (Score:2)
Re: (Score:2)
I once wrote a post on my blog that got frontpaged on /. and I had zero problems coping with the traffic. This was using Wordpress with the WP-Cache plugin on a modestly-powered server in a datacenter. I'm not really sure why so many people have issues (unless they aren't running WP-Cache, of course).
Most people seem not to be aware of WP-Cache et al. It really should be rolled into the default base.. "if you are going to get more than a handful of visitors any time soon, check this box! [ ]"
Re: (Score:1)
google "cache:..." (Score:2, Informative)
Re: (Score:1, Funny)
What does Sarah Palin have to do with this?
Re: (Score:1)
I dunno man Joomla is pretty fucking slow...
Performance? (Score:1)
Re: (Score:2, Informative)
Re: (Score:2)
Except that it uses Wordpress rather than PHPSolar or whatever it's called. Thus having no bearing whatsoever on the discussion.
Epic fail.
Re: (Score:2)
Is that "epic fail" on the part of the parent for not researching before he commented and being wrong, or "epic fail" on the part of the site owner for using WP instead of eating his own dogfood?
Re: (Score:1)
Yet another... (Score:4, Insightful)
Yet another PHP framework. Won't this ever stop? Won't the development efforts ever be directed to only a handful of frameworks, to get the best we can instead of a gazillion half-(or un-) documented, over-(or under-) engineered frameworks?
Re:Yet another... (Score:4, Funny)
That's the beauty of PHP. Everyone rolls their own everything because they can do it better than the other guy(s). That's why PHP remains the most vibrant community for web developers: there is a huge exchange of ideas that get recycled into new frameworks every day. Unlike other web development environments where you have to contend with other people's conventions who probably aren't as smart as you. When you go PHP, you know you're getting quality because it takes a special type of developer to wield the incredible power that raw PHP gives you.
Re: (Score:2, Insightful)
Yes, its totally beautiful that literally every time one gets involved in a PHP project some assclown involved has already decided to use the fad of the week framework, increasing frustration and limiting productivity as you search furiously for the non-existent documentation / examples to find the "framework" way to do some mindnumbingly simple operation that should have never been wrapped in a framework in the first place.
Invariably the individual who has decided to use the framework usually has worked wi
Re: (Score:3, Insightful)
I agree. The last 6 projects I've had the misfortune to take over were like this... unwieldy, evilly complex and error stuffed. What should have been simple was insanely complex. It took 4 to 6 weeks just to get anyone working on anything. I could have coded it in flat PHP in 2 days. Frameworks are the death of projects and its one of the reasons I no longer love programming.
Re: (Score:2)
Sounds like one of our recent projects. The programming team spent a week debating which PHP framework was the "best" framework for the project. Especially when they got into "does it have a library/module/api for service XYZ?". I got frustrated and hacked together a functional prototype in Perl over that weekend. No frameworks other than CPAN modules. It was admittedly ugly code (I'm the systems guy), but the programmers were able to take my foundation and complete the project about a week ahead of sc
Re: (Score:2)
Frameworks [docforge.com] are just another tool. They're only useless for the smallest of projects. Most web apps need a basic set of features, which any decent framework will easily provide, alleviating the nuisance of having to rebuild that functionality for each project.
Frameworks aren't a good tool for every project. That doesn't make them evil.
Re: (Score:3, Insightful)
I don't know if you're trying to be funny but what you describe is framework spaghetti. Everybody thinks they know how to do it better, so they keep reinventing the wheel - poorly. Producing frameworks that aren't stable aren't frameworks, it's just make as you go implementation with a nice name and likely to be thrown out and started all over again by the next guy who favors a different one because nothing is really standard or a convention. But I suppose it keeps web developers paid...
But it also allows new things to happen (Score:4, Insightful)
"Real" developers love to hate PHP because it goes against their rules, meanwhile the little language that could is the largest web language around. More site are run on PHP then anything else.
Why? Because it can. All the devs who want standards and a standard framework are the kinda dev's that take six months to produce the first draft of the first requirement pre-meeting agenda action point item. Sure, that is great if you work for the state or the fortune 500, but the new stuff happens with tiny companies started in someone's garage where the code has to be working yesterday.
As soon as other languages become capable of "just producing a site now", then PHP will start to becomes less dominant.
And yeah, this practice does result in thousand of badly written site in urgent need of being cleaned up. That is not a bad thing, if it was left to the ruby crowd, those sites would never have seen the light of day.
For people who understand business, having to rebuild your shop because it has become to small after a year is NOT a sign that you chose the wrong shop. It is a sign you did well. Only developers totally removed from the realities of daily life don't get this.
Oh and if you need conventions in your programming, aren't you really saying someone needs to hold your hand? For me the only quality measurement that works for software in the end is "does it allow the owner to make money". It can be the most horrible spaghetti code you ever saw, but if it allows the company to flourish and grow, then it is good code. I have seen to many "proper" development on very large projects that followed all the conventions and produced steaming piles of crap that were unusable. Look to every single government IT project for examples.
Re: (Score:1)
Re: (Score:1)
Re: (Score:2, Informative)
When you go PHP, you know you're getting quality because it takes a special type of developer to wield the incredible power that raw PHP gives you.
You forgot a /s right? Cause you have to be joking.
PHP is indeed a powerful language, but your average PHP developer has no clue what they are doing if they can't just copy and paste it from somewhere (and then they still have trouble explaining how it's doing it). I'm not saying that there are good PHP people out there (I know a few actually), just that it has been the language of choice for anyone that picks up a book and thinks they are now a programmer for some time.
In my last job I worked extensively w
Re: (Score:1, Flamebait)
I'm not saying that there are good PHP people out there
Good. Neither are we.
Re: (Score:1)
Re: (Score:1)
Oh, you mean a PHP cartel.
Sure, that usually turns out fine.
Also, if you happen to be involved in any open source projects, could you please stop diluting the workforce and just go work for somebody established? You're hurting the big guys.
Re: (Score:2)
There aren't really any more production-ready frameworks for PHP as any other language. It's just a good deal easier to 'promote' a new PHP framework because people are so willing to put the story on a tech news website knowing that it'll generate plenty of chatter (mostly about how awful PHP is).
When a framework developer starts selling their code on the basis of execution speed rather than ease of use, flexibility or completeness you know you can ignore it. Any proper framework will cache templates into n
Re: (Score:2)
Its not just PHP, the entire OSS world is like this..
Everyone wants their own wheel as no one likes painting a wheel that belongs to someone else.
Re: (Score:1)
No. (Score:2)
Yet another PHP framework. Won't this ever stop?
No. It won't. There's probably always going to be new ideas about abstractions with the potential to save developers effort once they're implemented. I should hope so, anyway.
Won't the development efforts ever be directed to only a handful of frameworks?
The lion's share of attention is certainly directed towards a handful: Cake, Symfony, Zend (not actually a framework), and CodeIgniter probably topping the list, others like Akelos or Zoop or TinyMVC p
Re: (Score:3, Insightful)
This is what is so annoying about all these new frameworks.
From a business point of view I will not develop with anything other than the most popular frameworks because if I need to hire a contractor, or even a new employee, it is more cost effective to use a popular framework that I don't have to train them in.
Re: (Score:2)
While I am philosophically opposed to Ruby as a programming language, I ultimately decided to do all of my web development with Rails because the Ruby community (unlike the PHP community) puts all their development efforts behind a single, standardized framework that can have lots of books, tutorials, and examples written about it.
Re: (Score:2)
If you feel the documentation of your favourite framework sucks then contribute. Making a great framework isn't just about writing code.
Phpulse is still faster (Score:1, Redundant)
http://www.phpulse.com/benchmarks/?area=86 [phpulse.com]
No more frameworks please! (Score:5, Interesting)
They are by definition antisocial, expect everything to revolve around them and don’t want you to use just pieces of them.
Give us just a nice set of libraries. That’s it.
Let us choose what parts to use, what parts to get from other libraries, and what not to use at all.
Frameworks are like having to buy a bundle offer at the supermarket, when all you need is one part of it, and then at home also noticing that the parts are not playing nice with everything else.
But I hope the craze will be over soon, just like the Flash intro craze, the Java Applet craze, etc.
Re: (Score:2)
I've never understood this. Why are you telling other developers what to do with their time? If you don't want their framework, IGNORE IT. If you want libraries, build them.
Re: (Score:3, Funny)
I've never understood this. Why are you telling other developers what to do with their time? If you don't want their framework, IGNORE IT. If you want libraries, build them.
you do realize that you are doing exactly what you are claiming you don't understand why people do, don't you?
Re: (Score:2)
Many developers end up picking up the pieces of halfway finished projects leftover by others; nobody works in a vacuum.
A good developer should care about what others are doing for a variety of reasons.
Re: (Score:2)
It's not that simple. What other web developers do, in the end bites YOU in the ass. Either in form of your boss asking you one sunny day "So, have you had any chance to experiment with that new Joomla thing?", and as you go on in your head "Noooo, please, not THAT conversation again!", he continues "You know, we expect our developers to pick up on the popular new technologies." Bla bla bla.
The butterfly effect of the programming business. So, don't talk like, anyone can do whatever the hell they want with
Re: (Score:2)
I am in complete agreement with you.
I write all of my code. I re-use a lot of code I write in virtually every project I've ever worked on.
Sometimes I only need one very simple part of that code (eg: session management). I should (and I do) only need to include one file. That's it. One file.
I am disgusted with PEAR. Zend does not appeal to me and at a first glance this SolarPHP looks horrible. Just peeking at the index.php file it does not look nice. And they don't appear to close half of their .php files wi
Re: (Score:1, Informative)
And they don't appear to close half of their .php files with '?>'. Why is that?
Because you avoid errors with trying to send headers after output since someone left whitespace at the end of a ?>
Re: (Score:2)
Re: (Score:1)
Re: (Score:2, Informative)
No closing ?> tag?
Because it's not XML, and it does not need to balance. The closing tag is just there to stop PHP processing and return to normal text mode. If you have no normal text to display it's completely optional. Heck, it might even help keep you from having trailing space/newlines/etc. at the end of your programatic output.
Now I personally prefer to close everything, and would never leave a hanging opening tag, but it's has no benefit toward processing the page.
Re:No more frameworks please! (Score:5, Informative)
As the AC noted below, it's considered a best practice to omit the ?> to avoid accidentally including non-processed whitespace after the closing tag when you include the file. If someone hits space after ?>, and you include that file and then try to print a header, it causes an error.
Re: (Score:2)
You have discounted the Zend Framework, but perhaps you should give it another look. It does exactly what you describe. If you want session management, you only need to include one or two files. You can ignore the rest of ZF and just take what you need! The code is generally clean and well documented.
Zend Sessions: http://framework.zend.com/manual/en/zend.session.basic_usage.html [zend.com]
Zend Framework For You, then (Score:4, Informative)
Give us just a nice set of libraries. That's it.
Pretty much Zend Framework in a Nutshell. Totally misnamed -- there is no Framework. It's a set of disparate libraries organized into a sort of class hierarchy that happens to have amongst it a Controller class.
Re: (Score:1)
Re: (Score:2)
I completely agree with you. I don't think the craze will stop ever though. Part of the whole culture survives on the money, and money math unfortunately favors less work for more pay, i.e. using (leaky) abstractions that cut costs to get paid, even if the framework goes under later, it's not anybody's concern (except the client of course), because legally, the job was done. If you stretch this logic, you can see it is the same reason nobody codes in assembly for commercial production anymore - people alway
Re: (Score:2)
Debate? (Score:2)
Curious, I searched for solarphp debate [scroogle.org] and the first 12 results are a verbatim cut-n-paste of the same summary that was copy-pasted into the Slashdot article.
The subsequent results don't even touch on any kind of performance testing with solarphp. So, um... why is this on the front page again?
What is the point of PHP frameworks? (Score:2)
Re: (Score:2)
I'd say that the reason PHP is so grate for rapid development is that it has a fantastic class library. I find that I need a good framework in any language for certain size projects. I'll admit that I use my own in my projects because when I started working in PHP there weren't good MVC or ORM libraries.
But if I'm doing a five page site I'll just embed the html. But I think what you're describing is what makes a good developer. Are you smart enough to know when you should be using a framework and when you s
Re: (Score:2)
I've found that as a hobbyist programmer, frameworks force me to be much more organized with my code by giving it structure. By the last project I did before I started using CodeIgniter, I had gotten pretty neat and organized, but CI takes it to a new level.
Re: (Score:2)
I've found that too. I'm a java programmer professionally, but use PHP for my hobbyist stuff (which includes buyplaytix.com which is a pretty large app). And I find I have to find a balance between write-once and so cumbersome that I won't actually write new code. My favorite piece of code is one class that I feel perfectly straddles the line between ORM and writing ad-hoc SQL. And that's something I think PHP does really well. Finding that balance between over-the-top architecture and the completely uninte
Yes, it is (Score:2)
The "problem" is what do you do if you do not have your own library of functions written? Or the company doesn't?
Then you can use a framework to get the basics down. Like for instance database abstration. What you say? That is already part of PHP...
Actually, I get your point entirely. It is the same with smarty... why on earth should you use a template language, in a template language?
I think all of this is partly because people expect it.
PHP is a scripting language, closer to perl then C or Java and pe
Re: (Score:2)
I don't view myself as a hardcore coder by any means. I actually came to PHP from a college background geared more toward design, although I had coded some BASIC, Pascal, C and C++ as a kid. What I realized almost instantly when I got into the real world is that almost any system that prepped anything for you in advance has glaring limitations.
And that goes all the way from learning that FrontPage sucks to learning th
How does it compare to CodeIgniter? (Score:2)
Anyone who's used both have an opinion of how it compares to CodeIgniter? I've done one project in CI and I've been pretty happy with it, thinking of using it to do some larger projects soon. It forces you to have neat, short code. Disadvantage is it's spread out a little more between files, but with an application like TextPad I can move back and forth between those files pretty easily.
Looking at Solar, it does look like it has a crapload of classes that do useful things without having to reinvent t
Clarification (Score:1, Informative)
Pauls blog is indeed running Wordpress, but that's all it is - a personal blog. The framework site itself runs on Solar.
This "performance debate" that people keep mentioning started back in 2006 when Paul benchmarked a select few frameworks (http://paul-m-jones.com/?p=236). Now even the creator of Symfony uses this method to compare performance. And Solar is still faster.
It's not a new framework on the block. It has been in development for years and can behave as a full-stack framework, a collection of libr
Thanks Paul! (nt) (Score:1)
Filler texts contained hearin contain no meaning even though they fit a certain grammar.
Ipsum Lorem.
Serious spagetti (Score:1)
90s (Score:2)
In 90s we had to build a complete interactive web-page in Perl or C, with html tags and JavaScript, and then print it out to a browser. And we were grateful.
Nowadays, having PHP, which is so easy to use, people want to make it even easier. I don't get it.
Re: (Score:2)
Yeah, because Rails is being used everywhere.
Re: (Score:3, Interesting)
If we used what was everywhere everyone would be developing websites in .NET to deploy on their Windows intranet. But it's a lot easier to be sarcastic than have a point other than "lol nobody uses Rails" (as if that were even close to true).
Re: (Score:2)
Masterfully observed
Re: (Score:3, Insightful)
You may have a valid point, but I can't get over the trollish way you souped up those code examples to prove your point. You made the PHP example over-commented, bulky and redundant on purpose. A more accurate counterpart would more likely look like this:
public function actionIndex()
{
$this->list = $this->_model->blogs->fetchAll(array(
'where' => array('blogs.status = ?' => 'public'),
'order' => 'blogs.created DESC'
Re: (Score:2)
Um, why stop there? Forgive my lack of indent, I can't be bothered to figure it out.
That function can be identically written as:
public function actionIndex() {
$this->list = $this->_model->blogs->fetchAll(array('where' => array('blogs.status = ?' => 'public'),'order' => 'blogs.created DESC'));
}
Also, I have the feeling that 'blogs' was just thrown in to make it longer. This calls a function on a 'blogs' object, which is presumably linked to the blogs table somehow, and will pres
Re: (Score:2)
Re: (Score:2)
You seem to think I made up that example, when in fact I got it from the SolarPHP documentation: http://solarphp.com/manual/blog-demo.app.index#blog-demo.app.index.action [solarphp.com]
Re: (Score:2)
*checks it out*
Yes, if you use fetchAll(), you have to pass in an array to do the select. Oooh, scary.
Whereas, with Ruby, you apparently just keep appending functions to the object.
Which then results in an interesting question: How the heck do you optionally add parameters to a select using the Ruby framework?
In SolarPHP, you add, or don't add, a record to an array. In Ruby on Rails you...what?
Apologizes as I don't actually know Ruby coding, but it would look something like this:
Post.where($whereclau
Re: (Score:2)
So you don't actually know Ruby or Rails, but you know that my example is less functional. You're kind of all over the place in the rest of your post, and the "ooh scary" remarks don't really help your case (which, as far as I can tell is "I am annoyed that you would compare PHP with Ruby unfavorably")
Re: (Score:2)
No, I'm annoyed you take an expanded example and compare it to the most concise way of doing something in Ruby, and pretend that demonstrates something.
The two examples are essentially identical.
They pass parameters different ways, but they are both functions, on a 'database table object' that return an array of result.
That's it. That's how you do that in the framework. It's a single function on a specific object. You get an array of arrays back.
You just decided to find an example with a bunch of paddin
Re: (Score:2)
They're not identical at all, you just don't know that because you've spent all your time going apoplectic here instead of reading the links I posted.
Re: (Score:2)
You also assume a lot about what the Ruby code is doing; this is where my Rails example is from: http://m.onkey.org/2010/1/22/active-record-query-interface [onkey.org]
Re: (Score:2)
Erm, I don't think I said anything about what the Ruby was doing at all.
Re: (Score:2)
My bad then, I thought your PHP examples were supposed to be functionally equivalent to my Rails example.
Re: (Score:2)
It's your PHP example.
I just rewrote it to be less expanded out, as you were bitching that PHP was too much typing or some other such nonsense.
Your example idiotically had the php tags, it had braces on lines by themselves, it created an array and stored it in a variable instead of just using the array, etc.
The PHP and the Ruby were both functionally one line, with two surrounding lines to define the function. The PHP line was about 50% longer than the Ruby one.
Which would be a fine thing to point out,
Re: (Score:1)
@posts = Post.where(:status => 'public').order('created DESC')
$records = $this->_model->blogs->fetchAll(array('status = ?' => 'public'), 'created DESC');
Assuming these would be returned from a framework library, or I can't readily access the source and this is just part of documentation.
The first example is fairly readable, concise and sensible. Knowing a little about how Ruby handles things as
Re: (Score:2)
Um, perhaps you need to think about what you're saying.
You might not be familiar with PHP, and thus unfamiliar with how it how it handles objects, but it's pretty easy to guess how a framework would return all records from a query if you know anything about PHP. It would return an array of arrays. Perhaps the repeated array is an associative array, perhaps it is column indexed and there's another command to get the associative ones.
You know, like the actual commands the language itself has, which I know b
Re: (Score:2)
Actually I pulled the sample straight from the documentation for the project in the OP.
Re: (Score:2)
Actually I pulled the sample straight from the documentation for the project in the OP.
I didn't realize this, sorry. But nevertheless, it seemed like an unfair and artificial comparison to me. Most people would agree that Rails is a nice, mature MVC framework and I doubt the same can be said about SolarPHP (which I personally don't know anything about). My perception was that your examples were chosen to present Ruby in a more concise and more elegant light, by force.
Again, which is not to say that there isn't a good point to be made here. Ruby code tends to be a little more concise and, as a
Bad Mod Alert. (Score:2)
(Score:0, Offtopic)
While the smugness of the parent post could be interpreted at a stretch as flamebait or trolling, it's in no way offtopic. Comparing code density/expressiveness between frameworks is topical.
Re: (Score:2)
Re: (Score:2)
To paraphrase MadTV's Snoop Dogg video parody, "it's all about the blogz, baby, it's all about the blogz." I am ironic of course, but let's face it - the media paints this picture of Internet that is full of blogs.
Re: (Score:2)
I mean, there *are* prebuilt blog software packages. Where does the real difference lie between a CRM and a web framework?
Wordpress vs Zend? The wordpress example is even easier: getposts(); Thus proving its the best framework ever!!!!!
Maybe I'm too harsh, but its like expecting a hello world program to be representative of the a programming languages ability. Sometimes it seems like there are all optimized towards creating a blog. Which makes as much sense to be as optimizing a language for hello world.
Re: (Score:2)
Look I'm sorry if I offended you, I didn't mean to cause so much outrage just by comparing code excerpts directly from the SolarPHP documentation ,with an example adapted from upcoming Rails 3.1 documentation.
You sound like someone with a fair share of experience with informed opinions about the tools you like to use. Well, me too. I think your last remark is dead-on, but I had a different point I was trying to make. I never said "Rails is awesome, everyone should use it all the time!"
I have to say thoug