Specification and Implementation

Asked

Viewed 1,862 times

17

I usually see the words "specification" and "implementation", but I don’t know the difference between one and the other. For example:

It is possible to have control over the garbage collector, this just does not happen with Java in its standard implementation, as far as I know, also by specification.

Overall, what is implementation and what is specification?

  • In the general context or in the context of java/garbage collector?

  • Overall, I used the garbage collector as an example.

3 answers

20


Specification

It is something abstract. It is some "document" that establishes rules to be followed, what is expected from possible implementations. These rules may require some things and prohibit others. It’s a formalization of how something should proceed. It’s the law. Roughly it’s the recipe.

Implementation

It’s something concrete. It’s how it’s actually made. It’s what’s there to use. It’s law enforcement. It’s the cake made by someone attending to what the recipe says.

It is possible to vary the recipe, but if you modify its fundamental points, you will be hurting the dish and it can no longer receive that name. Obviously in cooking causes less problem than in computing :P.

Relationship between them

It is obvious that if the implementation does not do something that the specification requires, who will use that, which should be a standard, will have problems. If the implementation does something extra that the specification does not prohibit there will be no problems. But if you’re going to use what was created on top of this implementation to take advantage of the extras, you obviously can’t port to a different implementation that is more narrowly focused on the specification.

In the context described the implementation is being made on top of the specification, meeting all rules established by it. The implementation can, in theory, do anything that is not prohibited by the specification, but this can bring difficulties, even future in a review of the specification.

Within the rules the implementation can and should do its best to meet the needs of its users.

If the implementation breaks a specification rule it cannot be considered to adhere to that standard.

The specification can be more detailed or more superficial, giving more rigidity or flexibility to what the implementation can do. Can also give more ambiguity and bring problems. Specification may have bug :).

It is often more difficult to make a good specification than a good implementation, although the amount of work may be the reverse.

A bad specification can make it difficult or even make it impossible for a good implementation to exist.

Usually the specification should be simple to understand. The implementation should be good to use.

Some domains work best with an existing clear and formal specification. Others may be just an unnecessary and undesirable complicator.

Planning how you will implement is not specification, at least not in the sense described.

Some implementations are considered as specification. Are informal specifications and other implementations should be compatible with this, until the bugs, because there is no clarity when it is a bug and when it isn’t. There are pros and cons to doing this.

Specification for programming language.

10

When several companies produce similar products, some organ/institute or even group of companies come together to define recommendations or standards which must be followed by those undertakings in order to reduce incompatibilities. A document is created containing all these recommendations with the aim of

  • Create a unified vocabulary.
  • Define communication/integration protocols.

Examples of specifications: The network OSI model, the ANSI SQL standard, JVM specification.

The implementation is the result applied (concrete) of a specification, for technical reasons, performance or use the implementation may be totally different from the specification.

Examples of implementations: TCP/IP protocol, Mysql, SQL Server, The JVM from oracle to Open JVM.

The ISO/OSI model defines how the exchange of messages between hosts works, has 7 layers, each takes care of a part of the work are they, physical, link, network, transport, session, presentation and application.

The TCP/IP protocol was based on the OSI specification, but for technical reasons it has only 4 layers, link, transport network and application. Virtually the first layer, TCP/IP link does the physical layer and link work of the OSI model, this is an example of how an implementation can change a lot of the specification.

8

You have already had useful answers, but since this type of doubt is recurrent (that is, it may appear again in the future with other terms), it is worth the hint that dictionaries are very useful. If you refer to the terms you will see that:

Specification:

act or effect to specify; breakdown, detail description and/or exhaustive and detailed enumeration of the characteristics of a particular set of things, a project etc

(Great Portuguese-language Houaiss Dictionary)

Act of specifying

  1. Determine by species.
  2. Indicate the species of.
  3. Particularize.
  4. Explain in detail.
  5. Split mention.

(Priberam Dictionary of the Portuguese Language)

Implementation:

act or effect of implementing

(Great Portuguese-language Houaiss Dictionary)

.Act or effect of implementing.

  1. Implement, execute or ensure that (something) is carried out. = EXECUTE
  2. [Informatics] Install, start (software or computer component).

(Priberam Dictionary of the Portuguese Language)

Sources:

Browser other questions tagged

You are not signed in. Login or sign up in order to post.