Specification and Implementation

11

I often see the words "specification" and "implementation", but I do not know the difference between one and the other. For example:

  

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

Overall, what is implementation and what is specification?

    
asked by anonymous 02.02.2016 / 14:23

3 answers

14

Specification

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

Implementation

It's something concrete. It's how it's actually done. It is what exists to be used. It is law enforcement. It's the cake made by someone serving what the recipe says.

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

Relation between them

Of course, if the implementation does not do something that the specification forces you to have, whoever is going to use it, who must be a pattern, you 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 by taking advantage of the extras, you obviously will not be able to portlet to a different implementation that adheres more strictly to the specification.

In the described context the implementation is being made on top of the specification, complying with all rules established by it. The implementation can, in theory, do anything that is not forbidden by the specification.

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

If the implementation hurts a rule of the specification it can not be considered as adhering to that standard.

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

It's often harder to make a good specification than a good implementation, even though the amount of work can be the reverse.

A bad specification may make it difficult or even impossible to implement a good implementation.

Normally 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 just be an unnecessary and undesirable complicator.

Plan how you plan to implement is not a specification. At least not in the sense described.

Some implementations are considered as specification. These are informal specifications. There are pros and cons to doing this.

Specification for programming language .

    
02.02.2016 / 14:50
7

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 companies in order to reduce incompatibilities. A document is created containing all these recommendations for the purpose of

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

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

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

Examples of implementations: TCP / IP, MySQL, SQL Server, JVM from Oracle to Open JVM.

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

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

    
02.02.2016 / 14:56
6

You've already had helpful answers, but since this type of question is recurring (that is, it may appear again in the future with other terms), it's worth the hint that dictionaries are very useful. If you look at the terms you will see that:

Specification :

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

(Great Houaiss dictionary of the Portuguese language)

Act to specify

  • Determine by species.
  • Specify the type of.
  • Particularize.
  • Explain in detail.
  • Mention by parts.
  • (Priberam Dictionary of the Portuguese Language)

    Implementation :

    act or effect to implement

    (Great Houaiss dictionary of the Portuguese language)

    .Act or effect to implement.

  • Implement, execute or ensure the performance of (something). = RUN
  • [Computers] Install, commission (program or computer component).
  • (Priberam Dictionary of the Portuguese Language)

    Sources:

    04.02.2016 / 14:07