Jump to content

Recommended Posts

Okay, for those of you who have read my previous posts in this forum section - I have to finally admit that I now see why you said a PHP 5 framework is better than a PHP 4 framework (I have also switched to Network Solutions which definitely has PHP 5) , CodeIgniter seemed great, but in my new project (Gaming website, almost something like IGN, just with user profiles, etc.), CodeIgniter seems a bit underpowered.

 

I don't have a lot of time to learn a new PHP framework, would you recommend a switch to Kohana, Symfony, or any other PHP 5 framework (I still need a bit convincing before switching to Zend as I like a full-stack framework a bit more)...

 

Any advice for choosing a PHP 5 framework this time?

 

Oh, and I have a bit of experience in PHP OOP (not a lot, but I will definitely look into it when switching to pure PHP 5), and a whole year's experience in RoR, I heard that Symfony is a lot like RoR, is this true? If so, it'll win me over in a heart's beat lol...

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/207298-seeking-php5-framework-advice/
Share on other sites

If you have RoR experience it would be best to switch to Symfony otherwise I would suggest Kohana as it's a fork of CodeIgniter. As you have little time to learn a new framework I do not recommend you go for Zend framework, the learning is pretty steep and if you haven't got any idea of most, if not all, OO patterns you'll find yourself in way over your head.

 

However, if you are not planning on using Zend framework as a full-stack framework (use Zend_Application, Zend_Controller, Zend_View) you can still benefit from most of their supplied components like Zend_Form, Zend_Auth, .. The good thing about the Zend framework is that it plays well with other frameworks, Zend_Loader for example can load your CodeIgniter/Kohana libraries.

 

While developing your application consider Zend framework components to speed-up your development. Try them and see if you can get them to work (in a reasonable amount of minutes/hours) the way you want them to, if you can't no problem as you can just fall-back to your base framework.

I don't know how Symfony is installed yet, but if it's anything like RoR, then I doubt that Network Solutions will host it just yet... I have contacted their technical support and keeping my fingers crossed. I heard that Kohana still doesn't use strictly PHP 5 OOP syntax, is that true? I really hope that I'll be able to use Symfony...

  • 2 weeks later...

I've used all kinds of web-frameworks with all kinds of different languages over the past 5-6 years. Here's what I've learned... None of them are as good as yours would be if you just wrote your own. It's really ... really not that hard. It'll be for sure at most 1/10th the size of most frameworks. They are so heavy with features you'll never use to their full potential, so it naturally loads 50% more code than you'll ever tap into, which slows down page loading time even for low-traffic sites.

 

By the time you use, test, learn, break, and fix a bunch of frameworks, you can pick and choose the procedures you liked the most out of all of them. Grab different blocks of code from each, maybe even some from snipplr.com, strip them down and rewrite them, and before you know it, you've got a really awesome little framework that works for YOU, and doesn't focus on being so robust and user-friendly it can be used by a total idiot (which is a factor contributing the weight of most frameworks).

 

I have built many websites for many purposes and have taken each opportunity to either test a new software/framework/language, or refine my own php framework. I possess now what I feel is the best possible framework for every type of website. It includes fast and simple methods for database queries, clean urls, templating, user authentication (session, cookie, and database), form error handling and processing (both server-side and client-side), a bunch of jquery features that are pre-templated and simple to integrate... it's really sexy.

 

Besides, there's no use in pursuing the study of frameworks for anything other than creating your own because businesses and developers that take the initiative to really understand the inner-workings of a framework and take pride in their ability to push it to the next level and advertise this service in hopes that it'll help them find a niche market... Well, all they did is get better at something some other team developed... for their purposes... not yours. Not YOUR niche market... So why not take what they did right, and ONLY what they did right, and apply it to your preferred process?

 

I don't know about you but I got into this business for two reasons: to make money and write beautiful code... in that order. Most developers go about it the opposite way and end up the average under-compensated, under-appreciated, under-challenged, and disgruntled techie. And we have all come across the client that (before you) has in the past been swindled into a $12,000 website and it looks like it was built in 19diggitydoo with the most archaic features.

 

Take that as a lesson. The client NEVER knows more about the web than you, so it's really just about your ability to sell a particular process or software that will determine if you'll land the project or not. As far as the client is concerned, it has nothing to do with the process or the software itself, again, because they never know more about their website than you do. They're not going to look at the code. Why would they? They wouldn't know how to interpret it, that's why they hired you in the first place! So work on your own simple, light-weight framework that works for YOU, while most frameworks will tell you "you must abide by our rules... that's how you get the most out of it..." Screw that! Programmers are clever, creative, and innovative, especially when it comes to programming stuff for themselves. So try them all, test them all, pitch them all to your clients or even for yourself. You'll probably like some features, and hate others. In the grander scheme of things, you'll inevitably encounter a project where the framework you've chosen to dedicate yourself to is NOT the best solution. Program your own, pitch your own with confidence, and get rich faster.

 

Cheers

Yes, it works for YOU, but what about the person after you? (Assuming you're in a business setting.) There's actually a chance whoever comes after you will have experience with one of the popular frameworks. There is zero chance they will have experience with your custom framework. I inherited a custom framework at my job. I wish the person or persons before me had just used an open source framework. The popular open source frameworks (Cake, Zend, CI, etc.) are better documented and more thoroughly tested.

Jaguar, you're right, but I was mainly talking about the freelance business environment where YOU are the boss, not a code-monkey drillin out syntax for the man.

 

In any sense though, the purpose of a framework is to make it easier for you to perform all tasks, or easier to collaborate with others when dividing tasks. Popular frameworks are more documented because they HAVE to be (there's a LOT more ground to cover). More thoroughly tested? No. Not if you grab the same code and change it a bit to fit your needs... It's even better, actually. It also doesn't matter if others have zero experience with a totally custom framework... there's a good chance it's easier to use than all the other ones out there, it makes more sense, it's super light-weight, and therefore easier to learn/work with. Nobody starts out with 100% experience in any framework. There is always a learning curve, and I think one of the main goals for most popular frameworks is how EASY they are to get started, learn, and use. If that's the case, then you must see how downloading, installing, configuring, and using a popular framework is always heavier than you'll ever require, and eventually won't be the perfect solution to a project, and you spent so much time trying to learn how to make it be the perfect solution for all projects. Sometimes... you guys gotta write procedural code. And that's why light-weight/custom frameworks are best... they are pluggable in the way that YOU want them to be. Not mandatory to install the whole thing if you want to use ONE cool feature. Strip it down to that one cool feature, and toss it into your own framework. I promise you'll get over your own learning curve a LOT faster than someone else's.

Of course you get to plan it, you're the developer! But as soon as your company starts eating the cost of the project just to make sure your code is structured and documented properly and everybody's adhering to the coding standards of the framework, your boss will tell you none of that shit matters anymore, get the project out the door, I don't care how it looks. THE CLIENT WILL PROBABLY NEVER LOOK AT YOUR CODE AND EVEN IF THEY DO, THEY WON'T BE ABLE TO TELL IF IT'S GOOD OR NOT.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.