Cakephp 3 and custom datasources

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Cakephp 3 and custom datasources

Martin-2
Hi,

For my current project I need to load data from different locations via API's. I think the best way to do this is to create datasources for it. Sadly I see there is nothing about datasources in the cakephp 3 book (only the text that is can be extended with alternative datasources). 
I also see there is no folder for datasources  in the 'src' folder of the app. So where should I put my datasource? 

I've find an older topic where is mark_story said "Instead custom datasources that don't use sql should provide an implementation of the RepositoryInterface, a query builder and possible a specialized entity object. " (https://groups.google.com/forum/#!topic/cake-php/UDDArIYV0nM)

I'm using https://github.com/cakephp/elastic-search as example. but it should be nice if there was a simple example for a custom datasource. and maybe some default features for making a custom datasource easier. I think this is a big missing feature in cakephp 3 at the moment.

So My question is: Are there plans for better support (and documentation) for custom datasources? And is there a easy example how to create one? and How are other developers doing this at the moment? I think it is strange to make a component for receiving data.

Greetings,
Martin


--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Cakephp 3 and custom datasources

Ricardo Aragón
Hi Martin,
You could learn about the custom datasources in CakePHP 3? I need to get information about this.

Regards

El domingo, 31 de mayo de 2015, 18:39:15 (UTC-3), Martin escribió:
Hi,

For my current project I need to load data from different locations via API's. I think the best way to do this is to create datasources for it. Sadly I see there is nothing about datasources in the cakephp 3 book (only the text that is can be extended with alternative datasources). 
I also see there is no folder for datasources  in the 'src' folder of the app. So where should I put my datasource? 

I've find an older topic where is mark_story said "Instead custom datasources that don't use sql should provide an implementation of the RepositoryInterface, a query builder and possible a specialized entity object. " (<a href="https://groups.google.com/forum/#!topic/cake-php/UDDArIYV0nM" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/forum/#!topic/cake-php/UDDArIYV0nM&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/forum/#!topic/cake-php/UDDArIYV0nM&#39;;return true;">https://groups.google.com/forum/#!topic/cake-php/UDDArIYV0nM)

I'm using <a href="https://github.com/cakephp/elastic-search" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fcakephp%2Felastic-search\46sa\75D\46sntz\0751\46usg\75AFQjCNGwyxEwb8bJOdORnasiERK95wnFEw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fcakephp%2Felastic-search\46sa\75D\46sntz\0751\46usg\75AFQjCNGwyxEwb8bJOdORnasiERK95wnFEw&#39;;return true;">https://github.com/cakephp/elastic-search as example. but it should be nice if there was a simple example for a custom datasource. and maybe some default features for making a custom datasource easier. I think this is a big missing feature in cakephp 3 at the moment.

So My question is: Are there plans for better support (and documentation) for custom datasources? And is there a easy example how to create one? and How are other developers doing this at the moment? I think it is strange to make a component for receiving data.

Greetings,
Martin


--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Cakephp 3 and custom datasources

José Lorenzo
Check out this project:

https://github.com/UseMuffin/Webservice

On Tuesday, November 24, 2015 at 11:43:08 PM UTC+1, Ricardo Aragón wrote:
Hi Martin,
You could learn about the custom datasources in CakePHP 3? I need to get information about this.

Regards

El domingo, 31 de mayo de 2015, 18:39:15 (UTC-3), Martin escribió:
Hi,

For my current project I need to load data from different locations via API's. I think the best way to do this is to create datasources for it. Sadly I see there is nothing about datasources in the cakephp 3 book (only the text that is can be extended with alternative datasources). 
I also see there is no folder for datasources  in the 'src' folder of the app. So where should I put my datasource? 

I've find an older topic where is mark_story said "Instead custom datasources that don't use sql should provide an implementation of the RepositoryInterface, a query builder and possible a specialized entity object. " (<a href="https://groups.google.com/forum/#!topic/cake-php/UDDArIYV0nM" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/forum/#!topic/cake-php/UDDArIYV0nM&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/forum/#!topic/cake-php/UDDArIYV0nM&#39;;return true;">https://groups.google.com/forum/#!topic/cake-php/UDDArIYV0nM)

I'm using <a href="https://github.com/cakephp/elastic-search" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fcakephp%2Felastic-search\46sa\75D\46sntz\0751\46usg\75AFQjCNGwyxEwb8bJOdORnasiERK95wnFEw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fcakephp%2Felastic-search\46sa\75D\46sntz\0751\46usg\75AFQjCNGwyxEwb8bJOdORnasiERK95wnFEw&#39;;return true;">https://github.com/cakephp/elastic-search as example. but it should be nice if there was a simple example for a custom datasource. and maybe some default features for making a custom datasource easier. I think this is a big missing feature in cakephp 3 at the moment.

So My question is: Are there plans for better support (and documentation) for custom datasources? And is there a easy example how to create one? and How are other developers doing this at the moment? I think it is strange to make a component for receiving data.

Greetings,
Martin


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