5 ms·
In order to do a Delphi-like product for the web, you need to solve these problems: 1) JS isn't discoverable from the perspective of the IDE. There's no stati
by TimJYoung 9y ago
In order to do a Delphi-like product for the web, you need to solve these problems:
1) JS isn't discoverable from the perspective of the IDE. There's no static typing and no way for the IDE to hook up code to UI elements, and vice-versa. You need a statically-typed language that can transpile to JS without too much "impedance mismatch".
2) HTML layout functionality isn't really geared for the type of layouts that are present in desktop applications. Document-oriented layouts have a completely different set of requirements.
3) You have to solve the design-time/run-time issue, and this is not an easy issue to solve due to 1). You can't just use a browser engine at design-time for the WYSIWYG portion, so you need to create a whole "browser emulation" layer in the IDE, along with an execution environment for your statically-typed language.
Our product, Elevate Web Builder, solves these issues and implements a Delphi-like IDE for developing single-page web applications:
https://www.elevatesoft.com/products?category=ewb&type=web https://www.elevatesoft.com/products?category=ewb&type=web
We've got a new version coming out soon that will also offer server-side coding in Object Pascal, giving developers a single-source-language approach to developing complex web applications.
- bdamm 9y agoYour IDE looks cool especially for Object Pascal die-hards but your way wrong with JS. One doesn't need static typing to discover patterned functions. You need a convention and a parser that can recognize that convention.
- TimJYoung 9y agoThanks. Re: patterned functions: you can't rely on patterned functions in a full-featured IDE that allows any class method to be an event handler/delegate for another class instance. What you end up may look like what Delphi is doing, but it is just an approximation of the real thing that won't work very well for general-purpose usage. There's going to be all sorts of edge cases that don't work correctly because you can't get a reliable signature for a given method.
- goatlover 9y agoSmalltalk was able to do #1 in the 70s without static types.
- scroot 9y agoAnd also #3.1: you program within the environment you are programming.
- TimJYoung 9y agoI'm not familiar enough with Smalltalk to comment, but I'm guessing that it had a formal, discoverable system of hooking events to event handlers. Was that the case ?
- scroot 9y agoThere is no "formal" system for events, but there are patterns and most Smalltalk systems follow. For example, Pharo makes use of an object called `Announcer`, which you then subclass to make your own announcements. It works similarly to a pub/sub pattern, but using pure live objects and by sending specific messages to subscribers. Previously, systems like Squeak used a pattern where objects had a collection of "dependents" that would be updated when sent the `changed` message. I think this is still how input events -- keys, mouse, etc -- work in Morphic. In either case, the "handler" is whatever you want it to be, so long as the target object implements the appropriate message. As for discoverable, I'd say most things in a Smalltalk are easily discoverable, though some of the patterns can get convoluted if you're inheriting an ancient object structure.
- TimJYoung 9y agoThanks, very interesting. I think a lot of the confusion here is over my terminology and a general lack of understanding about what the Delphi IDE is actually doing. By "discoverable", I mean can the IDE: 1) Compile/analyze the code in the component library/run-time, 2) Figure out which type of method can be used for a certain type of event property for a given class, and 3) Display all matching methods in the current unit/module for the user to select. This is what Delphi does (and Visual Studio with WinForms), and all of it is done at design-time, meaning that your application is not getting compiled in order to determine any of this. From what you're describing, I don't think Smalltalk is doing the same thing. However, it could be doing something similar if it enforces (at design-time) this part: "so long as the target object implements the appropriate message"