loose-coupling

Which patterns for loose coupling do you use most?

Lately I have seen a lot of blog posts concerning how to build loosely coupled applications. Which patterns do you use most when creating loosely coupled applications? Dependency Injection? Inversion of Control? ...

How can I loosely couple database columns in a .NET application?

Hi, I have two versions of an almost identical database. Below I have created an Example table to demonstrate the basic differences, namely the ID column has changed from an Integer Identity to a GUID and various properties have been updated, in the Example archived has been replaced with readOnly and hidden: Legacy version: CREATE T...

What are some of the things to watch for (pitfalls) while using IOC container?

What are some of the things to watch for (pitfalls) while using IOC container? ...

Do you define an interface for every public class in your domain model? Pros and Cons?

Do you implement an interface for every public class in your domain model? Pros and Cons? Update: If Repositories interfaces and domain model classes are defined in separate assemblies, wouldn't there be circular dependency if we do not define interfaces for every domain class. ...

Loose Coupling and OO Practices for Beginners

Keeping classes loosely coupled is an important aspect of writing code that is easy to understand, modify, and debug--I get that. As a newbie, though, just about anytime I get beyond the most simple examples I struggle. I understand, more or less, how I can encapsulate strings, integers, and simple data types in classes of their own. W...

DDD: What are good reasons for you to loosely-couple Entities?

Back in December, there was this post that was answered with "it is ok to use concret types [for simple object]". But I keep seeing more and more simple entities with interfaces in sample projects, and even the very large Enterprise application I just took control over (counting 89 interfaces and going). Is it that people are not picki...

Are there other benefits to loosely coupled code besides TDD?

When I'm doing TDD, it forces me to employ Dependency Injection principle and I end up with loosely coupled code. I was told that it's harder to understand application that has loosely coupled code. Can you tell me what pros and cons of loosely coupled code? ...

Loose coupling in a WSGI application/toolkit (templating specifically)

Hallo, I looked at the various loose-coupling questions around here but couldn't pin down something similar to my question, so apologies if it's already been asked. Basically I have a homegrown, very simplistic routing library that consists of Segments, Hubs, and Stubs. Hubs and Stubs inherit Segments, and represent directories or primi...

Any suitable patterns for this problem?

I have a situation in which I am attempting to keep my model and implementation as loosely coupled as possible, however I am faced with a situation where the coupling could potentially get a lot closer than I want. I have a selection of 'Model' classes, all implementing interfaces. Additionally I have 'Data Access' classes, which provid...

What are techniques for increasing cohesion while maintaining loose coupling?

Loose coupling, high cohesion for a maintainable application This is the battle-cry that I hear over and over. There is plenty of advice on how to loosely couple components. Base on interfaces and inject all dependencies Use events Use a service bus etc. However, I feel like I've never really heard any specific suggestions fo...

Loosely Coupled Database Design - How To?!?

Hello! I'm implementing a web - based application using silverlight with an SQL Server DB on the back end for all the data that the application will display. I want to ensure that the application can be easily scalable and I feel the direction to go in with this is to make the database loosely coupled and not to tie everything up with f...

Getting NHibernate to generate a HiLo string ID

Hi, We've got a large system that's loosely bound to its data source (Navision) via Unity - we're getting the opportunity to swap it out and have our own database. So we've had a look around and really like the look of Fluent NHibernate - we're trying to get a proof of concept going and swap out a couple of the services. We want to us...

Which side of the api chasm?

I am torn between to DRY and loose coupling :( I have two sites which you can link your account and then the sites can share data (via a RESTful api...) one site is a media aggregation site and the other is a media store where people can buy digital media (music/photo/video). My boss wants to emulate the itunes store and have a built-...

creating a wrapper around a 3rd party assembly - swap out and decouple

I have an email component that I am integrating into my application, looking for some tips on how should build a wrapper around it so I can swap it out with another 3rd party component if needed. My approach right now is it: build an interface will the functionality I need. create a class that implements the interface, using my 3rd pa...

want to move all business logic to BLL layer, but need to pass in formcollection, is that clean?

My asp.net controllers action takes the FormCollection as a parameter. I then loop through my own collection, do a lookup in the form collection for a value etc. I moved all my code to my business logic layer, and just call my business logic layer in my action like: SomeManager.Update(formCollection); But I am feeling a bit weary pa...

What are the best tools for Loose Coupling in C#

I was reading Loose Coupling and its benefits which are really good stuff but I started wondering which tools are great to create loosely-coupled solutions ? First what came to my mind are Type and Interfaces and Abstract classes but I am sure there are so many ways to provide loose coupling. Maybe Polymorphism helps to create loosely-co...

Loose coupling : Can we use Interfaces when we need cloneables params ?

As I was advised by PMD, I want to reduce coopling by using interfaces instead of implementation ... In this case, knowing that I need a cloneable param, can I overcome the clone Dilemma (no clone() method in the Cloneable interface) ?? public MyConstructor(ArrayList<E> myParam) { this.myAttribute = (ArrayList<E>) myParam.clone(); ...

Multi Tiers / Multi Layers system equals to a tightly coupled system?

Hi, I find that whenever I create a layer/tier, I have to translate between one layer to the other, does that mean it is a tightly coupled system? If I was to change a business logic, remove a field in the database, etc, I would have to change ALL layers from the database layer to the client front end? E.g. A web service that exposes...

Interfaces and Coupling

From a design and loose coupling standpoint. Is it a good idea to have an interface for each class in a project that might be part of a composition model? I have a project where I'm doing this, but now I'm getting rather a lot of interfaces, in an attempt to keep things relatively loosely coupled. ...

How to Implement Loose Coupling with a SOA Architecture

I've been doing a lot of research lately about SOA and ESB's etc. I'm working on redesigning some legacy systems at work now and would like to build it with more of a SOA architecture than it currently has. We use these services in about 5 of our websites and one of the biggest problems we have right now with our legacy system is that ...