Hacker News new | ask | show | jobs
by Zev 4930 days ago
Maybe the author had a need for it, built it, and is throwing it out there for anyone else who might have a similar need? Maybe you need to embed a web server in your app for something? Maybe you're really comfortable with ObjC and just want to get a quick server up for prototyping? Maybe you don't find it to be too verbose, and prefer having code that's easily self-documenting instead of relying on framework knowledge? Maybe you like being able to use a framework like Foundation (which has had 20+ years of history)? And so on.
1 comments

Everything you've mentioned could possibly be a decent reason for this beast. I'd just love to hear what they were. You make something like this for one of two reasons.

1) you've got a lot of spare time on your hands and wanted to test your skills and show your love for a language. Based on the outlandish hello world example (which is useless for most web developers), this is most likely.

2) you had some ridiculous constraints and really absolutely had to build a web sever in objective-c. In this case, a better use case or example would be appreciated.

3) You think that having a common language for all parts of your project could be an advantage, for example sharing your model code. Especially valuable if you've decoupled your model from your delivery framework like Uncle Bob told you ...;-) http://www.confreaks.com/videos/759-rubymidwest2011-keynote-...

4) You find that the very small amount of spare time this sort of thing takes is worth it, even if just for kicks.

5) You miss WebObjects.

6) In addition to having code commonality, you might be interested in performance that allows you to not have to worry about scaling out for much much longer than other common solutions (or requiring rewrites if you're successful). For example, my own embedded Objective-C web lib (based on libmicrohttp) clocks in at around 30K requests/second even when initialized via script on my laptop, whereas something like Sinatra does around 900.

http://blog.metaobject.com/2012/03/30k-requests-aka-wrk-is-f...

http://blog.metaobject.com/2011/12/ruby-and-rails-scalabilit...

7) You think textual verbosity is a good thing when it adds to readability.

8) You want to embed a web-server in your iOS and/or MacOS X app. Peer to peer, like the Internet was originally intended. While it may be possible to achieve with RoR or Sinatra or the like, an ObjC lib is just less hassle.

> 5) You miss pre-v.5 WebObjects

FTFY :)

Thanks! Exactly what I meant :)

In other words: there was a WebObjects after v4? ;-)

It was built in order to be able to create web applications in my scripting language called 'tranquil'. (And written in Objective-C to maximize performance)

Here's the first web app to be written using it: https://github.com/fjolnir/experience-tranquility