Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2011-02

Javascript in Desktop Applications

10 messages · 7 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author
to Anthony Walter
Anthony Walter wrote 9 lines
Over at stackoverflow someone asked<http://stackoverflow.com/questions/4913178/javascript-in-delphi-applications>, "Is it possible to utilize javascript in the making of windows desktop applications". I wrote up a pascal based solution to add javascript access to your desktop programs. If you have any interest in my solution you can view it here (source code included): http://www.codebot.org/delphi/?doc=9573

A cross-platform solution is to use one of libsee or BESEN.

The latter is implemented in 100% native Object Pascal.

Michael.

Andrew Brunner
to Unknown author
Show quoted text 5 lines
A cross-platform solution is to use one of libsee or BESEN. The latter is implemented in 100% native Object Pascal. Michael.

BESEN is very, very, very well written but I can't seem to get any indication how to use it in my project. I would love FPC to include a JIT system for JS or Pascal. IMO, FPC absolutely needs a scripting FCL going forward. BESEN seems like the right guy for the job, but I suspect he's burned out :-( I think he had memory concerns too.

Does anyone have any BESEN examples that integrated actual FPC units? It seems like all the samle js units are self contained with no interface to system or GUI units.

Including JS support on my project would enable people to leverage exiting "proven" technologies which would make for easier/allowable for adoption in working groups / houses where selection of language is restricted to language of the day :-) Taking this statment and applying this across the board, it would be an easier sell for adoption of FPC/Lazarus with JIT support. Personally, I'm thinking along the lines of Web RAD down the road...

Unknown author
to Andrew Brunner
Andrew Brunner wrote 26 lines
On Mon, Feb 7, 2011 at 7:35 AM, wrote: > A cross-platform solution is to use one of libsee or BESEN. > > The latter is implemented in 100% native Object Pascal. > > Michael. BESEN is very, very, very well written but I can't seem to get any indication how to use it in my project. I would love FPC to include a JIT system for JS or Pascal. IMO, FPC absolutely needs a scripting FCL going forward. BESEN seems like the right guy for the job, but I suspect he's burned out :-( I think he had memory concerns too. Does anyone have any BESEN examples that integrated actual FPC units? It seems like all the samle js units are self contained with no interface to system or GUI units. Including JS support on my project would enable people to leverage exiting "proven" technologies which would make for easier/allowable for adoption in working groups / houses where selection of language is restricted to language of the day :-) Taking this statment and applying this across the board, it would be an easier sell for adoption of FPC/Lazarus with JIT support. Personally, I'm thinking along the lines of Web RAD down the road...

Well, if you can't get BESEN to work, libsee definitely does. I even have an article on how to do it.

Michael.

Brian Winfrey
to Unknown author
Show quoted text 40 lines
On Mon, 7 Feb 2011, Andrew Brunner wrote: > On Mon, Feb 7, 2011 at 7:35 AM,   wrote: >> >> A cross-platform solution is to use one of libsee or BESEN. >> >> The latter is implemented in 100% native Object Pascal. >> >> Michael. > > BESEN is very, very, very  well written but I can't seem to get any > indication how to use it in my project.  I would love FPC to include a > JIT system for JS or Pascal.  IMO, FPC absolutely needs a scripting > FCL going forward.  BESEN seems like the right guy for the job, but I > suspect he's burned out :-(  I think he had memory concerns too. > > > Does anyone have any BESEN examples that integrated actual FPC units? > It seems like all the samle js units are self contained with no > interface to system or GUI units. > > > Including JS support on my project would enable people to leverage > exiting "proven" technologies which would make for easier/allowable > for adoption in working groups / houses where selection of language is > restricted to language of the day :-)  Taking this statment and > applying this across the board, it would be an easier sell for > adoption of FPC/Lazarus with JIT support.  Personally, I'm thinking > along the lines of Web RAD down the road... Well, if you can't get BESEN to work, libsee definitely does. I even have an article on how to do it. Michael. _______________________________________________ fpc-pascal maillist  -   http://lists.freepascal.org/mailman/listinfo/fpc-pascal

