Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self host at least part of the editor #11

Closed
timthelion opened this issue Dec 31, 2016 · 4 comments
Closed

Self host at least part of the editor #11

timthelion opened this issue Dec 31, 2016 · 4 comments

Comments

@timthelion
Copy link

It would be very interesting to me to see at least part of the editor self hosted, aka created with JavaFBP. That would be a good way for me to see FBP used in the real world and would go a long way in proving the philosophy.

@jpaulm
Copy link
Owner

jpaulm commented Jan 2, 2017 via email

@timthelion
Copy link
Author

timthelion commented Jan 2, 2017

Hi Paul,
I believe that you are convinced that FBP is a novel general purpose programming technique which can ease developement and reduce complexity. Yet here you throw up your hands and say that FBP is not a good fit. I think you may be disuaded, however, not by the dificulty of the problem, but by the GUI frameworks which you have been subjected to.

Modern GUI frameworks on the desktop are all written in what is refered to as OOP-Callback style. You have objects, such as buttons and text areas, which have event handlers(methods) which get called when some external event source calls them.

This technique is quite a natural one, and can seem like "the only way" to a person who is familiar with it. However, there are other ways of providing a graphical user interface which don't look like this at all. For example, users can interact with CGI powered web-pages and in this case, the server, rather than having a spider web of callbacks, sees itself as basically a single function/actor which takes a requst and produces a responce:

Client <-> Server
responce = f(request)

This request and responce model is far more simple than the OOP-callback method, and is more generic/flexible (you can implement the OOP-callback architecture in a webserver but you don't have to).

Would you consider FBP to be a good paradigm for writting a web server? If your answer is yes, is there a fundamental difference between that and writting an interactive editor?

Another example of a GUI architecture is that of OpenGL. OpenGL has an event loop which is usually triggered by a timer. Basically, your program runs by having its "draw" method called over and over again. This is also far simpler than the OOP-callback method. I think that the reason why we don't all write our GUIs in OpenGL has to do with edge cases, like the need to provide support for braille displays and screen readers. Otherwise, thinking about simply producing a changing image in responce to an event stream seems quite appealing to me.

If you think about the distinction between the client/server architecture and the OOP-callback architecture for GUI design, you will find that they have a very different shape.

OOP-Callback programs look like octopi (right click to view full size):
oop-callback

Where-as OpenGL draw loop programs look like hammocks.
hammock

procesing-engine

My interest in the architecture of DrawFBP is somewhat accademic. I don't care how it works on the inside from the standpoint of the user. I'm more interested in how you solved the various interesting problems which occure in the real world ;) .

One project which did do interactive GUIs using discrete-packet data-flow was the early versions of elm-lang http://elm-lang.org/ http://elm-lang.org/assets/papers/concurrent-frp.pdf Don't get put off by the letters "FRP". When reading "FRP" just say "ladedadeda" in your head and everything will make sense.

@jpaulm
Copy link
Owner

jpaulm commented Jan 3, 2017 via email

@timthelion
Copy link
Author

I have posted a new topic here: https://groups.google.com/forum/#!topic/flow-based-programming/CvXEkdQ-SIc

Unfortunately, it is extremely time-consuming to embed images in google groups(at least on my machine the google groups software runs incredibly slowly) and so for now I have not moved my post over there.

Regards,
Timothy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants