JavaScript MVC frameworks
Has anyone successfully used existing JavaScript MVC frameworks, such as JavaScriptMVC, PureMVC, or SproutCore to build Titanium apps for Desktop or Mobile? Is this even a good idea, or would it be too hard to adapt them (especially for mobile).
5 Answers
-
Ive used pureMVC successfully. works just fine. There are some tweaks you need to do though. More info here
-
I'm not sure about adapting an existing MVC framework, but I have successfully built one for use in Ti. For me, it's the best way to organize and optimize large projects.
For example, one project has around 25 views, with well over a hundred UI elements and several modules (XML, network, media, etc). It runs fast and is efficient across devices. Plus, it's largely modular, which let's me re-use chunks of code to quickly build additional features that already have cross platform support.
So, yeah. I'd look into it if I were you.
-
In looking for an MVC-esque way to organize Titanium apps, I came across this helpful thread: http://stackoverflow.com/questions/2573592/how-to-organize-js-files-in-a-appcelerator-titanium-project/2594227#2594227
-
You could also go about writing your own framework, however this would require a lot of time and attention to detail.
I am currently in the stages of progressing a framework for Titanium using the model and controller methods. Because views and controllers are so closely implemented in Titanium it's best to keep them together but with some logic between the two.
When the next version of CarPro is released I am looking at releasing the framework as open source, I will be happy to updated you when done.
-
Yes, I did.
Today I have built the JavascriptMVC Cookbook (sample application) on Titanium Desktop using the 1.1.0 SDK.