New in IOC and AOP

11 views
Skip to first unread message

puneet sharma

unread,
Jul 19, 2016, 2:30:47 PM7/19/16
to cujojs
Hi guys,

I am new in IOC and in AOP development. I started looking for wire specs and find out some interesting concepts. but I am having some doubts 
Ex.
main.js
define({
contacts: {wire:'app/spec'},
editView: {
render: {
template: { module: 'text!app/template.html' },
replace: { module: 'i18n!app/strings' }
},
insert: { after: 'dom.first!#contrainer' },
on: {
'submit': 'form.getValues | contacts.update'
},
connect: {
'contacts.onChange': 'reset'
}
}
})

spec.js

define({
  contacts: {
create:{},
before: {
add: 'cleanContact | generateMetaData',
update:'cleanContact | generateMetaData'
},
after: {
update:'cleanContact | generateMetaData'
}
},
})

I have few doubts related to main.js

1: what is contacte.update and when I am trying to put an alert in cleanContact method, its not poppingup while clicking on submit button.
2: If my application have 10 area , will I have 10 seperate main.js?
3: what about subView? how to wiredup subviews?
4: To perform data binding( thru cola.js) do we need to create seperate spec.js or can it be a part of main.js?

Appreciate the reply

Reply all
Reply to author
Forward
0 new messages