Gambas as language for web development

View: New views
15 Messages — Rating Filter:   Alert me  

Gambas as language for web development

by Tomas Eroles i Forner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all
I've been reading today an article about languages for web development:
PHP, ASP and Java are the main disussion subjects.
My question is... if GAMBAS has some extensions for networking, is
possible to write a web based application in GAMBAS?.

If so, how? Any example for study?
Else, could it be possible?

Thanks in advance


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Gambas-user mailing list
Gambas-user@...
https://lists.sourceforge.net/lists/listinfo/gambas-user

Re: Gambas as language for web development

by Daniel Campos-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Try the gb.web component



2008/5/14 Tomas Eroles i Forner <tomas.eroles@...>:

> Hi all
> I've been reading today an article about languages for web development:
> PHP, ASP and Java are the main disussion subjects.
> My question is... if GAMBAS has some extensions for networking, is
> possible to write a web based application in GAMBAS?.
>
> If so, how? Any example for study?
> Else, could it be possible?
>
> Thanks in advance
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@...
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Gambas-user mailing list
Gambas-user@...
https://lists.sourceforge.net/lists/listinfo/gambas-user

Re: Gambas as language for web development

by Bugzilla from gambas@users.sourceforge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On mercredi 14 mai 2008, Tomas Eroles i Forner wrote:

> Hi all
> I've been reading today an article about languages for web development:
> PHP, ASP and Java are the main disussion subjects.
> My question is... if GAMBAS has some extensions for networking, is
> possible to write a web based application in GAMBAS?.
>
> If so, how? Any example for study?
> Else, could it be possible?
>
> Thanks in advance
>
>

If you want an example, and if you can read french, here is what I do for my
job:

http://dev.guygle.fr

login: demo@demo
password: demo

Don't break everything please :-)

The application is based on gb.web, which will not be very difficult to learn
if you have already make ASP applications.

Regards,

--
Benoit Minisini

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Gambas-user mailing list
Gambas-user@...
https://lists.sourceforge.net/lists/listinfo/gambas-user

Re: Gambas as language for web development

