Well, what your company should do is say

"We will code a solution which supports DBX just now. If, in future, you
move to Oracle, we can re-develop the solution for that". To mitigate these
risks, you can abstract something like NHibernate behind the repository
pattern. I'm quite fond of the Repository pattern - when you combine it with
a good IoC solution (see
http://www.pnpguidance.net/Post/UsingCastleWindsorWithRepositoryFactoryForIoC.aspxfor
an overview) you can end up with a nicely flexible system.

On Wed, Nov 24, 2010 at 5:20 AM, jack me <[email protected]> wrote:

> Thanks for reply,
>
> Jamie: According to project, my company got a client who want to shift his
> site from PHP to .Net). The site database may be changed to Sql Server or
> Oracle later. So i need to find an solution if later we need to change
> database them we need to do only minimal changes.
>
> I have worked only in Singleton pattern, but in this case, dont know which
> pattern should I use. I checked on google and found this type of project can
> be developed in abstract factory pattern. :) I am just shaking my head to
> search about this on net.
>
> :)
>
> Thanks,
>
>
>
>
>
>
> On Tue, Nov 23, 2010 at 10:13 PM, Stephen Russell 
> <[email protected]>wrote:
>
>> I love adding a complex query in oracle and in mysql. All levels of
>> abstraction still need to get the proper syntax for the db.
>>
>> YMMV
>>
>> Sent from my iPhone
>> Stephen Russell
>> 901.246-0159
>>
>>
>> On Nov 23, 2010, at 10:12 AM, Jamie Fraser <[email protected]>
>> wrote:
>>
>> In my experience, the "requirement" to be database-neutral is often
>> misguided and completely unnecessary. Why would you switch out your DB?
>>
>> You can abstract things away using something like a Repository pattern,
>> but the levels of abstraction required often negate any benefit you'd get.
>> All IMO, of course.
>>
>> On Tue, Nov 23, 2010 at 12:31 PM, jack me < <[email protected]>
>> [email protected]> wrote:
>>
>>> Hi,
>>>
>>> I have to create a website, but according to some standards.
>>>
>>> - it should be compatible with any database with minimal changes, I
>>> googled and found that i need to implement abstract factory pattern. I have
>>> not used that.
>>>
>>> tell me Am I on right way ?
>>>
>>> any link Where I can found some information about this ..?
>>>
>>> regards,
>>>
>>>
>>>
>>>
>>
>

Reply via email to