On Friday, we announced that @WalmartLabs sponsored the Pixate project on KickStarter at the $10,000 level. Today I thought it would be fun to spend a few minutes writing about why I’m personally so excited about this project.
What is Pixate?
Disclaimer: I’m not a member of the Pixate team, but I have spoken with them a bit about the project. Take what I say as unofficial but somewhat informed content.
Pixate brings CSS to native apps. What does that mean? Pixate allows for the customizing of attributes of native UI components using a syntax inspired by the web’s CSS standards. It doesn’t aim to apply every CSS attribute in the various CSS specifications to iOS–that wouldn’t make sense. Instead, its goal is to take the “selectors” part of CSS and introduce attributes and values that make sense for styling native components. Where existing DOM-centric attributes make sense in a native context, they’ll be reused, but where new ones are needed, they’ll be christened as necessary.
Doesn’t CSS Suck for Apps?
Many web luminaries have gone on the record for years talking about how bad CSS is as a visual layout tool. I couldn’t agree more. In my personal experience, CSS layout has been remarkably unpleasant. Despite my years of hands-on web development experience, I must constantly refer to documentation, commentaries, debugging tools, and multiple browsers to achieve any sort of complex custom layout–heck, even simple stuff much of the time. I’m not interested in bringing this sort of thing to native, where the tools are generally better.
However, there is tremendous power in this concept of declarative configuration of user interface components. The parts of CSS that have to do with changing element attributes works quite well–and that’s independent of whether or not the particular set of attributes you have to work with are a mess. The selector syntax is easy to learn and extremely powerful. Editing a few lines in a text file can radically change the appearance of multiple interface definitions and can do so in both very general and very precise ways.
Peanut Butter, Meet Jelly
I’ve long had two feet in the desktop/native app and web app worlds. I started my career doing desktop apps, jumped to web when it hit the scene, came back to the desktop with Java Swing and then tried to bring some of that back to the web by founding Ajaxian.com with Dion and evangelizing rich web clients. As part of this cross-pollination, I created a Java Swing framework that worked a bit like Pixate: it loaded in interface definition files created with a UI builder (in my case, the third-party JFormDesigner app) and then applied CSS rules to the components in those definition files. Despite having different properties than DOM elements, it was an easy trick to expose properties of Swing components to CSS.
I returned to this idea a second time when I was in Mozilla Labs working on Thunderhead, an HTML5 Canvas-based UI toolkit experiment: I implemented part of a CSS engine to theme custom canvas-rendered components.
Based on these experiences, I’ve found that the native + CSS approach works really well. After all, it’s really just a fairly simple labor-saving short-cut. Both iOS and Android apps generally store the user interface as declarative metadata that is instantiated into a UI component graph at run-time. Whereas no one I know modifies this metadata manually in the iOS community, editing this metadata by hand is the standard approach for Android developers. CSS gives both sets of developers a tool to centralize the style-based metadata and to bulk apply styling rules across multiple components (and potentially across multiple screens) in one go. That’s a clear win.
Even if the UI is dynamically generated through hand-coding, the CSS approach can still work. It can be applied before the interface is displayed, and again after it is displayed for dynamic effects.
Update: It’s also worth mentioning that both Adobe Flex and the QT project have incorporated CSS-inspired features into their platforms (thanks to the commenters below for pointing this out).
Why It’s Useful
This approach opens up a few interesting use cases:
- Making it easier to customize a single UI for various different contexts; a more flexible form of conventional UI internationalization techniques
- Making it easier for non-developers to customize the design of native screens. The Pixate team has visions of integrating their engine with Photoshop, etc. Hey, if this happens, great. But allow designers to iterate in the CSS file directly is pretty interesting on its own.
- Creating app prototypes
- Dynamically changing user interfaces after app deployment. A huge advantage of the web over native is the ability the change the UI from the server. By serving the Pixate CSS to the app at run-time, the app’s UI can be changed in interesting ways without an app update. Lots of native developers have hand-rolled their own mechanism to do this, but it’s handy to have a general tool like Pixate for the job.
What Pixate Is Not
Pixate is not, and/or in my opinion should not be:
- An attempt at using HTML/CSS to create native user interfaces.
- An attempt to allow you to reuse web-based CSS files for native apps. The set of CSS attributes that a browser supports will be different than the set that Pixate supports. There may be some common attributes, but I don’t anticipate the overlap will be meaningful.
- A way to develop UIs once for both Android and iOS. I don’t want the Pixate team to waste a lot of time figuring out how to map disparate attributes for kinda similar Android/iOS components into the same CSS attributes. Cross-platform leverage is a non-goal. Let the Appcelerator folks figure out how to map Pixate into the same concepts–in fact, it may make sense to have an Appcelerator-specific grammar for Pixate. That would be really cool.
- Some kind of cross-platform development toolkit that blocks developers from developing their native apps the same way they always have. (Sure, developers will have to make some minor accommodations to incorporate Pixate, like including the lib and perhaps occasionally giving UI components a unique identifier.)
- A silver bullet. Sometimes it doesn’t make sense to apply static, declarative CSS to a native UI. That’s okay.
Furthering the State of the Art
I believe that we should support innovative tools creators in our industry. When projects come up that represent interesting attempts to further the state of the art, I try to be one of the first ones in line to buy licenses and support the projects, just like many other folks I know. I’m proud that ‘Labs has been able to sponsor Pixate so generously.
And perhaps it goes without saying, but in case it doesn’t: we’re always looking for great talent and we’re doing some really cool things in on-line and in-store commerce. Drop me a line (beng@walmartlabs…) if you’re interested in joining us.
28 August ’12 Update: Made some minor grammatical corrections and added the Flex / QT mention above.
Qt has qss: http://doc-snapshot.qt-project.org/4.8/stylesheet-examples.html
Flex has this kind CSS system since 2005.
Walt: I was going to mention that and forgot. Thanks for the comment.
Do you have a spam problem on this site; I also am a blogger, and I was wanting to know your situation; many of us have developed some nice procedures and we are looking to swap techniques with others, why not shoot me an e-mail if interested
Ben, Just came across this blog post from this past summer from you. Congrats on your investment in Pixate. We took a different approach that took both the designer and developer into the equation. So if I’m developing a consumer app on your team I can simply design in Fireworks or Photoshop and then pass off to the developer without losing my vision. So basically you get the design and then the active Xcode. Should take a look. KP
Hello, Neat post. There is an issue together with your website in internet explorer, might check this?
IE nonetheless is the marketplace leader and a large component of
people will omit your great writing due to this problem.
Many web luminaries have gone on the record for years talking about how bad CSS is as a visual layout tool. I couldn’t agree more. In my personal experience, CSS layout has been remarkably unpleasant. Despite my years of hands-on web development experience, I must constantly refer to documentation, commentaries, debugging tools, and multiple browsers to achieve any sort of complex custom layout–heck, even simple stuff much of the time. I’m not interested in bringing this sort of thing to native, where the tools are generally better. get amazon reviews
Many web luminaries have gone on the record for years talking about how bad CSS is as a visual layout tool. I couldn’t agree more. In my personal experience, CSS layout has been remarkably unpleasant. Despite my years of hands-on web development experience, I must constantly refer to documentation, commentaries, debugging tools, and multiple browsers to achieve any sort of complex custom layout–heck, even simple stuff much of the time. I’m not interested in bringing this sort of thing to native, where the tools are generally better. natural weightloss
Whereas no one I know modifies this metadata manually in the iOS community, editing this metadata by hand is the standard approach for Android developers. CSS gives both sets of developers a tool to centralize the style-based metadata and to bulk apply styling rules across multiple components (and potentially across multiple screens) in one web design.
However, there is tremendous power in this concept of declarative configuration of user interface components. The parts of CSS that have to do with changing element attributes works quite well–and that’s independent of whether or not the particular set of attributes you have to work with are a mess. cloud accounting software
Ben is Vice President of Global Products at Walmart.So too is Reith’s call for the strongest penalties. I do not HCG drops
Ben is Vice President of Global Products at Walmart.FM radio style hoaxes are meant to amuse listeners and aren’t political. Those of the Chaser are also meant to make people laugh eye doctor portland
Life means many things, but besides taking care of your family, home and working, you should take care of you. Anyone, especially if she is a woman must have a beauty routine .
Disclaimer: I’m not a member of the Pixate team, but I have spoken with them a bit about the project.The Egyptian revolution was preceded by one in Tunisiaforskolin for weight loss
i like this half up half down hairstyles
Disclaimer: I’m not a member of the Pixate team, but I have spoken with them a bit about the project.Such an attitude is complacent: there will undoubtedly be mouths agape as future generations contemplate our idiocyspartagen XT
Disclaimer: I’m not a member of the Pixate team, but I have spoken with them a bit about the project.Union Green Bans preserved Sydney Harbour’s urban heritage in the early 1970s. Hay Day Cheats Tool APK – Diamonds
Disclaimer: I’m not a member of the Pixate team, but I have spoken with them a bit about the project.Andbest joint supplement
i am thankful for the free resources of moviestarplanet games here .
forskolin for weight loss
Barbecue beef brisket is the national dish of the Republic of Texas. Here’s the recipe for how to cook it the way the BBQ champions abd BBQ restaurants cook it. Learn How to smoke spare ribs Brisket steak in best weather now!
Awesome info and now i am sharing to the others
small businesses
Very good info. Lucky me I discovered your website by chance (stumbleupon).
I’ve book marked it for later!
Hello, i feel that i noticed you visited my site so i got
here to return the desire?.I am trying to in finding issues to improve
my site!I guess its ok to use some of your
ideas!!
Lovely list. Self-promotion makes me squirm. Another great book to read is Brene Brown’s “Daring Greatly.” It’s all about the power of vulnerability.Marketing Kona
I wanted to thank you for this article. I read this article. I think You put a lot of effort to create this article. I appreciate your work.lisa
Thank you for the information you give is very helpful and we thank you very much need you give us small businesses the opportunity to comment.fethiye rodos feribot
During your Holiday Tour Package in Bangladesh you can read Bangladeshi Newspaper also you can take Bangladeshi Life and Health Insurance also can purchase through Bangladeshi Online Shopping also you can know about Bangladeshi Online Health Service and Medicinejasa pembuatan patung fiber