by José Luis Redrejo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Appart from having CGI, would not be great being able to use the ide to
build applications for gtk, qt or xul (like this example:
http://www.hevanet.com/acorbin/xul/top.xul) ?



2008/5/14 Daniel Campos <dcamposf@...>:

> Try the gb.web component
>
>
>
> 2008/5/14 Tomas Eroles i Forner <tomas.eroles@...>:
>
> > Hi all
> > I've been reading today an article about languages for web development:
> > PHP, ASP and Java are the main disussion subjects.
> > My question is... if GAMBAS has some extensions for networking, is
> > possible to write a web based application in GAMBAS?.
> >
> > If so, how? Any example for study?
> > Else, could it be possible?
> >
> > Thanks in advance
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user@...
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@...
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Gambas-user mailing list
Gambas-user@...
https://lists.sourceforge.net/lists/listinfo/gambas-user

Re: Gambas as language for web development

by Bugzilla from gambas@users.sourceforge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On mercredi 14 mai 2008, José Luis Redrejo wrote:
> Appart from having CGI, would not be great being able to use the ide to
> build applications for gtk, qt or xul (like this example:
> http://www.hevanet.com/acorbin/xul/top.xul) ?
>

I don't know xul well. Anyway, at the moment, I am totally against using it
for the following reasons:

* Developing "local" applications: it can be run only inside Mozilla/Firefox
and so on. It is not like Qt or GTK+ that are shared libraries that you can
use in any program.

* Developing "network" applications: you have to use Mozilla/Firefox as client
browser.

As if Mozilla/XUL becomes the OS... Herk. And it is so slow...

But I may be wrong. Apparently there is a XULRunner that allows to run
applications outside of Mozilla.

Anyway, what I want to achieve with Gambas is the ability to develop "web"
applications directly from the IDE, as easily as developing GUI is.

A good point is the upcoming HTML 5: it seems to bring all the controls that
are missing in HTML 4: treeviews, columnviews...

Another good point is the upcoming WebKit: it will allows browsers on small
computers (PDA...) fully compliant. Try to run JavaScript on Internet
Explorer on WindowsCE (I don't remember what his name is now).

I want to minimize the use of JavaScript as much as possible. I don't think I
will be able to avoid it for implementing controls equivalent to what we
already have in gb.qt/gb.gtk.

Events raised by control will be sent by JavaScript code to the server.
Consequently we won't be able to implement "real time" events
like "MouseMove".

Reacting to an event will need to display the page entirely again (it is an
HTTP request followed by its answer), unless we use JavaScript and the DOM to
update the web page. It is not necessarily a good idea, even if sophisticated
applications like Google Docs need that.

Whatever is done, I want it to be K.I.S.S. Something that can run on the
greater number of browsers, and that don't hide too much to the programmer.

Really, that task is big and not evident: how to make something easy without
making a kitchen sink?

All that is fully open to talk of course. I won't make anything now, I don't
have the time. :-)

Regards,

--
Benoit Minisini

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Gambas-user mailing list
Gambas-user@...
https://lists.sourceforge.net/lists/listinfo/gambas-user

Re: Gambas as language for web development

by Tomas Eroles i Forner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Very good example!
But I have more questions:
- As Jose Luis says, would be possible to design web forms from GAMBAS?
- How are defined the forms in your application?
- And how are you embeeding the GAMBAS code to control the behaviour of
the application?
- Does I need anything to add to my Apache to run apps with GAMBAS CGI?

thanks in advance
regards


El mié, 14-05-2008 a las 20:05 +0200, Benoit Minisini escribió:

> On mercredi 14 mai 2008, Tomas Eroles i Forner wrote:
> > Hi all
> > I've been reading today an article about languages for web development:
> > PHP, ASP and Java are the main disussion subjects.
> > My question is... if GAMBAS has some extensions for networking, is
> > possible to write a web based application in GAMBAS?.
> >
> > If so, how? Any example for study?
> > Else, could it be possible?
> >
> > Thanks in advance
> >
> >
>
> If you want an example, and if you can read french, here is what I do for my
> job:
>
> http://dev.guygle.fr
>
> login: demo@demo
> password: demo
>
> Don't break everything please :-)
>
> The application is based on gb.web, which will not be very difficult to learn
> if you have already make ASP applications.
>
> Regards,
>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Gambas-user mailing list
Gambas-user@...
https://lists.sourceforge.net/lists/listinfo/gambas-user

Re: Gambas as language for web development

by José Luis Redrejo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2008/5/14 Benoit Minisini <gambas@...>:

> On mercredi 14 mai 2008, José Luis Redrejo wrote:
> > Appart from having CGI, would not be great being able to use the ide to
> > build applications for gtk, qt or xul (like this example:
> > http://www.hevanet.com/acorbin/xul/top.xul) ?
> >
>
> I don't know xul well. Anyway, at the moment, I am totally against using it
> for the following reasons:
>
> * Developing "local" applications: it can be run only inside
> Mozilla/Firefox
> and so on. It is not like Qt or GTK+ that are shared libraries that you can
> use in any program.
>
> * Developing "network" applications: you have to use Mozilla/Firefox as
> client
> browser.
>
> As if Mozilla/XUL becomes the OS... Herk. And it is so slow...
>
> But I may be wrong. Apparently there is a XULRunner that allows to run
> applications outside of Mozilla.
>


That's right. At least in Debian it exists.


> Anyway, what I want to achieve with Gambas is the ability to develop "web"
> applications directly from the IDE, as easily as developing GUI is.
>
> A good point is the upcoming HTML 5: it seems to bring all the controls
> that
> are missing in HTML 4: treeviews, columnviews...
>
> Another good point is the upcoming WebKit: it will allows browsers on small
> computers (PDA...) fully compliant. Try to run JavaScript on Internet
> Explorer on WindowsCE (I don't remember what his name is now).
>


what's the point of using webkit instead of xulrunner?
I'm not saying I prefere xul, as I don't know enough of both to compare, I'm
just saying that you could apply to webkit the same reasons you gave to be
against xul.

OTOH if you plan to support IExplorer on any platform I'm afraid you'll
never arrive anywhere, unless you use javascript that has been used in
several ajax toolkit for a long time and has the needed workaround pretty
tested and solid.


>
> I want to minimize the use of JavaScript as much as possible. I don't think
> I
> will be able to avoid it for implementing controls equivalent to what we
> already have in gb.qt/gb.gtk.
>
> Events raised by control will be sent by JavaScript code to the server.
> Consequently we won't be able to implement "real time" events
> like "MouseMove".


> Reacting to an event will need to display the page entirely again (it is an
> HTTP request followed by its answer), unless we use JavaScript and the DOM
> to
> update the web page. It is not necessarily a good idea, even if
> sophisticated
> applications like Google Docs need that.
>


Maybe the answer is blowing in the wind:
http://en.wikipedia.org/wiki/Comet_%28programming%29 :



>
> Whatever is done, I want it to be K.I.S.S. Something that can run on the
> greater number of browsers, and that don't hide too much to the programmer.
>
> Really, that task is big and not evident: how to make something easy
> without
> making a kitchen sink?
>

I know of some very imaginative approach. As an example, I have a friend who
made a smalltalk-to-javascript translator, as he's a st guru but had to
develop some web apps and didn't want to leave his favourite language. Maybe
a gambas-to-javascript translator could do the magic.



>
> All that is fully open to talk of course. I won't make anything now, I
> don't
> have the time. :-)
>
>
I fully understand you. This is a very big project and maybe too ambitious,
but dreaming is free ;-)

Cheers
José L.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Gambas-user mailing list
Gambas-user@...
https://lists.sourceforge.net/lists/listinfo/gambas-user

Re: Gambas as language for web development

by Rob Kudla :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wednesday 14 May 2008 14:40, Benoit Minisini wrote:
> Reacting to an event will need to display the page entirely again
> (it is an HTTP request followed by its answer), unless we use
> JavaScript and the DOM to update the web page. It is not
> necessarily a good idea, even if sophisticated applications like
> Google Docs need that.

I know I'm biased because I've done more AJAX stuff than you have, but
I really think redrawing the whole screen after each update would be
intolerable.  Firefox 3 betas are already a lot faster at Javascript
than Firefox 2 and previous, though I don't know if the other
browsers are making similar speed improvements.

> Really, that task is big and not evident: how to make something
> easy without making a kitchen sink?

Personally, I would use some toolkit like dojo, just as you used
existing GUI toolkits like qt and gtk rather than reinventing the
wheel for Gambas.  (I'm not suggesting dojo specifically, but I think
it's an example of a toolkit that provides almost everything we would
need.)

> All that is fully open to talk of course. I won't make anything
> now, I don't have the time. :-)

I'm still waiting for more of my time to free up, as well.

Rob

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Gambas-user mailing list
Gambas-user@...
https://lists.sourceforge.net/lists/listinfo/gambas-user

Re: Gambas as language for web development

by Rob Kudla :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wednesday 14 May 2008 14:51, José Luis Redrejo wrote:
> http://en.wikipedia.org/wiki/Comet_%28programming%29 

Yes, this technique would really be required for doing Gambas
desktop-style programming in a web app.  Dojo does that too, though
again I'm sure there are other toolkits that would work just as well.

Rob

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Gambas-user mailing list
Gambas-user@...
https://lists.sourceforge.net/lists/listinfo/gambas-user

Re: Gambas as language for web development

by Bugzilla from gambas@users.sourceforge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On mercredi 14 mai 2008, Tomas Eroles i Forner wrote:
> Very good example!
> But I have more questions:
> - As Jose Luis says, would be possible to design web forms from GAMBAS?

No.

> - How are defined the forms in your application?

The application is a CGI script, so you have tu use PRINT to send the HTML to
the browser.

> - And how are you embeeding the GAMBAS code to control the behaviour of
> the application?

Embedding? There is no "embedding" anywhere...

> - Does I need anything to add to my Apache to run apps with GAMBAS CGI?

No. I suggest you replace your Apache by something like thttpd. A light
browser usually speeds up your web application.

Regards,

--
Benoit Minisinianything:anything:

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Gambas-user mailing list
Gambas-user@...
https://lists.sourceforge.net/lists/listinfo/gambas-user

Re: Gambas as language for web development

by Rob Kudla :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wednesday 14 May 2008 15:27, Benoit Minisini wrote:
> > - As Jose Luis says, would be possible to design web forms from
> > GAMBAS?
>
> No.

While I know that's true at present, I did write something a few years
back (before these AJAX frameworks were created) that converted
Gambas 1.0 forms to HTML+CSS on the fly, and added a lot of Javascript
event handlers to handle clicks and things like that.  Of course, the
server side was written in perl, and the whole thing turned out to be
incredibly clumsy.  But it allowed serving up Gambas forms on the web
and, to a degree, having them act like normal desktop app forms.

It was far from a literal Gambas web form designer, but I really think
such a thing would be possible if the other things we've been talking
about on this thread came to be.

Rob

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Gambas-user mailing list
Gambas-user@...
https://lists.sourceforge.net/lists/listinfo/gambas-user

Re: Gambas as language for web development

by Bugzilla from gambas@users.sourceforge.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On mercredi 14 mai 2008, Rob wrote:
> On Wednesday 14 May 2008 14:51, José Luis Redrejo wrote:
> > http://en.wikipedia.org/wiki/Comet_%28programming%29
>
> Yes, this technique would really be required for doing Gambas
> desktop-style programming in a web app.  Dojo does that too, though
> again I'm sure there are other toolkits that would work just as well.
>
> Rob
>

I continue on finding that these techniques are mainly hacks wasting
resources.

One big interest of web applications made in the classical HTTP request way is
that they do not consume any server resource between requests, and do not use
persistent connections.

As soon as, on the server side, you can share your session files and your disk
data, you can put your application in many different servers and so easily
increase the power of the application and have fault tolerance. A machine can
crash during your session, and you may not see it at all.

And a desktop-like application in a browser is something like NoMachine / X11
without NoMachine and X11 after all...

--
Benoit Minisini

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Gambas-user mailing list
Gambas-user@...
https://lists.sourceforge.net/lists/listinfo/gambas-user

Re: Gambas as language for web development

by Rob Kudla :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wednesday 14 May 2008 15:46, Benoit Minisini wrote:
> I continue on finding that these techniques are mainly hacks
> wasting resources.

Maybe so, but those hacks are in extremely high demand right now.  CGI
is fine, but users don't want the entire page to reload when they
change their selection in a listbox that other form controls depend
on.  Besides, even CGI itself is a hack, considering that HTTP was
originally designed to just serve up static pages and provide minimal
searching.  It's just a hack that's 8 or 9 years older.

And keeping a socket open may be excessive, and I feel totally
recreating the desktop Gambas experience would probably result in a
lot of bad applications written by people who don't understand the
web, but just sending a list of values to populate an HTML select is
a lot less data than redrawing the entire page.  Same with updating a
stock ticker or chat window.  That's the sort of thing these
techniques were really meant to do.

Rob

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Gambas-user mailing list
Gambas-user@...
https://lists.sourceforge.net/lists/listinfo/gambas-user

Re: Gambas as language for web development

by Tomas Eroles i Forner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello again
So much weeks ago we discussed about this subject. I'm looking for more
information.
I was looking your example, and it looks very nice, Benoit, but I do not
understand completely how you have done it. I worked with .NET
applications for the net, but there are some years ago, and, sincerely,
I do not remember.
So, I took a look at Gambasdoc with respect to the web component, but
I'm not sure of understanding how does it works.

Then, I would like to test this functinality and I've created a small
application (blank now), but I do not find how to start.

Could anybody help me? That is, which steps must I follow?

Thanks in advance


El dc 14 de 05 del 2008 a les 21:27 +0200, en/na Benoit Minisini va
escriure:

> On mercredi 14 mai 2008, Tomas Eroles i Forner wrote:
> > Very good example!
> > But I have more questions:
> > - As Jose Luis says, would be possible to design web forms from GAMBAS?
>
> No.
>
> > - How are defined the forms in your application?
>
> The application is a CGI script, so you have tu use PRINT to send the HTML to
> the browser.
>
> > - And how are you embeeding the GAMBAS code to control the behaviour of
> > the application?
>
> Embedding? There is no "embedding" anywhere...
>
> > - Does I need anything to add to my Apache to run apps with GAMBAS CGI?
>
> No. I suggest you replace your Apache by something like thttpd. A light
> browser usually speeds up your web application.
>
> Regards,
>


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gambas-user mailing list
Gambas-user@...
https://lists.sourceforge.net/lists/listinfo/gambas-user

Re: Gambas as language for web development

by José Luis Redrejo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2008/6/7 Tomas Eroles i Forner <tomas.eroles@...>:

> Hello again
> So much weeks ago we discussed about this subject. I'm looking for more
> information.
> I was looking your example, and it looks very nice, Benoit, but I do not
> understand completely how you have done it. I worked with .NET
> applications for the net, but there are some years ago, and, sincerely,
> I do not remember.
> So, I took a look at Gambasdoc with respect to the web component, but
> I'm not sure of understanding how does it works.
>
> Then, I would like to test this functinality and I've created a small
> application (blank now), but I do not find how to start.
>
> Could anybody help me? That is, which steps must I follow?
>
> Thanks in advance
>
>
You can take a look to rayuela-ldap at
http://linex.educarex.es/debian/pool/main/r/rayuela-ldap/
It's a small application that runs a gambas cgi to import a xml file, and
create users accounts in a ldap server. You can ignore the importation of
the data and ldap exportation, it does not care for your purpose, but you
can see how a cgi made in gambas is done.

Hope this helps.
Regards.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gambas-user mailing list
Gambas-user@...
https://lists.sourceforge.net/lists/listinfo/gambas-user