Re: 3.0: a peek into CakePHP's future

2013-07-17 Thread Benjamin Allison
I suppose the larger point is this: right now, most web apps require two 
separate frameworks: server-side and client-side. While the name itself, 
CakePHP, implies what its focus is, maybe it's worth considering including some 
more Javascript utilities, so that AJAXy web apps can follow Cake conventions, 
and both halves can be integrated more tightly.

-- 
benjamin allison – designer

b...@roestudios.com
http://www.roestudios.com
http://www.benjamin-samuel.com

On 2013-07-17, at 10:34 PM, mark_story wrote:

> The current plan that Jose and I have discussed is to return objects from the 
> Models/Repo/Table objects. (The name isn't decided yet).  This fixes many of 
> the data format issues and also mostly makes afterFind irrelevant which is 
> nice.
> 
> We've also removed containable in name but mainlined it in spirit. Instead of 
> being a separate behavior controlling joins is part of the query builder.
> 
> What parts of SecurityComponent are hard for ajax applications? I don't think 
> there will be a way to use the form tampering prevention with ajax forms, 
> however it is already possible to protect those forms from CSRF issues with 
> re-usable CSRF tokens.
> 
> -Mark
> 
> On Sunday, 5 May 2013 23:52:14 UTC-4, Benjamin Allison wrote:
> If you're reworking the model layer, I think the most important things are:
> 
> 1) Harmonizing the format that data and associated data is save in and 
> returned in. Right now, it's all over the map, and is sometimes hard to keep 
> straight.
> 
> 2) Allowing for a smoother way to filter models by their associated models; 
> having to write joins is kind of a pain.
> 
> In addition, a smoother way of using AJAX with the Security component to help 
> accomodate the growing trend of JS based web apps.
> 
> -- 
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "CakePHP" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/cake-php/-TLn6RpHt4U/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: 3.0: a peek into CakePHP's future

2013-07-17 Thread Benjamin Allison
Perhaps if there was an easy interface, that sends a new token as a return 
value for AJAX requests? Something we could repopulate a form with in the DOM?

I haven't thought anything through I'm just thinking out loud.

-- 
benjamin allison – designer

b...@roestudios.com
http://www.roestudios.com
http://www.benjamin-samuel.com

On 2013-07-17, at 10:34 PM, mark_story wrote:

> The current plan that Jose and I have discussed is to return objects from the 
> Models/Repo/Table objects. (The name isn't decided yet).  This fixes many of 
> the data format issues and also mostly makes afterFind irrelevant which is 
> nice.
> 
> We've also removed containable in name but mainlined it in spirit. Instead of 
> being a separate behavior controlling joins is part of the query builder.
> 
> What parts of SecurityComponent are hard for ajax applications? I don't think 
> there will be a way to use the form tampering prevention with ajax forms, 
> however it is already possible to protect those forms from CSRF issues with 
> re-usable CSRF tokens.
> 
> -Mark
> 
> On Sunday, 5 May 2013 23:52:14 UTC-4, Benjamin Allison wrote:
> If you're reworking the model layer, I think the most important things are:
> 
> 1) Harmonizing the format that data and associated data is save in and 
> returned in. Right now, it's all over the map, and is sometimes hard to keep 
> straight.
> 
> 2) Allowing for a smoother way to filter models by their associated models; 
> having to write joins is kind of a pain.
> 
> In addition, a smoother way of using AJAX with the Security component to help 
> accomodate the growing trend of JS based web apps.
> 
> -- 
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>  
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "CakePHP" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/cake-php/-TLn6RpHt4U/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: 3.0: a peek into CakePHP's future

2013-07-17 Thread mark_story
Yes there will be an upgrade shell much like there was from 1.x to 2.x. 
While a script won't be able to handle all the changes made, we're also 
keeping a detailed list of changes to help people upgrade/learn about what 
has changed.

-Mark

On Monday, 6 May 2013 13:53:51 UTC-4, steve van christie wrote:
>
> is version 3.x. support upgrade from previous version? just a suggestion, 
> why not use something like backward compatiblity like the others framework 
> have.
>
> best regards
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: 3.0: a peek into CakePHP's future

