Any good resource for learning advanced concepts?

151 views
Skip to first unread message

Nripendra Nath Newa

unread,
Jul 3, 2015, 3:29:08 AM7/3/15
to haxe...@googlegroups.com
Hi All,

I have been going through documentations on the haxe official site, but only thing that I find here is basic introductions. Its ok for hello world like introductory programs, but I'm looking for something more complex.

- How to manage large projects? Building libs and dlls and linking to main project.
- How to call native OS functions e.g it can be done using dllimport in c#. (My program requires modifying windows registry, registering/un-registering font resources etc)
- How to share code between multiple platforms? i.e. how to handle situation where we need to write specific code for each platform, calling native OS functions.
- I'd like to be able to build a daemon/windows service. Is it possible using haxe?
- Also is there any library support for building an embedded web server?
- IPC using named pipes.
- How to approach UI, can we build UI in native like cocoa/WPF and then interface with haxe?


Regards,
Nripendra

Alex Kolpakov

unread,
Jul 3, 2015, 3:57:24 AM7/3/15
to haxe...@googlegroups.com
These are good topics and a good question indeed.
Unfortunately there's no central bureau of Advanced Haxe tutorials; it's all rather scattered among blog-posts of Haxe programmers and some open-source apps that illustrate live examples.

 I'd suggest looking into blog posts of these people ( the list is just off top of my head, please don't think it's anywhere near complete ):

Jason O'Neil - http://jasono.co/
Joshua Granick (also just google his name, he had some blog posts) - http://www.openfl.org/
Juraj back2dos Kirchheim - google for his blog posts, videos and look at his github - https://github.com/back2dos
Nicolas Cannasse (creator of Haxe and the only person on this list who's name doesn't start with "J") - http://ncannasse.fr/

Of course there are many others. I'd suggest following the @haxelang twitter account as well as @Open_FL and @HaxeFlixel as often you'll see some cool things shown and that could lead you to discover a new blog post or let you contact some cool people directly.

Now on the topic of your concrete questions, I'll try to provide with the best answers in my ability:

Q: How to manage large projects? Building libs and dlls and linking to main project.
A: Treat Haxe projects like a C# project. In many ways the languages are similar with minor advantages in each. But also, Haxe is Action Script 3.0 on steroids: if you've been making Flash apps for a while - just continue in the same coding style and slowly build up by discovering new language features. For building libs - look into haxelib (http://haxe.org/manual/haxelib.html); DLLs are for Windows platform mostly, I'm not sure if it would be an advantage to use them if you plan to use your app to be cross-platform.

Q: How to call native OS functions...?
A: Look into native extensions. There are plenty created already. Since I'm using the OpenFL (Open Flash Library) framework, I use their native extensions. Also, you can create your own if you know how to write the native code for that platform! Link:  http://player03.com/2014/08/09/openfl-extensions/

Q: How to share code between multiple platforms?
A: Haxe is doing a very good job at being cross-platform, but if you have to make some code that is specific for a platform ( e.g. saving files in Flash Player would require FileReference while in C++ you can go with File class ) then you need to use compilation conditions (http://haxe.org/manual/lf-condition-compilation.html) also use typedefs if it's a whole class and not just a line of code to make it prettier and easier to maintain.

Q: How to approach UI?
A: Look into HaxeUI (http://haxeui.org). Other than that...as much as I could find for myself you'll have to build your own UI ( I did ), but don't take my word for it - I make games and there's virtually no way I'd use default/out of theme UI in a game. There might be a way. But still look into HaxeUI

Some questions I skipped but only because I have no idea how to approach them. Hopefully more people will reply and help.

Also, if you end up digging up some information and find it to be useful - feel free to write a blog post and share it with everyone else!

Best regards,
Alex.

Rafael Oliveira

unread,
Jul 3, 2015, 9:35:56 AM7/3/15
to haxe...@googlegroups.com
The old site has some documentation that was not ported yet

Nripendra Nath Newa

unread,
Jul 3, 2015, 12:00:52 PM7/3/15
to haxe...@googlegroups.com
Thank you all for your effort. I'll try looking into the resources linked here.

Regards,
Nripendra

Victor / tokiop

unread,
Jul 3, 2015, 3:20:24 PM7/3/15
to haxe...@googlegroups.com
Hi !

> - Also is there any library support for building an embedded web server?

this might help https://github.com/tong/wtri

Victor

Nripendra Nath Newa

unread,
Jul 4, 2015, 1:49:09 PM7/4/15
to haxe...@googlegroups.com
I tried downloading wtri and placed it in global lib folder, and tried embedding into my haxeui application, but it simply causes the application to hang. Trying to connect to it from browser just keeps on loading.

Mark Knol

unread,
Jul 5, 2015, 3:07:36 PM7/5/15
to haxe...@googlegroups.com
If you want to learn about macros, i collect some links here https://gist.github.com/markknol/2776beb30a3acab93394

Victor / tokiop

unread,
Jul 8, 2015, 9:09:49 AM7/8/15
to haxe...@googlegroups.com
> I tried downloading wtri and placed it in global lib folder, and tried
> embedding into my haxeui application, but it simply causes the application
> to hang. Trying to connect to it from browser just keeps on loading.

maybe a threading issue with the UI/OpenFL side ?
the project builds and run well from commandline..
Reply all
Reply to author
Forward
0 new messages