Obix: An Introduction



by Christian Neumanns

www.obix.lu



Welcome!

number of bugs = 0

Agenda


What is Obix? 5 min.
Why Obix? 10 min.
Simple examples 30 min.
Questions? 5 min.
+- 50 min.

What is Obix? (1/3)

What is Obix? (2/3)

What is Obix? (3/3)

Why Obix?

Why Obix?

Why Obix?

Why Obix?

Why Obix?

Why Obix?

Reliability: why it matters? (1/2)

Reliability: why it matters? (2/2)

Maintainability: why it matters?

Reliability: how to improve?

Unit-testing example


service string_utilities





      















end
		

Unit-testing example


service string_utilities

   command double_string



      













   end

end
		

Unit-testing example


service string_utilities

   command double_string
      in string type:string end

      out result type:string end
      













   end

end
		

Unit-testing example


service string_utilities

   command double_string
      in string type:string end

      out result type:string end
      
      script
         o_result = i_string & i_string
      end










   end

end
		

Unit-testing example


service string_utilities

   command double_string
      in string type:string end

      out result type:string end
      
      script
         o_result = i_string & i_string
      end

      test







      end
   end

end
		

Unit-testing example


service string_utilities

   command double_string
      in string type:string end

      out result type:string end
      
      script
         o_result = i_string & i_string
      end

      test
         script





         end
      end
   end

end
		

Unit-testing example


service string_utilities

   command double_string
      in string type:string end

      out result type:string end
      
      script
         o_result = i_string & i_string
      end

      test
         script
            test "a"                      // call command double_string with i_string = "a"
            verify v_result =v "aa"       // verify result is "aa"



         end
      end
   end

end
		

Unit-testing example


service string_utilities

   command double_string
      in string type:string end

      out result type:string end
      
      script
         o_result = i_string & i_string
      end

      test
         script
            test "a"                      // call command double_string with i_string = "a"
            verify v_result =v "aa"       // verify result is "aa"

            test "YaJUG is great!"
            verify result =v "YaJUG is great!YaJUG is great!"
         end
      end
   end

end
		

Reliability: how to improve?

Reliability: how to improve?

'Fail fast' rule ignored!

'Fail fast' rule ignored!

...

'Fail fast' rule ignored!

...

coding error:

'Fail fast' rule ignored!

...

coding error:
...

Javascript 'try to continue' example

var product = {
   identifier : 123,
   description: "banana",
   price      : 50
}

Javascript 'try to continue' example

var product = {
   identifier : 123,
   description: "banana",
   price      : 50
}

alert(product.description) // displays: banana

Javascript 'try to continue' example

var product = {
   identifier : 123,
   description: "banana",
   price      : 50
}

alert(product.description) // displays: banana

product.desciption = "apple"
alert(product.description) // displays: banana

Javascript 'try to continue' example

var product = {
   identifier : 123,
   description: "banana",
   price      : 50
}

alert(product.description) // displays: banana

product.desciption = "apple"
alert(product.description) // displays: banana

alert(product.desciption)  // displays: apple

Javascript 'try to continue' example

var product = {
   identifier : 123,
   description: "banana",
   price      : 50
}

alert(product.description) // displays: banana

product.desciption = "apple"
alert(product.description) // displays: banana

alert(product.desciption)  // displays: apple

alert(product.foo)         // displays: undefined

A simple example

A simple example

A simple example

A simple example

A simple example

A simple example

A simple example

Some conveniences

Some conveniences

'Fail fast!' support

'Fail fast!' support

More 'fail fast' support

Contract programming (Design By Contract)

3 important questions

People only use things if they are easy to use!

Date


type date

   attribute year
   attribute month
   attribute day

end

Date


type date

   attribute year  type:positive32 end
   attribute month type:positive32 end
   attribute day   type:positive32 end

end

Date


type date

   attribute_list type:positive32

      attribute year  end
      attribute month end
      attribute day   end

   end

end

Date


type date

   attribute_list type:positive32

      attribute year  end
      attribute month check i_month <= 12 end
      attribute day   check i_day <= 31 end

   end

end

Date


type date default_factory:yes

   attribute_list type:positive32

      attribute year  end
      attribute month check i_month <= 12 end
      attribute day   check i_day <= 31 end

   end

end

Date










const date delivery_date = fa_date.create ( &
   year  = 2008 &
   month = foo &
   day   = 1 )

Date


var positive32 foo

...





const date delivery_date = fa_date.create ( &
   year  = 2008 &
   month = foo &
   day   = 1 )

Date


var positive32 foo

...

foo = elephant.age

...

const date delivery_date = fa_date.create ( &
   year  = 2008 &
   month = foo &
   day   = 1 )

Feature redefinition in child type

Feature redefinition in child type

Feature redefinition in child type

Delivery date

Conclusion

The aim of Obix is to help programmers to write more reliable and maintainable code through a unique combination of proven and innovative concepts which all support the important Fail fast! rule.

Experience shows that the Fail fast! rule increases productivity and reduces costs for software development.

Typical application

Questions?

Thank you!