rawjeev's techposts

  • Random
  • Archive
  • RSS
  • Ask me anything
The proverb ‘owning a hammer doesn’t make one an architect’ is especially true with respect to object technology. Knowing an object-oriented language (such as Java) is a necessary but insufficient first step to create object systems. Knowing how to ‘think in objects’ is critical!
Craig Larman. (Applying UML and Patterns)
    • #oo
    • #programming
    • #software
    • #engineering
    • #agile
  • 2 years ago
  • Comments
  • Permalink
  • Share
    Tweet
Although inheritance gets a lot of emphasis while learning OOP, it doesn’t mean that you should use it everywhere you possibly can. On the contrary, you should use it sparingly, only when it’s clear that inheritance is useful. One of the clearest ways to determine whether you should use composition or inheritance is to ask whether you’ll ever need to upcast from your new class to the base class. If you must upcast, then inheritance is necessary, but if you don’t need to upcast, then you should look closely at whether you need inheritance.
Bruce Eckel (Thinking in Java, 3rd Edition)
    • #OO
    • #gyan
    • #quote
  • 2 years ago
  • Comments
  • Permalink
  • Share
    Tweet

Aggregation in OOD

If the composition happens dynamically, it’s usually called aggregation.

-Bruce Eckel

Think of it as a modeling placebo.

-James Rumbaugh

Aggregation is strictly meaningless; as a result, I recommend that you ignore it in your own diagrams.

-Martin Fowler

    • #quote
    • #gyan
    • #OO
  • 2 years ago
  • Comments
  • Permalink
  • Share
    Tweet

OO design vs Ontology modelling

You should be very afraid of classes that are nothing but a collection of fields and their accessors. Object-oriented design is about providing objects that are able to do rich behavior, so they shouldn’t be simply providing data to other objects. …

-Martin Fowler (UML Distilled, 3rd Edition, Chapter 3)

When we consider OWL/RDFS, where Classes are void of behavior and Properties stand independent from specific classes, the statement above gives us a hint to how Object-oriented design differs from Ontology design and the shift in the thought process that is required. Even though there are many overlaps in terminology/concepts of OO design and Ontology modeling (based on RDFS/OWL), I would like to say that Ontology design is more closer to Data modelling.

(I reserve all rights to change my opinion though.)

-Rawjeev

    • #ontology
    • #OO
    • #opinions
    • #semanticweb
    • #thoughts
    • #tech
  • 2 years ago
  • Comments
  • Permalink
  • Share
    Tweet

A Comparison of OWL/RDF and Object-Oriented Languages

Summarizing the introduction of RDF and OWL, the following table shows important differences and similarities between Semantic Web languages and object-oriented languages:

Object-Oriented Languages
OWL and RDF
Domain models consist of classes, properties and instances (individuals). Classes can be arranged in a subclass hierarchy with inheritance. Properties can take objects or primitive values(literals) as values.

Classes and Instances
Classes are regarded as types for instances. Classes are regarded as sets of individuals.
Each instance has one class as its type. Classes cannot share instances. Each individual can belong to multiple classes.
Instances can not change their type at runtime. Class membership may change at runtime.
The list of classes is fully known at compile-time and cannot change after that. Classes can be created and changed at runtime.
Compilers are used at build-time. Compile-time errors indicate problems. Reasoners can be used for classification and consistency checkingat runtime or build-time.

Properties, Attributes and Values
Properties are defined locally to a class (and its subclasses through inheritance). Properties are stand-alone entities that can exist without specific classes.
Instances can have values only for the attached properties. Values must be correctly typed. Range constraints are used for type checking.

Instances can have arbitrary values for any property. Range and domain constraints can be used for type checking and type inference.

Classes encode much of their meaning and behavior through imperative functions and methods. Classes make their meaning explicit in terms of OWL statements. No imperative code can be attached.
Classes can encapsulate their members to private access. All parts of an OWL/RDF file are public and can be linked to fromanywhere else.
Closed world: If there is not enough information to prove a statement true, then it is assumed to be false. Open world: If there is not enough information to prove a statement true, then it may be true or false.

Role in the Design Process
Some generic APIs are shared among applications. Few (if any) UML diagrams are shared. RDF and OWL have been designed from the ground up for the Web. Domain models can be shared online.
Domain models are designed as part of a software architecture. Domain models are designed to represent knowledge about a domain,and for information integration.
UML, Java, C# etc. are mature technologies supported by many commercial and open-source tools. The Semantic Web is an emerging technology with some open-source tools and a handful of commercial vendors.

Miscellaneous Features
Instances are anonymous insofar that they cannot easily be addressed from outside of an executing program. All named RDF and OWL resources have a unique URI under which they can be referenced.
UML models can be serialized in XMI, which is geared for exchangeamong tools but not really Web-based. Java objects can be serialized intovarious XML-based or native intermediate formats. RDF and OWL objects have a standard serialization based on XML, with unique URIs for each resource inside the file.

Source: A Semantic Web Primer for Object-Oriented Software Developers

    • #semanticweb
    • #oo
  • 2 years ago
  • Comments
  • Permalink
  • Share
    Tweet

About

Avatar For posts that are techy / matters a little grey that I din't want to be drowning in randomness.

Home Page     Rawjeev's Randoms

Me, Elsewhere

  • @rawjeev on Twitter
  • Facebook Profile
  • raw2ube on Youtube
  • rawjeev on Flickr
  • rawjeev on Delicious
  • Linkedin Profile
  • rawjeev on github

Twitter

loading tweets…

  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr