Reputation: 65077
Views and controller,
In titanium do you normally have 1 controller per view? or 1 controller per group of views?
You have a form, PageX_Detail, PageX_Confirm, and PageX_Results.
In this case would you create 3 views and 3 controllers or 3 views and 1 controller?
Upvotes: 2
Views: 371
Reputation: 76
I think it's best to have one controller per the group of views.
Titanium applications currently don't typically follow a strict MVC structure (although Appcelerator is working on an MVC framework for use with Titanium called Alloy).
The most popular ways to organize Titanium applications that I've discovered are:
1) The Tweetanium style, where a global namespace contains application-wide functionality and a main window hosts each application view.
Or, my favorite (and the most Appcelerator-supported way),
2) The CommonJS approach and the use of require()
instead of the deprecating Ti.include()
Upvotes: 2