Naked objects
Encyclopedia
Naked objects is an architectural pattern
Architectural pattern (computer science)
An architectural pattern in software is a standard design in the field of software architecture. The concept of a software architectural pattern has a broader scope than the concept of a software design pattern...

 used in software engineering
Software engineering
Software Engineering is the application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software, and the study of these approaches; that is, the application of engineering to software...

.

Definition

The naked objects pattern is defined by three principles:

1. All business logic
Business logic
Business logic, or domain logic, is a non-technical term generally used to describe the functional algorithms that handle information exchange between a database and a user interface.- Scope of business logic :Business logic:...

 should be encapsulated onto the domain objects
Business object (computer science)
A business object is a type of an intelligible entity being an actor inside the business layer in an n-layered architecture of object-oriented computer programs....

. This principle is not unique to naked objects: it is just a strong commitment to encapsulation
Information hiding
In computer science, information hiding is the principle of segregation of the design decisions in a computer program that are most likely to change, thus protecting other parts of the program from extensive modification if the design decision is changed...

.

2. The user interface
User interface
The user interface, in the industrial design field of human–machine interaction, is the space where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the...

 should be a direct representation of the domain objects, with all user actions consisting, explicitly, of creating or retrieving domain objects and/or invoking methods
Method (computer science)
In object-oriented programming, a method is a subroutine associated with a class. Methods define the behavior to be exhibited by instances of the associated class at program run time...

 on those objects. This principle is also not unique to naked objects: it is just a specific interpretation of an object-oriented user interface
Object-oriented user interface
In computing an object-oriented user interface is a type of user interface based on an object-oriented programming metaphor. In an OOUI, the user interacts explicitly with objects that represent entities in the domain that the application is concerned with. Many vector drawing applications, for...

 (OOUI).

The original idea in the naked objects pattern arises from the combination of these two, to form the third principle:

3. The user interface should be created 100% automatically from the definition of the domain objects. This may be done using several different technologies, including source code generation; implementations of the naked objects pattern to date have favoured the technology of reflection
Reflection (computer science)
In computer science, reflection is the process by which a computer program can observe and modify its own structure and behavior at runtime....

.

The naked objects pattern was first described formally in Richard Pawson's PhD thesis which includes a thorough investigation of various antecedents and inspirations for the pattern including, for example, the Morphic
Morphic (software)
The name "Morphic" was taken from the Greek word "morph", its morphs taking on the role of "forms", the basic graphical building blocks in earlier Self systems and in Smalltalk MVC....

 user interface.

Naked Objects is commonly contrasted with the model-view-controller
Model-view-controller
Model–view–controller is a software architecture, currently considered an architectural pattern used in software engineering. The pattern isolates "domain logic" from the user interface , permitting independent development, testing and maintenance of each .Model View Controller...

 pattern. However, the published version of Pawson's thesis (see References) contains a foreword by Trygve Reenskaug
Trygve Reenskaug
Trygve Mikkjel Heyerdahl Reenskaug is a Norwegian computer scientist and professor emeritus of the University of Oslo. He formulated the model-view-controller pattern for Graphic User Interface software design in 1979 while visiting the Xerox Palo Alto Research Center...

, who first formulated the model-view-controller
Model-view-controller
Model–view–controller is a software architecture, currently considered an architectural pattern used in software engineering. The pattern isolates "domain logic" from the user interface , permitting independent development, testing and maintenance of each .Model View Controller...

 pattern, suggesting that naked objects is closer to the original intent of model-view-controller than many of the subsequent interpretations and implementations.

Benefits

