I'm very happy to announce a huge step up for haXigniter! The latest release is a jump up from 0.57 to 0.8, because of two major features that will make web development for haXe more exciting than ever. Sorry if I sound like a TV announcer, I just watched some Guinness world records and the overexcited commentators must've made an impression. :)
First feature anyway is that haXigniter is now a full-fledged haxelib! No need to mess around in the library code and directories, you install the library from haxelib and it's there to use in any project you like. Starting a project from scratch is never fun though, so a build tool is included that will produce a workable project structure for you to build upon. Want to know how easy it is to install and compile a fully functional project?
1. "haxelib install haxigniter"
2. "haxelib run haxigniter init -neko"
3. Goto project directory
4. "ignite build"
5. "ignite nekoserver"
6. Browse to
http://localhost:2001/
Done! That's the super quick start for the impatient, for more details please visit the quick-start page on the wiki (url at the bottom).
The second feature is a step towards the world of Web 3.0: Acknowledging that the web is becoming a huge set of resources, that could be turned into whatever shape imaginable, haXigniter is now provided with an extremely powerful RestApi for exactly that purpose.
Combining the clear syntax of RESTful URLs with the power of CSS selectors, the RestApi can translate a simple url into a database query, sending and retrieving filtered information between server and client. Here are a few examples:
/tags/[name=food]/news/ - Retrieves all news articles tagged "food" from a news database.
/news/12/comments/[created>2009-11-16]:lt(10)/ - Retrieves 10 comments that was made last week on news article 12.
/orders/[created>=2009-01-01][created<2010-01-01]/customers/[country=Japan]/ - Retrieve the Japanese customers that have placed an order in 2009.
/customers/[email$=
gmail.com]:order(name)/ - Retrieve all customers whose email ends with "
gmail.com", ordering by name.
Starting to see the possibilies? The data retreived from these resources can be any format, but the built-in haXe format handler transfers data between server and client in a typesafe, useful fashion. You'll get the data like a database ResultSet, but automatically paginated and with nice error handling if the request fails for some reason.
Of course the standard methods of GET, POST, PUT and DELETE are supported, so you can create, change and delete resources as easily as retrieving them. All this is wrapped in a powerful but easy-to-use security system, supplying ownership of resources and preventing access down to field-level if needed.
I could talk and talk about this exciting REST interface, but let's stop now, not forgetting the rest of haXigniter. (I swear that was unintentional.) It's also a "normal" web framework, that brings you on a silver platter some of the following features:
* Unit and integrity testing made simple
* Quick and secure database access
* Improved tracing and logging
* Multiple template engine support for views
* Automatic session handling
* Useful libraries like inflection and server redirection
* User-friendly error handling
* Full Neko and PHP support on the server side.
Many thanks to John A. De Goes and Franco Ponticelli for help and contributions to this big step forward.
/Andreas