May 07, 2019
On Tue, May 07, 2019 at 07:21:52PM +0200, Robert M. Münch via Digitalmars-d-learn wrote: [...]
> > interface myFrameworkApp {
> > 	void init();
> > }
[...]

Note: it's a very bad idea to call a member function 'init'. It conflicts with the built-in .init property of all types, and can lead to strange bugs / confusing behaviours.

Call it something else, like 'initialize'.


T

-- 
If lightning were to ever strike an orchestra, it'd always hit the conductor first.
May 07, 2019
On Monday, 6 May 2019 at 16:50:14 UTC, Robert M. Münch wrote:
> I want to build a framework which gives some structure to the app using it.

I'm curious. What's the ultimate aim of the framework you're working on? An aid to building web apps? Desktop apps? Or something more specific like 3D, 2D, text editors...

Or am I misinterpreting what you're talking about?
May 08, 2019
On 2019-05-07 17:43:57 +0000, H. S. Teoh said:

> Note: it's a very bad idea to call a member function 'init'. It
> conflicts with the built-in .init property of all types, and can lead to
> strange bugs / confusing behaviours.
> 
> Call it something else, like 'initialize'.

Yes, thanks. I'm currently just building prototype code to get the single parts I need up & running. Next steps are to merge them together step-by-step.

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster

May 08, 2019
On 2019-05-07 18:02:16 +0000, Ron Tarrant said:

> I'm curious. What's the ultimate aim of the framework you're working on? An aid to building web apps? Desktop apps?

The goal is to have a generic framework for desktop apps where you can directly start to work on the app and don't have to care about getting all the necessary environment and building-blocks up & running.

> Or something more specific like 3D, 2D, text editors...

Some features we have in mind:

* High speed 2D graphics (working)
* GUI widget set, self-drawn via 2D graphics. Not using any OS widgets. Portable. (only simple tests so far)
* Flex-Box like layouting of GUI elements (working)
* Framework and App logic linked/using Reactive pattern. Message passing everywhere. (working)
* Selfcontained executables, no external dependencies (working)
* SQLite3 included (working)
* LuaJIT as embedded scripting layer for declarative GUIs (not yet decided)

