Questions tagged as 'interface'

1
answer

Programming oriented towards interface and not for implementation, why?

What are the main reasons (in practice) that lead developers to apply the practice of developing interface-oriented rather than implementation?     
asked by 11.09.2015 / 21:03
7
answers

In object orientation, why are interfaces useful?

Can anyone give a practical explanation on why interfaces are used and why they are useful to us developers?     
asked by 29.01.2014 / 21:13
3
answers

What's the difference between IEnumerable, IQueryable and List?

What is the difference between IEnumerable , IQueryable and List in .NET? When is it better to use one or the other? Why does ReSharper suggest changing the return of this function, for example, from List<T> : private Li...
asked by 27.05.2014 / 18:50
2
answers

When should I use Inheritance, Abstract Class, Interface or a Trait?

Since PHP 5.4 we have Trait , which "are mechanisms that help (and much) reuse code, and serve perfectly to solve the problem of lack of multiple inheritance." Example of Abastrata Class abstract class AbstractUser { abstract publ...
asked by 08.07.2015 / 18:07
6
answers

Using many interfaces is a bad programming practice?

I'm a student in Information Systems and I'm modeling a game, a virtual pet that has its needs and talks with its owner, below follows the modeling of classes and interfaces. I showed it to a friend in Computer Science, he thought it had a lo...
asked by 09.07.2014 / 16:23
5
answers

Abstract Class X Interface

What is the difference between an abstract class and an interface? I do not understand when I should use one or the other.     
asked by 31.01.2014 / 19:08
1
answer

When and how to implement Parcelable vs. Serializable?

After much time using the Serializable implementation in my classes on the Java platform (Android), I discovered Parcelable, but I was in doubt about the following issues below: 1. When to use (choose from) Parcelable vs. Serializable? 2....
asked by 29.10.2014 / 02:34
3
answers

What is the purpose of the Serializable interface?

Implementation example: public class MyClass implements Serializable{ private static final long serialVersionUID = 1L; }     
asked by 22.09.2015 / 15:50
1
answer

Is it a bad practice to use empty interfaces?

I've heard comments that would be a good idea when a future implementation can occur. I've also heard that it's a bad practice. I know that in PHP, for example, there is an interface called Traversable who has nothing. It serves onl...
asked by 24.07.2015 / 17:31
1
answer

Difference between ICollection, IList and List?

What is the difference between ICollection , IList and List ? When should I use each one specifically?     
asked by 23.07.2015 / 17:48