Author Topic: PHP Framework Poll  (Read 7763 times)

0 Members and 1 Guest are viewing this topic.

Offline Liquid FireTopic starter

  • Devotee
  • Posts: 858
    • View Profile
Re: PHP Framework Poll
« Reply #15 on: November 13, 2008, 07:04:43 PM »
This was my first impression of Yii:


	
/**
	
 * @var array class map for core Yii classes.
	
 * NOTE, DO NOT MODIFY THIS ARRAY MANUALLY. IF YOU CHANGE OR ADD SOME CORE CLASSES,
	
 * PLEASE RUN 'build autoload' COMMAND TO UPDATE THIS ARRAY.
	
 */
	
private static 
$_coreClasses=array(
	
	
'CApcCache' => '/caching/CApcCache.php',
	
	
'CCache' => '/caching/CCache.php',
	
	
'CDbCache' => '/caching/CDbCache.php',
	
	
'CMemCache' => '/caching/CMemCache.php',
	
	
'CCacheDependency' => '/caching/dependencies/CCacheDependency.php',
	
	
'CChainedCacheDependency' => '/caching/dependencies/CChainedCacheDependency.php',
	
	
'CDbCacheDependency' => '/caching/dependencies/CDbCacheDependency.php',
	
	
'CDirectoryCacheDependency' => '/caching/dependencies/CDirectoryCacheDependency.php',
	
	
'CFileCacheDependency' => '/caching/dependencies/CFileCacheDependency.php',
	
	
'CGlobalStateCacheDependency' => '/caching/dependencies/CGlobalStateCacheDependency.php',
	
	
'CAttributeCollection' => '/collections/CAttributeCollection.php',
	
	
'CConfiguration' => '/collections/CConfiguration.php',
	
	
'CList' => '/collections/CList.php',
	
	
'CMap' => '/collections/CMap.php',
	
	
'CQueue' => '/collections/CQueue.php',
	
	
'CStack' => '/collections/CStack.php',
	
	
'CTypedList' => '/collections/CTypedList.php',
	
	
'CConsoleApplication' => '/console/CConsoleApplication.php',
	
	
'CConsoleCommand' => '/console/CConsoleCommand.php',
	
	
'CConsoleCommandRunner' => '/console/CConsoleCommandRunner.php',
	
	
'CHelpCommand' => '/console/CHelpCommand.php',
	
	
'CApplication' => '/core/CApplication.php',
	
	
'CApplicationComponent' => '/core/CApplicationComponent.php',
	
	
'CComponent' => '/core/CComponent.php',
	
	
'CErrorHandler' => '/core/CErrorHandler.php',
	
	
'CException' => '/core/CException.php',
	
	
'CHttpException' => '/core/CHttpException.php',
	
	
'CModel' => '/core/CModel.php',
	
	
'CSecurityManager' => '/core/CSecurityManager.php',
	
	
'CStatePersister' => '/core/CStatePersister.php',
	
	
'CDbLogRoute' => '/core/log/CDbLogRoute.php',
	
	
'CEmailLogRoute' => '/core/log/CEmailLogRoute.php',
	
	
'CFileLogRoute' => '/core/log/CFileLogRoute.php',
	
	
'CLogRoute' => '/core/log/CLogRoute.php',
	
	
'CLogRouter' => '/core/log/CLogRouter.php',
	
	
'CLogger' => '/core/log/CLogger.php',
	
	
'CProfileLogRoute' => '/core/log/CProfileLogRoute.php',
	
	
'CWebLogRoute' => '/core/log/CWebLogRoute.php',
	
	
'CDbCommand' => '/db/CDbCommand.php',
	
	
'CDbConnection' => '/db/CDbConnection.php',
	
	
'CDbDataReader' => '/db/CDbDataReader.php',
	
	
'CDbException' => '/db/CDbException.php',
	
	
'CDbTransaction' => '/db/CDbTransaction.php',
	
	
'CActiveFinder' => '/db/ar/CActiveFinder.php',
	
	
'CActiveRecord' => '/db/ar/CActiveRecord.php',
	
	
'CDbColumnSchema' => '/db/schema/CDbColumnSchema.php',
	
	
'CDbCommandBuilder' => '/db/schema/CDbCommandBuilder.php',
	
	
'CDbCriteria' => '/db/schema/CDbCriteria.php',
	
	
'CDbSchema' => '/db/schema/CDbSchema.php',
	
	
'CDbTableSchema' => '/db/schema/CDbTableSchema.php',
	
	
'CMysqlColumnSchema' => '/db/schema/mysql/CMysqlColumnSchema.php',
	
	
'CMysqlSchema' => '/db/schema/mysql/CMysqlSchema.php',
	
	
'CMysqlTableSchema' => '/db/schema/mysql/CMysqlTableSchema.php',
	
	
'CPgsqlColumnSchema' => '/db/schema/pgsql/CPgsqlColumnSchema.php',
	
	
'CPgsqlSchema' => '/db/schema/pgsql/CPgsqlSchema.php',
	
	
'CPgsqlTableSchema' => '/db/schema/pgsql/CPgsqlTableSchema.php',
	
	
'CSqliteColumnSchema' => '/db/schema/sqlite/CSqliteColumnSchema.php',
	
	
'CSqliteCommandBuilder' => '/db/schema/sqlite/CSqliteCommandBuilder.php',
	
	
'CSqliteSchema' => '/db/schema/sqlite/CSqliteSchema.php',
	
	
'CDateFormatter' => '/i18n/CDateFormatter.php',
	
	
'CDbMessageSource' => '/i18n/CDbMessageSource.php',
	
	
'CGettextMessageSource' => '/i18n/CGettextMessageSource.php',
	
	
'CLocale' => '/i18n/CLocale.php',
	
	
'CMessageSource' => '/i18n/CMessageSource.php',
	
	
'CNumberFormatter' => '/i18n/CNumberFormatter.php',
	
	
'CPhpMessageSource' => '/i18n/CPhpMessageSource.php',
	
	
'CGettextFile' => '/i18n/gettext/CGettextFile.php',
	
	
'CGettextMoFile' => '/i18n/gettext/CGettextMoFile.php',
	
	
'CGettextPoFile' => '/i18n/gettext/CGettextPoFile.php',
	
	
'CDateParser' => '/utils/CDateParser.php',
	
	
'CFileHelper' => '/utils/CFileHelper.php',
	
	
'CMarkdownParser' => '/utils/CMarkdownParser.php',
	
	
'CTimestamp' => '/utils/CTimestamp.php',
	
	
'CVarDumper' => '/utils/CVarDumper.php',
	
	
'CCaptchaValidator' => '/validators/CCaptchaValidator.php',
	
	
'CCompareValidator' => '/validators/CCompareValidator.php',
	
	
'CEmailValidator' => '/validators/CEmailValidator.php',
	
	
'CFilterValidator' => '/validators/CFilterValidator.php',
	
	
'CInlineValidator' => '/validators/CInlineValidator.php',
	
	
'CNumberValidator' => '/validators/CNumberValidator.php',
	
	
'CRangeValidator' => '/validators/CRangeValidator.php',
	
	
'CRegularExpressionValidator' => '/validators/CRegularExpressionValidator.php',
	
	
'CRequiredValidator' => '/validators/CRequiredValidator.php',
	
	
'CStringValidator' => '/validators/CStringValidator.php',
	
	
'CTypeValidator' => '/validators/CTypeValidator.php',
	
	
'CUniqueValidator' => '/validators/CUniqueValidator.php',
	
	
'CUrlValidator' => '/validators/CUrlValidator.php',
	
	
'CValidator' => '/validators/CValidator.php',
	
	
'CAssetManager' => '/web/CAssetManager.php',
	
	
'CBaseController' => '/web/CBaseController.php',
	
	
'CCacheHttpSession' => '/web/CCacheHttpSession.php',
	
	
'CClientScript' => '/web/CClientScript.php',
	
	
'CController' => '/web/CController.php',
	
	
'CDbHttpSession' => '/web/CDbHttpSession.php',
	
	
'CExtController' => '/web/CExtController.php',
	
	
'CFormModel' => '/web/CFormModel.php',
	
	
'CHttpCookie' => '/web/CHttpCookie.php',
	
	
'CHttpRequest' => '/web/CHttpRequest.php',
	
	
'CHttpSession' => '/web/CHttpSession.php',
	
	
'COutputEvent' => '/web/COutputEvent.php',
	
	
'CPagination' => '/web/CPagination.php',
	
	
'CTheme' => '/web/CTheme.php',
	
	
'CThemeManager' => '/web/CThemeManager.php',
	
	
'CUrlManager' => '/web/CUrlManager.php',
	
	
'CWebApplication' => '/web/CWebApplication.php',
	
	
'CWebService' => '/web/CWebService.php',
	
	
'CWsdlGenerator' => '/web/CWsdlGenerator.php',
	
	
'CAction' => '/web/actions/CAction.php',
	
	
'CCaptchaAction' => '/web/actions/CCaptchaAction.php',
	
	
'CInlineAction' => '/web/actions/CInlineAction.php',
	
	
'CViewAction' => '/web/actions/CViewAction.php',
	
	
'CWebServiceAction' => '/web/actions/CWebServiceAction.php',
	
	
'CAuthAssignment' => '/web/auth/CAuthAssignment.php',
	
	
'CAuthItem' => '/web/auth/CAuthItem.php',
	
	
'CAuthManager' => '/web/auth/CAuthManager.php',
	
	
'CBaseUserIdentity' => '/web/auth/CBaseUserIdentity.php',
	
	
'CDbAuthManager' => '/web/auth/CDbAuthManager.php',
	
	
'CPhpAuthManager' => '/web/auth/CPhpAuthManager.php',
	
	
'CUserIdentity' => '/web/auth/CUserIdentity.php',
	
	
'CWebUser' => '/web/auth/CWebUser.php',
	
	
'CAccessControlFilter' => '/web/filters/CAccessControlFilter.php',
	
	
'CFilter' => '/web/filters/CFilter.php',
	
	
'CFilterChain' => '/web/filters/CFilterChain.php',
	
	
'CInlineFilter' => '/web/filters/CInlineFilter.php',
	
	
'CHtml' => '/web/helpers/CHtml.php',
	
	
'CJSON' => '/web/helpers/CJSON.php',
	
	
'CJavaScript' => '/web/helpers/CJavaScript.php',
	
	
'CPradoViewRenderer' => '/web/renderers/CPradoViewRenderer.php',
	
	
'CViewRenderer' => '/web/renderers/CViewRenderer.php',
	
	
'CAutoComplete' => '/web/widgets/CAutoComplete.php',
	
	
'CCaptcha' => '/web/widgets/CCaptcha.php',
	
	
'CClipWidget' => '/web/widgets/CClipWidget.php',
	
	
'CContentDecorator' => '/web/widgets/CContentDecorator.php',
	
	
'CFilterWidget' => '/web/widgets/CFilterWidget.php',
	
	
'CFlexWidget' => '/web/widgets/CFlexWidget.php',
	
	
'CHtmlPurifier' => '/web/widgets/CHtmlPurifier.php',
	
	
'CInputWidget' => '/web/widgets/CInputWidget.php',
	
	
'CMarkdown' => '/web/widgets/CMarkdown.php',
	
	
'CMaskedTextField' => '/web/widgets/CMaskedTextField.php',
	
	
'CMultiFileUpload' => '/web/widgets/CMultiFileUpload.php',
	
	
'COutputCache' => '/web/widgets/COutputCache.php',
	
	
'COutputProcessor' => '/web/widgets/COutputProcessor.php',
	
	
'CTextHighlighter' => '/web/widgets/CTextHighlighter.php',
	
	
'CTreeView' => '/web/widgets/CTreeView.php',
	
	
'CWidget' => '/web/widgets/CWidget.php',
	
	
'CBasePager' => '/web/widgets/pagers/CBasePager.php',
	
	
'CLinkPager' => '/web/widgets/pagers/CLinkPager.php',
	
	
'CListPager' => '/web/widgets/pagers/CListPager.php',
	
);


