Twitter LinkedIn E-mail RSS
Home Development Abstraction, Refactoring and the Model View Controller using Titanium PT2.

Abstraction, Refactoring and the Model View Controller using Titanium PT2.

AppceleratorThe second post in the series is going to layout what is to come. Covering the processes and terminology that will be used.


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.

Oh not wikipedia, this time CommonJS site. To see how it is used within titanium visit the appcelerator wiki page

Appcelerator TitanWhat else should you know before reading the next posts.

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:

Part 1
Part 2

 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
2 Comments  comments 

2 Responses

  1. Good to see ya at Titanium London earlier on this week and looking forward to future posts!

  2. how come some blogs in a blogroll do not have their most recent post listed and others do? How to change that?