I felt that the transition to the titanium alloy from the classics suits me. I felt that the classic development of Titanium was not structured enough and did not give me enough guidance for a good way to structure my application. Alloy provides an MVC structure for your code, but the classic does not completely prevent you from rolling back on your own or using one of the community libraries with MVC capabilities. In this regard, I think I would say that it is more flexible to use the classics over the alloy, because you can choose how to fulfill your structure, rather than embed it in the structure of a titanium alloy. That being said, I never felt confined by the Fusion.
How you develop in Titan is your preference. There is no right answer to using alloy or using classics. If someone works better for you, use it. I feel that a structured approach to separating Alloy display and business logic provides me with a structure that makes sense to me when developing the application.
I did not find that the alloy is less flexible than the classic. Since you can use the classic code in your Alloy project, you can pretty much do everything in the alloy that you can in the classic. I am sure that these are some cases with edges that I have not encountered when one may be simpler than the other when coding a certain type of application. Maybe the classics are less flexible because I don’t think you can use Alloy in your classic application. I don't think the compiler would know how to do this.
Whenever I evaluate whether I will use a specific technology, I make a series of experimental mini-programs to make sure that all the features are present in my applications. If I feel that it is not suitable or too difficult to achieve these requirements, I do not use this technology. For example, when I switched to Alloy, I made sure that the Ti.Paint library would still work. If this were not so, I would still use the classics.
Like the classic, there are controls for Alloy. There is already a pretty smooth splice menu for a sliding menu. I use the Ti.Paint library, which existed before the alloy and is not a special alloy module.
http://gitt.io/ is a decent starting point for finding alloy modules / widgets.
index.xml
<Alloy> <Window id="win"> <View id="content" /> </Window> </Alloy>
1) In your index.js file, you have the following to use classic encoding to control the Fusion view.
index.js
var myview = Ti.UI.createView({ backgroundColor: 'green' }); $.content.add(myview);
2) I do not think that you can use splice code in your classic project. As you mentioned earlier, it should do the code translation, and the classic project will probably skip this step in the process.
3) You ask if you can include or remove parts of the code based on if it is Android or iOS? You could probably do this with include / require statements strategically placed between if (Ti.Platform.osname == "android") statements that require or don't require code. If the code is for Android, this requires this, if it is for iOS, this is required.
4) Never tried to test the performance between classic and splicing projects. I think, since I switched and never noticed the problem that bothered me or my clients, I never thought about it. It is possible that Alloy will automatically generate code, which in some cases is slower. I have never noticed this.
I feel that the efficiency that I find in using Alloy far outweighs this as an immediate problem. Plus, if I felt that I didn’t like the way the special control was created through Alloy, I could use the classic code and determine that the control itself has control over the classic project.