Slashdot Mirror


Embedding Mozilla in Mac OS X Cocoa Apps

JimCricket writes "Art & Logic has published a new article: Embedding Mozilla in Mac OS X Cocoa Apps . The author presents a detailed step-by-step guide for Mac OS X developers that want to use Mozilla within their applications."

11 of 49 comments (clear)

  1. Why not WebKit/KHTML? by foyle · · Score: 5, Insightful

    Why would you embed Mozilla, which is acknowledged to be bloated even by its supporters, instead of Apple's WebKit (based on KHTML, used in Safari)?

    WebKit Docs

    1. Re:Why not WebKit/KHTML? by Anonymous Coward · · Score: 4, Informative

      Been a while since you checked out Safari, huh? iht.com, which was a pain in the ass for a long time, has been working for weeks now, since the late betas.

  2. embed _Mozilla_, or Gecko? by Tumbleweed · · Score: 3, Insightful

    I don't even wanna know why you'd want to embed the whole frickin' browser in anything, rather than just the renderer. And if you're going to embed the renderer, then just use the system one in WebCore, based on the KHTML renderer.

    1. Re:embed _Mozilla_, or Gecko? by Quixotic+Raindrop · · Score: 3, Insightful

      Actually, one reason _not_ to use WebCore is that it doesn't handle quite a number of websites using authentication now, which tells me that their authent package is broken (or, simply behind). IIRC, Safari uses webcore, and has tremendous difficulty (even yet) with e-commerce and online banking sites. Mozilla/Mac OS X is able to connect to these sites, and I assume would be a better choice for secure connections (whether Gecko or Mozilla itself).

      --
      Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. (Einstein)
    2. Re:embed _Mozilla_, or Gecko? by nitehorse · · Score: 4, Informative

      Of course WebCore is JavaScript-enabled.

      Or haven't you heard of JavaScriptCore? It's a part of WebCore.

    3. Re:embed _Mozilla_, or Gecko? by megabulk3000 · · Score: 5, Interesting

      Sure, check this article for instructions on how to make a one-line-of-code web browser in Cocoa using WebCore (and the comment at the bottom of the article which tells how to make a no-line-of-code browser!)

  3. Re:the point is this... by Anonymous Coward · · Score: 3, Insightful

    most of the "kruft" that has "bloated" gecko is in fact the kind of support code that's slowly being added by apple to kthml to get it to support the *REAL* web.

    Huh? No, Gecko is over 1 million lines of code, more than 10 times the size of KHTML. Most of that is stuff like their own string and basic container classes. (Why do people feel compelled to write THEIR OWN fundamental library classes? It boggles.)

    but just around the corner there are *hundreds* of other sites, already workin in gecko mind you, that kthml is going to have to hack around

    Hundreds? Doubtful.

    its horribly naive to think that in 1 years time when khtml comes close to approaching where gecko is *now* (not to mention where gecko will be in 12 months) that khtml will still be as light and clean as it is now

    Except that KHTML is already superior to Gecko NOW. You seem to have missed that little tidbit.

  4. Silly unless you want to make your own browser.. by Steveftoth · · Score: 4, Insightful

    For most programmers, we are just looking for a way to embed a small HTML rendering system so that we can display documentation, help, or someother hyperlinked document. Quickly too, so that we can easily get back to making a quality application. Gecko is a huge project and if you want to use it as the basis for an application more power to ya.

    However, Apple has the edge here with WebCore, you can now make a generic web browser without a single line of C/C++/ObjC code. Using only project builder, Interface Builder and WebCore, you can create a custom browser. It won't have many options, but it's quick and easy. Takes like 10 minutes to get working if you have all the tools installed.

  5. Re:the point is this... by madamimadam · · Score: 5, Interesting

    You seem to be forgetting the VITAL point that Apple REFUSES to release a new version of Safari, and therefore the WebKit, if it is at ALL slower that the previous version. This is a definate fact that Apple hangs on to dearly and could be why there are still a few places that they need touching. As per WWDC, sometimes coders kind of cheat by optimising another part of the code so that their new code does not slow down the browser but as long as the end result is that the new build runs at least as fast as the previous build, Apple will release it. If it is at all slower than the previous build, Apple refuses to let it out of the closet.

  6. One would want cross-platform solutions by Anonymous Coward · · Score: 3, Informative

    Safari ain't the bee's knees as far as I'm concerned, although I'm using it right now. It's got lots of advantages, sure, but it's still not handling as many pages as Mozilla for OSX. Mozilla 1.4 is fast and stable, and runs on almost everything. Safari is fast and stable and you need to be running OSX to use it.

    Explorer is the world-wide de facto standard right now; it's a bad browser with a lot of propritary drek in it, and much more coming down the line, including possibly a subscription service. Why not embed Mozilla in everything? Since it's cross-platform, open source, and pretty good?

    How would you rather do your online banking five years from now?

    A) With Windows, which charges you $1,000 a month just for the right to use Explorer?

    B) With Safari, which comes with a $25,000 entry-level iMac?

    C) With Mozilla, which is free, and which will run on almost anything?

    Mozilla isn't the be all and end all of browsers, but it's cross-platform, open-source, and runs all right. Nothing to sneeze at.

  7. Vaguely related note: Embedding SDL in Cocoa Apps by follower-fillet · · Score: 3, Informative

    I noticed recently that there's work going on to embed SDL in Cocoa Apps, here's a link to some sample code:

    "Mac OS X Cocoa Integration Patch and Sample Code"

    http://www.libsdl.org/pipermail/sdl/2003-July/05 54 35.html

    In theory, with this in place I believe it should also be possible to embed SDL in Mac OS X wxWindows apps, once the 'GetHandle' functionality is implemented there.