In your case it's a good to use web services to abstract database
model B as you know it'll be modified soon.
Where I disagree is putting all on the same SF project, you should
separate your app in 2 parts :
- The main project, embedding A database models and acting as web
service consumer
- The web service provider project that contains DB B models
This way when DB schema for B Will change, you can refactor only one
app/project. You can even switch framework or language ... as long as
your web service API behavior do not change you won't ne required to
refactor the whole application.
IMHO that's the key interest in using webservices.
Regards
Le 7 avr. 2010 à 16:54, jaubry <[email protected]> a écrit :
Hi,
Let me explain my problem.
My challenge (in fact, thanks to my client...) is to create a
application based on symfony.
It has multiple databases. One master, for the application, and
others, for reference tables.
I know that in symfony, I can enumerate multiple databases in the
databases.yml.
I can also use the sfDoctrineMastSlavePlugin to get rapid access to
one or another DB.
I can describe the different DB schema in the schema.yml
But, some slave databases are meant to be replaced in short term. So
my client wish to use web services in order to access the data.
Furthermore, all the code (including webservices) has to be done in
one place (my symfony project)
Right now, i feel a bit perplex about this implementation.
Tell me if I am wrong.
My database B is the slave that might change in short term.
I make my connection to B in databases.yml
I have to describe my B database in the schema.yml
I create a module for all the webservice, and the methods to query the
data
I create some routes to access the methods, which will return lists in
xml
In my application, I point to this methods to retrieve the data,
analyse the xml and publish it.
If the B database, has to change, I have to :
- modify databases.yml
- modify schema.yml
- rebuild --all (or a part of it)
- modify the code in the webservice module, because the fields might
be different...
Hope I'm right.
Thanks for your advices and your comments.
Jerome
--
If you want to report a vulnerability issue on symfony, please send
it to security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" 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/symfony-users?hl=en
To unsubscribe, reply using "remove me" as the subject.
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" 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/symfony-users?hl=en