Lectures Tracker (Simple Mobile Application Using RingQt)

181 views
Skip to first unread message

Mahmoud Fayed

unread,
May 6, 2024, 7:48:22 PM5/6/24
to The Ring Programming Language
Hello

Application: Lectures Tracker 
Description: Simple Mobile Application Using RingQt - An example about using Web API


Screen Shot:
screenshot.png

Greetings,
Mahmoud

Mansour Ayouni

unread,
May 9, 2024, 3:52:24 AM5/9/24
to Mahmoud Fayed, The Ring Programming Language
Hello Mahmoud,

A tiny but really instructive example, both at the design level and on the strategy you opted for in implementing the solution.

It would be helpful to tell us more about this...

In particular, the webapi.ring part seems like an abstructed solution that we can reuse to request any web service...

May we think of enhancing it and providing it as a RingWebAPI library that simplifies the connection of Ring apps to online services...

All the best,
Manour

--

---
You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-lang+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ring-lang/c697e9e8-7923-44a0-9f29-59b0e38b706bn%40googlegroups.com.

Mahmoud Fayed

unread,
May 9, 2024, 4:05:35 AM5/9/24
to The Ring Programming Language
Hello Mansour

>> "In particular, the webapi.ring part seems like an abstracted solution that we can reuse to request any web service..."

I shared this example because of this file.
The idea is to use Qt (instead of LibCurl) which provide more simplicity when using (RingQt for Android)

Also, the application sends multiple requests without blocking the execution, get notified once we have a reply from the server.
I did that just as an example, because in this particular application we could have a design based on one request and a JSON response.

Greetings,
Mahmoud

Mansour Ayouni

unread,
May 9, 2024, 6:49:29 AM5/9/24
to Mahmoud Fayed, The Ring Programming Language
Hello Mahmoud,

I shared this example because of this file.
I'm happy I was able to capture your intent!
A lot to learn from you...

All the best,
mansour

Mahmoud Fayed

unread,
May 9, 2024, 8:29:39 AM5/9/24
to The Ring Programming Language
Hello Mansour

You are welcome :D

Greetings,
Mahmoud

MOHANNAD ALDULAIMI

unread,
May 13, 2024, 3:36:10 PM5/13/24
to The Ring Programming Language
Hello Mahmoud ,
Very great example..
Thanks for

depending on your code in webapi.ring I create this function:
I have question about RingQt:
I see some updates to the classes to start support qt6,
does RingQt5 apps can be run in the next RingQt version?
Also , Will we could in the next version take RingQt dll files depending in our needs?
e.g: if we create app depending on : qwidget , qmediaplayer , qprogresbar and some tools but we did not use the qWebView so ,In general we do not need the dll file for it...


#-----------------------------------------------------------------------
aManager=[  ]

func QDownload(poWidget,cURL,cFuncCallBack)

oUrl = new QUrl(cURL)

request = new QNetworkRequest(oUrl)


aManager + 0

nManagerIndex = len(aManager)

cResultfunc = func nMIndex,cFuncCallBack{

oManager = ref(aManager[nMIndex])

reply = new QNetworkReply { pObject = oManager.getEventParameters()[1] }

cResult = reply.readall().data()

call cFuncCallBack(cResult)

}

aManager[nManagerIndex]= new QNetworkAccessManager(poWidget) {

setfinishedevent(cResultfunc + "("+nManagerIndex+",'"+cFuncCallBack+"')" )

getvalue(request)

}

Mahmoud Fayed

unread,
May 18, 2024, 12:32:16 AM5/18/24
to The Ring Programming Language
Hello Mohannad

>> "does RingQt5 apps can be run in the next RingQt version?"

Once we support Qt6, most of RingQt5 apps will work on RingQt6 without modification (With a few exceptions)

Qt6 doesn't inlcude some classes like QDesktopWidget, and changed some methods names
In such situations, we try to reduce the porting effort by providing a class with a similar name that includes the common used methods
For example RingQt6 will provide QDesktopWidget class with two methods (width() & height()) because many RingQt samples uses this class and these two methods.

I have RingQt6 on my machine (Not in GitHub) - all of my projects, Ring Applications/Samples works without problems, except the applications the uses the Qt Multimedia module and play list classes.

So, I updated the VideoMusicPlayer application to avoid the missing classes: ring/applications/videomusicplayer at master · ring-lang/ring (github.com)

The setMedia() method is changed to setSource(), but in RingQt6 we provide both methods names to support old code.

