Results 1 to 1 of 1

Thread: Recommended C++ QtWebApp architecture - more than just your tutorial

  1. #1
    Join Date
    Feb 2015
    Location
    Poland
    Posts
    34
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Exclamation Re: Recommended C++ QtWebApp architecture - more than just your tutorial

    Hi

    [[THIS POST IS BASED ON EMAIL I HAVE SENT TO AUTHOR OF QTWEBAPP. AS HE SEEMS TO BE UNABLE TO RESPOND FOR SOME REASON.]]

    I am fancy with C++, Qt, QtWebApp (http://stefanfrings.de/qtwebapp/index-en.html) and vision implementing www service using them. I want to write professional applications for my company. I want to introduce QWebApp to my boss as we will be started new projects soon.

    I study your tutorial carefully and make some trying to implement mock www computer shop (just for studding purposes).

    But I find some difficulties with this. I cover them in few points:

    1. I want to use in my www server self describing and search engines friendly directory names and page names. So: I suppose to have addresses like this: http://www.myshop.com/products/monit...rolite-x2485ws instead: www.myshop.com/products/93939303.html

    I suppose that the best idea is to have one template for www.myshop.com/products/monitors/ with out parameters, and two templates for every pages with some string after www.myshop.com/products/monitors/ in this case 'iiyama-prolite-x2485ws', as this will be showed in 2 modes: view (for customer) and edit (for operator).

    But I have no idea how to design paths in flexible and efficient way... I want many categories like monitors, keyboards, memories, processors, and so on. I suppose to have subcategories like producer/trade mark, so my url should be like this: http://www.myshop.com/products/monit...rolite-x2485ws. More! As you can see my monitor is belong to brand 'prolite', so maybe sensible will be to have urls like this: http://www.myshop.com/products/monit...rolite/x2485ws.

    How do you implement things like that?!?

    2. I want to have multinational www server so I suppose to have:
    http://www.myshop/en-GB/products/mon...rolite-x2485ws
    or
    http://www.myshop/de-DE/products/mon...rolite-x2485ws
    or
    http://www.myshop/pl-PL/products/mon...rolite-x2485ws
    How to you think: Is this good approach to internationalization?!? Have you any better ideas?!? Do you think urls should be translated also?!? I mean some thing like this:
    http://www.myshop/pl-PL/produkty/mon...rolite-x2485ws

    3. I want to write time and memory efficient, object oriented, modular C++ programs, but: QtWebApp is of course mutithreaded, I keep it in mind and store everything on stack (to avoid mutex lock). That is mean that I use only plain functions instead objects. You may be ask why?!? I want to avoid memory allocation for every browser call. I don't know how to approach to this problem. Should I write my own memory buffering allocation for used objects?!? I mean for example: overload new and delete operators for some www related classes and store memory (let say) 25 last deleted objects in each class, and return them immediately instead use system allocator?!?

    I suppose that good idea is: one class for one page, but I am not sure...

    4. In real www pages headers and footers are the same for most of the pages in the www service. This is mean, that I have join some how headers (with session, and basket, and search options, and language settings) with rest of the pages. Do you store each part of the page in separate template?!? Or maybe you join every pages offline and fill them always as one page?!? The second option will slightly speed up server (I suppose). The second option can be done by server at its start. Or maybe there is some other solution?!? Please share ideas...

    5. Plugins. Do you think is this sensible to implement www pages as qt plugins?!? I mean every page as plugin. I think this will be very cumber some (Qt Creator is very weak for multi projects systems), but maybe have some advantages like: good separations between pages, and possibility to adding new pages (or replace old one) in working server. The idea is that: to real directories (e. g. ~/www/pages/products/) add 3 plugins: 1) for list view, 2) for item view, 3 for edition. And 3 templates in directory ~/www/templates/en-GB/products/, and 3 others in ~/www/templates/de-DE/products/ and 3 others in ~/www/templates/pl-PL/products/

    How do you think about this?!?

    thank you in advance, and best regards

    Szyk

    ps. I wounder about how fast is QtWebApp compare to PHP - have you done some tests like this?!? Please share if so...


    Added after 1 45 minutes:


    Author of QtWebApp answered to my email today at 20:53. But your answers to this subject will be also appreciated.
    I am not sure he allow me to publish his answer.
    One of the issues arise is that I don't mentioned that I want to use QtWebApp for embedded environment.
    Fell free to join discussion.
    Last edited by Szyk; 20th May 2018 at 21:43.

Similar Threads

  1. Recommended structure of Qt-based software
    By Kryzon in forum Qt Programming
    Replies: 4
    Last Post: 28th February 2015, 17:56
  2. Your favourite/recommended third-party libraries
    By agarny in forum General Discussion
    Replies: 4
    Last Post: 27th January 2011, 12:38
  3. Recommended database driver
    By babygal in forum Qt Programming
    Replies: 1
    Last Post: 22nd July 2010, 07:58
  4. Recommended Update Procedure
    By GimpMaster in forum Installation and Deployment
    Replies: 9
    Last Post: 28th May 2009, 23:35
  5. Is it recommended to statically built Qt?
    By RThaden in forum Qt Programming
    Replies: 1
    Last Post: 21st July 2008, 21:23

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.