Yii Framework Forum: Some suggestion for features based in other frameworks - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Some suggestion for features based in other frameworks

#1 User is offline   prchakal 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 92
  • Joined: 20-January 10

  Posted 30 March 2012 - 01:32 AM

Hi,

I have some suggestion based in other frameworks like rails, grails and play!.

#1 - When use active record to get some database data, sometimes we need convert it to xml, json, array, it will turn our life to build services too easy. So i suggest it (array i think is already implement in 2.0):

$customers = Customer::find()->asArray()->all();
$customers = Customer::find()->asXml()->all();
$customers = Customer::find()->asJson()->all();

#2 - Custom transformation data when use activerecord, like #1, but custom, example:

$customers = Customer::find()->asMyCustomConverter()->all();
$customers = Customer::find()->asPDF()->all();

#3 - Native CURL extension:

We always need integrate our website to another thing, so, we need a decent curl class to do it. That can make all type of requests (get, post, put, delete) and some of other sort of improvements and utilities using CURL (set cookies, headers, ...)

#4 - Native package manager like others, example:

yiic install myExtension
yiic install-extension myExtension
yiic install-plugin myExtension
yiic install myExtension -v 1.2
yiic install myExtension -v=1.2

some of one from this list

#5 - Native interface to send mail and custom implementation

A way to send mail from a class from framework and if you need another sender/mailer (like phpmailer) you can set it.

Example:

$mailer->subject = 'teste';
$mailer->body = 'teste';
$mailer->from = array('my name' => 'my email');
$mailer->to = array('one name' => 'one email', ...);

and

$mailer->setClass('extensions.phpmailer.PHPMailer'); // you can set from config too

#6 - Config files to different environments

We need urgent a way to change config files in different environments.

We can set a server var on apache/nginx for development/test environment, and if this var doesnt exists assume 'production'

#7 - Change UI framework

I suggest BOOTSTRAP than BLUEPRINT. I test a king of UI framework, and bootstrap if complete, well documented, too many of features and a big company on maintenance.

#8 - Nice logger/profiler native support

Every application need a decent log to you know what is happening, so yii need one too. I like this too much:
http://www.yiiframew...-debug-toolbar/

#9 - Clear everything from console

We need a native console command that clear all from command line (assets, runtime, cache, log, ...)

#10 - A requiments command from console

Always that we need check requirements from YII we need access from browser, but i use linux and remote shell, and i need check some issues that we can prevent using requirements page. Will be more easy and usually a way to do it from command line. Example:

PHP version - Need 5.2 (Current is 5.3.5) - [OK]
Path writable (webroot/assets) - [FAIL]

#11 - GII from command line

Everything from gii generator, from command line

#12 - A better ajax form, ajax button and submit

I never do it work, i never understand it. I like too much the implementation of couponic. It is very easy to use and work for return a new content to a element, alert, custom script, json, xml, redirect and custom, and you decide if from controller return data.

http://uniprogy.com/

#13 - The pagination class has some bugs

I get some bugs from pager class - You cannot hide some elements and change text form some elements.

#14 - A client/server for soap

We need a client and server for soap 1 and 1.2. A lot of webservices use it.

#15 - A fast utlitity class to convert numbers and date from calendar

Today i dot:

echo(Yii::app()->numberFormatter->format(Yii::app()->params['percentFormat'], 1234) . '%');

We need a way to convert our activerecord data from our language to database automatic

#16 - Console/shell/terminal class

When use PHP i have a lot of difficult to find a correct way to create process or execute something in terminal/console

I suggest a native class to make this work. Execute for example imagemagic from command line. Like this:

Console::execute(array('unrar', 'myfile.txt', '-d', '/tmp/myfile.rar'));

#17 - Class to manager file and dir

We need a native class to handle files and dir.

Read and write files
List files/dir recursive
Create, delete, chmod files and dir recursive
And more

#18 - Serial class

A native class to handle serial port, like COM1 (windows) and /dev/usb1 (linux/mac)

#19 - Render an action s custom class

Render a view or content as a custom class (i think it is already done in 1.*)

$this->renderAsClass('ext.render.PDF');

#20 - Some helper, utility class from here:

http://www.symfony-p...ct.org/api/1_4/
http://api20.cakephp.org/classes

util, helpers, renders

#21 - Cron/task

A way to create tasks/jobs and it run based on a time in the job, like this:

http://grails.org/Jo...eduling+(Quartz)
http://www.playframe...tation/1.0/jobs


I think that is only this for now. Its only a suggestion.

This post has been edited by prchakal: 30 March 2012 - 02:08 AM

0

#2 User is offline   NaX 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 51
  • Joined: 13-January 12
  • Location:Johannesburg

Posted 30 March 2012 - 02:09 AM

Based on some of your suggestions I think you might find this forum post interesting "ActiveResource for using REST resources as models".
http://www.yiiframew...__1#entry103794

Some of what you suggest I think could be possible now without changing core. EG: #6 can be achieved with some creative organisation of config files in combination with something like Phing.

I am also interested in #9 and #10, but would add the ability to run extension requirements routines.

I also think some of your points are already being discussed EG: #4 = Atomic core and packages
http://www.yiiframew...__fromsearch__1
0

#3 User is offline   Rodrigo Coelho 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 665
  • Joined: 05-August 10
  • Location:Rio de Janeiro, Brazil

Posted 30 March 2012 - 07:27 AM

Hi prchakal,

There are already some extensions for what you propose. IMHO, some features would be better implemented as extensions than in the core.

Some other suggestions are curently being discussed on this forum. Join the discussions and share your opinion there!

For #6, read these wiki articles for inspiration:
http://www.yiiframework.com/wiki/155
http://www.yiiframework.com/wiki/289
http://www.yiiframework.com/wiki/33
http://www.yiiframework.com/wiki/63
0

#4 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,897
  • Joined: 04-October 08
  • Location:DC, USA

Posted 30 March 2012 - 09:02 AM

#1 - instead of supporting different formats in ActiveQuery, it's better we have separate data formatters that can turn array into XML or JSON or something else.

#2 - same as above.

#3 - The requirements are very vague. Nevertheless, I agree having some CURL helper is useful. This is not our top priority though.

#4 - We have discussed this before. Will have something in 2.0

#5 - We may or may not support this in the core.

#6 - This doesn't belong to the core, but we probably can provide some commands or initial setup to simplify this.

#7 - We will consider bootstrap and other alternatives.

#8 - We will have it.

#9 - This belongs to application domain.

#10 - Will consider it.

#11 - We will drop the command line code generator except the webapp command.

#12 - Requirements too vague or broad to be considered.

#13 - same as #12.

#14 - Beyond our scope.

#15 - same as #12.

#16 - Beyond our scope.

#17 - Beyond our scope.

#18 - Beyond our scope.

#19 - Not in our design.

#20 - We will have more helper classes in 2.0.

#21 - We may consider it.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users