


Gallery 2.0 Released 224
uss_valiant writes "From the Gallery website: "We are incredibly pleased to announce the release of Gallery 2.0! Over three years of design and development have gone into creating the best online photo management product possible. Gallery 2.0 is the natural successor to Gallery 1, and we hope that you like what you see. Don't wait, download Gallery 2 now!" From a developers point of view, the Gallery 2 framework is particularly interesting because it's written with modern programming patterns (OOP, extreme programming, test driven development, MVC, factories, modularity, ...) in mind which is rather unusual for PHP based projects. Over 1500 unit tests ensure correct functionality and its architecture is really impressive."
FYI (Score:4, Informative)
The Gallery Project is an open source PHP project enabling simple management and publication of photographs and other digital media through a PHP-enabled Apache or IIS web server. Photo management includes automatic thumbnails, resizing, rotation, and flipping, among other things. Albums can be organized hierarchically and individually controlled by administrators or privileged users.
+5 Insightful! (Score:5, Insightful)
Re:+5 Insightful! (Score:5, Insightful)
Mods: The parent post was *informative*. See how it works? Not insightful, but informative.
Gallery (Score:3, Insightful)
Re:Gallery (Score:5, Informative)
All of this has now been fixed, with a robust user/group model with a permission "tree" ("view all sizes" implies "view full size" and "view thumbnail" for example), and the images stored in a dedicated data directory outside of the web server doc-root. They've also fixed that annoying "feature" of 1.x.x where it would output image URLs with the explicit host name used during the install. This meant for my old gallery, that all the image URLs were prefixed with my internal host name for the server, so you got no images when browsing it from outside (unless you had a real non-proxied connection to the Intarweb and could edit the local hosts file
Gallery 2 demonstrates the ease of use of a mature project. Upgrading within 1.x.x release used to be a bit of a chore, but after unpacking Gallery 2 to a new virtual server, a couple of MySQL commands to create and permissiona new database, all I had to do was browse to the new server, and tell it where the data was for the old gallery and it just got on with it. Detected all the image tools and preserved all the comments and metadata.
The "help n fill" on the local server paths is a bit spooky, but handy. The upload options are comprehensive, even supporting Xo's "publish to Internet" function, although I can't really reccomend that - it's very slow. The best option is to use Gallery Remote - a swing app that lets you just drag images, or folders or zip files of images onto it to upload to your gallery.
It even acts as a shop, letting your customers select images to buy from smaller versions and then making them a handy zip archive for checkout time.
Now I don't have to bother emailing pictures to family and friends - I just made them a user id each, created some groups, permissioned up the albums (and it supports inheritence too for permissions) and mailed people the link
Fantastic job guys.
Any other ways to see it (Score:2, Insightful)
Re:Any other ways to see it (Score:2)
All the same files are posted there!
Gallery vs. JAlbum vs. ??? (Score:2, Informative)
Re:Gallery vs. JAlbum vs. ??? (Score:2, Interesting)
Re:Gallery vs. JAlbum vs. ??? (Score:2)
The main problem is that I'd like to have one photo in multiple albums. I know that was on the requested features for Gallery - anyone know if it made it into this release? (I can't check with the website not responding).
I'd also like one that doesn't arbitrarily use the terms 'album', 'collection', 'category', etc., in strange and bizarre ways. They're the same bloody thing! (in that they're all ultimately a collection of photos by some theme).
One that lets me use keywords for dynamic tagging and displaying of photos would be nice. Especially if it will let me just select keywords already used rather than typing them every time (that always goes horribly wrong since you typically end up referring to one thing in different ways, especially if there's more than one person uploading pictures).
I suspect I might end up writing my own, but if anyone can save me the trouble by pointing me in the right direction, I'd appreciate it.
Re:Gallery vs. JAlbum vs. ??? (Score:2, Informative)
Regarding your complaints about keywords, they can be added to items and searched for, but there is still a lot to be done in this area. AFAIK, the next version should support functionality similar to Flickr - e.g. albums generated on the fly based on keywords.
Re:Gallery vs. JAlbum vs. ??? (Score:2)
Re:Gallery vs. JAlbum vs. ??? (Score:2)
Re:Gallery vs. JAlbum vs. ??? (Score:2, Interesting)
1) much smaller code, much easier to understand, much easier to hack. 2) more secure than gallery. I was scared off by the large number of security problems gallery was having back then (and apparently still are, I'm told but haven't confirmed there was another one discovered recently?).
Qdig isn't for everyone though, as it is rather spartan. It does come with a web-based admin script I've never used, so some of the things I may think it lacks, might be handled by that (probably are). I generally just scp my files to the server though and manage directories (galleries) that way.
Coppermine (Score:2, Informative)
JAlbum was the first I tried, but it was not practical for adding pictures to albums and comments to pictures, so I switched to Gallery. It works for me since I have my own server on a DSL line. Mambo is already slow on it (P166MMX), so I suspect Gallery 2 will be the same since it also uses MySQL.
PHP != Crap Code (Score:5, Interesting)
PHP has been a wonderful language in which to "put together quick solutions which grow into large projects" for me in fields from accounting to my current work in Industrial / Manufacturing! The interfaces you can write to control PLCs and generate plant floor intelligence using *good* PHP and a web server are light years beyond what is usually available on a shop floor with PanelViews and Vorne displays (Light bars...) Someone out there would be smart to write a PHP-for-software-engineering book.
Re:PHP != Crap Code (Score:3, Insightful)
This is the primary problem with languages like PHP. There is *NO* structure to them, no type strictness, no standard practices. ASP (original) suffered from the same problems.
JSP and ASP.NET have a lot better structure to them, and standard practices, not to mention tools that follow them.
Re:PHP != Crap Code (Score:2)
Re:PHP != Crap Code (Score:4, Interesting)
I spent 4-5 years trying to get JSP to work as a "rapid development prototype to full scale application" environment, and I constantly ran into issues with Tomcat, Jasper, JAR file surprises, all of the warts that come with the Java language, etc... I switched to PHP for all "non-transactional" code when I did a study whereby I analyzed the amount of time it took one of my teams to react to "changing customer requirements" utilizing PHP/Apache as opposed to how much time it took another team of mine to react to similar requirement changes using JSP/Tomcat. I am not saying that JSP couldn't have worked, it's just that it seemed to not really have as many benefits as I would have liked for an environment that required as much agility as that which I found myself in.
I have to admit, my experience with ASP is nearly nill, as I have not been able to convince any clients to allow me to test out MS platforms controlling plant floor hardware.
All that being said, when my company writes something that requires "transactional integrity", we do pick Java for the backend... it's just that those situations in my field really are few and far between.
Re:PHP != Crap Code (Score:5, Interesting)
The problem with most PHP applications is that they don't scale. I don't mean that in a "PHP SUXORS! YOU CAN'T WRITE S$!@ IN IT"... I mean that most PHP applications aren't built with any real caching implementations (like this gallery software, or phpbb, or nuke, etc...) and the PHP frameworks that I looked at don't really provide that functionality.
The stuff availble for Java is just so much more powerful. You have the Hibernate [hibernate.org] OR mapping package that provides an amazing amount of OR work for you, including the ability to plug in multiple transactional caches, session caches, database connection pools (including the ability to have clustered caches across multiple boxes.) You have complex messaging architectures to talk to and keep multiple machines in sync. You have great web service APIs and great search engines that can be plugged in. Stuff to that degree just doesn't exist for PHP.
It often shocks me to see so many "Enterprise Level" PHP apps released with no caching implementation... you shouldn't see ANY home page hit a database on every hit. (And yes, you can easily avoid stale content by eviction, injection routines.)
So yes, you can definitely write decent stuff in PHP. But for the highly scalable enterprise environment, the libraries and packages that exist for Java and ASP just don't exist.
The other thing I hate about PHP is that there just is no IDE that is of the caliber of Eclipse for PHP (and PHPEclipse just ain't there yet.) A professional IDE allows me to introspect objects, trace stacks, change variables on the fly per hit and control each thread individually. This kind of power makes debugging and performance testing so much easier and more powerful than a PHP app. Good luck trying to seriously profile a PHP app...
So yea, PHP has it's place. It's wonderful for quick one-offs. I just wouldn't want to code a massive user load, transactional, high availability, multiple machine cluster application on it.
Re:PHP != Crap Code (Score:2)
Re:PHP != Crap Code (Score:3, Interesting)
Then I also use URL arguments to make links look "new" to the front-end proxy when things change. For example, there is a 'v' field for documents that gets incremented whenever the document is modified. So then if a page is added, then all the links on subsequent generated pages have '&v=123', which looks like a new page and so the user doesn't get stale data. I also use the same technique for user options, which (as well as storing in a cookie) I compress and pass around as 'o=xxx'. This is useful for browsers, some of which do not distinguish pages which are otherwise identical but with different cookies.
Finally, user editing pages get 'no-cache', since these really are dynamic and are only being seen by one person anyway. But if I got slashdotted by someone posting a link to one of the journal pages on a popular site, the server would hardly break a sweat because it would generate that page just once and then serve it to all the other requests as static from the front-end.
I use these techniques successfully on my bike journals website: http://www.crazyguyonabike.com/ [crazyguyonabike.com]
Re:PHP != Crap Code (Score:3, Interesting)
I did mention earlier that it is possible to code a scalable perl/php/mysql/etc application (look at
Its great that you took the time to essentially code alot of framework or scaffold code. I hope that its extensible and can be reused on different sites (if you ever have to make a new one, hopefully you can take most of this code with you.)
The nice thing about Java (and I have no experience with
The nice thing about large sites (and sites that need scability) is you can focus your time on the logic of the site in Java, and not on various solutions to make sure your caching implementation works correctly.
You can definitely code a php/perl app so that it can scale well, as you did, but it requires alot of work that isn't related directly to the site.
That's all I'm saying.
Re:PHP != Crap Code (Score:3, Interesting)
The stuff I did in Perl isn't really onerous at all, at least no more than any other framework out there, with the added benefit that I have full control over its behavior, and I don't inherit a lot of bloat that I don't need. Making sure to call a particular routine whenever you want to generate a link isn't hard, and as a whole it was fun to do... I keep thinking I should write this stuff up, because I don't think I've seen this approach talked about much (if at all - about all you see is the talk of using a reverse proxy, which itself is more than most people seem to be aware of)...
Ironically, I was driven to do this work with reverse proxies after my first slashdotting - the mod_perl backend was getting hit for every request, and about 40,000 people came to visit!
http://www.neilgunton.com/spambot_trap/ [neilgunton.com]
Subsequent slashdottings have been no problem, though they haven't actually hit crazyguyonabike itself (yet...)
Fun stuff!
Re:PHP != Crap Code (Score:3, Insightful)
However, in my particular case, I have different needs. My company writes "shop floor intelligence" systems in which PHP is my *middleware* language. We use Smarty/PHP to generate XML/[other streams] from proprietary interfaces to PLCs or embedded shop floor systems. This XML has to have whatever the state of the machine is *at that moment.* These systems are not neccesserally "Hard real time", but they need to be very performant. We feed the PHP systems XML configurations which tell the middleware which series of registers or memory locations on the "embedded controllers" to look for state, and how to package that state as a message to the decision support systems.
The maintenance engineers / technicians on these machines may go in during a plantwide shutdown and code a series of changes to the flow control logic of a foamer (for example) in ladder logic (or even by wiring relays) and our code has to be able to take the new internal state of these machines, and turn it into a consumable format quickly. Often times, I might add, we're not notified until 4:45 on a Monday after a plant shutdown when the 1st shift build engineers realize that their decision dashboard is giving data that doesn't map the expected state of the machine. Utilizing PHP/Smarty we are able to very quickly either change the XML / whatever template, as well as the actual feed information, and in next to no time, get the line back up and running.
One of the mantras which I used to abhor was: "there can be no unplanned system downtime on a production line" because it implied to me that everyone was lazy and simply didn't want to do their job. What it turns out happens, is that when you are retooling an entire line during a 5 day plant shutdown, sometimes little pieces don't get communicated, and one of the most prized assets of a system is the ability to dynamically reconfigure it to the changes on the line, while minimizing the downtime on the line.
As silly as this sounds, even the 5 minutes neccessary in packing a WAR file, redeploying it, and having the system bootstrap itself (after having compiled it and tested it on your system) are 5 minutes that the line doesn't want to lose.
So, in closing, I 100% agree with a great deal of your sentiment. PHP is most certainly not a splendid language for a great many applications, but I think it's a narrow point of view to believe that it's useful simply for quick one-offs... all the world is not a CRUD web app
(I forgot to add that we use DBs simply as a place to store data until the next time that we request it from the shop floor system... so for our needs, PEAR::DB is a reasonable tool.)
Re:PHP != Crap Code (Score:2)
It is nice that languages like PHP are interpreted (or at least dynamically run in a way that seems interpreted) and its nice that functionality is provided out of the box. It does make it very easy to modify code on the fly in production (something that is very scary though!)
Java provides similar type of functionality too if you need it(you can do hotdeploys of
It also would not be the right tool the job you described (because PHP gives this to you for free.) Again, right tool for the right job. It sounds like you have a great implementation using PHP, just many people think PHP is the end-all-be-all and every website in the world should be LAMP. That's who I was really addressing in my post.
Re:PHP != Crap Code (Score:2)
But yeah, modifying production code on the fly was something that took me a while to get used to. I had come from a tradition "IT Environment" in which you had programmers coding in a dev environment, and test environments, and staging, and deployment... etc... And suddenly, I find myself in an environment where you *can't* really have a test environment. How do you test, for example, a mile long conveyor that diverts packages at 100 feet per second accross 250 diverts. Particularly when one of the primary things that goes wrong is that the electricians wire up motors backwards 1/2 the time
So yeah, it's been a bizarre transition, but even though I now have to routinely be *at work* by 5 a.m., I love ever second of it.
To be completely honest, I wish I could program (and have my staff program) in Common LISP or some similar language, but the fact of the matter it's that it's hard enough to find dependable programmers, much less dependable programmers willing to be at work at 5 a.m.... and even less dependable programmers willing to be up at 5 a.m. and hack functional paradigm
Re:PHP != Crap Code (Score:2)
I would like to know what you mean by "scale". Even if we stipulate everything you say as being true are they really that important in order to scale your application? Is ORM mandatory for large scale application? Certainly MS does not think so because they don't reccomend ORM for
Let me rephrase the question. How large can a PHP application scale? Presuming savvy programmers how much load can a PHP application take before it keels over and you have to use Java.
I think that's a very important question because if you don't expect your application to scale up to the level of ebay or amazon.com it might not be worth the programmer productivity hit you are going to get from java.
Re:PHP != Crap Code (Score:2, Insightful)
No, we have seem java sites and
" it died because of a lack of connections since it was making lots of wasted database calls that aren't necessary."
I don't think that's right. In PHP you get to set an absolute limit and once that limit is reached then it stops. You can not presume the database pooling was misconfigured, it probably worked just like the author intended.
"The programmer productivity hit of using Java in a real IDE for something substantial isn't as big as you might think. "
Having done both I don't think I KNOW. I was at least two to three times more productive with PHP.
'Java just seems to have more of these that can scale well than PHP."
That's just your opinion, you have no read data to back that up. Oh also since PHP can call java classes all of those are available to PHP as well.
"Java just seems to have more of these that can scale well than PHP."
This is just misinformation. There is the zend IDE as well as few other PHP IDEs which let you debug your code line by line. Having said that I programmed for four years in PHP using Jedit and never once wished I had a better IDE. I built and maintained a very busy commerce site which made millions of dollars per month and worked like a charm on single low end dell server. I won't say it was as busy as ebay or anything but it was able to take two to 20 hits per second with only 1 or 2 percent CPU utilization and ran comfortably on 512 megs of ram (freebsd).
"Of course, you should always imagine the stuff you build will become as big as ebay or amazon!
Perfect is the enemy of good. That's premature optimization.
Re:PHP != Crap Code (Score:2)
I've done BOTH too... I've coded my high school's 10 year reunion site in PHP and I've coded a major portal in Java.
To say that you don't "need an IDE" is great. I can use vi to code my stuff to. The point is, it is NICE to have. It is nice to be able to debug stack traces, it is nice to be able to change variables and see the effects. It's nicer to debug code this way than it is to drop variables in HTML to see what they're set to in the execution.
And, as I said before, good luck profiling a PHP app. Need to know which method is taking up most of your execution time? For all you know, one xml transformation can be accounting for 60% of your execution time... can you find that out in PHP? Sure, you can put in lots of time printouts that print to the screen or console but its certainly not as efficient as something like Eclipse Profiler [sourceforge.net].
Notice how all the stuff that I mentioned so far is free? Zend is $300 per license (and that's not the all-incompassing package)
Additionally, yes there real packages to back up my statements. Nothing out for PHP is as powerful as Hibernate, or as AspectJ, or as the profiler above or as JMS, or etc, etc...
Again, in your architecture there is no way for you to add another box, scale the application up, etc, etc... If you ever get to that point, you have to throw everything out and write it all from scratch.
You might have been more productive in PHP. How much more productive? 10%? 50%? 80%? Is it enough to compensate for the possibility that you must rewrite if your application grows dramatically?
Were you that much more productive because you are more comfortable in PHP in general? I bet someone can be just as comfortable coding in PHP as in the Struts or Tapestry frameworks for Java.
So yes, I've done both. No need to get nasty.
"I don't think that's right. In PHP you get to set an absolute limit and once that limit is reached then it stops. You can not presume the database pooling was misconfigured, it probably worked just like the author intended."
Great, that's stupid. If the absolute limit for database connections is TWO, it should still not crash on the home page. My problem isn't the connection pooling, its the fact that a wasted database hit is being made for EVERY access to the home page. That's ridiculous. Especially on a site that has relatively static data (that doesn't change more often than once a minute.)
And trust me, I doubt ANY author would intend for their site to just "die." If that's how you intend to react to heavy load, you're just a bad author. That's isn't "premature optimization," it's obvious smart optimization.
Re:PHP != Crap Code (Score:2)
Right. ANd PHP has IDEs. Stop putting this strawman up. There are IDEs for PHP. I happen to use and like Jedit.
"And, as I said before, good luck profiling a PHP app. Need to know which method is taking up most of your execution time? For all you know, one xml transformation can be accounting for 60% of your execution time... can you find that out in PHP? Sure, you can put in lots of time printouts that print to the screen or console but its certainly not as efficient as something like Eclipse Profiler."
Somehow during my years of programming in PHP I never needed it. Maybe that's because the combination of PHP and Apache is so lightweight. As I said I was averaging less then two percent CPU utilization taking 2 to 20 hits per second.
"Notice how all the stuff that I mentioned so far is free? Zend is $300 per license (and that's not the all-incompassing package)"
So? How much does intelliJ or Jbuilder cost? I am glad you are now changing your argument though. you went from "there are no PHP IDEs" to "PHP IDEs cost more then eclipse" at least we are making progress.
"Additionally, yes there real packages to back up my statements. Nothing out for PHP is as powerful as Hibernate, or as AspectJ, or as the profiler above or as JMS, or etc, etc..."
Let's presume you are right. So? Does any of that make PHP less scalable and if so by how much? That's the real question. Somehow my company was able to make millions of dollars per month without those things on a PHP based web site. Go figure!
"You might have been more productive in PHP. How much more productive? 10%? 50%? 80%? Is it enough to compensate for the possibility that you must rewrite if your application grows dramatically?"
I already said I was 200 to 300% more productive in PHP. And yes it was worth the price. Why? because it ended up that PHP was perfectly suitable for our application. WE NEVER HAD TO REWRITE IT. The application never got so big that it needed java.
"Great, that's stupid. If the absolute limit for database connections is TWO, it should still not crash on the home page. My problem isn't the connection pooling, its the fact that a wasted database hit is being made for EVERY access to the home page"
How is that the fault of PHP?
"And trust me, I doubt ANY author would intend for their site to just "die." If that's how you intend to react to heavy load, you're just a bad author. That's isn't "premature optimization," it's obvious smart optimization."
Premature optimization is writing your application in J2EE because you hope one day the application will need to be the size of amazon.com and taking two years to develop something that could have been on the market in six months.
Re:PHP != Crap Code (Score:2)
Repeat after me. JEdit is NOT an IDE. In fact, JEdit doesn't even refer to itself as an IDE (it calls itself a "programmer's text editor.") You either don't know what an IDE is or have never used one. It's a text editor with syntax highlighting. Does it do autocomplete? No. Does it do debugging/tracing? No. Does it have integration with CVS or other source code management software? No. (Let me guess, you don't need that either!) Do you know what an IDE is?
"Somehow during my years of programming in PHP I never needed it. Maybe that's because the combination of PHP and Apache is so lightweight. As I said I was averaging less then two percent CPU utilization taking 2 to 20 hits per second."
It's NOT lightweight if you are doing complex things. There's more to load than CPU utilization. What about number of connections that your application spawns or uses? What about the number of threads it executes? Do you even know these answers?
So? How much does intelliJ or Jbuilder cost? I am glad you are now changing your argument though. you went from "there are no PHP IDEs" to "PHP IDEs cost more then eclipse" at least we are making progress.
THERE IS NOTHING OF THE CALIBER OF ZEND FOR FREE. Maybe you should read that again. So I'll be even CLEARER, there are no FREE PHP IDEs. (No your text editor that does color [which is wonderful what it does] doesn't count.) Eclipse is not only of the caliber of IntelliJ/Jbuilder but in many cases SUPERIOR. (In fact the latest version of JBuilder will just be plugins in Eclipse... Borland has even given up on making a full blown IDE because Eclipse is so good.) Not only do I say this, but so do many many other people in this topic thread.
Let's presume you are right. So? Does any of that make PHP less scalable and if so by how much? That's the real question. Somehow my company was able to make millions of dollars per month without those things on a PHP based web site. Go figure!
That's great! And you can write your application in assembler and if you're really good at assembler you can make a website that makes millions of dollars per month too! Oh hell, just write your own web server too... in Ada! Sure, why not? That's great too!
The point is these options exist and are written by professionals who probably know more about this stuff than you (just because you can't know more about everything than the experts in those fields.) I feel confident using software written by the Apache Group or the JBoss group... and you know what, I can write an entire database application without ANY SQL... and that's just great.
I already said I was 200 to 300% more productive in PHP. And yes it was worth the price. Why? because it ended up that PHP was perfectly suitable for our application. WE NEVER HAD TO REWRITE IT. The application never got so big that it needed java.
Ah... so you don't know Java. Ok... that makes more sense. I am like 30000000% more productive in English than in Thai.
How is that the fault of PHP?
Because you can't implement an in-memory caching solution in PHP without something like the Zend Optimizer since PHP spawns independent threads for each access of a page. Hell, without paying money for things like Zend Optimzer/ZendCache, PHP has to COMPILE THE BYTECODE ON EVERY HIT. But unless you use something like PEAR cache, you ain't getting in memory caches with PHP.
I know you've coded PHP, but it sounds like you don't really know how PHP works internally. But that doesn't matter becuase it's better!
Premature optimization is writing your application in J2EE because you hope one day the application will need to be the size of amazon.com and taking two years to develop something that could have been on the market in six months.
No. That's just hiring someone who doesn't know shit about the languag
Re:PHP != Crap Code (Score:2)
"
I never claimed that Jedit is an IDE for PHP. I simply said I used Jedit. There are IDEs for PHP though. More then one. Get that through your thick skull. Stop saying what you know is to be false. There are IDEs for PHP.
Having said that Yes Jedit integrates with CVS, yes it has code completion (depending on the language), and yes it integrates with various debuggers.
Finally IDEs have nothing to do with the scalibility of PHP.
"It's NOT lightweight if you are doing complex things. There's more to load than CPU utilization. What about number of connections that your application spawns or uses? What about the number of threads it executes? Do you even know these answers?"
I was doing complex things, as I said it was a very large and heavily used e-commerce site for a business with SOAP services, XML transforms, complex reporting etc. I was able to set how many connections it uses, how many applications it spaws all from either the apache configuration or PHP configuration. There was no threading, I was using apache1.3 with pre-forks. It worked like a charm and made millions of dollars a month.
"The point is these options exist and are written by professionals who probably know more about this stuff than you (just because you can't know more about everything than the experts in those fields.) I feel confident using software written by the Apache Group or the JBoss group... and you know what, I can write an entire database application without ANY SQL... and that's just great."
How does that make your application more scalable? I told you that my application scaled to 20 hits per second without breaking a sweat. I calculated that it could probably do 100 hits per second but we never even came close to that.
"Ah... so you don't know Java. Ok..."
I know java very well thank you.
"Because you can't implement an in-memory caching solution in PHP without something like the Zend Optimizer since PHP spawns independent threads for each access of a page. Hell, without paying money for things like Zend Optimzer/ZendCache, PHP has to COMPILE THE BYTECODE ON EVERY HIT. But unless you use something like PEAR cache, you ain't getting in memory caches with PHP."
Right, so what's your beef? You can get caching with PHP. Zend charges for theirs but there are free ones too. Hell I wrote one my self with a handful of code, it was easy!.
On the one hand you say PHP can't cache on the other hand you list products which enable PHP to cache. Where are you going with this?
This has got the most insane conversation I have ever had. How can you simultaniously claim that PHP is unable to cache and then list one free and one paid product that enable you to cache?
"No. That's just hiring someone who doesn't know shit about the language you're coding in. If you get an experienced java programmer that is used to a framework like Struts or Tapestry or JSF, they can easily output pages at a rate that is equal to or not faster than a professional PHP developer (I've done both professionally.) With PHP you are almost always starting from scratch (and rewriting (or cut and pasting) parameter validation code, authentication code/engines, connection pooling, etc)"
That's just a flat out lie. By the time you get your classpath figured out and your XML written the PHP application will be halfway to done. How? Just go visit the PEAR library and see for yourself.
"I don't mean an entire enterprise javabean application, i mean an application that uses the standard JDBC, and some messaging too."
That application will not be more scalable then PHP. The only time Java is more scalable then PHP is when you have to distribute your application server amongst multiple servers.
You're right about the professional IDE (Score:2)
I was hoping to see more from PHPEclipse. Quite honestly, the plugin was a dissapointing to me. I don't see any reason to tie it to the XAMPP packages and it loses so much of the awesome functionality of Eclipse that I quickly resorted back to Macromedia homesite for a glorified text editor.
Re:PHP != Crap Code (Score:3, Insightful)
The lack of any real type safety in PHP makes it difficult to track down simple typos (for example, misspelling a variable name). I don't mean syntax errors, since those are easily caught, but typo's that are not syntax errors.
The lack of any real scope in functions and the ability to RAII also make it difficult. Debugging is also pretty difficult, even if you use commercial tools (ie Zend).
Re:PHP != Crap Code (Score:2)
Most PHP code I've looked at is vile: the people who wrote it cannot code worth a damn and seem to program completely by trial-and-error. register_globals anyone? no checking return values? Grabbing values from POST variables and using them unconditionally, without any sort of validation? Yeah, let's do that! People seem to start programming in PHP before they learn fundamental programming practices.
PHP should be more strict and not allow the strictness to be reduced. PHP should be written with security as the number 1 priority: it needs to not even _offer_ things like register_globals. You don't need a "Enterprise PHP" book, you need:
1. A hardened PHP
2. To learn how to program secure, correct code under whatever language.
Gallery 1.x is trivially exploitable (to say the least). I hope G2 is better but doubt it will go without an exploit for long. Apparently there's only been one exploit found in Gallery 2 so far and that was fixed before an official version was pushed out, so that raises my confidence level marginally.
Sorry to piss on everyone's batteries but I'm missing out on sleep because of PHP and the legions of self-styled "PHP Programmers" that can whip up $200 brochure sites that are trivially exploitable.
Cheers
Stor
Re:PHP != Crap Code (Score:2)
I write well-structured (in my opinion, at least) PHP code a lot at work. These things are some of my main dislikes:
There are a few more, but those are the main ones that frustrate me most days. Fortunately, my job doesn't entirely revolve around PHP. That's just one project.
Re:PHP != Crap Code (Score:2)
Marketing (Score:3, Funny)
Of course, it were a Microsoft product, the natural successor would be 'Gallery Super Uber Ultimate Edition'.
Re:Marketing (Score:3, Funny)
You sure you're not thinking of the "Street Fighter" series?
No (Score:2)
buzzwords check passed (Score:4, Funny)
Re:buzzwords check passed (Score:2)
Not bad, but I'm sure with a little more work they could throw at least half a dozen other nearly meaningless phrases in there.
Slashdotted (Score:3, Informative)
http://66.102.7.104/search?q=cache:EYRwD7JSrCoJ:g
Re:Slashdotted (Score:2)
Gallery 2 [sourceforge.net]
I have a gallery2 site too. It'l be nice when I can get enough bandwidth to get the full version of gallery2
Site (With default theme and ~500 pics): here [bs-squared.com]
How are the Debian packages? (Score:3, Interesting)
Hey, has anyone tried out the Debian gallery2 package? Does it do a good job of migrating the data, or does it install stand-beside? I have a gallery 1 installation that my whole family uses, and I'd like to know if it's safe to upgrade, or if I should wait for the bugs to be worked out.
Re:How are the Debian packages? (Score:5, Informative)
FWIW, I uploaded version 2.0-1 of the Debian gallery2 package this afternoon - it should be available in Debian unstable as of this afternoon's archive run.
Re:How are the Debian packages? (Score:2)
Re:How are the Debian packages? (Score:2)
Unit Test 1501 (Score:4, Funny)
Can it manage photos of your server on fire? (Score:2)
Working download link (Score:5, Informative)
the new site runs Drupal (Score:2, Informative)
Re:the new site runs Drupal (Score:2)
Talk about borked. ouch.
top three favorite features (Score:3, Informative)
Gallery Local, a smart client for Gallery (Score:2, Informative)
It allows viewing of your gallery offline. It takes advantage of the new XML-RPC routines available in Gallery 2.
Re:Gallery Local, a smart client for Gallery (Score:2)
My Gallery (Score:2, Interesting)
Re:My Gallery (Score:3, Funny)
Give me a break. (Score:4, Interesting)
From the code I saw, everything is extremely over-engineered (read: too freaking complicated). It looks like they have some input sanitization functions but they aren't used consistently.
The coding style throughout isn't consistent (but who cares?).
On the plus side, they have used PHPDOC or some similar syntax to document their classes and functions (makes for good API docs). They have used external libraries for some things like templating and database abstraction (can't say much for their choices but at least they didn't rewrite those from scratch).
The error handling also looks particularly nightmarish: (repeated 12 times in one 100 line file!!!!)
Re:Give me a break. (Score:5, Informative)
As for the coding style not being constistent, could you please give an example? G2 has very strict code style guidelines that have to be followed for a patch to be accepted (you can find them on the g2 codex site which is currently getting hammered). The code may appear complicated but if you take the time to read things it's actually quite legible and it makes sense. Usually people who have not worked on very large team projects feel intimidated by something as large and complex as Gallery2, I know I was when I first started working on it.
I admit the
The error handling code works and I challenge you to find a cleaner way to let the developer know exactly where an error occured so they can fix it. Why does it occur so often? Because error checking is good, it's just too bad more people don't do it.
Re:Give me a break. (Score:3, Interesting)
I'll take "exceptions" for £50, Bob. Unfortunate that PHP5 doesn't seem to be taking off quite like PHP4 did; I wonder if that's because many of the people who would find the new new features attractive are finding other languages suit them better? I know I did, and I used to really love PHP and was dead excited by Zend Engine 2
Re:Give me a break. (Score:2, Interesting)
Re:Give me a break. (Score:2)
Seems a bit like a chicken and egg problem in some ways; very few people use the new features because most people don't have control over their own servers, so those that do have control don't see a point in upgrading because.. nobody uses the new features. Having a few big-name apps start requiring them and making obvious the benefits would probably go a long way towards helping the demand side.
Not that I don't see it as a good thing to see users find better languages for them; a monoculture where "web scripting" == PHP really isn't healthy, I don't care how free it is. Competition makes everything suck less
Over-engineered? (Score:2)
I find it funny that g2 is over-engineered because it is specified in the article that XProgramming was used to develope it. And one of the advantage that makes XProgramming so great is that it should prevent you from over-engineering your stuff.
Safe mode (Score:2, Informative)
Wordpress support (Score:3, Informative)
Re:Wordpress support (Score:2)
The iPhotoToGallery-Plugin [zwily.com].
Makes photoblogging really easy.
Second to one (Score:3, Informative)
mysql_connect() (Score:3, Informative)
Re:mysql_connect() (Score:3, Informative)
Normally you do NOT want to use mysql_pconnect. This function is designed for environments which have a high overhead to connecting to the database. In a typical MySQL / Apache / PHP environment, Apache will create many child processes which lie in idle waiting for a web request to be assigned to them. Each of these child processes will open and hold its own MySQL connection. So if you have a MySQL server which has a limit of 50 connections, but Apache keeps more than 50 child processes running, each of these child processes can hold a connection to your MySQL server, even while they are idle (idle httpd child processes don't lend their MySQL connection to other httpd children, they hold their own). So even if you only have a few pages which actually connect to MySQL on a busy site, you can run out of connections, with all of them not actually being used.
In general use mysql_connect() for connecting to MySQL unless that connection takes a long time to establish.
Re:mysql_connect() (Score:2)
So is their main site indicative of code quality? (Score:2)
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /usr/www/website/drupal.gallery2.org/index.php:39) in /usr/www/website/drupal.gallery2.org/includes/sess ion.inc on line 10
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /usr/www/website/drupal.gallery2.org/index.php:39) in /usr/www/website/drupal.gallery2.org/includes/sess ion.inc on line 10
Warning: Cannot modify header information - headers already sent by (output started at /usr/www/website/drupal.gallery2.org/index.php:39) in /usr/www/website/drupal.gallery2.org/includes/boot strap.inc on line 448
Plus half a page of unreadable junk which I won't even try to get past the lameness filter.
I think I'll wait for Gallery 3.x
Re:So is their main site indicative of code qualit (Score:2)
Here's the content I got from the demo page. (Score:2)
Seems their site's working just fine.
Gallery Remote Not Wprking (Score:2)
Server contacted, but Gallery not found at this URL ( http://www.mysite.com/gallery2/main.php [mysite.com] )
Any pointers? Has anyone else experienced this? Does Gallery Remote work at all with g2?
Re:Gallery Remote Not Wprking (Score:3, Informative)
Not right now (Score:2)
Couldn't you have waited till I got my copy first?
not natural (Score:2)
I disagree. I was going to try one of the Beta or Alpha releases of 2.0 a while back, but as soon as I read that it required MySQL, I turned tail and ran.
One of the beautiful things about Gallyer 1.x is that it didn't require a relational database, which IMHO is massive overkill for such a simple application from a data perspective.
Re:paid press release on /.? (Score:2, Insightful)
Extreme Programming at Wikipedia (Score:2, Informative)
http://en.wikipedia.org/wiki/Extreme_Programming [wikipedia.org]
Re:Extreme Programming at Wikipedia (Score:2)
(BTW, I'm asking because I tend to be wary of the latest buzzwords in the industry, because they obscure the legitimate breakthroughs.)
Re:Extreme Programming at Wikipedia (Score:2)
http://paulgraham.com/lisp.html [paulgraham.com]
Do Xtremers have any particular choice of language?
Re:uhh ohh (Score:3, Insightful)
But my favorite part is the bit about "test driven development." Of course it's test-driven... that's how programming generally works.
And Zonk... please tell me what the program is before telling me to "Clickey here! Download Now!". I'm not really looking for online photo management software at the moment, thank you.
Re:uhh ohh (Score:2)
Nope, Not offtopic!! Re:What the fuck is Gallery (Score:2)
Doing a quick google search for gallery 1.0 or 2.0 leads to nothing immediately informative.
So, what the fuck is gallery!?
Re:Nope, Not offtopic!! Re:What the fuck is Galler (Score:3, Informative)
What does it do..... (Score:2)
online photo management, sorry, i'm not in the field.
Re:What the fuck is Gallery (Score:2)
Re:Uhm, been running on my server for months.... (Score:5, Insightful)
I've been using it in a high-volume production environment since April Fool's Day. We plan on dumping it next week and moving to our own code. It's a very nice system (and a tremendous leap forward from Gallery 1), but it's wedded to a folder organizational metaphor, and we need a richer taxonomy to support potentially tens of thousands of users.
Re:Big deal. (Score:2, Funny)
I've just finished creating the worlds first working fusion reactor, but hey, whats the fuzz - others have thought of it before me.
Re:Big deal. (Score:2)
So you think an app that maintains a photo gallery is something that hasn't been done a few times [freshmeat.net]? Possibly on every known platform, in every known language, for every known format, both offline and online?
But I see how one might confuse it with a technological breakthrough on the order of a new energy source.
Re:Big deal. (Score:4, Interesting)
Re:Big deal. (Score:2)
Not from my experience (Score:2)
Re:Not from my experience (Score:3, Informative)
Users who have reported "weird" redirects (you may be the third), always had a misconfigured webserver, which made their Firefox use the built-in (FF) google "I feel lucky" feature. So if you give your webserver a weird name and misconfigure the webserver, you end up on a I feel lucky hit from google for that search term.
Re:Upgrading? (Score:2)
Re:Extreme programming? (Score:3, Informative)
It's quite likely that following the UP exactly may slow down development significantly.
Re:3 years? I think not. (Score:2)
Re:I wish it had iphoto integration (Score:2)