Is this architecture RIGHT?



  • Hi,

    The scenario.

    The app is for displaying the maps. The basic functionalities are included like Login/List of Maps Display / Download & DisplayMaps / UserAccessRoles etc.,
    The way I designed architecture, Login.qml for user authentication, Listportal.qml for listing the maps according to user access levels.
    Login.qml/ListPortal.qml will call HomeController.cpp and pass the data. Then HomeController.cpp will decide which class should be called like utility.cpp/model.cpp/ReadWritexml.cpp

    The results will be passed from utility.cpp/model.cpp to HomeController and to Login.qml/ListPortal.qml. I thought about the advantage, Home controller can save the information using Qsettings like username etc., so that time will be saved.

    Am I doing the right architecture? Do we need anything more or less like interface/abstract class should be implemented? I am very much concern about the performance and memory.

    Thanks in advance.


  • Moderators

    @Mathan-M
    It looks kind of correct IMO.

    Do we need anything more or less like interface/abstract class should be implemented?

    Does your classes have a common protocol or perhaps functions which are very critical and needs to be implemented compulsarily in subclasses ? If yes then it makes sense to use interfaces or abstract classes.

    I am very much concern about the performance and memory.

    Since you use QML dont worry about graphics performance , they all will be optimized due to harware rendering.
    In other cases for eg. your business logic which will be on CPP side its your duty how to optimize the memory usage and performance. Qt will handle deletion of objects on exit as long as to pass proper parents to your objects. The remaining stuff is upto you. Profile your application during each development phase. Analyse each segment if required and look for ways to optimize it.



  • @p3c0

    Thanks a Lot.

    As you said, I will use the profiler now and then.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.