Model-View-Controller (MVC) have made our work so much easy. before this coding were too much congested. business logic and design were in same file. imagine how it was. well now we have MVC Structure in all(Many of them) programming language. In which we have different files for different purpose. but still few things you have to consider if you want clean and nit code.
well, what are those things ?
If your app have user interface mobile or web interface the first thing i think most important for you.
1. Font Size
Define font size for Header, labels and detail text. what ever app you have you may require decent and same look through out the app. so this will help you. one more thing define them in Constant Class(where you can define all static and Constant variables) so you can use them through out the app. and please use even proper name also. like header_text_size or text_header_size so you can even recognize for long time.
2. Padding / Margin
One more thing you have to consider for app style and for its decent look.
well you are thinking how ?
After above steps create a style according to you app colors (Theme). so if your client want to change theme you just have to change at one place no more
Ctrl + f for old color code and replace it with new.
4. Define Constants or Strings
You may require text like "OK" , "Save" , "Yes/No" at many place so why to write it again and again. define them once and use them through out the app. this will even help when your app is in two or more languages. so according to language you can change them.
5. Use access specifier
Private, protected, public these are the access specifier which acts like a guard. how ?
In hacking or spiffing hackers use programs which can change values of your app variables. but if you have defined access specifier before variable declaration, they are not acceessible by out side the class. So they can not change the value of that. so if you know scope of the variable define them with appropriate access specifiers.
Give or write proper comments for each class or method that you have defined or created. now a days editor have so many plugins which auto generate comment block so use them. you are not only working on the app or you may not work it on life time so your code must be understandable by others. so that proper comments require which clarify what it actually do.
7. Create proper directory structure
Now a days MVC have already separated our files but still we require some files to put in different folders. like in web app we have java script and css file so put them in different folders.
in mobile app create different folders for activities and services and for all others so if any error or change comes you can directly go there and find problem/change.
8. Background colors
Don't use dark or gradient colors as background use light or single color as a background. mostly we use white or light gray as a background. you can give all effects with this color and even it is more acceptable. as it will effect user experience and you may see dig ration in your app popularity.
Well these all are the points which is based on Kiss(Keep it Simple stupid). i hope you know it.
well i think i have covered all basics that you need to consider before creating any app weather it is web app or mobile app. if i forgot any point let me know in below comment box. i am really happy to know your thoughts on this article.
If you liked my blog please share and subscribe with it.