Hello Guys,

Any help for below points.

Thanks!
Shadab Shaikh

On Sat, Jul 11, 2009 at 12:19 PM, Shadab Shaikh <[email protected]>wrote:

> Hi James, Robert & Other crew members,
>
> Thanks for all your answers. I appreciate all senders’ comments.
>
> I think we are near to our requirements.
>
> I like the Robert and James approach.
>
>
> Robert Approach:” We can use helper to accomplish the above tasks. ”
>
>
> James Approach:” A helper in conjunction with elements would likely be the
> closest
> thing you'll get to a Joomla module. Elements would contain the
> presentation logic for each "module", and the helper could be written
> to act like a "module bucket" - pull in the modules for that page,
> pass data to the elements and render them to a position in your page.”
>
> It seems that James approach is more generalized:
>
> James if I am not wrong than you are asking me to deal the things as
> following way
>
> 1)      I should create helpers for Module
>
> 2)      For sub functionality of that module, I should use elements.
>
> 3)      View will call helpers, and helpers will call elements, finally my
> modules will be displayed.
>
> I will check this practically in upcoming days. I will surely let you know.
>
> Now Let me explain my real time requirements, so you guys can understand my
> requirement in more details,
>
> Please check out attached image.
>
> We are using four tables in it called
>
> 1)      Phones
>
> 2)      Emails
>
> 3)      Websites
>
> 4)      IMS
>
> 5)      Work
>
> This module will be used in different pages.
>
> We would have one extra functionality which is called send message by that
> user can send message to contact person. In general ,we may have any kind of
> such functionalities which can trigger other pages or  open functionality
> in the page it self. So for send message one text area would be open same
> module or may be open in other view.
>
> So as per James Suggestions,
>
> 1)      Should I need to create helper called “contacts”?
>
> 2)      For Emails,IMS, PHONES etc Should I need to create elements?
>
> 3)      How we can handle send message kind of functionality in above
> scenario?
>
> 4)      I am not aware with caching much, so in above circumstances how I
> will manage caching of helpers and elements?
>
> 5)      What will be best way to improve performance in above conditions?
>
>
>
>  I hope that above narration makes complete sense to you. Look forward to
> hear from you soon.
>
> Thanks again for your reply,
>
> Cordially,
>
> Shadab Shaikh
>
>
> On Sat, Jul 11, 2009 at 12:14 PM, Shadab Shaikh <[email protected]>wrote:
>
>> Hi James, Robert & Other crew members,
>>
>> Thanks for all your answers. I appreciate all senders’ comments.
>>
>> I think we are near to our requirements.
>>
>> I like the Robert and James approach.
>>
>> Robert Approach:” We can use helper to accomplish the above tasks. ”
>>
>> James Approach:” A helper in conjunction with elements would likely be the
>> closest
>>
>> thing you'll get to a Joomla module. Elements would contain the
>> presentation logic for each "module", and the helper could be written
>> to act like a "module bucket" - pull in the modules for that page,
>> pass data to the elements and render them to a position in your page.”
>>
>> It seems that James approach is more generalized:
>>
>> James if I am not wrong than you are asking me to deal the things as
>> following way
>>
>> 1)      I should create helpers for Module
>>
>> 2)      For sub functionality of that module, I should use elements.
>>
>> 3)      View will call helpers, and helpers will call elements, finally
>> my modules will be displayed.
>>
>> I will check this practically in upcoming days. I will surely let you
>> know.
>>
>> Now Let me explain my real time requirements, so you guys can understand
>> my requirement in more details,
>>
>> Please check out attached image to get better idea.
>>
>> Untitled-4.png (*image/png*) 
>> 104K<http://?ui=2&ik=bb9b6fd9a4&view=att&th=122688c794ca057c&attid=0.1&disp=attd>
>>
>> This is one module called “Contacts”.
>>
>> We are using four tables in it called
>>
>> 1)      Phones
>>
>> 2)      Emails
>>
>> 3)      Websites
>>
>> 4)      IMS
>>
>> 5)      Work
>>
>> This module will be used in different pages.
>>
>> We would have one extra functionality which is called send message by that
>> user can send message to contact person. In general ,we may have any kind of
>> such functionalities which can trigger other pages or  open functionality
>> in the page it self. So for send message one text area would be open same
>> module or may be open in other view.
>>
>> So as per James Suggestions,
>>
>> 1)      Should I need to create helper called “contacts”?
>>
>> 2)      For Emails,IMS, PHONES etc Should I need to create elements?
>>
>> 3)      How we can handle send message kind of functionality in above
>> scenario?
>>
>> 4)      I am not aware with caching much, so in above circumstances how I
>> will manage caching of helpers and elements?
>>
>> 5)      What will be best way to improve performance in above conditions?
>>
>>
>>
>>  I hope that above narration makes complete sense to you. Look forward to
>> hear from you soon.
>>
>> Thanks again for your reply,
>>
>> Cordially,
>>
>> Shadab Shaikh
>>
>>
>> On Wed, Jul 8, 2009 at 7:08 PM, James K <[email protected]> wrote:
>>
>>>
>>> A helper in conjunction with elements would likely be the closest
>>> thing you'll get to a Joomla module. Elements would contain the
>>> presentation logic for each "module", and the helper could be written
>>> to act like a "module bucket" - pull in the modules for that page,
>>> pass data to the elements and render them to a position in your page.
>>>
>>> Helpers have the same limitation as views or elements, however, in
>>> that they do not have direct access to any Models as they are also
>>> view-scoped. You'd still have to use App::import to bring in your
>>> models and run your queries.
>>>
>>> If you're not concerned with encapsulation, you'd be looking at a more
>>> involved approach like Robert suggested. Personally, I would probably
>>> go with something like a Component, that runs logic in beforeFilter to
>>> gather the data to support the modules on the page, and beforeRender
>>> to send the data to the view in a format that the Helper can read and
>>> then render to Elements.
>>>
>>> Action agnostic data access is an interesting problem in CakePHP as
>>> the framework was very specifically built such that all of your
>>> queries will be happening at the Controller Action level - this makes
>>> it difficult when you need to pull data that is non-specific to the
>>> action, but to a higher level entity like a "page" (if you were
>>> building a CMS, for instance).
>>>
>>> If you get something working well, myself, as well as others, would be
>>> interested in hearing about the approach you went with.
>>>
>>> - James
>>>
>>> On Jul 8, 1:00 am, Shadab Shaikh <[email protected]> wrote:
>>> > Hello James & Robert,
>>> >
>>> > Thanks for sharing your ideas with me.
>>> > But I think we should use Helper rather than element would be good idea
>>> as
>>> > element having certain limitation but helper is more extensible.
>>> >
>>> > If any one having other idea please share with us.
>>> >
>>> > Thanks!
>>> > Shadab Shaikh
>>> >
>>> >
>>> >
>>> > On Wed, Jul 8, 2009 at 12:14 AM, James K <[email protected]>
>>> wrote:
>>> >
>>> > > There is no entity in CakePHP that work like Joomla modules out of
>>> the
>>> > > box. The closest thing would be elements - elements are "mini-views"
>>> > > that can be included in layouts or views. However, since they are
>>> > > intended to be reliant on the information passed to the view they're
>>> > > included in, they lose the main bit of a Joomla module's
>>> functionality
>>> > > - namely the ability to be fully self-contained and make their own
>>> > > database calls.
>>> >
>>> > > You CAN use App::import within an element to include the model(s) you
>>> > > need, and run queries on them but this not very efficient as you may
>>> > > end up with several complete instances of the same model being
>>> > > generated in a single request.
>>> >
>>> > > - James
>>> >
>>> > > On Jul 7, 1:44 am, shadab <[email protected]> wrote:
>>> > > > Hello All,
>>> >
>>> > > > Greetings of the day!
>>> >
>>> > > > I want to develop some robust application in CAKE PHP. I would like
>>> to
>>> > > > use Joomla module idea in it. Let me clear what is Joomla module,
>>> who
>>> > > > are not familiar with Joomla. Joomla module is logic with interface
>>> > > > which can placed at multiple pages at well defined position of the
>>> > > > pages. We can easily make it enable/disable it and change it
>>> position
>>> > > > any time. For e.g. “online friends” is one module which can be
>>> placed
>>> > > > in different pages at well defined position.
>>> >
>>> > > >  would like same thing to develop in CAKE PHP to accomplish below
>>> goal
>>> > > > •     We can create module by simply adding files and db entries
>>> > > > •     We would have generalized function to load modules but once I
>>> want
>>> > > > to create new module than I need not require to touch my
>>> controller’s
>>> > > > logic, just need to db entry and adding necessary files
>>> > > > •     We can easily enable/disable modules to any page by db may be
>>> using
>>> > > > flag
>>> >
>>> > > > Now my questions
>>> > > > 1)      What would be best things in cake php to create this kind
>>> of
>>> > > > module? Whether I should go with helper or anything else?
>>> > > > 2)      I am open for suggestions/discussions. Please send me your
>>> views/
>>> > > > ideas to accomplish above goals.
>>> >
>>> > > > Thanks in advance. :)
>>> >
>>> > > > Best Regards,
>>> > > > Shadab Shaikh
>>> >>>
>>>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to