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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to