Live data from Hacker News

WebAppKit - create web applications using Cocoa

webappkit.org

21–30 of 46 posts

Re: WebAppKit - create web applications using Cocoa

#21
post #20
post #18

Earlier quoted context omitted.

How is this similar to node.js? This looks just like a MVC framework that happens to be in Obj-C.

I'm thinking about the fact that neither JavaScript on V8, nor Cocoa are equipped with HTTP networking. So the framework supplies that part. A big part of node, when used for a web app, is that it supplies an HTTP server. Same with this.

Cocoa (and CoreFoundation) actually make it pretty trivial to write HTTP servers already. I was completely surprised by how painless it was when I did it recently. Not quite as easy as Node.js, but on the same order of magnitude, IMHO.

(Edit) Here's an article that describes the basics: http://macdevcenter.com/pub/a/mac/2006/11/14/how-to-write-a-...

Re: WebAppKit - create web applications using Cocoa

#22
post #11
post #3

Boy, I really don't know. I've actually enjoyed using Objective-C and Cocoa when used for Mac OS/iOS development (the dynamicity of Smalltalk data structures with the control flow of C), but I don't think I'd ever voluntarily choose it outside that context. Too verbose, too fragile.

Fragile? Compared to what? Not going to argue with verbose though, and I also wouldn't choose it for web apps.

It's C, for heaven's sake. ;) Compared to any dynamic / memory-safe language in history. Oh, I don't know--Perl, Python, Ruby, Javascript, Lisp, Haskell, oh, and Java, I s'pose.

Re: WebAppKit - create web applications using Cocoa

#23
Genuine question: what is the appeal here?

I write iOS apps for a living, and appreciate what Objective-C and (especially) Cocoa have to offer, but why would anyone choose to use Objective-C when there are so many other great alternatives available?

To consider just one example of the pain Objective-C developers like me have to deal with on a daily basis, why would I want to write:

  NSDictionary *d =
      [NSDictionary dictionaryWithObjectsAndKeys:
       [NSNumber numberWithInteger:1], @"foo",
       [NSNumber numberWithInteger:2], @"bar", nil];
when most other mainstream web programming languages allow me to write something like:

  d = { "foo" => 1, "bar" => 2 }

Re: WebAppKit - create web applications using Cocoa

#24
post #23

Genuine question: what is the appeal here? I write iOS apps for a living, and appreciate what Objective-C and (especially) Cocoa have to offer, but why would anyone choose to use Objective-C when there are so many other great alternatives available? To consider just one example of the pain Objective-C developers like me have to deal with on a daily basis, why would I want to write: NSDictionary *d = [NSDictionary dic…

Relative runtime speed or compatibility with an existing Objective-C code base that you want to easily call from your web app are two possibilities that spring to mind.

This isn't to say that conciseness of expression isn't a useful attribute, but I don't think it's so utterly critical to web development that the any tool suited for the job must provide such things as concise dictionary syntax.

You use the best tool for the situation, and I can at least conceive of situations in which I might care about the benefits that come with using Objective-C et al more than I care about how verbose dictionary initialization is.

Re: WebAppKit - create web applications using Cocoa

#26
post #23

Genuine question: what is the appeal here? I write iOS apps for a living, and appreciate what Objective-C and (especially) Cocoa have to offer, but why would anyone choose to use Objective-C when there are so many other great alternatives available? To consider just one example of the pain Objective-C developers like me have to deal with on a daily basis, why would I want to write: NSDictionary *d = [NSDictionary dic…

Objective-C's incredibly verbose syntax for array and hash manipulation is my number one pain point with the language. A little syntactic sugar would go a long way here.

Re: WebAppKit - create web applications using Cocoa

#27
post #16
post #15

Isn't this basically what WebObjects did back in 1995? (WebObjects used to be written in Objective-C, but Apple switched it to Java sometime during the server-side Java boom in the late '90s.)

Yes, that's essentially what WebObjects was. However, WebObjects today is a mess, and it's written in Java. Also, we have a ton of conventions today, with regards to MVC development, REST APIs, etc. that we did not have in '95. Which means that therefore WebObjects is not suited to modern web development. The only company still using WebObjects in production today is Apple.

> The only company still using WebObjects in production today is Apple.

What about Web Help Desk?

http://www.webhelpdesk.com/

Re: WebAppKit - create web applications using Cocoa

#29
post #23

Genuine question: what is the appeal here? I write iOS apps for a living, and appreciate what Objective-C and (especially) Cocoa have to offer, but why would anyone choose to use Objective-C when there are so many other great alternatives available? To consider just one example of the pain Objective-C developers like me have to deal with on a daily basis, why would I want to write: NSDictionary *d = [NSDictionary dic…

Objective-C's incredibly verbose syntax for array and hash manipulation is my number one pain point with the language. A little syntactic sugar would go a long way here.

Try this set of macros that adds some syntactic sugar to obj c: https://github.com/petejkim/ConciseKit

For example, this:

  [NSDictionary dictionaryWithObjectsAndKeys:v1, k1, v2, k2, nil]
Turns into:

  $dict(v1, k1, v2, k2)

Re: WebAppKit - create web applications using Cocoa

#30
post #3

Boy, I really don't know. I've actually enjoyed using Objective-C and Cocoa when used for Mac OS/iOS development (the dynamicity of Smalltalk data structures with the control flow of C), but I don't think I'd ever voluntarily choose it outside that context. Too verbose, too fragile.

What do you think is different about Mac OS/iOS context vs others that makes Cocoa's approach more or less appropriate?
Post reply on HN