Status
Not open for further replies.
Thanks. Oh and if anyone wants a specific section commented, I will quite happily do a quick run over and do some docblocks. Im just going through fairly randomly at this stage.
 
I´m not the most skilled php coder ... and i´m little lost, never used a Framework before and i have some questions.

Wich is minimun php version required by the framework?

I downloaded the framework and the blog example. Now should i put framework files combined with blog files?

I see lots of files ".project" , ".buildpath", etc... a folder named ".settings".
All those files are trash and can be deleted correct?

Sorry for those dumb questions, i´m trying to understand how to work with the framework and perhaps give a hand with bug reporting, documentation, etc... but first i need to understand how to work with the framework.

And while i writing previous lines arrived to my head one idea, perhaps supply the most basic help to start is good (before enter in advanced documentation):
- Installation guide.
- Hello world example.

And i was searching a little on google about PHP frameworks, and a i have new question, which advantages have this framework over competitors (codeigniter,Yii, etc...)? (i´m speaking about advantages different of open source and free).

Thanks in advance for your atention.
 
Minimum PHP version: 5.3.3
MySQL requires the innodb engine to be enabled. Basic MyIsam support is complete but its not as stable.

.project, .buildpath and .settings are part of Zend Studio and only needed if you use that IDE. For execution and for other users these can be ignored or deleted.

1. To install radical blog download radical php
2. Then copy radical blog into the same folder (overwriting and merging)
3. You will also need to import the SQL
4. Then edit the app/config.php
The line you need to edit is
Code:
$_SQL = new Model\Database\DBAL\Adapter\Connection('db', 'root', 'passwordmysql', 'radical_blog');

I have packaged a version for you with steps 1 and two completed. https://dl.dropbox.com/u/62365823/radical-php/radical-blog-internal-preview3.rar
I havent had a chance to test this specific package, but it looks right. If you have problems ill install it on my testing server. I expect there may be problems with relative site roots, Im not sure if that code is complete yet (e.g putting it in a folder like /radicalblog).

radical-blog will take the place of one of the more advanced examples
radical-monitor will be a moderate one (showing off mostly command line stuff)
radical-myip is what I plan to make into the first beginner tutorial. I expect alot more applications suitable for examples will be made by other users when this takes off.

While these apps are simple designs to develop once you know what you are doing (and they also so serve as a tool for me to figure out what I can improve in the framework) it takes alot of time for me to make them perfect examples and comment them etc.

The framework is probably most similar to django or lithium, but really its unique. Its everything Ive wanted in 10 years of programming but never been able to find (or hasnt been possible in the past -- e.g real OOP)

Neither an Installation guide or a Hello world example have been written as the framework isnt ready for beginners yet (atleast not unassisted to get over the initial hurdle of lack of documentation). Although writing these documents is probably something a contributor (Ive been hoping to find some helpers for a while) could do.

I personally love inline (phpdoc) documentation, which then is parsed out to form the basis of documentation (e.g like php or jquerys function reference), thats why I am focusing on in code documentation first.

EDIT: Oh and just be aware this is beta software, I just noticed that some SQL builder changes have the search subsystem.

If you cant get it to work it may be due to a fault in the code (its been mostly tested on linux and in semi professional - professional setups (never on XAMPP etc)) so I fully expect there will be bugs... its alpha and pre-stable (1.0.0 will be the first stable)

EDIT2: Fixed the search bug (which also affected categories and tags), simple one line fix so I re-uploaded.
 
Last edited:
Hi,
I don't know if you have included any prepaired sql statements mechanism in your framework but if not you may add something like this.
 
Currently I havent added Prepared statements (they will probably be added for those who like them in the future). This is mostly because it is rare that we access the database directly (you could write without knowing anything but basic SQL). Two current interfaces (other than direct database querying).

1. Query Building
Code:
$sql = $this->logTable->select('log_id,log_status,log_to')
             ->where(array('host_id'=>$host->getId()))
             ->order_by('log_to','DESC')
             ->limit(1);
//or for update etc
$sql = $this->logTable->update()
             ->where('log_id',$row['log_id'])
             ->set('log_to',\DB::toTimeStamp(time()));
//also this can be done directly on non modeled tables using DB::Select();
Source: radical-monitor log plugin

2. Models
Code:
$user = \X4B\DB\User::fromId(1);
$user->setName('admin');
$user->Update();

//or

$users = \X4B\DB\User::getAll();

//and / or
$users->sql->where('user_username','tester');

foreach($users as $user){
    echo $user->getEmail(),'<br />';
}
Source: Top of my head.


