Please critique my PHP framework: CodeFrame
Moderator: General Moderators
Please critique my PHP framework: CodeFrame
Hello,
I would like to know what people here think about a framework I wrote.
http://www.majgaj.com/codeframe
This project was born some time ago and now I got inspiration to continue on this. Please have a look at the project and tell me your thoughts on it.
Thanks!
I would like to know what people here think about a framework I wrote.
http://www.majgaj.com/codeframe
This project was born some time ago and now I got inspiration to continue on this. Please have a look at the project and tell me your thoughts on it.
Thanks!
Re: Please critique my PHP framework: CodeFrame
The documentation isn't complete. How can anyone evaluate it?
Also...
Seriously?
Also...
Code: Select all
<?= $this->content ?>Re: Please critique my PHP framework: CodeFrame
Evaluation can be done by downloading the source. As this is 0.xxx release I'm not putting effort into detailed documentation. And also by actually reading what is written in the documentation pages that are currently available. By looking at the access logs, you spent about 3 seconds per page.onion2k wrote:The documentation isn't complete. How can anyone evaluate it?
And you are saying?onion2k wrote: Also...Seriously?Code: Select all
<?= $this->content ?>
Re: Please critique my PHP framework: CodeFrame
Short tags and the shortcut "=" echo are both very bad practise in PHP development*. The php.ini short_open_tag directive needs to be switched on for them to work, which, in any properly configured environment, won't be the case. And finally, short tags won't be in PHP 6.codeframe wrote:And you are saying?onion2k wrote: Also...Seriously?Code: Select all
<?= $this->content ?>
* Arguably Zend's push to use "PHP as a template" encourages them, as does CodeIgniter's template system, but both of those frameworks have a system to expand them out. Your framework doesn't (at least, not according to the documentation).
Re: Please critique my PHP framework: CodeFrame
Well, replacing <?= with <?php echo is not a tremendous amount of work done if it bother someone. Some like the short tags and some don't.
Its a matter of preference I think until we get to PHP 6.
Its a matter of preference I think until we get to PHP 6.
Re: Please critique my PHP framework: CodeFrame
Well, true, but if I were to run the default template you've included with your framework on my server here it'd fail (it'd output the raw PHP text). No problem for me because I've been writing PHP for over a decade but a new user wouldn't immediately understand what's wrong and would be confused by it.codeframe wrote:Its a matter of preference I think until we get to PHP 6.
If you're writing libraries and frameworks they need to work with the minimum of configuration especially for new users.
Re: Please critique my PHP framework: CodeFrame
Thanks for your reply. You are correct, the framework should work with minimal server configuration. I never thought about this as I have never stumbled upon a server in which the short tags are disabled, not even at my work.
I will make the changes in the next release.
I will make the changes in the next release.
Re: Please critique my PHP framework: CodeFrame
I created a Subversion repository in Google Codes, so that people can look at the source code before downloading.
http://code.google.com/p/codeframe/sour ... #svn/trunk
http://code.google.com/p/codeframe/sour ... #svn/trunk
Re: Please critique my PHP framework: CodeFrame
Not so much. You'll get parse errors in XML files.codeframe wrote:Well, replacing <?= with <?php echo is not a tremendous amount of work done if it bother someone. Some like the short tags and some don't.
Its a matter of preference I think until we get to PHP 6.
Re: Please critique my PHP framework: CodeFrame
That's not wrong, obviously, and I've seen it as an argument against short tags many times, but I've never quite worked out why you'd be putting PHP source code through an XML parser in the first place so it's a bit redundant really. Right?astions wrote:Not so much. You'll get parse errors in XML files.codeframe wrote:Well, replacing <?= with <?php echo is not a tremendous amount of work done if it bother someone. Some like the short tags and some don't.
Its a matter of preference I think until we get to PHP 6.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Please critique my PHP framework: CodeFrame
Seems like a fine super minimal framework. It's really more a simple Front Controller and a few utility classes.
As for <?= vs <?php echo, why ever use <?= when it is not supported everywhere, its is going away, and it provides minimal/no benefits. I don't even find it more readable because I am used to looking for <?php echo.
As for <?= vs <?php echo, why ever use <?= when it is not supported everywhere, its is going away, and it provides minimal/no benefits. I don't even find it more readable because I am used to looking for <?php echo.
(#10850)