PHPDN Codeoff!! [Finished]
Moderator: General Moderators
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Too chicken?
Oh and your scoring on accessibility really inhibits what we can do. I mean I'm all for degrading gracefully when it comes to web sites but when you are building a web 2.0 application you really gotta rely on the presence of JavaScript. I think my entry will require JavaScript and IE7+ or standards compliant browsers.
Oh and your scoring on accessibility really inhibits what we can do. I mean I'm all for degrading gracefully when it comes to web sites but when you are building a web 2.0 application you really gotta rely on the presence of JavaScript. I think my entry will require JavaScript and IE7+ or standards compliant browsers.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
I'm quite unclear about the "PHP5" aspect of this project. Probably sounds redundant and should not be synonymous with "PHP5" but does that mean completely object oriented? Design patterns? What about procedural coding?
Or, does it simply mean that it has to be compatible with PHP5, meaning, it won't have any problems running?
Or, does it simply mean that it has to be compatible with PHP5, meaning, it won't have any problems running?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
You know what I think I'm going to bow out actually. I had begun to develop an idea for an application but I've dropped the idea because it's too ambitious. I have spent the last 5 hours solidly thinking about something small (maybe only taking a week) that I could write and drawn a blank. So I'm going to go back to learning Ruby.
The initial post has been updated with a modification of the "pre-existing code" rule, as well as category scores.
PHP5 means that when tested, it won't cause any PHP5 specific errors - like using the 'var' keyword. Object-orientation is one of many programming styles & is not always best suited for every application. Feel free to use oject-orientation or procedural coding, or whatever you feel is best suited for the situation.
@~ole - whether you enter or not is up to you of course, but you do have over a month and teams are allowed. I believe ~superdezign has voluteered.
PHP5 means that when tested, it won't cause any PHP5 specific errors - like using the 'var' keyword. Object-orientation is one of many programming styles & is not always best suited for every application. Feel free to use oject-orientation or procedural coding, or whatever you feel is best suited for the situation.
@~ole - whether you enter or not is up to you of course, but you do have over a month and teams are allowed. I believe ~superdezign has voluteered.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Well I was going to enter on my own but perhaps I could go for a team and just act as a code reviewer or something. So here is one possible project idea:@~ole - whether you enter or not is up to you of course, but you do have over a month and teams are allowed. I believe ~superdezign has voluteered.
PHD
PHPDoc has been around for some time. As far as I know the project has been going at a snails pace for some time. The two original authors are still the only ones involved in the project. If you have ever had the displeasure of using some of the more advanced features of PHPDoc such as writing tutorials or had a look at the mark-up it generates you'll know that is more than enough room for improvement. PHD would be an attempt to improve on some of these problems but be a complete rewrite obviously.
Possible improvements over PHPDoc:
- Enhancements to PHPDoc syntax, improved consistency? Careful consideration will be needed. Some of my ideas follow:
- Have a @pragma syntax for controlling what PHD does instead of configuration file
- Introduce a @flag syntax for marking things. So like "@flag binarysafe". PHD can produce output of what was flagged and what wasn't.
- Improved handling of errors in the subject code
- Embrace DocBook much more. DocBook is an XML schema for writing documentation that can than be transformed into other things such as HTML or PDF. Our library should probably just generate pure DocBook and be entirely DocBook based I believe there are existing tools to do conversion from there otherwise we could write those as well. Point is it gives users much more flexibility. Formerly to generate documentation for distribution with your source and documentation suitable to embed into your website was an impossibility, for instance.
- Intelligent notifications of misuse of PHPDoc syntax
- Better PHP syntax highlighting.
- The Phoenix
- Forum Contributor
- Posts: 294
- Joined: Fri Oct 06, 2006 8:12 pm
Oh my, thank goodness!
Attempting to write a small templating engine is no small task.
Attempting to write a small templating engine is no small task.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
There you go, took me about 5 minutes
Code: Select all
<?php
/**
* Template class.
*/
abstract class Template
{
/**
* @var array
*/
private $_data = array();
/**
* Get data back escaped for HTML
*
* @param string $name
* @return mixed
*/
public function __get($name)
{
return htmlspecialchars($this->getRaw($name));
}
/**
* Get data back as it was entered
*
* @param string $name
* @return mixed
*/
public function getRaw($name)
{
return $this->_data[$name];
}
/**
* @param string $name
* @params mixed $value
* @return mixed
*/
public function __set($name, $value)
{
$this->_data[$name] = $value;
}
/**
* @param string $name
* @return bool
*/
public function __isset($name)
{
return isset($this->_data[$name]);
}
/**
* @param string $name
*/
public function __unset($name)
{
unset($this->_data[$name]);
}
/**
* Set several values at once with an array
*
* @param array $pairs
*/
public function assign(array $moreData)
{
$this->_data = array_merge($this->_data, $moreData);
}
abstract public function __tostring();
}Well, crapcicles.
Not that many (or any) of you care
But it looks like I may have to bow out of this codeoff.
With a project already underway, it's too much of a task to have my submission for this contest done by the deadline. Plus, money rules. I'm downgrading my submission to 'work-on-it-for-fun' status.
If I happen to have it done by the deadline, that'll be sweet! Whether or not I do though, I still thank this competition for giving me the motivation to start on a project I've had in my mind for quite a while.
Not that many (or any) of you care
With a project already underway, it's too much of a task to have my submission for this contest done by the deadline. Plus, money rules. I'm downgrading my submission to 'work-on-it-for-fun' status.
If I happen to have it done by the deadline, that'll be sweet! Whether or not I do though, I still thank this competition for giving me the motivation to start on a project I've had in my mind for quite a while.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Anyone send anything in?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.