[fpc-pascal] Does Free Pascal generates Java bytecode

Gilles MARCOU g.marcou at chimie.u-strasbg.fr
Fri Jul 18 15:45:45 CEST 2008


Hi,

Marco, I do not very much understand what are managed and unmanaged code
needs. I just understand from your link that compiling to Java bytecode
requires a fork from Free Pascal in order to rewrite a substantial part
of the compiler. Something I will not do and have no resources to do.

To make things clearer about what I had in mind, I am working in
chemoinformatics. And Java stands high above any other language in this
field because of databases interfaces. We need to be able to draw a
molecule to search for it in a database. Users are often chemists that
know nothing about informatics and want to have some calculations done
for them. Therefore, they need a web page where a simple molecular
sketcher is provided. All those users might withdraw if they need to
download a software themself and "install" it (whatever this takes).
This is why a the Java bytecode is so appealing.

For historical reasons, my lab has developped a very nice sketcher with
some usefull and rare features. The code is large and written in Delphi
(I'll need to port it to Free Pascal one day). So, we want to use this
sketcher in our frontend rather than using others sketchers that are
Java written.

Wanderlan, this is why I don't believe that ExtJS will fit perfectly our
needs. Nonetheless my current solution is close to what offers
ExtPascal. I am using Powtils to generate html formulars as interface to
my web application. This formular include JavaScript call to display a
third party Java applet that display the sketcher and manage chemical
query to my applications (see for instance
http://infochim.u-strasbg.fr/cgi-bin/predictor.cgi).

So if I cannot enrich my web experience with my Free Pascal
applications, I believed that I can enrich my Free Pascal applications
with web capabilities. For this, in Perl, I used to craft POST or GET
reply to a server serving me an HTML form. I believe I can then enjoy
the capacities of my own sketcher to create custom queries to chemical
databases or web applications.

As I do not own these I cannot work on dedicated client/server tightly
integrated. Nontheless, other applications, in particular Distributed
Genetic Algorithms might benefit of lower level of network
communications. Currently my colleagues are managing this kind of
application through bash+awk/sed scripts and mono-processor fortran77
code. To say that there is room for improvements.

Indy seems a good start. But as I read on the front page:

"In the future the FCL build will be replaced by the newer Indy.Sockets
CLR project", that I understant as replacement of the Delphi by a .NET
framework.  

Beside, I'd rather prefer a Free Pascal solution rather than having to
wrap a C library or port some Delphi code.

In case I have to write a wrapper to libwww, is there an audience for
this kind of work? I must say that it would be more motivating...

Thanks for your answers. I might stay silent until next monday.

Ciao,
Gilles Marcou

Le vendredi 18 juillet 2008 à 12:27 +0200, Marco van de Voort a écrit :
> > this is silly question but I saw that is was an idea posted as feature
> > idea. In fact, I'd like to provide some small applications that could be
> > downloaded and executed into a client web browser. As I understood, java
> > does this through dowload of the corresponding Java bytecode onto the
> > client that is then interpreted by the JVM. So is it possible to compile
> > a Free Pascal application to a Java bytecode interpretable by the JVM?
> 
> The .NET item of the FAQ also mentions Java:
> http://www.hu.freepascal.org/faq.var#dotnet
> 
> > An acceptable alternative would be to write a desktop application that
> > connects to a server-side application or an HTML form. For instance,
> > such application shall be able to send a query to a dedicated list of
> > public SQL databases.
> 
> All is possible of course. Exact details will depend on what choices and
> additional requirements of the problem.
> 
> > Is there some library to write applications that
> > can communicate through the web? Something equivalent to LWP for Perl
> > for instance?
> 
> I've no idea, but I assume one could write a header to the libwww lib on
> which this module is based.
> 
> Or one could try to craft something like that using parts that are already
> there, there are mime encoders/decoders and HTTP clients in e.g. Indy.
> (which in general supports a lot of internet protocols)
> 
> But I don't think this is a desirable solution if sb also has control over
> the server side. Then one can better work with a dedicated server
> application or communicate with a serverside app with e.g. SOAP.




More information about the fpc-pascal mailing list