2013-07-17 Thread mark_story
The current plan that Jose and I have discussed is to return objects from 
the Models/Repo/Table objects. (The name isn't decided yet).  This fixes 
many of the data format issues and also mostly makes afterFind irrelevant 
which is nice.

We've also removed containable in name but mainlined it in spirit. Instead 
of being a separate behavior controlling joins is part of the query builder.

What parts of SecurityComponent are hard for ajax applications? I don't 
think there will be a way to use the form tampering prevention with ajax 
forms, however it is already possible to protect those forms from CSRF 
issues with re-usable CSRF tokens.

-Mark

On Sunday, 5 May 2013 23:52:14 UTC-4, Benjamin Allison wrote:
>
> If you're reworking the model layer, I think the most important things are:
>
> 1) Harmonizing the format that data and associated data is save in and 
> returned in. Right now, it's all over the map, and is sometimes hard to 
> keep straight.
>
> 2) Allowing for a smoother way to filter models by their associated 
> models; having to write joins is kind of a pain.
>
> In addition, a smoother way of using AJAX with the Security component to 
> help accomodate the growing trend of JS based web apps.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




CakePHP 2.3.8 & 2.2.9 released

2013-07-17 Thread mark_story
The CakePHP core team is happy to announce the immediate availability of 
2.3.8[1] and 2.2.9[2]. These releases contain security fixes and are 
recommended for all CakePHP developers. A short list of changes you can 
expect in 2.3.8 are:

* Improved API documentation.
* I18nShell now extracts plugin model validation messages correctly.
* ServerShell now serves static assets with query string parameters.
* ServerShell correctly uses the document_root parameter.
* Inflector can now pluralize additional words.
* File responses using HTTP Range now work correctly.
* A regression introduced to AuthComponent in 2.3.7 for redirectUrl() when 
an application is running in a subdirectory has been fixed.
* Pagination sort whitelists are now trusted implicitly. No additional 
validation is done on whitelisted fields. This makes it easier to sort on 
synthetic columns, or columns added through joins in custom finds.

As previously mentioned, a security issue related to the AssetDispatcher 
was fixed. This upgrade is important for all applications serving assets 
out of themes or plugins using the built-in AssetDispatcher. A big thank 
you to Takeshi Terada of Mitsui Bussan Secure Directions for contacting us 
about the security issue and providing steps to reproduce it. We'll 
disclose more details about the vulnerability in the future once people 
have had the chance to upgrade.

A huge thanks to all involved in terms of both contributions through 
commits, tickets, documentation edits, and those whom have otherwise 
contributed to the framework. Without you there would be no CakePHP. 
Download a packaged release [4].

### Links

- [1] http://cakephp.org/changelogs/2.3.8
- [2] http://cakephp.org/changelogs/2.2.9
- [3] https://github.com/cakephp/cakephp/tags

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Retrieving data from belongs to related model

2013-07-17 Thread Allan Diego
Hello,


I wonder how can I retrieve data from belongs model to other controller:

*Models linking:*

Course (id, name)
Class (id, class_number, course_id)
User (id, username, password)
ClassMembership (id, user_id, class_id)


Course hasMany Class
Class hasMany ClassMembership
User hasMany ClassMembership
ClassMembership belongsTo (Class, User)



>From UsersController  how can i retrieve *Class.class_number* and *
Course.name*?

User->find()  return ClassMembership data only not the belongsto related
$this->User->ClassMembership->recursive = 2; //dont work 


*
I have done this way to retrieve Course and Class data  from 
ClassMembership Controller:*

  $this->ClassMembership->Class->virtualFields['description'] = 
'CONCAT(Course.name, \' - (Class: \', Class.class_number, \')\', \' - (\', 
Class.date, \')\' ) ';

$classmembership = $this->ClassMembership->Class->find('list', 
array(
'fields' => array('Class.id', 'Class.description'),
'contain' => array('Course')
));

is there better way?






-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: User Authentication with 2 different tables

2013-07-17 Thread heavyKevy
When the user goes to log in, what determines which table is used?

Did you read this page:
http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html

Specifically "
Configuring Authentication handlers"?
It appears to me that you can do something in the before filter to figure 
out which table you want the Auth to use and pass in the configuration 
parameters there.



On Wednesday, July 10, 2013 6:45:44 PM UTC+7, Marius Heil wrote:
>
> Hello,
>
> what's the best approach for the following?:
> I have normal web users and admin users, admin users
> I need the admin users to stay in a different database than the webusers
>
> My admin users and web users have a different table structure that I do 
> not want to merge.
> So I basically just want authentication and authorization with those two 
> tables, what should I do?
>
> Thanks,
> Marius
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.