| SitePoint Sponsor |








Hey guys, I'll be back on Sunday and put a lot more work into this, I'm taking the weekend off!![]()
Learn about the new Retro Framework
Code PHP the way it was meant to be coded!
Cool.
In the meantime, I'm ripping apart my site and making it run on Retro. Do you have any code updates from b6?
Jake Arkinstall
"Sometimes you don't need to reinvent the wheel;
Sometimes its enough to make that wheel more rounded"-Molona


I will have a think of what could be done better that annoys me at the minute guys, and if you want to use Dave the Penguin then I can retro him up a bit for you!
Mike Swiffin - Community Team Leader
Only a woman can read between the lines of a one word answer.....
I started out with nothing... and still got most of it left!
Disco dave! Might give him a home ontop of the vinyl LP
A disco/hippie penguin ontop of an LP - Don't the words 'retro' and 'open-source' just jump into your mind!
Last edited by Jake Arkinstall; Sep 26, 2008 at 17:32.
Jake Arkinstall
"Sometimes you don't need to reinvent the wheel;
Sometimes its enough to make that wheel more rounded"-Molona
I've been integrating my current site with Retro, and I have to say it's going great.
Due to the simplistic nature of the framework, you have to expect more running time. For example, the generated queries return all the columns and rows - so you'd expect it to run slow.
Suprisingly, it doesn't. At all.
It's taken me about 3 hours in total to learn how to build a simple site in Retro (thanks to Yam's video tutorials - great for learning), gotten to grips with using the controllers and methods, and almost fully integrated my existing site into it - including keeping the topic-recursing directories etc.
I've changed a bit of the existing library code due to some errors I received in testing, stuff like accessing a row which doesn't exist. Also, the result object automatically puts the keys to lowercase, so I used strtolower() on the field sent to the __get method to fix errors due to casing.
I am loading my site with it for a few reasons. Firstly, I've never used a framework before and I'm in full support of this one - I think it's fantastic. Also, I some framework ideas may work in theory but fail when putting them into full practice - so I'm building a fully functional site with it to do some propper testing.
It also means that things are easier to change, and when I actually get round to loading content to my site and getting traffic, the site will be proudly wearing that penguin-mounted-LP logo on the bottom, getting more publicity for the framework site itself. Heck, I could have articles on the site ABOUT Retro, and gain traffic for both.
Jake Arkinstall
"Sometimes you don't need to reinvent the wheel;
Sometimes its enough to make that wheel more rounded"-Molona





Sounds promising. I've noticed the build releases have slowed. Does this mean you're close to releasing a final version?
Two reasons.
Firstly, a full version is quite close. I'm guessing by the middle of next week, maybe before.
Yam's taking a break for the weekend and I'm constantly slightly modifying framework code to work correctly when a site is built with it. Currently it does allow sites to be built, but on certain conditions it can fail. An example is when you have a controller such as 'searchController' and a class such as 'search', by default it looked for the 'search' class before finding a controller class, which of course created a nice fatal error. I changed it to look for the controller-suffixed class and it's more stable.
I've also made the way the script parses the template slightly different, because I had a few problems when outputting some variables.
So when I've fully made a site with it, I'll upload the framework code.
I'm also considering distributing the full site code too, for a price, to generate interest for the framework and some revenue too. Of course I'd want Yam's approval before selling code which uses his framework.
Jake Arkinstall
"Sometimes you don't need to reinvent the wheel;
Sometimes its enough to make that wheel more rounded"-Molona



Ok, I'm back. Now I have to say I would like to get all the fixes anyone made and implement them myself, and of course I'd allow selling it. It's licensed under the GNU GPL.
Learn about the new Retro Framework
Code PHP the way it was meant to be coded!



And also - spikez, I really love your illustration skills, it would be simply great to have you design the logo for my framework!
Learn about the new Retro Framework
Code PHP the way it was meant to be coded!



Form validation:
http://serialize.us/val2/val2.html
Learn about the new Retro Framework
Code PHP the way it was meant to be coded!



Update:
Validation is now more like:
And I'm working on making it generate Javascript validation as well.Code:<form> <title> <min-chars>4</min-chars> <max-chars>32</max-chars> </title> </form>
Learn about the new Retro Framework
Code PHP the way it was meant to be coded!
Oh and anyone interested in joining the group and lending a hand, just email Yam. After the next few stages, our ideas will get more and more complex so, well, we may need a hand
We'd also love some more ideas! Anything that is annoying or too complicated, too awkward to write or takes up too much thinking power.
Jake Arkinstall
"Sometimes you don't need to reinvent the wheel;
Sometimes its enough to make that wheel more rounded"-Molona