lol

Well i do pretty much the same thing except i use a xml file to store file location for my autoload.

Offline corbin

  • Guru
  • Freak!
  • *
  • Posts: 7,951
  • Gender: Male
    • View Profile
Re: PHP Framework Poll
« Reply #16 on: November 13, 2008, 07:11:17 PM »
Hrmmm.....

Yeah, I guess it has to be like that unless the names are super long....


Like Web_Widgets_Pager_CListPager.  lol
Why doesn't anyone ever say hi, hey, or whad up world?

Offline Liquid FireTopic starter

  • Devotee
  • Posts: 858
    • View Profile
Re: PHP Framework Poll
« Reply #17 on: November 13, 2008, 07:18:15 PM »
Hrmmm.....

Yeah, I guess it has to be like that unless the names are super long....


Like Web_Widgets_Pager_CListPager.  lol

Yea, that is actually why i did it that way, I don't want class names like Zend has and no other option has found its way to me.

Offline bogeyman

  • Irregular
  • Posts: 21
    • View Profile
    • Bogeyman's blog
Re: PHP Framework Poll
« Reply #18 on: November 13, 2008, 09:54:34 PM »
There is a new framework:

http://www.yiiframework.com/

It's called Yii. It's still in beta version. But, maybe the fastest framework.

Not that php 6 is coming out next week but that framework would fail with it because of it dependence on get_magic_quotes_gpc() which may or may not be an easy fix but i would think a newer framework would follow most common standards and since magic quotes are a bad idea(which is why it is finally being removed in php 6) and no one has ever said that magic quotes are great as long as i has been doing PHP programming(2 years) so who knows what other weird stuff that framework does.  I would love to ask the lead developer why he/she decided to support magic quotes.

Ow, it looks like I can't rely on Yii at this time. Honestly, I'm just impressed by its speed. Right now, i'm still using (and learning) Prado. But I'd love to try another framework which can run faster (maybe Code Igniter).
« Last Edit: November 13, 2008, 09:56:18 PM by bogeyman »

Offline Liquid FireTopic starter

  • Devotee
  • Posts: 858
    • View Profile
Re: PHP Framework Poll
« Reply #19 on: November 13, 2008, 10:42:04 PM »
Its speed is nothing mind blowing to me, the hello world take around 2ms with xdebug and my own framework take about that long.  I have not used its model and while it may look fast, it provide no functionality for retrieving/saving data and the only functionality i see is validation and error checking(not sure the difference).

This really seems like nothing special or anything.  The model portion may be faster but does nothing special and has very limited functionality to save coding time.  My framework too could say that it is nothing special as i am not adding a ton of new things that no other MVC and/or ORM framework has however my goal has been cleaner and faster code as from earlier testing, my framework(with a custom ORM system) is 2 times faster for loading the same amount of data from a model than the doctrine ORM(and Doctrine does not even do MVC stuff like parse url, load controller, load view.

Offline ionik

  • Enthusiast
  • Posts: 185
  • Gender: Male
  • Senior PHP Developer
    • View Profile
Re: PHP Framework Poll
« Reply #20 on: November 14, 2008, 09:24:18 AM »
You can manipulate your __autoload function to do anything you should'nt need any kind of external loaded file to tell it where the paths are for files, just make sure you set your include paths, there should be no problems at all

Lotta Regex and planning :)

That loong array for Yii main core classes is a ridiculous and to me doesn't use PHP to its full extent...there being lazy
« Last Edit: November 14, 2008, 09:25:48 AM by ionik »
- Linux - Ubuntu, RedHat
- PHP - Unus, Zend
- Python - Django
- The best programs are built by idiots that no one can understand

Offline shawc

  • Irregular
  • Posts: 4
    • View Profile
Re: PHP Framework Poll
« Reply #21 on: November 26, 2008, 09:02:15 AM »
There is a new framework:

http://www.yiiframework.com/

It's called Yii. It's still in beta version. But, maybe the fastest framework.

Not that php 6 is coming out next week but that framework would fail with it because of it dependence on get_magic_quotes_gpc() which may or may not be an easy fix but i would think a newer framework would follow most common standards and since magic quotes are a bad idea(which is why it is finally being removed in php 6) and no one has ever said that magic quotes are great as long as i has been doing PHP programming(2 years) so who knows what other weird stuff that framework does.  I would love to ask the lead developer why he/she decided to support magic quotes.

From where did you learn that Yii depends on get_magic_quotes_gpc()?
On the contrary, Yii tries to eliminate the effect of get_magic_quotes_gpc() if magic quotes is enabled.

Offline shawc

  • Irregular
  • Posts: 4
    • View Profile
Re: PHP Framework Poll
« Reply #22 on: November 26, 2008, 09:05:38 AM »
Its speed is nothing mind blowing to me, the hello world take around 2ms with xdebug and my own framework take about that long.  I have not used its model and while it may look fast, it provide no functionality for retrieving/saving data and the only functionality i see is validation and error checking(not sure the difference).

This really seems like nothing special or anything.  The model portion may be faster but does nothing special and has very limited functionality to save coding time.  My framework too could say that it is nothing special as i am not adding a ton of new things that no other MVC and/or ORM framework has however my goal has been cleaner and faster code as from earlier testing, my framework(with a custom ORM system) is 2 times faster for loading the same amount of data from a model than the doctrine ORM(and Doctrine does not even do MVC stuff like parse url, load controller, load view.

Yii has complete implementation of Active Record. I guess what you saw is only its base class CModel. Please take a look at CActiveRecord and CFormModel.

Offline shawc

  • Irregular
  • Posts: 4
    • View Profile
Re: PHP Framework Poll
« Reply #23 on: November 26, 2008, 09:07:16 AM »
You can manipulate your __autoload function to do anything you should'nt need any kind of external loaded file to tell it where the paths are for files, just make sure you set your include paths, there should be no problems at all

Lotta Regex and planning :)

That loong array for Yii main core classes is a ridiculous and to me doesn't use PHP to its full extent...there being lazy

Relying on include path means extra time in including files, which is something most frameworks are trying to avoid. It is perfectly fine you use include path in personal projects, though.

Offline Liquid FireTopic starter

  • Devotee
  • Posts: 858
    • View Profile
Re: PHP Framework Poll
« Reply #24 on: November 27, 2008, 12:41:58 AM »
There is a new framework:

http://www.yiiframework.com/

It's called Yii. It's still in beta version. But, maybe the fastest framework.

Not that php 6 is coming out next week but that framework would fail with it because of it dependence on get_magic_quotes_gpc() which may or may not be an easy fix but i would think a newer framework would follow most common standards and since magic quotes are a bad idea(which is why it is finally being removed in php 6) and no one has ever said that magic quotes are great as long as i has been doing PHP programming(2 years) so who knows what other weird stuff that framework does.  I would love to ask the lead developer why he/she decided to support magic quotes.

From where did you learn that Yii depends on get_magic_quotes_gpc()?
On the contrary, Yii tries to eliminate the effect of get_magic_quotes_gpc() if magic quotes is enabled.

Now PHP 6 is still not coming out anytime soon but in php 6 get_magic_quotes_gpc() is being removed(along with the other things tied to magic quotes and it is in a whole being removed) so when i run yii under the last php 6 i get the following fatal error:

Fatal error: Call to undefined function get_magic_quotes_gpc() in C:\wamp\www\yii\framework\web\CHttpRequest.php on line 63

now my opinion is that any new framework should assume that magic quotes are turned off because you have to be an idiot to still be using them.  I hope this is something that can easily be fixed when it needs to and not something that is spidered in the whole system.

Offline shawc

  • Irregular
  • Posts: 4
    • View Profile
Re: PHP Framework Poll
« Reply #25 on: November 27, 2008, 03:31:23 PM »
Agree with you that this function call should be removed when PHP 6 is released.

Offline Mchl

  • Staff Alumni
  • Freak!
  • *
  • Posts: 8,582
  • Gender: Male
  • That's Largo in my avatar, not me.
    • View Profile
    • FlingBits
Re: PHP Framework Poll
« Reply #26 on: November 27, 2008, 03:49:07 PM »
Or at least add PHP version check before calling it.
NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Flingbits tutorials | Class Autoloading