Web doesn't have to be HTML : Project of a QML web-browser

Currently, the web is dominated by HTML websites and web apps. Websites are generally in HTML, CSS, and JS

And that’s great, but there are other languages that deserve more attention.

QML is one of them.

For those of you who never heard of QML : it is a declarative markup language (like HTML) but instead of being based on XML, it’s closer to JSON / CSS and supports Javascript for scripting. It can perform everything HTML/CSS can and even more. And -in my opinion- in a more elegant and readable syntax.

Unfortunately, web-browsers don’t understand QML. So I started working on a “web” browser that would load QML apps from the Safe Network instead of HTML.

Current status is:
*The browser is working
*I successfully deployed 2 QML apps on the Safe Network and the browser is loading them properly
*The browser loads and stores bookmarks and navigation history on the safe network (meaning you can use the browser from anywhere, your bookmarks will still be there)

Now the browser needs a lot of polishing and improvement (eg. it doesn’t currently support tabs)

Before spending too much time on this, and improve it, I’d like to know what the community thinks of such a project?

26 Likes

Sounds very interesting! But whats the advantage from a user perspective?

In term of static appearances and features, there would be no difference for a user. I suspect it would use less broadband because the syntax allow to define content with less text (although until stressed and tested, I can’t be sure).

It is really from a developer perspective that it would be different.

5 Likes

@Jimmy_HUGUET I think this is a great thing you’re doing (even though I know next to nothing about QML). I also know next to nothing (walked through early tutorial) about Elm language, and my first thought is how these two compare.

I see from Wikipedia that QML is part of Nokia’s Qt framework which MaidSafe were I think looking at using for their Apps long ago - so I did poke around with Qt briefly myself.

Elm language seems to have a similar declarative approach, but the advantage of being compilable to HTML/CSS/JavaScript.

I don’t have time to look into QML right now, but hope you’ll continue, especially if you can find a way to support both HTML/CSS/JS and QML in one browser. Perhaps you could add a plugin to SAFE Beaker?

This would allow developers to choose the best/easiest development route (language), while users won’t notice the difference.

3 Likes

In fact I already support both (I didn’t mention it before because I don’t want to be concurrent to beaker).

I don’t know if I would be able to create a plugin for beaker though, the qml-browser is using QML itself and this is easing a lot the loading of QML from the network.

3 Likes

Of course very good of you to look into this.
Coincidentally, I recently have had a quick look at the possibilities of Qt (mainly qml) to replace an old user interface at my work. Some nice to have specifications that I was looking for: a (wysiwyg) development interface (for an hmi), that not so technical customers can use, that can generate html5.

And, like you said: If I understand it correctly Qt supports ‘embedding’ browser functionality in the apps you develop with it. But you can’t use their qml IDE to make an html5 app for a common browser in qml.
They have Qt WebChannel, which ‘Expose QObjects to remote HTML clients’, but that was not what I was looking for.

1 Like

Exactly what safe devs should be doing. Pursuit into newer designs, that is more clean and concise, and gets rid of the old web problems. HTML, and CSS are annoying to work on, especially when each browser has it’s own meaning of it’s context. In this sense, one would need 3 same script, but for three different browsers, firefox, chrome, IE. This leads to more boated webpage, and the ecosystem. I would like to see JS to be replaced as well.

QML looks really nice to work on. I would definitely use that over html/css.

5 Likes

Concerned about JS security and HTML 5 support. I understand that JS compatibility doesn’t require the actual use of JS, but does that functionality necessarily invite or bring security concerns? Also, wasn’t HTML 5 the best thing to happen to HTML as it gave the world an alternative to Adobe’s abusive flash player. Will the QML- HTML 5 compatibility with their own intermediary introduce the same flash type problems again? I sympathize with empowering developers and making their life easier of course but not in any way that cedes end user power. My understanding here isn’t much deeper than buzzwords, sorry if the answers are completely obvious, part of this is I think FOSS when I think HTML but I don’t have that association with Nokia or their recent close partners like MS.

You are totally right to be concerned. There could be security problems (that is one of the reason I don’t provide a build to test for now), a few day ago I realise QML app loaded in the browser could access the Maidsafe token of the browser (I found a way to prevent it), also you need to know that JS in QML is a bit different that the one embedded in HTML browser.

100% Agree with that as well. The goal is not to make it harder on the user. And if it turns out it does, it would not be used anyway.

No worry about that, even though nokia is a big actor in Qt/QML it is and will stay free and open source

1 Like

@anon81773980: Thank you, this is exactly the kind of message that motivate me to continue.

3 Likes

Thank you. I hope this project is all green lights.

Oh cool! That makes it even better. So we might get a second safe brwoser of some sorts? :slight_smile:

1 Like

Hi
I’m using Qt since more that 5 years and what is missing is the ability to be deployed through the web. QML Web Browser is a nice solution for that and so is a really good idea.
One question : do you plan in your browser the ability to have plugins (extension) able to use Qt (C++). In fact, QML only is often not sufficient and the possibility to have plugins should be really interesting.
Does you project is open source ?

Yes, I would love to do that, my hope is that plugin could be made available in the form of .so/.dll file on the network. I would like to also be able to load Qml “toolkits” in the same way, to have predefined Qml component that people would be able to use.

It is (or will be), but I haven’t shared the link to it on the forum yet, I am concerned about security, and I don’t want people to start making Qml app that could be harmful for users

1 Like

I’m a QML developer and have recently started learning HTML and CSS. Working with HTML and CSS is a total headache. For those people who have not worked with QML I suggest looking into it. I believe with things like QML present, CSS and HTML are not the future of Web development.

I think you are doing a great job. Keep it up.

7 Likes
2 Likes

Interesting project.

There was another project some years ago where you could do something similar, but with wxWidget instead of Qt.

It was called Virtual Object System and had a browser named Ter’Angreal where you could use some XML to make “websites” with wxWidget widgets. The browser also included the game engine Crystal Space 3D for making games and 3D websites. It hasn’t been updated in more than 10 years, but it had some interesting ideas. You can read more about it here, although that document focuses more on the 3D parts than the wxWidget parts. It used to have a wiki with more interesting info, but it looks like it has disappeared from the web.

1 Like

Excellent idea, would be great to incorporate on the safe browser and hopefully QML can become a Web standard at some point, there are also some other projects like QMLWeb for standard web browsers, but are somehow limited, there’s also a QML based OS in alpha. A mobile version of the Safenet client could be developed in Qt and apps could be made in QML. I’m new to the safe net community but I’ll try to work on a mobile client using Qt

1 Like