0

I don't get completly the architecture of Titanium Alloy. Maybe someone can explain it better or draw me a picture? :)

What I understood is that it is a mvc architecture but not in the "basic" way... The Model is only a blueprint for the intern SQLite database. The Backbone Model also can be extended to check for correct input and duplicates. To synch with the extern the Controller is used. At least all the examples I found did that. And the View is basic with Titanium Style Sheets.

fr34ky
  • 3
  • 1
  • 2

2 Answers2

0

Unfortunately you have a very terse, incomplete understanding of what Alloy is, what it does, and how it does it. Fortunately for you though, there's is extensive and complete documentation that covers all this in guide form. Answers to all these high level architecture questions and more can be found here: http://docs.appcelerator.com/titanium/latest/#!/guide/Alloy_Framework

Tony Lukasavage
  • 1,937
  • 1
  • 14
  • 26
0

Well Alloy is indeed a framework that is based on the MVC architecture, maybe what you need is to get some insight on the design goals of MVC and how they can be achieved using the separate roles for each unit of software. Here is a very good article I would recommend: http://blog.codinghorror.com/understanding-model-view-controller/

The fact that you can specify view structures using only xml files and styling using only static properties means that Alloy is a very well implemented MVC framework as it does not allow you to mix the responsibilities of each role.

My 2 cents of understanding Alloy:

  • controller.js Here place only code that handles ui element events such as clicks, taps and so on. Your controller should pick up an event and call a method belonging to some external common.js module that you should require using require(). It is fully supported in Alloy.

  • view.xml Here you only specify the tree structure of your ui elements. This means what component belongs where and to which other component.

  • style.tss Here you should specify anything that has to do with colors, position, layout etc.

Vasilis
  • 107
  • 1
  • 4