In my last post, I was exploring new web frameworks to migrate to, while learning more Elixir. I attempted a few, but learning a framework can be uphill, especially when not being fluent in the language. The main frustrating point was not being able to understand the errors I was getting. They were usually in one, long, truncated line. So not only was it formatted poorly, it didn’t give me all the information that was intended for me. I didn’t really find a good way of getting better error information or analyzing the errors I was getting, so finally I gave up… for now.
So I went back to what I know, and I know Objective-C and Cocoa really, really well. And there are a few webservers for it. I grabbed OCFWeb, thinking perhaps I could add exploration of Objective-Cloud to the task. This way I knew I would be able to understand the error messages I was getting, I had a debugger I could set breakpoints with and step through, and I would be comfortable.
With the advice of Christian Kienle I switched my templating language to Mustache. I forked it to update Mustache to a newer version and still be able to use OCFWeb as a Pod. That worked fairly well, but of course it’s a new framework to learn, just like all the other web frameworks I’ve tried so far. It isn’t much used, which means searching the web didn’t give many results, and thus I had to dig through the source exploring how the pieces fit together when I didn’t understand how to do something or why it behaved another way than I expected. That, of course, was a good opportunity to contribute, but it also exposed a weakness with my Cocoa-approach: the recompile-restart-reload cycle of seeing the results of my changes was rather longer than what I wanted. Of course, the content could be modified by having it outside of my application, but the routes and logic could not. Or at least I didn’t think of a way where I could keep it outside the server app.
So for now, I won’t be deploying my website as a Cocoa app either. Coming up next, back to Node.js