Pawson's thesis claims four benefits for the pattern:
  • A faster development cycle, because there are fewer layers to develop. In a more conventional design, the developer must define and implement three or more separate layers: the domain object layer, the presentation layer, and the task or process scripts that connect the two. (If the naked objects pattern is combined with object-relational mapping
    Object-relational mapping
    Object-relational mapping in computer software is a programming technique for converting data between incompatible type systems in object-oriented programming languages. This creates, in effect, a "virtual object database" that can be used from within the programming language...

     or an object database
    Object database
    An object database is a database management system in which information is represented in the form of objects as used in object-oriented programming...

    , then it is possible to create all layers of the system from the domain object definitions alone; however, this does not form part of the naked objects pattern per se.) The thesis includes a case study comparing two different implementations of the same application: one based on a conventional '4-layer' implementation; the other using naked objects.

  • Greater agility, referring to the ease with which an application may be altered to accommodate future changes in business requirements. In part this arises from the reduction in the number of developed layers that must be kept in synchronisation. However the claim is also made that the enforced 1:1 correspondence between the user presentation and the domain model, forces higher-quality object model
    Object model
    In computing, object model has two related but distinct meanings:# The properties of objects in general in a specific computer programming language, technology, notation or methodology that uses them. For example, the Java objects model, the COM object model, or the object model of OMT...

    ling, which in turn improves the agility.

  • A more empowering style of user interface. This benefit is really attributable to the resulting object-oriented user interface
    Object-oriented user interface
    In computing an object-oriented user interface is a type of user interface based on an object-oriented programming metaphor. In an OOUI, the user interacts explicitly with objects that represent entities in the domain that the application is concerned with. Many vector drawing applications, for...

     (OOUI), rather than to naked objects per se, although the argument is made that naked objects makes it much easier to conceive and to implement an OOUI.

  • Easier requirements analysis. The argument here is that with the naked objects pattern, the domain objects form a common language between users and developers and that this common language facilitates the process of discussing requirements - because there are no other representations to discuss. Combined with the faster development cycle, it becomes possible to prototype functional applications in real time.

Limitations

The auto-generated OOUI
Object-oriented user interface
In computing an object-oriented user interface is a type of user interface based on an object-oriented programming metaphor. In an OOUI, the user interacts explicitly with objects that represent entities in the domain that the application is concerned with. Many vector drawing applications, for...

 is potentially suitable for sovereign applications but not for transient applications.

Software frameworks

There are now several software framework
Software framework
In computer programming, a software framework is an abstraction in which software providing generic functionality can be selectively changed by user code, thus providing application specific software...

s that implement the naked objects pattern:

Practical experience

The Department of Social Protection (DSP) (formerly known as the Department for Social and Family Affairs) in Ireland has built a suite of enterprise applications using the naked objects pattern. As part of its Service Delivery Modernisation (SDM) programme, the DSP designed a new enterprise architecture both to meet its planned new business requirements and to provide greater agility over the longer term. The naked objects pattern forms a key element of the SDM architecture. In November 2002, the DSP went live with a new application to replace its existing system for the administration of child benefit. This is believed to be the first operational application of the naked objects pattern, anywhere. The DSP's experience in building this first application, including the reactions of user to the radical user interface is documented extensively in Pawson's thesis., and more recently in a presentation at QCon London 2011.

One of the more striking aspects of the DSP experience was the way that the Naked Objects technique permitted re-use very actively. Once a domain object, such as a Customer, had been defined for one 'application' it could be (has been) readily adapted with the minimum of tweaking and addition for use elsewhere. This suggests that the approach could become a favourite in government circles, where re-use is seen as a powerful technique for breaking down siloed systems. The UK 'Transformational Government' policy is particularly keen to see re-use become a standard requirement of new government systems, both consuming other governmental system components and making new ones available for others to use. This re-use is often seen in terms of services, but objects could be an equally powerful approach.

The DSP's initial 'Naked Object Architecture' was developed by an external contractor, but the architecture was subsequently redeveloped around the Naked Objects framework, which now forms the basis for future application development, as confirmed in the request for tenders for a four-year programme of further applications to be built using naked objects.

Criticisms

The naked objects pattern has attracted a fair amount of criticism since the first public demonstration of the idea at the OOPSLA 2001 conference under the banner of Intriguing Technologies. This criticism has typically focused on one of three main areas:
  • The validity of aiming to encapsulate all business logic onto the domain objects. Arguments both for and against this idea may be found within the research literature for object-oriented programming
    Object-oriented programming
    Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...

     and domain-driven design
    Domain-driven design
    Domain-driven design is an approach to developing software for complex needs by deeply connecting the implementation to an evolving model of the core business concepts...

    .

  • The applicability of object-oriented user interfaces .

  • The usability of generic user interfaces.


