Re: Identical controller names

2013-10-09 Thread Ed Propsner
Naming the files with the same name wouldn't be so difficult ...  one of
the files is contained in a plugin. My thinking was that within the app
itself I would have controller and plugin.controller and although they
would share the same name they are referenced differently and perhaps it
wouldn't be so much of an issue. To be honest I wasn't really sure how it
would work out but I was curious nonetheless.


On Thu, Oct 10, 2013 at 1:08 AM, Борислав Събев wrote:

> It would not really affect it in a good way. :D
> Cake is convention based and this will be your first drawback.
> Moreover how did you plan on naming the files with the same name?
> It is possible on Unix/Linux systems but it is a bad practice - very bad.
> :)
> If they serve similar functionality they are most probably just different
> user roles? :D
> You could have different controllers for them, like: Users and Managers.
> This is really an abstract OOP decision but in the context of Cake it'd
> not do much good.
>
> On Thursday, 10 October 2013 08:02:16 UTC+3, CrotchFrog wrote:
>>
>> I thought better of the idea. Seems pointless to have identical names
>> when there are so many others to choose from :) I suppose I was more
>> curious about how it would effect the app moreso than actually creating the
>> controllers.
>>
>> Thanks for the reply :)
>>
>>
>> On Wed, Oct 9, 2013 at 11:40 PM, Reuben  wrote:
>>
>>> Without namespaces, I think you might end up with a class name clash,
>>> since you would have two UsersController classes trying to occupy the
>>> global name space.
>>>
>>> Regards
>>> Reuben Helms
>>>
>>> On Thursday, 10 October 2013 03:29:49 UTC+10, CrotchFrog wrote:
>>>
 Would it be considered bad practice to have two identical controller
 names? For example I was wondering about having a 'UsersController'  to
 keep my logic separate from 'UsersController' in one of my plugins, or
 would it be best to just name one or the other differently? I can foresee
 one or two "issues" going this route but am I missing a bigger picture?

>>>  --
>>> 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/7SvbTm2_MX4/**unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> cake-php+u...@**googlegroups.com.
>>> To post to this group, send email to cake...@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 a topic in the
> Google Groups "CakePHP" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/cake-php/7SvbTm2_MX4/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: Identical controller names

2013-10-09 Thread Борислав Събев
It would not really affect it in a good way. :D 
Cake is convention based and this will be your first drawback.
Moreover how did you plan on naming the files with the same name?
It is possible on Unix/Linux systems but it is a bad practice - very bad. :)
If they serve similar functionality they are most probably just different 
user roles? :D
You could have different controllers for them, like: Users and Managers. 
This is really an abstract OOP decision but in the context of Cake it'd not 
do much good.

On Thursday, 10 October 2013 08:02:16 UTC+3, CrotchFrog wrote:
>
> I thought better of the idea. Seems pointless to have identical names when 
> there are so many others to choose from :) I suppose I was more curious 
> about how it would effect the app moreso than actually creating the 
> controllers. 
>
> Thanks for the reply :)
>
>
> On Wed, Oct 9, 2013 at 11:40 PM, Reuben 
> > wrote:
>
>> Without namespaces, I think you might end up with a class name clash, 
>> since you would have two UsersController classes trying to occupy the 
>> global name space.
>>
>> Regards
>> Reuben Helms
>>
>> On Thursday, 10 October 2013 03:29:49 UTC+10, CrotchFrog wrote:
>>
>>> Would it be considered bad practice to have two identical controller 
>>> names? For example I was wondering about having a 'UsersController'  to 
>>> keep my logic separate from 'UsersController' in one of my plugins, or 
>>> would it be best to just name one or the other differently? I can foresee 
>>> one or two "issues" going this route but am I missing a bigger picture? 
>>>
>>  -- 
>> 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/7SvbTm2_MX4/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> cake-php+u...@googlegroups.com .
>> To post to this group, send email to cake...@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: Identical controller names

2013-10-09 Thread Ed Propsner
I thought better of the idea. Seems pointless to have identical names when
there are so many others to choose from :) I suppose I was more curious
about how it would effect the app moreso than actually creating the
controllers.

Thanks for the reply :)


On Wed, Oct 9, 2013 at 11:40 PM, Reuben  wrote:

> Without namespaces, I think you might end up with a class name clash,
> since you would have two UsersController classes trying to occupy the
> global name space.
>
> Regards
> Reuben Helms
>
> On Thursday, 10 October 2013 03:29:49 UTC+10, CrotchFrog wrote:
>
>> Would it be considered bad practice to have two identical controller
>> names? For example I was wondering about having a 'UsersController'  to
>> keep my logic separate from 'UsersController' in one of my plugins, or
>> would it be best to just name one or the other differently? I can foresee
>> one or two "issues" going this route but am I missing a bigger picture?
>>
>  --
> 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/7SvbTm2_MX4/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: Identical controller names

2013-10-09 Thread Reuben
Without namespaces, I think you might end up with a class name clash, since 
you would have two UsersController classes trying to occupy the global name 
space.

Regards
Reuben Helms

On Thursday, 10 October 2013 03:29:49 UTC+10, CrotchFrog wrote:

> Would it be considered bad practice to have two identical controller 
> names? For example I was wondering about having a 'UsersController'  to 
> keep my logic separate from 'UsersController' in one of my plugins, or 
> would it be best to just name one or the other differently? I can foresee 
> one or two "issues" going this route but am I missing a bigger picture? 
>

-- 
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.


Identical controller names

2013-10-09 Thread CrotchFrog
Would it be considered bad practice to have two identical controller names? 
For example I was wondering about having a 'UsersController'  to keep my 
logic separate from 'UsersController' in one of my plugins, or would it be 
best to just name one or the other differently? I can foresee one or two 
"issues" going this route but am I missing a bigger picture? 

-- 
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: New to Cake -- Security Questions

2013-10-09 Thread schenkerstudio
Sorry for the double post!  My previous post seemed lost until after I 
posted this one!

On Wednesday, October 9, 2013 12:48:03 PM UTC-4, schenke...@gmail.com wrote:
>
> Greetings,
> I am new to CakePHP.  I've tested several other frameworks (Laravel, 
> CodeIgniter, Symfony, Yii, and even a clever little one called PHPixie).  
> My choice is to go with CakePHP for various reasons, but mostly because it 
> makes sense to me.
>
> I like everything I see about CakePHP, but I am wondering how experienced 
> Cake developers handle security.  I know that this is a big topic and there 
> is no single answer, but what are the general steps you take to secure an 
> app in CakePHP?  I am talking about an app where I will be accepting form 
> inputs from logged-in users.
>
> Here's what I understand so far:
> 1. I really like the Cake Data Validation 
> class.  
> This seems to allow very nice control of form inputs.
> 2. I'm confused about the removal of the Data Sanitization 
> tool.  
> Was this done because there are better built-in methods for this, or is it 
> because the framework no longer handles sanitization?
>
> Can anyone please shed some light on general "good practices" on securing 
> CakePHP apps?
>
> Thank you!
>
> Matthew
>

-- 
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.


New to Cake -- Security Questions

2013-10-09 Thread schenkerstudio
Greetings,
I am new to CakePHP.  I've tested several other frameworks (Laravel, 
CodeIgniter, Symfony, Yii, and even a clever little one called PHPixie).  
My choice is to go with CakePHP for various reasons, but mostly because it 
makes sense to me.

I like everything I see about CakePHP, but I am wondering how experienced 
Cake developers handle security.  I know that this is a big topic and there 
is no single answer, but what are the general steps you take to secure an 
app in CakePHP?  I am talking about an app where I will be accepting form 
inputs from logged-in users.

Here's what I understand so far:
1. I really like the Cake Data Validation 
class.  
This seems to allow very nice control of form inputs.
2. I'm confused about the removal of the Data Sanitization 
tool.  
Was this done because there are better built-in methods for this, or is it 
because the framework no longer handles sanitization?

Can anyone please shed some light on general "good practices" on securing 
CakePHP apps?

Thank you!

Matthew

-- 
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.


Can't get to make before and complete work with get

2013-10-09 Thread Andrei
Hello all,

Maybe not the most clear subject line but here is my problem. I have a 
'change' event on an input field. It works fine except I can't get the 
'before' and 'complete' callback to hide/show a div. If a use alert just 
for testing, everything is fine, so the script is OK.

Here is the code from the view.

$this->Js->get('#name')->event('change', $this->Js->request(array(
'action' => 'changeTerms', 'name'
), array(
'async' => true,
'method' => 'post',
'update' => '#offer',
'before' => $this->Js->get('#loading')->effect('fadeIn', 
array('buffer' => false)),
'complete' => $this->Js->get('#loading')->effect('fadeOut', 
array('buffer' => false)), 
'dataExpression'=>true,
'data'=> $this->Js->serializeForm(array(
'isForm' => true,
'inline' => true,
)),
)));

I get why this is not working, the generated js is wrong. The last two 
$this->Js->get('#loading') are to blame , but how can I fix it?

Thanks,
Andrei

-- 
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.