Our focus is executable size (I'm an old school guy) and speed.

For some simple real-time grid example see: https://www.dropbox.com/s/eyya0brc5sbcs09/Bildschirmaufnahme%202019-05-02%20um%2022.09.54.mov?dl=0 


This one is doing on resize: a new layout, draws the grid and blits it to screen. It still has a double blit that we already removed.

We are currently all in prototype state to find out what's the best architecture and desing to link all these elements. But so far things look very promising, since the code is very compact. The major work will be to build up the GUI widget library. But we will do this step-by-step as we need things. And we start with the most complex ones first. If these work, the rest is a home-run.

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster

May 08, 2019
On Wednesday, 8 May 2019 at 06:30:56 UTC, Robert M. Münch wrote:

> The goal is to have a generic framework for desktop apps where you can directly start to work on the app and don't have to care about getting all the necessary environment and building-blocks up & running.

> * High speed 2D graphics (working)
> * GUI widget set, self-drawn via 2D graphics. Not using any OS widgets. Portable. (only simple tests so far)
> * Flex-Box like layouting of GUI elements (working)
> * Framework and App logic linked/using Reactive pattern. Message passing everywhere. (working)
> * Selfcontained executables, no external dependencies (working)
> * SQLite3 included (working)
> * LuaJIT as embedded scripting layer for declarative GUIs (not yet decided)

This sounds like a complete replacement for either QT, MFC, or GTK as well as Glade/QT Designer all rolled into one.

> Our focus is executable size (I'm an old school guy) and speed.

Right with you there.

> For some simple real-time grid example see: https://www.dropbox.com/s/eyya0brc5sbcs09/Bildschirmaufnahme%202019-05-02%20um%2022.09.54.mov?dl=0

Very impressive. Is there somewhere I can follow along with what you guys are doing? Do you have a GitHub presence?


May 08, 2019
On 2019-05-08 09:15:41 +0000, Ron Tarrant said:

> This sounds like a complete replacement for either QT, MFC, or GTK as well as Glade/QT Designer all rolled into one.

Let's say it's an alternative ;-)

All the ones you listed are either too big, too complicated, bring too much stuff that we don't need etc. We took a look at every approach out there. Unbelievable, but non really fit or impressed me.

Since we created such a framework on a different technology stack in the past, and our product is based on it, we have quite some experience how such a framework should work. GUI wise we did a lot of rounds in the last 15 years and the single best decision I made was: Draw the stuff yourself.

Oh, and I forgot one thing on my feature list: Text rendering. This already works, but there is quite some work on editing text, and layouting etc. But we have a zero dependency font loading and rending system. Pretty neat.

>> For some simple real-time grid example see: https://www.dropbox.com/s/eyya0brc5sbcs09/Bildschirmaufnahme%202019-05-02%20um%2022.09.54.mov?dl=0 
>> 
> 
> Very impressive.

Thanks, at the core, leaving out all the necessary envrionment code, it's really only 50 lines of code. And the framework idea is, that I can focus directly on those 50 lines of code after adding one import statement.

>  Is there somewhere I can follow along with what you guys are doing? Do you have a GitHub presence?

We have one, but nothing published at the moment. I need to think about this. A framework needs to have enough stuff included, to be usable for others out-of-the-box. And it needs to be supported to lift off. So, I think it's a bit early at the moment.

However, I'm happy to post some updates/screenrecordings to show our progress.

What are you interested in or what would you do with such a framework?

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster

May 08, 2019
On Wednesday, 8 May 2019 at 10:21:34 UTC, Robert M. Münch wrote:

> However, I'm happy to post some updates/screenrecordings to show our progress.

Works for me.

> What are you interested in or what would you do with such a framework?

You sparked my interest because it sounds like you're working on something similar to what I cover in a blog I've been writing since January (http://gtkdcoding.com).

Rather than write something from scratch like you guys (I'm not that brave) I take an OOP approach to GtkD, modularizing so it's as close to using Lego as possible.

This blog is a revamp of another I started back in 2006 for PHP-GTK, but using D rather than PHP and updated to GTK 3.x. The original also included an application framework (which I haven't yet reproduced in D) with a pluggable do/undo/redo system.

So you can see why I perked up when I read your thread.

And I assume your framework is written with D as a base language? And you said it's cross-platform, too? Windows, Mac, Linux? Are any of the BSDs supported?

Assuming all that, we're very much of the same mind: cross-platform GUI applications made fast-n-easy using a single language and toolkit.
May 09, 2019
On 2019-05-08 13:31:40 +0000, Ron Tarrant said:

> On Wednesday, 8 May 2019 at 10:21:34 UTC, Robert M. Münch wrote:
> 
>> However, I'm happy to post some updates/screenrecordings to show our progress.
> 
> Works for me.

Ok, so I need to find a good name for this thing which I can use as thread subject :-)

>> What are you interested in or what would you do with such a framework?
> 
> You sparked my interest because it sounds like you're working on something similar to what I cover in a blog I've been writing since January (http://gtkdcoding.com).

Ah, sorry, didn't catch the link. I saw this but didn't read anything yet. Will do.

> Rather than write something from scratch like you guys (I'm not that brave) I take an OOP approach to GtkD, modularizing so it's as close to using Lego as possible. This blog is a revamp of another I started back in 2006 for PHP-GTK, but using D rather than PHP and updated to GTK 3.x. The original also included an application framework (which I haven't yet reproduced in D) with a pluggable do/undo/redo system.
> 
> So you can see why I perked up when I read your thread.

Good to know that there are not only web-stack people around these days.

> And I assume your framework is written with D as a base language?

Yes. Of course we use some C bases libs but the overall goal is to make a D framework.

> And you said it's cross-platform, too? Windows, Mac, Linux? Are any of the BSDs supported?

Since we are going to draw all GUI stuff ourself it should work on all platforms where you can blit a memory buffer to screen. The part that's most platform specific is the event loop. But that's not rocketscience. Overall we try to keep the OS specific integration to an absolut minimum.

The application won't know/see a difference on which platform it runs. I expect some differences in how GUI actions are handled or communicated to the framework, however these should be rare and can be handled with conditional compilation.

> Assuming all that, we're very much of the same mind: cross-platform GUI applications made fast-n-easy using a single language and toolkit.

Great :-) Let's see how quick we move forward.

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster

May 09, 2019
On Thursday, 9 May 2019 at 11:48:59 UTC, Robert M. Münch wrote:

> The application won't know/see a difference on which platform it runs. I expect some differences in how GUI actions are handled or communicated to the framework, however these should be rare and can be handled with conditional compilation.

This is sounding more and more interesting.
May 09, 2019
On Thursday, 9 May 2019 at 11:48:59 UTC, Robert M. Münch wrote:
> Good to know that there are not only web-stack people around these days.


i do web and gui

Though my gui library is 100% from scratch on linux, and... barely even good enough for myself to use. I really need to write a new text edit widget.