Build 7 up for grabs. Probably the last development version.
http://code.google.com/p/retrophpmvc/downloads/list
Main Todo's:
in libs/record.php : Pagination class and Records:get_pagination($countPerPage) method
in libs/validation : using JS/jQuery - a js_validate($formID) function that validates either via AJAX or JS implemented validations (second is preferred)
New stuff:
Big fixes
Validation
As soon as we get a logo: Website, online documentation, video tutorials
Needed from contributers:
Logo
Extra libraries (preferably dependency-free)
Working on TODO's
Spotting and reporting bugs
Desired result:
Easiest PHP framework yet.
![]()
Learn about the new Retro Framework
Code PHP the way it was meant to be coded!


Class Record, record.php:
Do you quote each type of field (numeric, boolean)? Or the filters could be only strings?PHP Code:foreach($filters as $key => $value)
{
if($value !== null)
$query .= $key . ' = \'' . $value . '\' AND ';
else
$query .= $key . ' = null AND ';
}
Simple fix for that, will implement before next release.
PHP Code:foreach($filters as $key => $value)
{
$query .= $key . ' = ';
if($value !== null){
if(!is_numeric($value)){
$query .= '\'' . $value . '\'';
}else{
$query .= $value;
}
}else{
$query .= 'null';
}
$query .= ' AND ';
}
Jake Arkinstall
"Sometimes you don't need to reinvent the wheel;
Sometimes its enough to make that wheel more rounded"-Molona
Build 7.1 Uploaded.
There could be a couple of small things which I have forgotten to write, but nothing major.Code:ChangeLog: ************************** CV.php: Line 51: (Tpl->fixVarScope()) Replaced existing function with a preg_replace variant. This fixes a bug in which any occurance of a variable name (in PHP tags or not, without $) was replaced - e.g. <title> was before replaced with <this->title>. Uriparser.php: Lines 119-122: (UriParser->parseUri()) Added support for get $_GET strings (Now $_GET values are parsed into $_GET) Vars.php Lines 006-027: (Dump() and _Dump()) Func_Get_Args() returns an array. Now if only one item is passed, it dumps that item rather than Func_Get_Args(). Tags.php Lines 134-137: (Breadcrumb()) The crumbs variable now defaults to null, and is converted to an empty array if that value is null. This means that if you call the function with either null or array(), it has the same effect as calling it with no parameters. Record.php Line 89, 142, 490: Spelling fix - from setValues to the correct set_values Request.php Line 51: Spelling mistake fix - from gett_post() to get_post()
Jake Arkinstall
"Sometimes you don't need to reinvent the wheel;
Sometimes its enough to make that wheel more rounded"-Molona



Numeric & Booleans & Dates: The SQL databases I worked with didn't have any problems with this, and I saw in an official MySQL article somewhere that it's actually recommended to quote everything.
I'll take a look at the bug fixes!
Learn about the new Retro Framework
Code PHP the way it was meant to be coded!





I use my own Session class that isn't dependent on PHP's built-in session support. I was going to update it for my new app, but since I'm now thinking of using Retro in that app, it seems (at the moment) that it would make more sense to just write it as a Retro add-on.
The new version will use MySQL instead of files. Instead of a normalized table, I'm thinking of putting a serialized array of session variables into a single BLOB or TEXT column. I think this would make it much easier for the user, because he could add session variables without having to add columns to the session table.
Here are the properties and methods of the current version. I haven't thought of what else I'd want to add yet.
$id
$instance
$data
__construct
getInstance
set (set a session variable)
get
(The foregoing could be changed to override magic __set and __get methods in PHP 5+)
clear (unsets all session variables)
exists (similar to session_is_registered)
isAdmin
isModerator
registerForm
loginForm
changePasswordForm
register
login
logout
changePassword
retrievePassword
save
__usernameIsRegistered
__usernameIsValid
__emailIsRegistered
__emailIsValid
__clone
Your thoughts?



Also I really like how you listed the change log with lines because when I upload I still continue to work on it so changing whole files is a bad idea.![]()
Learn about the new Retro Framework
Code PHP the way it was meant to be coded!



Ok, fixes: build 7.2
http://code.google.com/p/retrophpmvc/downloads/list
Learn about the new Retro Framework
Code PHP the way it was meant to be coded!



Just added a few final injection fixes for find() methods so again, 7.x is still a development version, but the final one.![]()
Learn about the new Retro Framework
Code PHP the way it was meant to be coded!



Some people say the world lays on giant turtles, too.
I'll make SQLite and Postgre handlers as well. If they give me any problems there, I'll add type-handler.![]()
Learn about the new Retro Framework
Code PHP the way it was meant to be coded!


PostgreSQL would be very nice, because MySQL is really piece of ****. Only a few notes for dates, could I afford them? - Supported range for DATETIME from 1000-01-01. Ugh. Forget the Rome empire and the ancient world. Shocking check for date values (2008-02-32 goes through as zero value.) No timestamp with time zone. Ugh. No fraction of seconds. Forget sport.
Bookmarks