Is Yii the framework of your dream?

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.

Disagree.

Dont ask me why, but as of yii version 1.1.6 I use yii 1.1.

And it just feels right.

Cutting framework’s functionality for emotional/marketing aspects is impractical. A developer who will need some additional functionality will have to [find it, download it?] and to tell this to framework in some way. Now all Yii “official” classes are placed in a single directory and you can always load them “on demand”.

I understand what you mean, but the solution shouldn’t be the truncation/splitting/restructure of framework.

Agree with andy_s,

And I am not really into the creation of an extension on top of its foundation classes.

What you propose seems to me a ‘lite version’ of Yii, even though for me Yii are all the on-demand classes out of zii, jui and all those extensions, even out of the widgets that were placed there in order to expose the good things Yii allows us to do (also to help us improve our development speed).

The library is good as it is and it only can get better. There are already other liter frameworks out there, even collections of classes that will serve that purpose. Don’t you think?

Cheers