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.
Posts about stuff I encounter when programming in Swift. Lots of example code.
Do you need help on a specific subject? Use the contact form (Request a blog entry) on the right hand side.
Showing posts with label Swift. Show all posts
Showing posts with label Swift. Show all posts
2017-04-04
2015-06-12
Final, Private and optimization
I just saw the WWDC video "Optimizing Swift Performance".
A very useful video for all software developers (that use Swift).
As a software engineer I create software solutions. In order to do that to my best ability, I have taken a liking to "Software Engineering" as a discipline. I.e. how to write good software. Using information hiding, decoupling etc, all these kind of things. Given this background I think I can be forgiven that I assumed that the "Final" and "Private" were in fact tools to help the software engineer.
Hmm, I could not have been more wrong.
After looking at the video, I think you will agree: "Final" and "Private" are meant to allow the compiler to optimize.
Sure they have some meaning for the engineer as well, but all in all? no they are optimizer switches!
Btw: I used "Final" on a class that is the basis of my recent app and that will not be subclassed. The speed improvement was substantial!
There is more in the video, but I for me will use "final" and "private" wherever I can...
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.
A very useful video for all software developers (that use Swift).
As a software engineer I create software solutions. In order to do that to my best ability, I have taken a liking to "Software Engineering" as a discipline. I.e. how to write good software. Using information hiding, decoupling etc, all these kind of things. Given this background I think I can be forgiven that I assumed that the "Final" and "Private" were in fact tools to help the software engineer.
Hmm, I could not have been more wrong.
After looking at the video, I think you will agree: "Final" and "Private" are meant to allow the compiler to optimize.
Sure they have some meaning for the engineer as well, but all in all? no they are optimizer switches!
Btw: I used "Final" on a class that is the basis of my recent app and that will not be subclassed. The speed improvement was substantial!
There is more in the video, but I for me will use "final" and "private" wherever I can...
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.
Subscribe to:
Posts (Atom)