Haxe as one one language for websites

Using existing frameworks might get you started quicker, because they already solve the basics. But you also have to adopt their way of thinking, their way of doing things, which might not be how you prefer to solve your problems or how you organise your logic / code.
So I’d say take a look at them and maybe try them out, but if you find that they don’t work for you, then you can as well just get your hands dirty and write your own framework.

I use Haxe to build PHP and JS sites and I decided to write my own framework (a couple years back) - it’s a lot of work, but you can start small and expand with every project, adding more and more features. Thanks to Haxe I am able to use my framework or parts of it even in C++ or Java projects, which I didn’t plan for when I started, my focus was on PHP and JS.
It has about 40K lines of code as of now, just to give you a number… I guess someday I need to split it up into smaller parts.
Features include a database layer, a logging mechanism, a mail implementation, easy to use form fields, and a bunch more.

So it’s possible to do it, and it might be the right way to go for you. If you already have your own framework written in PHP, then porting it over to Haxe should be pretty straight forward - if you have the time to do it. That way you can continue to work as you did in pure PHP, but you get type safety and all the other Haxe goodness.

As to reinventing the wheel: Sometimes it’s fun to be able to reinvent the wheel. And it’s not like there are hundreds of wheels to choose from, especially for web development.
There is also a section about wheels in The Joy of Haxe

Just in case someone asks: Unfortunately there are currently no plans to release my framework as open source.

1 Like