None of these criticisms is unique to naked objects, but the fact that naked objects combines all three ideas gives it a higher profile.

Relationship to other ideas

The naked objects pattern has relevance to several other disciplines and/or trends, including:

Object storage mechanisms: Object-relational mapping
Object-relational mapping
Object-relational mapping in computer software is a programming technique for converting data between incompatible type systems in object-oriented programming languages. This creates, in effect, a "virtual object database" that can be used from within the programming language...

, object database
Object database
An object database is a database management system in which information is represented in the form of objects as used in object-oriented programming...

s, and object persistence
Object persistence
System prevalence is a simple software architectural pattern that combines system images and transaction journaling to provide speed, performance scalability, transparent persistence and transparent live mirroring of computer system state....

 are all concerned with eliminating the need to write a conventional Data access layer
Data access layer
A data access layer is a layer of a computer program which provides simplified access to data stored in persistent storage of some kind, such as an entity-relational database....

 underneath the domain objects. These patterns are complementary and potentially synergistic with the naked objects pattern, which is concerned with eliminating the need to write layers above the domain objects.

Agile software development
Agile software development
Agile software development is a group of software development methodologies based on iterative and incremental development, where requirements and solutions evolve through collaboration between self-organizing, cross-functional teams...

: Naked objects is compatible with the trend towards agile development methodologies in many different ways, but especially to fine-grained iterative development. The DSFA experience (described above) was probably also the largest application of agile software development techniques within a public-sector organisation, worldwide.
Domain-driven design
Domain-driven design
Domain-driven design is an approach to developing software for complex needs by deeply connecting the implementation to an evolving model of the core business concepts...

: Domain-driven design is the idea that an evolving domain (object) model should be used as a mechanism to help explore requirements rather than vice versa. The fact that a naked object system forces direct correspondence between the user interface and the domain model makes it easier to attempt domain-driven design, and makes the benefits more visible.
Model-driven architecture
Model-driven architecture
Model-driven architecture is a software design approach for the development of software systems. It provides a set of guidelines for the structuring of specifications, which are expressed as models. Model-driven architecture is a kind of domain engineering, and supports model-driven engineering of...

 (MDA): Although naked objects does not conform to the strict definition of MDA, it shares many of the same goals. Dan Haywood has argued that naked objects is a more effective approach to achieving those goals.

See also

  • Model-view-controller
    Model-view-controller
    Model–view–controller is a software architecture, currently considered an architectural pattern used in software engineering. The pattern isolates "domain logic" from the user interface , permitting independent development, testing and maintenance of each .Model View Controller...

  • Software architecture
    Software architecture
    The software architecture of a system is the set of structures needed to reason about the system, which comprise software elements, relations among them, and properties of both...

  • User interface
    User interface
    The user interface, in the industrial design field of human–machine interaction, is the space where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the...

    • Direct manipulation interface
      Direct manipulation interface
      In computer science, direct manipulation is a human-computer interaction style which involves continuous representation of objects of interest, and rapid, reversible, incremental actions and feedback. The intention is to allow a user to directly manipulate objects presented to them, using actions...

    • Graphical user interface
      Graphical user interface
      In computing, a graphical user interface is a type of user interface that allows users to interact with electronic devices with images rather than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and...

    • Interface metaphor
      Interface metaphor
      An Interface metaphor is a set of user interface visuals, actions and procedures that exploit specific knowledge that users already have of other domains. The purpose of the interface metaphor is to give the user instantaneous knowledge about how to interact with the user interface...

    • Object-oriented user interface
      Object-oriented user interface
      In computing an object-oriented user interface is a type of user interface based on an object-oriented programming metaphor. In an OOUI, the user interacts explicitly with objects that represent entities in the domain that the application is concerned with. Many vector drawing applications, for...

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK