Results 1 to 3 of 3

Thread: Application 3-tiers (multi layers)

  1. #1
    Join Date
    Jan 2008
    Location
    Brasil
    Posts
    131
    Thanks
    18
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Application 3-tiers (multi layers)

    Hi friends,

    I'm developing an application that supports the database Firebird. QT4 can make an application with multi-layers (3 layers or 3 tiers). How would the return of data from a QTableView? I have little doubt, is the QtSql module supports multi tiers? Examples are welcome.

    Thanks,

    Marcelo E. Geyer

  2. #2
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Application 3-tiers (multi layers)

    first: what constitutes a layer is kind of abstract and subject to personal interpretation.

    A QTableView displays data of a "model". These models can be layered (through proxy models). How the data gets into the "base" model, is up to you. You might use a QSqlTableModel, or you might communicate with the db through custom classes (lots of room for layers there, too):
    How many models (or other layers) you put between the db and your view, is up to you.

    I suggest you describe what you plan to achieve, and then we can suggest a (or critique your) design for that goal.
    The number of layers is rather immaterial imo. Just try to think of "separation of concerns", i.e. separate db access logic from user interface logic etc and you should be fine.

  3. #3
    Join Date
    Jan 2008
    Location
    Brasil
    Posts
    131
    Thanks
    18
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Application 3-tiers (multi layers)

    Hi,

    The idea is to improve the performance especially when access to the database is through the internet and try to separate the interface of the client to the database, as you mentioned.
    Thought to start porting to 3 layers, following this structure:

    Database <---> App Server <---> LAN/WAN/Others <---> App client

    Thanks,

    Marcelo E. Geyer

Similar Threads

  1. Multi Window Application in QT/C++
    By pshah.mumbai in forum Newbie
    Replies: 8
    Last Post: 8th July 2008, 17:21

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.