Do you need help on a specific subject? Use the contact form (Request a blog entry) on the right hand side.

2017-04-04

Swiftfire | Building websites in Swift

As you could guess from a lack of postings lately, I have been quite busy. The main effort has gone into a new kind of (web)server that would allow me to write websites in Swift.

Finally I have now gotten it to the point where this is now actually possible.

Swiftfire is the name of the project and it is hosted on github.

How does it work?

You can use function calls in HTML or CSS files that Swiftfire will replace with the result of that function call.

An example:

<p>This page has been accessed .nofPageHits() times<p>

will become:

<p>This page has been accessed 12744 times<p>

Assuming of course that the function "nofPageHits" has been implemented and registered with Swiftfire. (It has, because it is a build-in function)

Swiftfire is distributed as source code, allowing anybody to write their own functions, and thus allows anyone to develop entire websites in Swift.

Swiftfire uses only three hooks to allow anybody to extend its functionality:

1) Application Setup
2) Service registration
3) Function registration

The difference between Services and Functions is that functions work at the file level, and services work at the (HTTP) request level. Together they allow fully customization of the website.

As proud as I am on the current status of the project, I should point out that it is still in beta stadium. The foundation is in place, but now it needs fleshing out.

Still, if you want to create websites in Swift, head over to the swiftfire website for more information.

In case you were wondering, Swiftfire also supports HTTPS and multiple domains.

Happy coding...

Did this help?, then please help out a small independent.
If you decide that you want to make a small donation, you can do so by clicking this
link: a cup of coffee ($2) or use the popup on the right hand side for different amounts.
Payments will be processed by PayPal, receiver will be sales at balancingrock dot nl
Bitcoins will be gladly accepted at: 1GacSREBxPy1yskLMc9de2nofNv2SNdwqH

We don't get the world we wish for... we get the world we pay for.

2 comments: