Re: Some talk about complex Applications with CakePHP

2013-11-10 Thread Ivan Rimac
if this is going to be custom web app, based on your text i would really
recommend you using mongodb for this one, it should solve you most of your
concerns regarding speed. you have very good plugin of mongodb for cakephp.


On Mon, Nov 11, 2013 at 8:24 AM, Gaurav Matta wrote:

> Check this
>
> http://itfeast.blogspot.in/2013/10/cakephp-query-and-cache-optimization.html?m=1
> On 10-Nov-2013 8:21 PM, "Ighor Martins"  wrote:
>
>> Hi there!.
>>
>> I'm a web developer from Portugal for like 8 years. I have been using
>> CakePHP for about 1 year and a half right now, and I'm pretty used to it,
>> with a good knowledge of the Framework.
>>
>> On the last month, the company I work for, decided to create a new
>> company and engage on a new project.
>> The idea is to create a platform based on the needs of the company. It's
>> something like these sites: http://www.lynda.com/,
>> https://www.coursera.org/ and etc, but a little bit more complex, since
>> our final users isn't singular people, and some others functional
>> requirements that has to be done.
>>
>> So, Long story short, since last month we are developing a really small
>> "sneak peek" of the platform working (because we need something functional
>> ASAP), and then on the next month we're going to re-factor it all to
>> develop the final product. As you can imagine I'm using CakePHP on this
>> initial preview, and I'm wondering if I couldn't use CakePHP for the final
>> product too.
>>
>> We all know that a lot of people complain about CakePHP performance. But
>> we know too that 80% of these complains is due to bad use of the Framework.
>> Ok, Cake has a way of working that in some cases may have a really big
>> performance impact, for example it trying to format all the data into
>> relational arrays, which could be a problem in querys that return a really
>> big bunch of data, but ...
>> Sincerely performance isn't my biggest concern.
>> My biggest problem is:
>> This will be an application, with a custom software design. And CakePHP
>> almost force us to follow it's strict design. At the same time, this
>> platform won't require that enough for me to move to something like Zend.
>>
>> So, I have knowledge about Cake, but I don't really know the best
>> practices to develop big applications with Cake. Only normal websites.
>> Sometimes I even feel like cake almost force us grow our controllers code
>> instead of models, and that's what's making me sad.
>> To give you an example:
>> I normally do things like this on controllers:
>> $this->MyModel->find('all', array(
>>   'contain' => array(
>>  'SecondLevelThing' => array(
>>'ThirdLevelThing' => array(
>>   'conditions' => 'thirdLevelThingConditions'
>>),
>>'conditions' => 'secondLevelThingConditions'
>>  )
>>   )
>> ));
>>
>> Then I need this same information on other places of application. So I
>> just repeat the code, but as you can see, this is already a custom code, I
>> can't be re-writing this everywhere.
>> So I should do something like:
>> $this->MyModel->id = x
>> $this->MyModel->getCustomInfo();
>>
>> and this object method would return that information. But the problem is,
>> when I do that, I see myself fighting against Cake default way of working
>> in a lot of things, for example if I want to paginate that information, and
>> other things.
>>
>>
>> I know CakePHP 3 will be there in a while to solve some of these issues,
>> and it will finally return objects instead of arrays :)
>> but for now, how is the best design pattern to follow with CakePHP when
>> developing big applications without fighting against the framewok?
>>
>>
>> Thank you guys.
>>
>> --
>> 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.
>>
>  --
> 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.
>



-- 
*Ivan Rimac*
mail: i...@rimac.hr
*tel: +385 95 555 99 66*
*http://ivanrimac.com *
*http://rimac.hr *

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

Re: Some talk about complex Applications with CakePHP

2013-11-10 Thread Gaurav Matta
Check this
http://itfeast.blogspot.in/2013/10/cakephp-query-and-cache-optimization.html?m=1
On 10-Nov-2013 8:21 PM, "Ighor Martins"  wrote:

> Hi there!.
>
> I'm a web developer from Portugal for like 8 years. I have been using
> CakePHP for about 1 year and a half right now, and I'm pretty used to it,
> with a good knowledge of the Framework.
>
> On the last month, the company I work for, decided to create a new company
> and engage on a new project.
> The idea is to create a platform based on the needs of the company. It's
> something like these sites: http://www.lynda.com/,
> https://www.coursera.org/ and etc, but a little bit more complex, since
> our final users isn't singular people, and some others functional
> requirements that has to be done.
>
> So, Long story short, since last month we are developing a really small
> "sneak peek" of the platform working (because we need something functional
> ASAP), and then on the next month we're going to re-factor it all to
> develop the final product. As you can imagine I'm using CakePHP on this
> initial preview, and I'm wondering if I couldn't use CakePHP for the final
> product too.
>
> We all know that a lot of people complain about CakePHP performance. But
> we know too that 80% of these complains is due to bad use of the Framework.
> Ok, Cake has a way of working that in some cases may have a really big
> performance impact, for example it trying to format all the data into
> relational arrays, which could be a problem in querys that return a really
> big bunch of data, but ...
> Sincerely performance isn't my biggest concern.
> My biggest problem is:
> This will be an application, with a custom software design. And CakePHP
> almost force us to follow it's strict design. At the same time, this
> platform won't require that enough for me to move to something like Zend.
>
> So, I have knowledge about Cake, but I don't really know the best
> practices to develop big applications with Cake. Only normal websites.
> Sometimes I even feel like cake almost force us grow our controllers code
> instead of models, and that's what's making me sad.
> To give you an example:
> I normally do things like this on controllers:
> $this->MyModel->find('all', array(
>   'contain' => array(
>  'SecondLevelThing' => array(
>'ThirdLevelThing' => array(
>   'conditions' => 'thirdLevelThingConditions'
>),
>'conditions' => 'secondLevelThingConditions'
>  )
>   )
> ));
>
> Then I need this same information on other places of application. So I
> just repeat the code, but as you can see, this is already a custom code, I
> can't be re-writing this everywhere.
> So I should do something like:
> $this->MyModel->id = x
> $this->MyModel->getCustomInfo();
>
> and this object method would return that information. But the problem is,
> when I do that, I see myself fighting against Cake default way of working
> in a lot of things, for example if I want to paginate that information, and
> other things.
>
>
> I know CakePHP 3 will be there in a while to solve some of these issues,
> and it will finally return objects instead of arrays :)
> but for now, how is the best design pattern to follow with CakePHP when
> developing big applications without fighting against the framewok?
>
>
> Thank you guys.
>
> --
> 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.
>

-- 
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: Some talk about complex Applications with CakePHP

2013-11-10 Thread rchavik


On Sunday, November 10, 2013 9:51:26 PM UTC+7, Ighor Martins wrote:
>
> Hi there!.
>
> I'm a web developer from Portugal for like 8 years. I have been using 
> CakePHP for about 1 year and a half right now, and I'm pretty used to it, 
> with a good knowledge of the Framework.
>
> On the last month, the company I work for, decided to create a new company 
> and engage on a new project.
> The idea is to create a platform based on the needs of the company. It's 
> something like these sites: http://www.lynda.com/, 
> https://www.coursera.org/ and etc, but a little bit more complex, since 
> our final users isn't singular people, and some others functional 
> requirements that has to be done.
>
> So, Long story short, since last month we are developing a really small 
> "sneak peek" of the platform working (because we need something functional 
> ASAP), and then on the next month we're going to re-factor it all to 
> develop the final product. As you can imagine I'm using CakePHP on this 
> initial preview, and I'm wondering if I couldn't use CakePHP for the final 
> product too.
>
> We all know that a lot of people complain about CakePHP performance. But 
> we know too that 80% of these complains is due to bad use of the Framework.
> Ok, Cake has a way of working that in some cases may have a really big 
> performance impact, for example it trying to format all the data into 
> relational arrays, which could be a problem in querys that return a really 
> big bunch of data, but ...
> Sincerely performance isn't my biggest concern.
> My biggest problem is:
> This will be an application, with a custom software design. And CakePHP 
> almost force us to follow it's strict design. At the same time, this 
> platform won't require that enough for me to move to something like Zend. 
>
> So, I have knowledge about Cake, but I don't really know the best 
> practices to develop big applications with Cake. Only normal websites.
> Sometimes I even feel like cake almost force us grow our controllers code 
> instead of models, and that's what's making me sad.
> To give you an example:
> I normally do things like this on controllers:
> $this->MyModel->find('all', array(
>   'contain' => array(
>  'SecondLevelThing' => array(
>'ThirdLevelThing' => array(
>   'conditions' => 'thirdLevelThingConditions'
>),
>'conditions' => 'secondLevelThingConditions' 
>  )
>   )
> ));
>
> Then I need this same information on other places of application. So I 
> just repeat the code, but as you can see, this is already a custom code, I 
> can't be re-writing this everywhere.
> So I should do something like:
> $this->MyModel->id = x
> $this->MyModel->getCustomInfo() 
>

> and this object method would return that information. But the problem is, 
> when I do that, I see myself fighting against Cake default way of working 
> in a lot of things, for example if I want to paginate that information, and 
> other things.
>
>
You should lookup custom find methods in the book.

-- 
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: Missing Behavior File

2013-11-10 Thread sanjog dangol
hello i am having same problem and cannot solve it .plz help me.

On Wednesday, February 2, 2011 6:28:53 PM UTC+5:45, milotimbol wrote:
>
> Hi, 
>
> I'm new to cakephp currently trying out this plugin . 
>
> https://github.com/webtechnick/CakePHP-FileUpload-Plugin 
>
> I basically followed everything in the readme file. I'm just creating 
> a simple blog app for studying purpose and I'm trying to combine it 
> with the file upload. 
>
> Here's what i did 
> I created an Upload Model. 
>
>  class Upload extends AppModel { 
>   var $name = 'Upload'; 
>   var $actsAs = array('FileUpload.FileUpload'); 
> } 
> ?> 
>
> Created a table. 
>
> CREATE TABLE IF NOT EXISTS `uploads` ( 
>   `id` int(11) unsigned NOT NULL auto_increment, 
>   `name` varchar(200) NOT NULL, 
>   `type` varchar(200) NOT NULL, 
>   `size` int(11) NOT NULL, 
>   `created` datetime NOT NULL, 
>   `modified` datetime NOT NULL, 
> `post_id` int(11) default NULL, 
>   PRIMARY KEY  (`id`) 
> ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; 
>
> made the relation to the post model 
>
>  class Post extends AppModel{ 
> var $name = 'Post'; 
> var $hasMany = array('Comment','Upload'); 
>
>//some more code here 
> ?> 
>
> When I try to save a Post. It says 
>
> Error: The Behavior file app\models\behaviors 
> \file_upload.file_upload.php can not be found or does not exist. 
> Error: Create the class below in file: app\models\behaviors 
> \file_upload.file_upload.php 
>
> How do I use a plugin? it seems it is not looking for the files in the 
> plugins folder. Is there some setting like in the bootstrap.php I need 
> to change so that the app knows where this plugin is? 
>
> Hoping to get some help. 
>
> Thanks, 
> Milo

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


Some talk about complex Applications with CakePHP

2013-11-10 Thread Ighor Martins
Hi there!.

I'm a web developer from Portugal for like 8 years. I have been using 
CakePHP for about 1 year and a half right now, and I'm pretty used to it, 
with a good knowledge of the Framework.

On the last month, the company I work for, decided to create a new company 
and engage on a new project.
The idea is to create a platform based on the needs of the company. It's 
something like these sites: http://www.lynda.com/, https://www.coursera.org/ 
and 
etc, but a little bit more complex, since our final users isn't singular 
people, and some others functional requirements that has to be done.

So, Long story short, since last month we are developing a really small 
"sneak peek" of the platform working (because we need something functional 
ASAP), and then on the next month we're going to re-factor it all to 
develop the final product. As you can imagine I'm using CakePHP on this 
initial preview, and I'm wondering if I couldn't use CakePHP for the final 
product too.

We all know that a lot of people complain about CakePHP performance. But we 
know too that 80% of these complains is due to bad use of the Framework.
Ok, Cake has a way of working that in some cases may have a really big 
performance impact, for example it trying to format all the data into 
relational arrays, which could be a problem in querys that return a really 
big bunch of data, but ...
Sincerely performance isn't my biggest concern.
My biggest problem is:
This will be an application, with a custom software design. And CakePHP 
almost force us to follow it's strict design. At the same time, this 
platform won't require that enough for me to move to something like Zend. 

So, I have knowledge about Cake, but I don't really know the best practices 
to develop big applications with Cake. Only normal websites.
Sometimes I even feel like cake almost force us grow our controllers code 
instead of models, and that's what's making me sad.
To give you an example:
I normally do things like this on controllers:
$this->MyModel->find('all', array(
  'contain' => array(
 'SecondLevelThing' => array(
   'ThirdLevelThing' => array(
  'conditions' => 'thirdLevelThingConditions'
   ),
   'conditions' => 'secondLevelThingConditions' 
 )
  )
));

Then I need this same information on other places of application. So I just 
repeat the code, but as you can see, this is already a custom code, I can't 
be re-writing this everywhere.
So I should do something like:
$this->MyModel->id = x
$this->MyModel->getCustomInfo();

and this object method would return that information. But the problem is, 
when I do that, I see myself fighting against Cake default way of working 
in a lot of things, for example if I want to paginate that information, and 
other things.


I know CakePHP 3 will be there in a while to solve some of these issues, 
and it will finally return objects instead of arrays :)
but for now, how is the best design pattern to follow with CakePHP when 
developing big applications without fighting against the framewok?


Thank you guys.

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