I come from a desktop-programming background and am trying to get into web-development. I am probably being a huge noob in many ways, so please bear with me.
It might be that background talking, but I have been a little disappointed (and overwhelmed) regarding looking for a PHP foundation to build my applications on top of.
I have been looking around at various frameworks and so far I haven't found what I am looking for. I am looking less for a system that is largely pre-made and lets you customize, and more for a library full of handy-dandy tools that I can piece together in various ways. Short version: I am hoping for a well-established set of classes/interfaces in the form of .php source files that are all stored in a directory (or two directories).
Longer Version: Call me spoiled, but one thing I liked about Java / Visual Studio is the large and well-established class structure. If I wanted to use a particular function, I include a particular class (or add a namespace, depending on the circumstances) I just include the file in my code. Or it was also convenient when making a class to be able to extend an existing class or implement an existing interface so that it can have maximum usability with the other items in the collection.
The Plan: I want to have a shared class directory (above web-accessible folders) that I pull components from as desired. I am hoping to maximize code-reuse in this fashion and keep things neat and tidy.
I have recently looked into PEAR, and it seems to be largely what I am looking for, except it is clearly not designed with my plan in mind. As of right now it looks like I would have to retrofit each one to work like so (I am probably being a noob).
I am probably making no sense at all, but maybe I ultimately will make more sense after answering questions form a confounded community.
Short version: I am hoping for a well-established set of classes/interfaces in the form of .php source files that are all stored in a directory (or two directories).
The growing convention is to place third-party libraries in a directory called "vendor". And from there, the namespaces directly map to directory paths.
Originally Posted by TheOnlyMerlin
Call me spoiled, but one thing I liked about Java / Visual Studio is the large and well-established class structure.
I hear ya. I used to be a Perl/CGI programmer, and when Perl/CGI slowly died out, I had to pick a new language to specialize in. I was inclined to pick Java/JSP for some of the same reasons you mentioned. I liked the extensive and high quality libraries, and I liked the OO architecture and strong typing. But due to the requirements of my job, I ended up picking PHP instead. Today, I would still stick with PHP largely because I'm a huge fan of the Symfony framework.
But you don't need to pick PHP, and based on your background, it may not even be the best option for you. Both Java and .NET are good options too. A few additional factors to consider in that decision are: How many jobs are available; how big is the community; and what kind of workplace do you prefer.
Thank you guys for your help. Your patience is appreciated.
My initial reaction is one of disappointment so far with Zend and Symfony. I am getting more the impression that what I want does not exist as of yet.
Both of these are far more weighty than I was looking for. Now, as far as I can tell they look like decent enough frameworks. I just found myself trying to find their source include directory so I can rip it out and set it aside.
I am playing around with Symfony (since it seems to come highly recommended) to give it an honest shot to change my mind.
Source of my pain? - I suppose one thing that is causing me grief is that the project I am working on is for a school with some difficult security settings. This means I have no telnet access, all PHP database commands are disabled (so no databases for me), and no FTP access (I am supposed to e-mail the site to their web master who then loads it into directories). I want to make my own projects, but I don't want to have a collection of different systems for different circumstances if I can help it, I at least want to be operating under the same basic set of paradigms. So I am looking for a decent foundation that can be used under such draconian security conditions with ease, and not finding anything.
I have a vision of a framework that I would like to exist, but would be a truly massive undertaking that seems horribly not worth it if it is just for me. Particularly because it feels so much like reinventing the wheel.
Once again, I think this ultimately stems from my noobish status and having unreasonable expectations.
Having just replied on your other thread about Galleries, and now having read of your source of pain -- I wouldn't hesitate in using the idea of "aggregated content" which is a term I think I may have overheard or indeed may have made up myself.
This is where very few simple PHP scripts aggregate and display content from other websites.
I decided to push this idea for a local sporting club event once and we used:
Flickr for all the images.
Posterous for all of the article content (and images)
Tumblr for news headlines
Twitter for updates and headlines
So that way your "content authors" can email Posterous with a new article, someone with a Twitter account can be writing all your headlines and deeplinking into your content, mulitple photographers can be adding images - geocoded images can turn up on maps.
They sign up and create their own accounts, you don't have to worry about GUIs or supporting mobile -- all you have to do is orchestrate the content to appear in the right place.
I have found that all PHP ORM offerings to be lacking in some way or another. Either they rely on ActiveRecord methodology, with minimal mapping on top for automation, or they rely on the business entities having looser scopes than ideal on their properties. I like my business entities encasuplated. I find SQRS with Event Sourcing a much better solution than an ORM. It only takes a few simple classes to implement, eliminates the need for mapping code, and your entities can have private members.