[Gambas-user] Gambas WebPage

Sebastian Kulesz sebikul at ...626...
Sat Jan 28 16:53:36 CET 2012


I really like this idea, it makes an application really versatile.
What I think is that before starting to code it you must define some
things.

First, the security implications. Will real webpages be able to use
that syntax?. A nice feature would be a whitelist of allowed pages
that can be executed within a form, maybe with the include tag.

Second, and most important.  How would you manage to call each event
of a form input object, like a textbox? How could someone use the
value of a textbox, for example? What happens if two form objects have
the same "name" attribute? When an input button is pressed, the user
is normally redirected to the "action" webpage, will you override this
to execute an event and let the user choose?

Third, about the links. A nice syntax would be
gambas://FormName/Method/Param1/Param2/...

That's all I could think of. Thanks for all the work!!

On 28/01/2012, at 07:07, "Benoît Minisini"<gambas at ...1...> wrote:

> Hi all,
>
> I have started the support of a new kind of "form" in the IDE, the
> "WebPage".
>
> WebPage is an HTML page with ASP-like syntax. It is implemented in the
> gb.web component.
>
> The IDE now can edit WebPage, but cannot compile them.
>
> Actually it is "just" a matter of modyfing the compiler so that the
> WebPage is transformed into Gambas code that generates the final HTML.
>
> At the moment, the following ASP-like syntax will be implemented:
>
> - <% ... %> to insert any Gambas code.
>
> - <%= ... %> to insert the result of a Gambas expression. Html$() will
> be automatically called.
>
> - Maybe something like <%INCLUDE ... %> to include a WebPage in another one.
>
> Note that the WebPage is a file with a ".webpage" extension, and that,
> they have their own class file attached (like any form).
>
> That way, you don't have to put all your code inside the HTML. Just what
> is needed.
>
> Internally all WebPages will inherit the WebPage class, and will have a
> "Render" method to render their contents (i.e. print to the standard
> output - don't forget that a Gambas web application is a CGI script!).
> They can be startup class too.
>
> I'd like to have the thoughts of Gambas users about that: what kind of
> syntax you would like, what ideas you have...
>
> One idea I have would be a standard syntax for the URL received by the
> CGI script, so that the displayed WebPage would be automatically
> selected from it. It could be something as simple as
> "http://myapp.com/<form name>".
>
> Thanks in advance for your comments.
>
> Regards,
>
> --
> Benoît Minisini
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user




More information about the User mailing list