Personally I dont think prepared statements are necessary when we provide query builders, these builders are SQL injection proof btw. The only benifit to using prepared satements is probably performance, and for that we will probably add it.
 
Well people with limited knowledge wont even make use of this, but for more "serious" programming i think this is a must.
I haven't seen the sql builder yet so i don't know how does your code prevent sql injections, especially for example when there is multibyte chars involved!
 
mutibyte chars arent an issue, mysql_real_escape_string handles escaping in the database's character encoding. The database subsystem makes up around 1/3 of all of the code, its very well developed.

ActiveRecord and ORM implementations are industry standard now days, they are amazing (e.g Doctrine -- but its overly bloated), SQL builders are secure since you never deal with strings.
 
Last edited:
only just saw this.

not bad, looks like you've done a good job.
though there are endless amounts of frameworks out there, many under far heavier development than yours (meaning more features, support, documentation, everything).

its good to make your own to learn, but difficult to have any benefit over any other framework. personally I use kohana these days.

overall though, good job, had a look at the code and its pretty good. keep it up
 
First of all thanks, while I acknowledge that there are tons of large frameworks out there (and that was the main reason it took me a year before I even posted this publicly) I dont believe this is a reason to not develop new ones. I don't think there is any framework out there that meets the same criteria or style of this framework. And while we are underdocumented, supported etc we are a very young project which much to go (I dont expect a stable release until atleast a year from now). I definitely understand the size of this project, It was initially quite a deterant to the undertaking but none the less here we are in early alphas.

This framework shares alot of common features with Kohana, in fact it even includes a modified version of the Arr class from it. I have used Kohana extensively for work, howeaver it has alot of faults (overriding order of system>modules>app is the major one, resulting in large app small module development instead of the more efficient modular pattern). If you think a feature is missing you are quite welcome to fork and write them in, or improve existing ones. I do pull from forks where the work is up to par.

Also be careful stating the features argument, I think you would be surprised at the number of features complete, most aren't documented yet and as such are unknown to most people.

Basic documentation is certainly high on the priority list, Its one of the 0.2.x milestones to complete basic documentation for most user facing classes. The other main milestone is bugfixes, we all know how fun bug hunting is.
 
First of all thanks, while I acknowledge that there are tons of large frameworks out there (and that was the main reason it took me a year before I even posted this publicly) I dont believe this is a reason to not develop new ones. I don't think there is any framework out there that meets the same criteria or style of this framework. And while we are underdocumented, supported etc we are a very young project which much to go (I dont expect a stable release until atleast a year from now). I definitely understand the size of this project, It was initially quite a deterant to the undertaking but none the less here we are in early alphas.

This framework shares alot of common features with Kohana, in fact it even includes a modified version of the Arr class from it. I have used Kohana extensively for work, howeaver it has alot of faults (overriding order of system>modules>app is the major one, resulting in large app small module development instead of the more efficient modular pattern). If you think a feature is missing you are quite welcome to fork and write them in, or improve existing ones. I do pull from forks where the work is up to par.

Also be careful stating the features argument, I think you would be surprised at the number of features complete, most aren't documented yet and as such are unknown to most people.

Basic documentation is certainly high on the priority list, Its one of the 0.2.x milestones to complete basic documentation for most user facing classes. The other main milestone is bugfixes, we all know how fun bug hunting is.

Indeed no single framework is good for all situations and circumstances, but it remains that there are still many which can produce the same result with as much ease and efficiency as yours.
When it comes down to it, the decision on which framework to use is always personal opinion. There are so many these days (from people such as yourself, having a go at it) that there exists one which is ideal for each particular project (e.g. kohana may be best for one project, yii for another).

You may well have some disadvantages to state about Kohana, but evidently those disadvantages don't affect the overall resulting product anyway. It may do some things differently, but it can produce the exact same product with slightly different code, in which case it comes down to efficiency rather than functionality.

In terms of features, be careful stating the opposite argument. I have no doubt there are many, many frameworks with features yours doesn't have or implement as well. The same may even apply to yours, meaning you implement features they don't have. Either way, it is pretty much guaranteed that other frameworks will have features you don't have and you will have some they don't have. So it yet again comes down to personal opinion.

I guess the point here is...

There does not exist and never will exist a 'perfect framework', it is essentially impossible to gain the 'upper hand', so to speak, on another framework. Reason being, some framework somewhere will always implement something which you don't, or something better than what you have implemented (the same applies to all other frameworks, not just yours).

You've done a great job and should continue doing so. Consider finding something frameworks are missing and implement it rather than competing directly with every other framework in existence.

Also, I didn't check but from you mentioning mysql_real_escape_string, I assume you're using the old MySQL library (mysql_*). You should *strongly* consider changing to PDO or MySQLi, especially for the use of prepared statements.
 
Well stated, yes very close to the way I think. And there are numerous things that we have that are uninique (event based form system, javascript integration, etc).

Oh and I stated mysql_real_escape_string because most people on this site wouldnt understand $mysqli->real_escape_string, it was just to reduce confusion but I see it had the opposite effect.

Im a big supporter of mysqli and mysqlnd, I had it before it was cool (and stable). But thats offtopic :P

Id like to think that this framework has the highest productivity, at-least it does for me but that may have something to do with it fitting my coding style well. My aim is to make it universally so, without compromising on this.
 
https://dl.dropbox.com/u/62365823/radical-php/radical-php-0.1.0alpha5.zip

0.1.0 alpha5 posted. Mostly bug fixes, some performance tweaks and some new classes / more complete classes. Lots more PHPDoc documentation.

---------- Post added 27th Jun 2012 at 01:27 AM ---------- Previous post was 26th Jun 2012 at 09:58 PM ----------

New release, supports relative urls so you can now just place it in your localhost.

Thanks to Baraka for debugging and reporting the bug.

Framework:
https://dl.dropbox.com/u/62365823/radical-php/radical-php-0.1.0alpha6.zip

Blog:
https://dl.dropbox.com/u/62365823/radical-php/radical-blog-internal-preview4.rar
 
https://dl.dropbox.com/u/62365823/radical-php/radical-php-0.1.0alpha5.zip

0.1.0 alpha5 posted. Mostly bug fixes, some performance tweaks and some new classes / more complete classes. Lots more PHPDoc documentation.

---------- Post added 27th Jun 2012 at 01:27 AM ---------- Previous post was 26th Jun 2012 at 09:58 PM ----------

New release, supports relative urls so you can now just place it in your localhost.

Thanks to Baraka for debugging and reporting the bug.

Framework:
https://dl.dropbox.com/u/62365823/radical-php/radical-php-0.1.0alpha6.zip

Blog:
https://dl.dropbox.com/u/62365823/radical-php/radical-blog-internal-preview4.rar

Your welcome :D, so far so good on this Framework, i plan to do some apps with it :D Still playing around with it at the moment
 
Radical PHP Version 0.1.0 alpha7 released. Just some minor bug fixes (and one majorish one, if you have issues with Database models update).

---------- Post added at 12:24 PM ---------- Previous post was at 06:45 AM ----------

Just a quick post, my programming pocedure.

My basic process for creating projects (its pretty RAD [bad pun]):
1. Use mysql Workbench and design databases (using tablename, prefix_field format). Focus on clean (normalized) tables.
2. Convert into a table into a model class (I use Zend Studio which allows me to run a single version of radical-php) and my server is symlinked back to that version.
3. Create recognizer rules (Using Web\Page\Router\Recognisers\Templates\Standard -- gotta shorten that namespace).
4. Create Controllers, usually at the same time as #3
5. Create empty templates and link into controllers with return new Template statement.
6. Start coding. The extra planning results in really clean code.

---------- Post added at 12:49 PM ---------- Previous post was at 12:24 PM ----------

alpha8, compatibility for older versions of PHP (XAMPP).
https://dl.dropbox.com/u/62365823/radical-php/radical-php-0.1.0alpha8.zip


https://dl.dropbox.com/u/62365823/radical-php/radical-blog-internal-preview6.rar

Also again thanks to 1only/Baraka for reporting the issue.
 
Last edited:
Alrighty! Beta :D

I'm in a learning mood.
Started going Class-Oriented only a month ago because the project I'm currently part of became too big.
Chose to go for my own MVC-interpretation which works and I'm getting good feedback from my co-developers.

Going Class-Oriented ( I don't like saying Object-Oriented, but you know thats what I'm talking about ) is really a one-way ticket. I can't imagine doing semi-large to large projects any other way.

The next step is using a framework. I was never a fan of this since it means you have to 'change' the way you work. (Except for SplitIce, he says "fuck it, I'm building my own damn framework!")
But since I also didn't like Class-Oriented programming at first, I'm guessing I'll find using a framework to be fun too.

So here I am, willing to try out a framework for the very first time.
Is radical-php doable as a first framework? Or should I start with the (apparently) easier CodeIgniter?
 
Status
Not open for further replies.
Back
Top