cleverca22
Posts: 341
Joined: Sat Aug 18, 2012 2:33 pm

Re: Cross Platform GUI

Fri Jan 23, 2015 8:35 pm

in my last java project, that core logic was the code to interface with the server, and i didnt have access to modify the server
and depending on what your doing,there might not be a server to put it on either, all depends on the project

Heater
Posts: 14771
Joined: Tue Jul 17, 2012 3:02 pm

Re: Cross Platform GUI

Fri Jan 23, 2015 8:52 pm

Quite so. It all depends on what you are trying to do.

I might argue that your "core logic" was not really core logic at all. After all it needed the server, right?

It might as well have been some HTML/CSS/JS in a browser. Given that your core logic speaks HTTP, which may not be so now but will be in the future.

On the other hand any machine can be a web server now. Only takes a hand full of lines of code.

It's interesting to watch how these architectural ideas play out.
Memory in C++ is a leaky abstraction .

cleverca22
Posts: 341
Joined: Sat Aug 18, 2012 2:33 pm

Re: Cross Platform GUI

Fri Jan 23, 2015 8:56 pm

my case needed to still run when the app was closed, to handle things like notifications, thats one thing a browser still cant do on android

Heater
Posts: 14771
Joined: Tue Jul 17, 2012 3:02 pm

Re: Cross Platform GUI

Fri Jan 23, 2015 9:07 pm

Hmm..interesting.

I'm old fashioned so when my apps are closed I want them closed, dead, kaput, no notifications and annoyances possible.

However I can see that might be an issue in some cases on a phone / tab.

Sounds like something Google needs to fix in Android.

How does Chrome OS handle such things?
Memory in C++ is a leaky abstraction .

cleverca22
Posts: 341
Joined: Sat Aug 18, 2012 2:33 pm

Re: Cross Platform GUI

Fri Jan 23, 2015 9:18 pm

dont know about chromeos, but android has 2 options for doing those notifications

the proper way is for the app to be totally dead, and then use gms (google messaging service) to send a msg down to the app/device
the os will start the app up in the background and inform it, then the app can do anything (notification, sync data, and for certain apps, self-destruct because the device was stolen)

the bad way (which i had to do, no server control), is for the app to just wake up every 5mins and poll an http server, i was able to optimize things enough that it had no noticable impact on battery life

and as for IOS, it just doesnt support running in the background at all, their push notifications can ONLY spawn a notification, it cant actually run the app in the background

otani
Posts: 62
Joined: Fri Dec 13, 2013 4:18 am

Re: Cross Platform GUI

Fri Jan 23, 2015 9:20 pm

Heater,

I think Qt have a huge library like Microsoft Visual C++, that why it takes 38 hours to build on Rpi. It is very powerfull and can realize everything whatever you want, however,it will take several month to understand the whole system and usage.
On the other hand, I think that they are not highly enccapsulated , that needs more code to be written (compared with Lazarus).
https://www.linkedin.com/groups/Lazarus ... .210574885
http://vsandor.com/lazarus-qt-creator-2984577
Of couse, this is just personal preference ...

Thank you very much for posting Qt5.2 for Raspi,
Since I have failed to build , I shall try your post .

cleverca22
Posts: 341
Joined: Sat Aug 18, 2012 2:33 pm

Re: Cross Platform GUI

Fri Jan 23, 2015 9:31 pm

i have used QT in a recent project, and it can give the identical gui on the pi (didnt take 30+ hours, just apt-get install)
normal linux, mac, windows, and android

android was the most complex, since i had to build qt for android using the NDK

when comparing qt to java, qt is a case of 'write once, compile 5 times', while java is more of a 'write once, compile once' thing, assuming your gui libs work everywhere

Heater
Posts: 14771
Joined: Tue Jul 17, 2012 3:02 pm

Re: Cross Platform GUI

Fri Jan 23, 2015 9:44 pm

I don't know, Visual C++, Qt, Lazarus, whatever. I think I'm done with user interfaces in anything but the browser for the rest of my time. Why? Because:

1) Whatever I work on, I can work on on any machine I happen to have in front of me. No need to install anything, configure anything, it's just there.

2) Having done it, it's immediately available to anyone who may be interested. Just post them a link.

3) I don't have to mess around building and testing and distributing for every possible platform users may have. No need to make an installer or package for every possible platform. Just post them a link.

I still need C/C++ for the low level hard real-time stuff. But after that it's data up to the "cloud", i.e. whatever server I choose local or other wise, and then down to the browser, wherever and whatever that is.

Admittedly this plan may not play out for some serious video editing or whatever apps but I'm not in that world.
Memory in C++ is a leaky abstraction .

timrowledge
Posts: 1330
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Cross Platform GUI

Sun Jan 25, 2015 1:26 am

Heater wrote:I'm sure SmallTalk is a wonderful thing. It has a a lot of historical creds but I have never looked into it.
Oh, you should. There's a lot to learn that would be of benefit in any other OOPL you might use later. Oh, and we prefer the lowercase 't' in Smalltalk.
Heater wrote:Seaside seems to be a disaster though. One is not running Smalltalk in the browser unless it's been compiled from Smaltalk to JS.
Well, Seaside is a web server, so unsurprisingly it serves web-browsers. It does so very nicely. And you can do that core logic so much more enjoyably than with java. If you use javascript etc on your client side it works quite nicely with that; and indeed some of those parts could do a simple counter without a round trip. But I'm sure you understood that a simple example is really just a simple example to illustrate something.

There is, by the way, a full Smalltalk system that runs on top of JS within a browser. I don't imagine it would be terribly fast on a current Pi, but it moves along pretty smartly on an iPad Air etc.
Have a peek at http://bertfreudenberg.github.io/SqueakJS/
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

Heater
Posts: 14771
Joined: Tue Jul 17, 2012 3:02 pm

Re: Cross Platform GUI

Sun Jan 25, 2015 1:34 pm

timrowledge,

Ah, you mean it's "Smalltalk" not ""BigTalk", sorry :)
Well, Seaside is a web server... If you use javascript etc on your client side it works quite nicely with that.
I would imagine so. But at that point Seaside is not a cross platform GUI. The browser with HTML/CSS/JS is.

Squeak is fun. Slow as heck. Interesting stuff though.
Memory in C++ is a leaky abstraction .

cacb
Posts: 35
Joined: Sun Feb 01, 2015 12:18 am

Re: Cross Platform GUI

Sun Feb 01, 2015 12:59 am

otani wrote:Heater,
BTW, I am looking for the RAD tools of c/c++/c# which works on arm-linux.
such like Microsoft:C# or Borland:C++Builder,but works on Raspi. Anyone knows about it ?

Code::Blocks + wxSmith might be candidate.
http://www.codeblocks.org/
wxSmith features comparison
http://wiki.codeblocks.org/index.php?ti ... h_features
I am using Code::Blocks + wxSmith under Windows, Kubuntu Linux and Raspberry PI. That means using wxWidgets as C++ cross platform library. There is a learning curve, but it is very powerful. I like being able to develop a program on a Windows or Linux desktop, then simply copy the project file + source code to the Raspberry PI and compile it there to get a working raspberry pi program.

User avatar
scidata
Posts: 92
Joined: Tue Jan 06, 2015 4:21 pm
Location: Toronto
Contact: Website

Re: Cross Platform GUI

Tue Jul 21, 2015 2:46 am

timrowledge wrote:Try Smalltalk.
and it's a natural for the pi
"People who are really serious about software should make their own hardware."
- Alan Kay
"Self-education is, I firmly believe, the only kind of education there is" - Isaac Asimov

Return to “General discussion”