I have some interest in exploring javascript implementations for fpc. http://code.google.com/p/fpcjs/ -- Is this comparable to what you have noted?

Michael Van Canneyt
to Brian Winfrey
Brian Winfrey wrote 12 lines
> > Well, if you can't get BESEN to work, libsee definitely does. > I even have an article on how to do it. > > Michael. > _______________________________________________ > fpc-pascal maillist  -   > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > I have some interest in exploring javascript implementations for fpc. http://code.google.com/p/fpcjs/ -- Is this comparable to what you have noted?

No, that project embeds mozilla in FPC.

Michael.

Andrew Brunner
to Brian Winfrey: I have some interest in exploring javascript implementations for fpc.…
Brian Winfrey wrote
I have some interest in exploring javascript implementations for fpc. http://code.google.com/p/fpcjs/  -- Is this comparable to what you have noted?

Actually fpcjs is the first project that I, (myself), have seen that addresses the gateway issue of accessing application level methods. Granted fcpjs (currently) only supports one type of callback(variant array):variant. The only issue I see is having a quasi fpc/js design restriction in developing apps with no OOP - coding low-level linear methods(for register) with maps to JS object counterparts. The other MAJOR issue is that callbacks via Register are not working on Linux !?!. Docs said they needed something about native registration. But this project looks lightweight enough on its face.

I'm at a point in my project where I think I am needing something like this. In an ideal world, any application level scripting engine should know how to interface with FPC objects @ runtime w/o variants.

Currently, my largest problem is because without things like scripting :
* Admins must rebuild the service exe every time back-end objects are modified.
* Production environments where each binary is installed on a different device across the network cluster(s)/node(s) will have different versions.
* Auto-build or auto-updates via distribution system will most likely lead to problems for either us or for Admins during deployment.

The use of a scripting engine would resolve these problems.

Sven Barth
to Andrew Brunner: BESEN is very, very, very well written but I can't seem to get any indication how to use…
Andrew Brunner wrote
Does anyone have any BESEN examples that integrated actual FPC units? It seems like all the samle js units are self contained with no interface to system or GUI units.

I haven't looked at the source in general and I also haven't tested it yet, but take a in BESEN.pas and
TBESENNativeObject in BESENNativeObject.pas. TBESENNativeObject utilizes RTTI, so this seems to be the way to access native code. You might need to inherit from that class and provide published methods/properties for the native code you want to use.

Regards,
Sven

Benjamin Rosseaux
to Andrew Brunner: BESEN is very, very, very well written but I can't seem to get any indication how to use…
Andrew Brunner wrote 26 lines
On Mon, Feb 7, 2011 at 7:35 AM, wrote: > A cross-platform solution is to use one of libsee or BESEN. > > The latter is implemented in 100% native Object Pascal. > > Michael. BESEN is very, very, very well written but I can't seem to get any indication how to use it in my project. I would love FPC to include a JIT system for JS or Pascal. IMO, FPC absolutely needs a scripting FCL going forward. BESEN seems like the right guy for the job, but I suspect he's burned out :-( I think he had memory concerns too. Does anyone have any BESEN examples that integrated actual FPC units? It seems like all the samle js units are self contained with no interface to system or GUI units. Including JS support on my project would enable people to leverage exiting "proven" technologies which would make for easier/allowable for adoption in working groups / houses where selection of language is restricted to language of the day :-) Taking this statment and applying this across the board, it would be an easier sell for adoption of FPC/Lazarus with JIT support. Personally, I'm thinking along the lines of Web RAD down the road... _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Have you looked at the BESENShell.dpr/BESENShell.lpr? Because that contains the most important part, how you can integrate own API stuff. And the last commit to the BESEN SVN was just a few days ago with a few weeks pause, because I've found no bugs and got no bugreports in that time.

Benjamin 'BeRo' Rosseaux