Hi, guys!
I’m using Yii since 1.0 release and clearly see it’s growing out of it’s
known boundaries. It can no longer considered lightweight and tries to
solve every task in the most complete and generic case.
Here is the quote from an About Page:
As it’s said, “It was built with enterprise applications in mind”. But
is this good for solo developers and small projects? No, it will certainly
work. If you’re a senior developer and have a team, hands up, Yii is for you.
The question here is about an ease of use and your personal tastes.
Being a developer for over 10 years, I’ve used to keep the whole picture
in mind. Having a huge framework under my fingertips makes me feel unsure
unless I completely understand what it exactly does. Reading Yii sources
made me realize that in most cases I just don’t need such a power and
complexity. Especially when it comes to database and UI layer.
A lot of solo programmers are in search of a framework with a tiny codebase
and simple nonredundant API. Let say, you have 75Kb overall footprint and
25 classes doing all common tasks developers need in the most generic
simple way. This would significantly shorten learning curve and attract more
developers to the community!
So, why not make an extension built on top of Yii foundation classes? Here
are my thoughts:
- Implement a simplest DB interface based on Query Builder.
- Implement a simple Query Builder based Active Record.
(Optionally undepend db/* from db/schema/*)
- Implement a set of UI widgets: form, grid, menu, breadcrumbs, tabs.
(CSS/JS library should be unpluggable and solid!)
- Get rid of behaviors and controller filters.
- Only leave inline controller actions.
- Get rid of CAssetManager, CClientScript and huge JS library.
(In small projects assets can be part of a theme)
- Implement a simplified CUrlManager.
- Simplify error/exception handling.
(Let say, redirect to an error controller/action)
This framework should come with a simple website and admin panel out
of the box. Sample application should be a ready-to-extend basemenent
for anything new.
I suspect having read everything above, you may say that Yii is using
dynamic load-on-demand and that you may not use the stuff that you don’t
need. You’re right from the practical point, but here I’m talking about
an emotional/marketing aspects which affect the growth of the community.
People tend to accept what is simple and well-understood and reject things
that are complex or hard-to-get. Being implemented, such an extension could
beat many frameworks around.
I suspect that many people will not understand me, but if you find my thoughts
reasonable - please share yours here, or call me on Skype: sergeymorkovkin.