HaxeFoundation / haxe

Haxe - The Cross-Platform Toolkit
https://haxe.org
6.18k stars 656 forks source link

Issue 1855 - please implement Web class in java and Csharp targets - haxe #1855

Closed issuesbot closed 10 years ago

issuesbot commented 11 years ago

[Google Issue #1855 : https://code.google.com/p/haxe/issues/detail?id=1855] by zaxe...@gmail.com, at 26/05/2013, 19:33:18 with reference to http://haxe.org/api , the php.Web class and neko.Web class should also be implemented. This will enable in easy porting of neko and PHP web applications to run on pure java web servers like Apache Tomcat; which is really important.

other candidates for implementation is neko.Random, neko.net.* and neko.zip.* classes in java and csharp targets. This will help in easy and instantenous porting of neko and php targets based haxe programs to instantaneously compile on java and csharp platform with least issues.

zaxebo1

issuesbot commented 11 years ago

[comment from zaxe...@gmail.com, published at 26/05/2013, 19:49:20] producing a .war file for deployment on tomcat from the same set of haxe source files; which also produce php files to run on normal Apache web server , will be the real important and useful feature to have.

zaxebo1 zaxebo1@ gmail.com

issuesbot commented 11 years ago

[comment from waneck, published at 26/05/2013, 20:44:01] I agree with this, but it seems to me that another cross-platform Web API should be created instead. For example, the fact that the current Web API is static has bad implications on some web servers. Also, this kind of feature may fit better into a library, precisely to have a post-build feature that will deal with deploying to each target correcly

issuesbot commented 11 years ago

[comment from zaxe...@gmail.com, published at 27/05/2013, 04:25:19] implementation can be in library or in core haxe/java(haxe/c#) distribution; but the thing is that there is so much need to bring haxe/java and haxe/C# ports on the "functional level features" as of haxe/php and haxe/neko. May be in future WebAPI can be changed or not. But as on date, there is a great deal of code , which provides web interface written in pure haxe and deployed on haxe/php. If by porting neko.Web (php.Web) ,neko.Random, neko.net.* and neko.zip.* to java , we can bring a great deal of code to tomcat instantly (without needing PHP or mod_neko), then many enterprise people can have a relook on haxe as on date. Discussion on a futuristic and better web API for all - will take a bigger time window to materialize. Once that happens new WebAPI can also be implemented in haxe/java . But as of now, the reality is that no such web API exists, and it will take time to port old code in current haxe WebAPI to a futuristic Web API. We should realize the current popularity haxe/php port, and allow people "as on date" to target the "existing applications" to tomcat instantly without much change. zaxebo1 zaxebo1@ gmail.com

issuesbot commented 11 years ago

[comment from zaxe...@gmail.com, published at 27/05/2013, 05:00:47] on "Shared hosting packages" , as of date we have three options available on internet - Windows hosting (C#+IIS), PHP hosting, Java Hosting.

Putting the above small bunch of classes in already really awesome haxe/java and haxe/c# target will enable to target on any shared hosting platform to use haxe "as on date" from a single EXISTING source code base, rather than waiting for emergence of an idealistic Web API. This is really important to get haxe into the java web shops "as on today" with EXISTING SOURCE CODE BASE.

royag commented 11 years ago

I created a little haxe/php-web-framework some years ago:

https://code.google.com/p/hails/

It's not been developed much lately, but I recently upgraded it to be haxe3-compatible, and to at least be able to compile a "Hello World"-web-app for Tomcat (as a servlet).

One of the things I had to do was, as waneck points out, remove the static calls, since the web-context is not available statically in a Java-servlet.

It's unfortunately not very well documented, but if anyone is interesting in hacking/contributing, give me hint.

The "grand vision" was of course making it able to deploy as both PHP,mod_neko,C++/CGI,Java,C#, but I never got the time for that.

waneck commented 10 years ago

I guess this doesn't make much sense anymore, now that ufront is becoming the standard way to do web dev with Haxe.