Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Brainstorm
  4. Qt with a Rails like MVC
QtWS25 Last Chance

Qt with a Rails like MVC

Scheduled Pinned Locked Moved Brainstorm
7 Posts 5 Posters 8.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    viniciustinti
    wrote on last edited by
    #1

    Hello,

    Does anyone have ever seen Ruby on Rails in action? It's just amazing, I was thinking about in something similar for Qt. Like just a script to do what "scaffold" does. I really want to discuss about implement it, I believe that it will help a lot in some cases. At least, I want to implement "active record" pattern.

    Examples:

    • http://media.rubyonrails.org/video/rails_blog_2.mov
    • http://en.wikipedia.org/wiki/Active_record_pattern

    Att,
    Tinti

    1 Reply Last reply
    0
    • C Offline
      C Offline
      croland
      wrote on last edited by
      #2

      Hey Tinti,

      I think using MVC for Qt is an interesting idea. I posted not long ago about using Domain Driven Design with Qt and even though they are a little different, they both are striving to reach the same goal. To use current application development practices with Qt and to make life happier.

      I've created simple apps using the active record pattern, but I think with the capabilities Qt gives you, a "Model View ViewModel(Model View ViewModel)":http://en.wikipedia.org/wiki/Model_View_ViewModel with DDD might be a better mix. I know MVVM is used primarily with .NET development :), but I see it as a perfect match with Qt. I'm actually going to work on a simple app using this approach, so I'll see if it really fits.

      I think extending qmake to do what rake does would also be interesting. I wonder if it already has features that can be used to create a scaffold like environment.

      If all else fails, have you tried out "QtRuby(QtRuby)":http://techbase.kde.org/Development/Languages/Ruby ? I've seen several blog and forum posts where people use ActiveRecord without rails and use QtRuby instead. Cool thing is you are still able to use rake.

      Chris

      1 Reply Last reply
      0
      • V Offline
        V Offline
        viniciustinti
        wrote on last edited by
        #3

        Hi,

        Thanks for the answer. I have never tried QtRuby, it seams to be good. However, I believe that Qt should have his own tools for that. Even in a separated project or library for a while, if it gets popular it after could be build-in like another frameworks. I will read about MVVM, currently I use MVC, might be a good choice.

        Regards,
        Tinti.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          declanmcgrath
          wrote on last edited by
          #4

          Hi Tinti,

          I've been working on a project, Qt on Rails, which combines Qt with a Rails back end (through the QtRuby bindings which Chris mentioned). The end result is that you can develop your Qt app's in Ruby, harness the libraries of Rails and there's support for scaffolding on apps as well.

          It's still a 'Work In Progress' but the current latest version at http://github.com/theirishpenguin/qtonrails will certainly give a flavour of where the project is headed. Contributors and feedback is most welcome and detailed blog post is available at http://www.theirishpenguin.com/2010/06/21/qt-on-rails-v0-1-released-but-is-this-ruby-based-qt-and-kde-app-framework-doomed

          All the best,
          Declan

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tobias.hunger
            wrote on last edited by
            #5

            What kind of scaffolding would you like to have? If you can propose a good structure we might be able to incorporate such a scaffolding into creator or some other tool:-)

            1 Reply Last reply
            0
            • D Offline
              D Offline
              declanmcgrath
              wrote on last edited by
              #6

              That scaffolding in Qt on Rails would, given a Rails app, take that app and generate a Ruby-based Qt app. The command would look something like

              ./script/generate qtify Model1 Model2

              ... where Model1 and Model2 are models in your Rails app that would like to be ported to Qt app.

              It's an area I must do some work on - particularly with Rails 3 on horizon!

              All the best,

              Declan

              1 Reply Last reply
              0
              • cybercatalystC Offline
                cybercatalystC Offline
                cybercatalyst
                wrote on last edited by
                #7

                I am developing a framework that works similar like rails in Qt:
                https://github.com/cybercatalyst/qtwebserver

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved