Rebel: a Framework for Improving AppKit
In our last blog post, we revealed Mantle, our Cocoa model framework. Today, we’re announcing Rebel, a framework for improving AppKit. Since you may recall our original TwUI announcement, the…
In our last blog
post, we
revealed Mantle, our Cocoa model framework.
Today, we’re announcing Rebel,
a framework for improving AppKit.
Since you may recall our original TwUI
announcement, the decision to
start using AppKit again bears some explanation.
Farewell, TwUI
For a while now, we’ve been collaborators on Twitter’s
TwUI, a popular UI framework for the Mac. TwUI
made it easy to build a modern layer-based application for OS X.
However, the AppKit improvements in Lion and Mountain Lion include substantial
fixes for layer-backed views. On Snow Leopard, layer-backed NSTextFields
and
NSTextViews
were almost unusable – now, most standard views behave sanely.
NSScrollView
, in particular, no longer consumes an absurd amount of memory or
performs asynchronous tiling (so content no longer fades in while scrolling).
These fixes make TwUI less necessary, so we’re slowly migrating GitHub for Mac
back to be 100% AppKit, freeing up our development time to work on GitHub for
Mac instead of maintaining an entire UI framework alongside it.
As we move away from using TwUI, we will also become less active in its
development. We want to leave the framework in good hands, though, so if you’re
interested in helping maintain TwUI, please open an
issue and explain why you think you’d be
a good fit.
It’s Not All Peaches and Cream
Still, AppKit isn’t perfect.
Some significant
improvements
are only available on Mountain Lion. Even then, there are still some bugs
– silly things like horizontally scrolling NSTextFields
ending up on half
pixels, or NSScrollView
being unbearably slow.
Not to mention that many of its APIs are often difficult to use:
- NSCell
is the perennial example. Support for views (instead of cells) in
NSTableView
helped a lot, but
NSControl
still uses a cell. - Three-slice
and
nine-slice
images are a pain to draw. - NSPopover
doesn’t support much appearance customization. - Animator
proxies
don’t immediately reflect changes, and always animate, even when outside
of an explicit animation group. Together, these behaviors make it
impossible to write a single code path that performs correct layout
regardless of whether an animation is occurring.
Introducing Rebel
This is where Rebel comes in. Rebel aims
to solve the above problems, and whatever else we may run into.
There are fixes to the NSTextField
blurriness
and NSScrollView
performance. There are
iOS-like
resizable
images.
Let Rebel figure out whether you’re animating or
not.
Have you seen the username autocompletion popover?
That’s
RBLPopover at work!
We want to make AppKit easy and enjoyable to use without rewriting it from the
ground up.
Getting Involved
Rebel is currently alpha quality. We’re already using it in GitHub for Mac,
but we may still make breaking changes occasionally.
So, check it out, enjoy, and please file any
issues that you find!
Written by
Related posts
![](https://github.blog/wp-content/uploads/2023/10/Collaboration-DarkMode-2.png?resize=400%2C212)
2024 is the biggest global election year in history. What’s at stake for developers?
GitHub is considering what is at stake for our users and platform, how we can take responsible action to support free and fair elections, and how developers contribute to resilient democratic processes.
![](https://github.blog/wp-content/uploads/2023/10/AI-DarkMode-2.png?resize=400%2C212)
GitHub named a Leader in the Gartner first-ever Magic Quadrant for AI Code Assistants
This year, as part of its annual Magic Quadrant series, Gartner published a first-of-its-kind report analyzing the state of play in the AI Code Assistants market–and named GitHub a Leader.
![AI in software development 2024 survey results with colorful graphics and percentages.](https://github.blog/wp-content/uploads/2024/08/ai-survey-header.png?resize=400%2C212)
Survey: The AI wave continues to grow on software development teams
We surveyed 2,000 people on software development teams at enterprises in the U.S., Brazil, India, and Germany about the use, experience, and expectations around generative AI tools in software development.