Skip to main content

Frameworks Are Good

·535 words·3 mins
Hari KT
Author
Hari KT
Freelancer | Founder of Tripti and Tanvish | Maintainer of Aura for PHP, created by Paul M Jones

Some of the recent discussions in the PHP world are

Framework is not a bad idea
#

If you don’t use a framework, probably you will be using a bunch of independent libraries glued together or some code which help you to achieve your task.

Whether we use a framework or independent library, our ultimate aim is building the right product for our customer.

If you are building an app, and if you strongly feel symfony is the right choice you should go with it. And if you feel zend framework, auraphp, fuelphp, cake .. (you name it) is the right one you should go for it.

The ultimate aim of any framework developers is to make a living from it or to advertise his capability. So all will advertise it as good and never say a bad word even if they know the pit falls.

One of the recent problem we can notice is every php framework tries to advertise they are developed from components.

First
#

Laravel is an awesome framework, so do symfony, zend framework and you name it.

and not to your surprise “I love auraphp

Don’t call all are build from libraries
#

May be we need to define how/why we call it as library.

Consider a routing library : You give a URL path and $_SERVER values it extracts the route information.

Some of the libraries that does the work are aura/router, symfony/routing, illuminate/routing

Apart from aura, I did a search for routing in packagist

If you have a good eye, you would have understood looking at the packagist dependencies.

The next one is regarding the require-dev. The require-dev dependency is when you want to bind other components. The best way is to get rid of the require-dev. The glue package should be another independent package.

Consider Lusitanian/PHPoAuthLib Symfony session has one. What will happen when someone who loves zend, aura, fuel etc love to have the session. It gets overly complicated. So is https://github.com/friendsofaura/OAuthSession repo born. Another good example I would like to show is aura/project-kernel

Yes it is a bit of hack, to run tests. Have a look into travis

What I love to see in the PHP world is have a single repo where the pull request, create issues can be made rather than going and forking the entire code base. And not to mix the source and tests.

The packagist need a way to sort dependent packages, independent packages and framework dependent packages.

If you are new to PHP, I will recommend you to use components and glue it together.

Your application defnitely at some point of time need Input Filtering & Validation

May want to introduce form libraries to glue with your legacy code.

You will learn PHP, and not the magic of a framework. Depending upon the dependencies it will be easy to replace the component. That is the ultimate aim of components, not to trap you.

Thanks for reading.

Happy PhPing!

Related

Aura Framework Released

·67 words·1 min
It is a great feeling, and one of the happiest moment in my life when aura releases its stable framework. Aura is one of my first framework, which helped me to learn the inner working of a framework, how to create a framework, rather than playing with full stack framework. If you are interested to learn or contribute in the next version of Aura join the group.

Aura Framework Releases Beta 4

·41 words·1 min
Aura.Framework released Beta4. In this release Aura.Framework has extracted the Hello Word package and renamed it as Aura.Demo. You can get the system as a whole from http://auraphp.github.com/system/downloads/ Read about the release from blog post and join discussion at auraphp group

Composer Support for ProcessWire, Part 2

·155 words·1 min
In my earlier post I mentioned about adding a composer.json in the root of the github repo. Sometimes you may see a non composer.json repo or some times people reject it, you still can do like the below. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 <?php { "minimum-stability": "dev", "repositories": [ { "type": "package", "package": { "name": "ryancramerdesign/process-export-profile", "version": "1.0.0", "source": { "url": "https://github.com/ryancramerdesign/ProcessExportProfile", "type": "git", "reference": "master" }, "type": "pw-module", "require": { "hari/pw-module": "~1.0" } } } ], "require": { "ryancramerdesign/process-export-profile": "1.0.0" } } And run