In General
1 - I don't see a noticeable gain when using Qt6 with respect to most of Ring application that doesn't use QML
2 - I still need to port some modules (Bluetooth, Charts) and do more tests, etc. 
3 - Qt6 doesn't support Windows 7.
4 - Qt6 doesn't come with 32-bit binary release. 
5 - Qt6 have some bugs in QMediaPlayer (Not Solved) like: https://bugreports.qt.io/browse/QTBUG-118501
6 - Qt5 is already very powerful and enough for Ring applications
7 - At some point in time we will move to Qt6 (It's the natural direction anyway)


>> "Will we could in the next version take RingQt dll files depending in our needs?"

In RingQt we provide three options
1 - Using QtCore
2 - Using LightGUILib (QtCode, QtGUI & QtWidgets)
3 - Using GUILib (All modules except bluetooth)

I don't have a plan to provide such an easy option for each module alone (I don't need this)
But it's very easy to have a custom build of RingQt that includes only the modules that you care about

Just copy the batch files, Qt project file and update it

Greetings,
Mahmoud

MOHANNAD ALDULAIMI

unread,
May 20, 2024, 9:58:39 AM5/20/24
to The Ring Programming Language
Hello Mahmoud,
every time your words are very helpful and give the full information that I needed.

" I don't see a noticeable gain when using Qt6 with respect to most of Ring application that doesn't use QML",
" Qt5 is already very powerful and enough for Ring applications">>>
I really agree with you in these points, but we still need to decrease the gap between used version and qt current versions , classes like :Qt Quick Effect Maker
,Qt HTTP Server
are not present in our version and one day we have to move into the new versions as you told :  (It's the natural direction anyway)

thank you for your reply that made all the points clear, and your helpful words...

we all waiting for enhancements, updates and grow of RING PROGRAMMING LANGUAGE project.

Best wishes...
Have a nice day...
Mohannad

Mansour Ayouni

unread,
May 20, 2024, 10:57:00 AM5/20/24
to MOHANNAD ALDULAIMI, The Ring Programming Language
Hello Mahmoud and Muhannad,

Thank you for this discussion.

Personally, I think QML is the most interesting part of the Qt framework.

In RingQt, we support the generation of a QML user interface, which is good, but we don't have a way to interact with its widgets using Ring.

The Qt community is divided between the QML declarative way and the C++ QtWidget way (alreadysupported by RingQt), but it's clear that the Qt company invests heavily, through all its product line, in making QML the norm.

I hope one day we will be able to do the following:
  • describe the user interface in QML or in a QML-like Ring dialect (ie DSL)
  • write the interactivity scripts and the business logic directly in Ring
Like for example:

image.png

This will open a large window of opportunities to Ring developers, and to others who find C++ as a barrier for adopting Qt, who can propose software solutions to customers in many UX-demanding domains.

All the best,
Mansur

All the best,
Mansour


Mahmoud Fayed

unread,
May 22, 2024, 1:36:00 PM5/22/24
to The Ring Programming Language
Hello Mohannad

>> "classes like :Qt Quick Effect Maker ,Qt HTTP Server are not present in our version"

I don't have a plan to support these classes/features
Also no promise to support all of Qt classes

RingQt already support all of the classes that I need (Hunderds of classes)
And Majdi Sobain developed a nice tool to extend RingQt with more classes (if this is required)

RingQt in Ring 1.21 will support more classes (Tens of classes from the Qt Graphics View Framework are added)  
I added them in a few hours (because I need them)

Note: OfCourse Support of Qt6 is coming, and more classes will be supported, the point I am trying to highlight is to keep treating Ring as an open-source project, where developers have access to the source code and can add the features that they need. 

Greetings,
Mahmoud

Mahmoud Fayed

unread,
May 22, 2024, 1:41:15 PM5/22/24
to The Ring Programming Language
Hello Mansour

>> "Thank you for this discussion."

You are welcome :D

>> "Personally, I think QML is the most interesting part of the Qt framework."

I like the declarative way of QML, it's listed as one of the languages influenced Ring design: Introduction — Ring 1.20 documentation (ring-lang.github.io)

But QML is designed for specific needs, it's more about developing UI for Mobile & Embedded systems
For Desktop & tools development (What I care about) I see Qt Widgets is the way to go (Even if it's an old technology from many decades ago, but it still can get the job done).

Providing better support for QML in RingQt is an easy task and it's already on my To-Do list for the future (Once I have the time).

Greetings,
Mahmoud 

Mansour Ayouni

unread,
May 22, 2024, 2:08:50 PM5/22/24
to Mahmoud Fayed, The Ring Programming Language
Hello Mahmoud,

But QML is designed for specific needs, it's more about developing UI for Mobile & Embedded systems
 
Yes you are right: That's why I used the term UX-demanding domains.

I would rather compliment this by saying that QML is also good for making rich interactive desktop applications mixing text, graphic controls, animations, videos and 2D/3D media.

UX practices and user-centered design approaches have disrupted our old style of making desktop applications. UI designers have more impact today in the development workflow, and tools like Figma and others, let them define the screens and export them directly to the programmer in a declarative dialect (like it is the case between Qt Designer and Qt Creator).

Providing better support for QML in RingQt is an easy task and it's already on my To-Do list for the future (Once I have the time).

I'm enthusiastic and happy about that!

Best,
Mansour


Reply all
Reply to author
Forward
0 new messages