Do you like working with PHP Frameworks?

Do you like working with PHP Frameworks like Yii2, Laravel, Zend framework, Symphony, CodeIgniter to name a few

Or

you like prefer/enjoy coding from scratch?

Some PHP developers have said in the past that they enjoy working with core PHP rather than WordPress. That’s why I thought of asking this question.

Thank you :slight_smile:

1 Like

That’s a different thing altogether. WP is not a framework, it’s a CMS.

I do code php from scratch, I think really just for the learning experience of doing it all myself. I have not got around to looking at php frameworks, though it may be worth considering if it speeds up development, as doing everything from scratch can be time consuming.
I’m not a fan of front-end frameworks, but that’s a different subject.

4 Likes

I like this question! Short answer is “no” for me. I don’t like working in/with frameworks. I worked with Drupal (a content-management-system like Wordpress but with more power exposed for integrating custom php-code). I ran into walls that kept me from doing things I needed to do effectively. Drupal is a great CMS. So is Wordpress. And then the php-targeted frameworks…they obviously are great or they would not be so successful. One’s decision is of course based on personal preference. And then also in the debate about “framework or not” is that php-frameworks are indeed based on pure-php. Yep, I risk re-inventing the wheel by creating what has become my own personal framework, but I am fully aware of this. I know that I have control over what direction I go into and also I am control of my code-quality. I am not at someone else’s mercy about how or when code functionality might be fixed, improved, or expanded. I would suggest for a new to intermediate programmer that they…

  1. learn PHP
  2. learn a framework by starting to work with it (and also while improving your PHP skills)
  3. you will see and say to yourself, “dang” “this framework does a lot for me”
  4. you will be hard-pressed to justify doing your own framework from scratch (but this is what I have done)
    Likely the best over all is a proper integration of a good framework (and php libraries) and your own framework.
5 Likes

You mean Java Script frameworks?

1 Like

I was thinking more about css.

3 Likes

Working with only self made code is fun but getting good examples from others is very useful. I’ve used a framework written on my own in the past and it had great performance and sufficient feature set but then I found the code a bit messy when I began learning about dependency injection and other good OO practices.

Now, I mostly use Silex (a micro framework) but I tend to make my applications as framework independent as possible - I’m aware that at some point in the future I might choose to port them to a different framework for some reason and I prepare for that up front. Recently, I’ve started playing with Symfony 4 and might use it soon.

My requirement of a framework is to be minimal and stay out of my way. When I installed a full-fledged demo of a Symfony 4 app and I looked at the code it literally made my brain hurt - it’s such a monstrosity. But a minimal Symfony 4 framework can be very small with only a request/response class, router and the kernel, etc. - that’s what I need, and most other stuff to be installed or added optionally.

What I value more than frameworks is components. With Composer it’s easy to add all kinds of libraries to a project. A framework just needs to make it easy for me to use them all together without getting in the way and adding my own features without any hackery.

5 Likes

I really enjoy working with frameworks and CMSs. I truly believe that working with frameworks and CMSs creates more productive and intelligent programmers. Learning to navigate and manipulate other peoples code and interfaces to fix bugs and add new features is highly valuable skill which applies to nearly ever real world situation in this industry. I will go as far to say that the people who write things from scratch are selfish and stupid and as part of any organization are not acting in the best interest of organizations ability to maintain a project long term. Despite what others have said I find it very satisfying debugging a large framework or highly abstracted code written by others. Much more satisfying than creating yet another DI container or “custom framework”. I think those types of exercises are great for learning but not professional web development. I’m working with Angular right now and I really enjoy it. I’ve learned a lot more about modern JavaScript using Angular the last 6 months than I would have writing my own JavaScript framework.

2 Likes

Then it’s a very good thing that the creators of the frameworks you enjoy now and shall enjoy in the future do not agree with you, otherwise you wouldn’t have achieved such a level of productivity and intelligence.

1 Like

Yeah, I guess so.

1 Like

The funny part is that Rasmus calls it a framework.

2 Likes

In the context he is referring to them they could be considered “frameworks” but the more correct term is CMS. A CMS is a framework but a framework might not necessarily be a CMS. I tend to focus less on the terminology and more on just getting things done anyway.

3 Likes

