MVC stands for Model View Controller. This is best explained by somebody other than me so here is a link to Wikipedia.
To firstly understand the code architecture is a must. Reading up on MVC will enable you to see how I have implemented it and either see flaws or find a way which better suits you.
I can best describe abstraction as writing a chunk of code in a procedural manner, realising that this code can be used elsewhere and then creating a common function to enable reuse. Sounds simple and in reality it is, the hardest part is deciding where to put this new function in the code architecture.
And wikipedia once again explains it far better than me.
A term used to describe the way you change code. My take on this is it refers to either changing names of functions or variables to better fit the naming convention of the application and moving code into different sections (files) as it is more appropriate in that place. Again a nice simplistic description but the hard part is naming and placing.
And yes were off to wikipedia again.
When you have the application code architecture then the naming conventions and function locations becomes apparent.
Titanium has an implementation of commonJS and I have just refactored my code architecture to use this. It wasn’t implemented when the project was developed using these principles but it will be used in the example code.
Well an understanding of coding and the Titanium framework would help. If you have not used Titanium before please go to the appcelerator wiki and read the Quick start guide. This wiki is also essential reading and reference material going forward. If you get stuck or just want clarification there is a really good, friendly and experienced community, ready and willing to help at the appcelerator Q & A forum.
In the next post we will start to get into the code structure.
Articles in this series: