Hi Madhawa,

Does PHP have native datasource support? For example[1]. I am -1 on doing
it through Java. We must look at how PHP community does it. First thing is
to see how PHP community uses databases in apps.

If they do have a native datasource concept we have to use it. If that is
not available second option is using variables and calling registry via
REST APIs.

thanks,
dimuthu

[1] http://book.cakephp.org/2.0/en/models/datasources.html


On Thu, Aug 21, 2014 at 7:17 PM, Manjula Rathnayake <manju...@wso2.com>
wrote:

> Hi Madhawa,
>
> We can keep these variables(string $dsn , string $user , string
> $password) in registry and use registry rest API to get values at runtime.
> So when you promote the application to Test and Production environments,
> application will pick the environment specific values. This will not break
> PHP developer experience as well.
>
> thank you.
>
>
> On Thu, Aug 21, 2014 at 7:00 PM, Madhawa Bandara <madh...@wso2.com> wrote:
>
>> Any thoughts please?
>>
>>
>> On Tue, Aug 19, 2014 at 8:14 PM, Madhawa Bandara <madh...@wso2.com>
>> wrote:
>>
>>> Hi,
>>>
>>> Appfactory supports data sources to be defined and be used in the Java
>>> applications.
>>>
>>> In the process of enabling the PHP app type support in Appfactory, we
>>> need to allow users(i.e.developers) to create data sources in Appfactory
>>> and use them directly inside their PHP applications.
>>>
>>> PHP applications use the odbc_connect ( string $dsn , string $user ,
>>> string $password [, int $cursor_type ] ) to connect to a database.
>>>
>>> There are third party libraries that enable Java inside PHP scripts [1].
>>> An example for JNDI look-up in inside PHP is in [2].
>>>
>>> In order to allow data sources to be called directly from the PHP apps
>>> what are the preferable options available?
>>>
>>> You ideas are welcome.
>>>
>>>
>>> [1] -  http://php-java-bridge.sourceforge.net/pjb/
>>> [2] -
>>> http://php-java-bridge.sourceforge.net/pjb/examples/source.php?source=documentClient.php
>>>
>>>
>>>
>>>
>>> --
>>> Regards,
>>>
>>> *Madhawa Bandara*
>>> Software Engineer
>>> WSO2, Inc.
>>> lean.enterprise.middleware
>>>
>>> Mobile - *+94777487726 <%2B94777487726>*
>>> Blog* - *classdeffound.blogspot.com
>>>
>>
>>
>>
>> --
>> Regards,
>>
>> *Madhawa Bandara*
>> Software Engineer
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - *+94777487726 <%2B94777487726>*
>> Blog* - *classdeffound.blogspot.com
>>
>> _______________________________________________
>> Architecture mailing list
>> Architecture@wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> Manjula Rathnayaka
> Software Engineer
> WSO2, Inc.
> Mobile:+94 77 743 1987
>
> _______________________________________________
> Architecture mailing list
> Architecture@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
Dimuthu Leelarathne
Architect & Product Lead of App Factory

WSO2, Inc. (http://wso2.com)
email: dimut...@wso2.com
Mobile : 0773661935

Lean . Enterprise . Middleware
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to