I agree, technically, because technically it is recognized as a CMS. But it is also a framework. What is a framework, really? From a practical standpoint, a framework is anything that offers code-organization and structure for increased productivity and better code quality. Faster time-to-market. Many other benefits. (I know you know this and I realize you’ve gone with the technically-accepted answer which is fine.) But realistically, buzzwords aside, once a set of code begins the process of reaping the benefits of code re-use, and component-based programming, and some structure that enhances productivity in any way…it has reached some level of status as “framework.”

1 Like

Both actually :slight_smile:

As far as I have used a particular PHP Framework for a very long time, tried numerous others and still revert back to the one with the best documentation and also their own forum support.

Once written and used their guidelines it is a relief to be able to easily update the online web site, which I have just done…

  1. downloaded latest zipped 2.7 MB zipped source
  2. extracted locally
  3. uploaded source files (523 items, totalling 12.2 MB)
  4. modified the following index.php line
    $system_path = ‘…/…/ci2/MyFramework-3-1-8/system’;
  5. Uploaded index.php

####About five minutes to implement the following security updates, etc

1 Like

The framework he is referring to is CodeIgniter and I absolutely hate that framework. The best way to describe CodeIgniter is as a tricycle. Where as Laravel, Symfony, and even Zend are more like mountain bikes. CodeIgniter uses a lot of out of date old bad code and patterns if you can even call them that. I just wish they would have let that project die because unfortunately it has enough of a following to be relevant. Most of the time I think people are really smart who have written frameworks like Laravel, Symfony, Zend, etc. The people who built CodeIgniter are very stupid. That is what makes the framework so popular though stupid framework written for stupid people who can’t be bothered to learn modern application architecture. No dependency injection, God classes, no event system but hooks the whole way CodeIgniter is built just makes me sick to my stomach. 3 is basically just 2 with namespaces but the same code smell. Yuck… CodeIgniter devs should be ashamed of the garbage they peddle. I don’t blame devs for using it though addictions to anything bad like drugs or in this case CodeIgniter are difficult to crack.

1 Like

Yeah, I read that CI is not properly maintained these days.

1 Like

Yes it is the PHP CodeIgniter Framework and according to Wiki, Initial release: February 28, 2006 and it ran quite happily using PHP 4.?

A lot of PHP versions have appeared since and also numerous PHP Class modifications.

New PHP Frameworks have appeared and as mentioned I have tried most of them…

You may be interested and commenting on how your favourite PHP Frameworks compare to the imminent release of…

1 Like

It looks like CodeIgniter 3 with namespaces. I think I was originally referring to CI 4 when I made the comment about it is all similar code as 2 and 3 but with namespaces. Having worked with many other projects I’m just not at all impressed with anything that team is doing. CodeIgniter was a good framework 10 years ago but now it is complete trash. If you start reading about why they haven’t used any new modern patterns / architecture its just a bunch laziness and bull sh*t. That project is waste and the devs maintaining it – keeping it on life support are lazy idiots.

2 Likes

I’ve found that name calling is not a good way to have a productive conversation. Name calling is the sort of behavior that causes forum threads to devolve quickly into shouting matches. “Those people are idiots” carries the implication that anyone who follows “those people” are also idiots. You didn’t call John_Betong a “lazy idiot” directly but did so by inference through association whether you consciously intended to or not.

SitePoint Community guidelines: “Be kind to your fellow community members. Constructive criticism is welcome, but criticize ideas, not people.” Those guidelines should even apply to writing about people who aren’t even on this thread, such as the CI devs, because they aren’t here to respond nor should they have to be.

4 Likes
1 Like

Although Elon Musk may have no problem with members calling other members idiots on his forum, the SitePoint forum does and members here would do well to keep discussions as civilized, respectful and on-topic as best they can.

* Note
rather than derail a discussion, please take advantage of the Flag feature when applicable

https://www.sitepoint.com/community/faq

… we rely on you to help out. You can do that by alerting us of anything you see that looks off base. It might be a post that’s rude, it might be spam or maybe it’s just in the wrong forum.

When you see bad behavior, don’t reply. It encourages the bad behavior by acknowledging it, consumes your energy, and wastes everyone’s time. Just flag it. …

7 Likes