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







service string_utilities
end
service string_utilities
command double_string
end
end
service string_utilities
command double_string
in string type:string end
out result type:string end
end
end
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
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
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
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
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
var product = {
identifier : 123,
description: "banana",
price : 50
}
var product = {
identifier : 123,
description: "banana",
price : 50
}
alert(product.description) // displays: banana
var product = {
identifier : 123,
description: "banana",
price : 50
}
alert(product.description) // displays: banana
product.desciption = "apple"
alert(product.description) // displays: banana
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
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
type product
end type
type product
attribute identifier
end type
type product
attribute identifier type:positive32 end
end type
type product
attribute identifier type:positive32 end
attribute description type:string end
end type
type product
attribute identifier type:positive32 end
attribute description type:string end
attribute vendor type:string end
end type
type product
attribute identifier type:positive32 end
attribute description type:string end
attribute vendor type:string end
attribute price type:zero_positive32 end
end type
type product default_factory:yes
attribute identifier type:positive32 end
attribute description type:string end
attribute vendor type:string end
attribute price type:zero_positive32 end
end type
var product banana = fa_product.create ( &
identifier = 123 &
description = "banana" &
vendor = "Best fruits" &
price = 50 )
var product banana = fa_product.create ( 123, "banana", "apple", 50 )
var product banana = fa_product.create ( &
identifier = 123 &
description = "banana" &
vendor = "apple" &
price = 50 )
var product banana = fa_product.create ( &
...
price = 50 )
var product banana = fa_product.create ( &
...
price = void )
var product banana = fa_product.create ( &
...
price = foo.bar )
type product default_factory:yes
...
attribute price type:zero_positive32 voidable:yes end
end type
type product default_factory:yes
attribute identifier type:positive32 end
attribute_list kind:variable setable:all
attribute description type:string end
attribute vendor type:string end
attribute price type:positive32 end
end attribute_list
end type
type product default_factory:yes
attribute identifier type:positive32 &
check: i_identifier >= 10000 and i_identifier <= 99999 end
attribute description type:string &
check: i_description.item_count >= 5 end
...
end type
type date
attribute year
attribute month
attribute day
end
type date
attribute year type:positive32 end
attribute month type:positive32 end
attribute day type:positive32 end
end
type date
attribute_list type:positive32
attribute year end
attribute month end
attribute day end
end
end
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
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
const date christmas_2008 = fa_date.create ( &
year = 2008 &
month = 12 &
day = 24 )
const date delivery_date = fa_date.create ( &
year = 2008 &
month = foo &
day = 1 )
var positive32 foo
...
const date delivery_date = fa_date.create ( &
year = 2008 &
month = foo &
day = 1 )
var positive32 foo
...
foo = elephant.age
...
const date delivery_date = fa_date.create ( &
year = 2008 &
month = foo &
day = 1 )

type month
inherit positive32
attribute value and_check: i_value <= 12.value end
end
end type
type month
inherit positive32
attribute value and_check: i_value <= 12.value end
end
end typetype date default_factory:yes
attribute year type:positive32 end
attribute month type:month end
attribute day type:positive32 end
endtype day_of_month
inherit positive32
attribute value and_check: i_value <= 31.value end
end
end typetype date default_factory:yes
attribute year type:positive32 end
attribute month type:month end
attribute day type:day_of_month end
end
var positive32 foo = ...
const date delivery_date = fa_date.create ( &
year = 2008 &
month = foo &
day = 1 )type delivery_date
inherit date
attribute day and_check: not i_day.is_first_day_of_month end
end
endtype product default_factory:yes
attribute identifier type:positive32 end
attribute description type:string end
attribute vendor type:string end
attribute price type:zero_positive32 end
attribute first_delivered type:delivery_date end
end typeThe 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.

Thank you!