These days we are doing an audit on a project where several technologies converge front-end. The truth is that it is a very interesting project because beyond the standard binomial apps (Android / iOS), also live in this ecosystem, an app in Windows 8, a web application and a desktop. As I said, it’s a very interesting challenge.
[Infobox bgcolor = “# eeeee5″ textcolor = “# 807f7a”] In summary, our proposal will be to harmonize the architectural vision of the front-end, that is, to agree to all the teams to align the logical architecture. [/ Infobox]
[One_half] At this point, the question is “what logical architecture using”. After solving this problem, we will solve other implementation, but would talk overcoat issues “technology mapping”. [/ One_half]
Some basic concepts of terminology frontend you should review
[/ One_half]
Before remember that our chances today in front-end architecture, or at least which have seemed more convenient priori. We evaluated the following:
[Tabs tabs = “MVC (Model-View-Controller), MVP (Model-View-Presenter)”] [tab title = “MVC (Model-View-Controller)”]Model-View-Controller[/ Tab] [tab title = “MVP (Model-View-Presenter)”]Model-View-Presenter[/ Tab] [/ tabs]
In the case of Android, which is where we will begin implementation, we have decided for Model-View-Presenter and we made a small architectural spike, which have risen to github .
Apart from some peculiarities as the fact of using maven to build android, which lays the foundation for self-construction in the continuous integration server and use a project instrumentation and test integration android, the highlight is separating the presenter in another module.
I see only advantages:
[List style = “list-img4″] By separating the android project module, forcing me to encapsulation and guidance to domain contracts (interfaces) well defined. [/ List] [list style = “list-img4″ ] Separating compile not only get faster feedback to improve not link me to the android virtual machine but can also more easily reuse the module, not only in android. [/ list] [list style = “list-img4″] If I have a presenter where domain logic is, this logic can re-use any technology. It is true that it will not be easy (use of wrappers, adapters, exports, etc …) but I will save much time. [/ List] [list style = “list-img4″] This avoids duplication maximum plus frees the (native in all cases) view of the coupled code is not required. [/ list] [list style = “list-img4″] When defining a contract know if anything responsibilities and lays the basis for implementing “interface segregation”. [/ list] [list style = “list-img4″] As delegate the responsibility to build an actor (maven) … own construction repetitive tasks (signature, alignment, ran obfuscation, packaging, publishing, etc ..). Needless to say that human error is minimized to the maximum. [/ List] [list style = “list-img4″] I open the door to use more advanced ways to approach components, for example, building as “apklib” and sharing the library, this is a more advanced expression of the concept DRY (Do not Repeat Yourself), one of the mantras of Agile . [/ list] [list style = “list-img4″] The best for last … this is highly testable, which will reduce bugs, learn to second if I break something and I’ll increase functional scalability, ie the TimeToMarket since receiving the instruction to create a new feature until this functionality is actually usable by user (and gives value). [/ list]