Welcome!

Blog Feed Post

Hubbub ❤ SproutCore – Introduction

I was recently asked to do a write-up about my SproutCore app, Hubbub (@hubbubapp), as a general anecdotal guide to those interested in writing large scale applications in SproutCore for the first time.

I’m afraid this first post won’t be very technical, but I will at least attempt to make it an enjoyable read, and to tell you about some of my early bumps in the road so that you can avoid them. My overview of Hubbub will also span a few posts, so if you have particular questions, I can spend some time on them in future.

What’s all the Hubbub?

This isn’t the place to talk up the app itself, only how it operates, so i’ll just give you the briefest of descriptions now to help set the stage.

The premise for Hubbub is that we still live in the physical world; that we all have real families, real friends and real coworkers and that we also all have a lot of real stuff. Hubbub is a companion app for our real lives, helping us keep track of our real stuff and helping us share with our real friends and neighbours.  So with that idea in mind, let me present to you the development history.

Uh, but I don’t remember much about writing Hubbub.

It’s true, but not in the drunken orgy of code way that you’re imagining (calm yourself!). It’s just that Hubbub was written entirely in my spare time, evenings and weekends, going back over a year, which means my brain has jetissoned a lot of those early efforts to make space for everything I’ve learned since then (and to not lose the essentials, like using a spoon, my kids’ names and the order of pants vs. underwear).

Typically, it won’t take so long to write an application, but I switched careers and postponed the app for several months, only recently picking it up again and releasing the beta. Hopefully the cathartic process of writing will shake loose a few of those early memories for you (or else you may find me wearing my underwear on the outside with a spoon stuck up my nose yelling at… uh, Morticent?).

So enough excuses, at least I should begin with an answer to:

Why SproutCore?

That’s easy. Like you, I knew right from the start that I wanted my app to be used by every person in the world, which meant it had to be on all the varied devices, which meant writing versions for iPhone/iPod Touch, iPad, Mac OS, Windows OS, Android Phone, Android Tablet, Blackberry Phone, Blackberry Playbook, Windows Phone, Linux OS, Web OS and…  stop!  I’m not a lunatic!  Of course I was going to build Hubbub as an application for the one decent common environment, the browser! In fact, I just can’t imagine building any application these days not as a “web application”1, other than perhaps writing a money-grubbin’ iPhone game.

So yes, a web application; but why a SproutCore web application? Why not a Ruby-on-Rails, Cappuccino or micro-Frankenstein app for example? That’s also easy. I have a preternatural knack for spotting winners.

Well, I did feel immediately that SproutCore was going to be the future for writing applications, but I’ll admit that there was a bit more to it than that.  For instance, I knew that I wanted to write a large-scale application (MVC, localizations, bindings, etc.), which excluded all of the smaller client-side frameworks that were going to leave me hanging after my app grew, and I knew that I wanted the application to be super fast and work offline, which excluded all of the server-side frameworks. Thus it came down to Cappuccino vs. SproutCore. I came from a background of writing Mac and iOS apps, so Cappuccino was appealing… but oh, Apple uses SproutCore. Oh, okay, sure why not.

The Company Line

Now, I realize “Tyler’s gut feeling” isn’t as compelling an argument for your VP of Engineering as it should be, but the only words I’ve ever found compelling have followed an action, not preceded it. I’m not going to waste time formulating theories that SproutCore’s apples are better than framework X’s oranges, but leave you to just look at the existing SproutCore apps like those from Eloqua and Apple and try and argue that they are not a higher class of web application.

For my part, my action is Hubbub, which I built entirely on my own, which means that that also is possible, which means imagine what you can do with a team and money and talent!

For a more scientific approach to choosing SproutCore, you can also read the excellent posts by Evin Grano and Majd Taby, How do you really build large impressive web applications? and When To Use SproutCore, and When Not To respectively.  Now back again to Hubbub ❤ SproutCore.

Standing on the Shoulders of People of Prodigious Size and Strength and Possible Gland Issues

I do recall that when I started with SproutCore, I made amazing progress at an amazing pace.  I also made amazing mistakes.  But those mistakes didn’t yet matter as I kept going forward and was also myself amazed time and time again at how little code did such big things.

SproutCore really does contain such a wealth of good ideas that you can simply turn them on as you go for quite a while. But then, eventually, your app will be big and you’ll need to do something no one else thought of before. I know when I hit that wall, it was a bit of a challenge.

The first truth to accept is that SproutCore is open source and so if no one has had your particular itch, then it’s up to you to scratch it.  The second truth to accept is that reading the source is the best way to learn how to use the framework as well as to extend it.

Back to those early mistakes. I recall that I refactored several times. In particular, moving to Statecharts was a big refactor and getting comfortable with the Datastore took a few attempts; so I would recommend that you work hard to understand and use these tools right from the start.  I can confirm that they work very well in concert with an extremely complicated UI and data layer.

The other mistake that I made was moving too quickly in some instances, so that I needed to basically go back and rethink large chunks of code.  Which brings me to the third truth, there are no shortcuts to good code, no matter what framework you use.  So now may be a good time for you to read carefully Colin Campbell’s thoughts on application structure.

Another major mistake I made was not to understand observers and bindings well enough and so I ended up often using the wrong tool for the job and creating unnecessarily complex dependency chains. This both hurt performance and was unwieldy to maintain.

Tune in Next Time

So, with that high level introduction to my experience with SproutCore out of the way, in my next post, Hubbub ❤ SproutCore – Getting My Feet Wet Behind the Ears (working title), I will describe in further detail the entire architecture of Hubbub, from the MongoDB database and Node.js server of the backend to the carefully tuned SproutCore 1.6 application on the client-side.

There is actually a lot that can be covered, such as:

  • the format of the JSON API that I use to communicate between the client and server
  • the inclusion of third party libraries like Google maps, Socket.io and Raphaël
  • how Statecharts manage the application flow
  • how I coordinate state changes to smooth out animations
  • or even my process of doing a Hubbub build and deploy.

So be sure to indicate if any of that is interesting and I’ll dedicate more space to it.

Thanks for making it to the end, you’re awesome!

  1. Wait! “web application”, like “native application”, is a loaded term. If you think that Hubbub isn’t complex software like any other complex software on your device you’re wrong.  If you think that it won’t be available in the iTunes App Store, Android App Store, Mac App Store, etc., then you’re not thinking very big. Why wouldn’t I embed the Hubbub code and launch it in the stores? I will! Just give me a couple minutes, I mean I have to finish this post and the follow-up posts and we just had another baby and I’ve got a full time job and it’s summer time, and come on!

Read the original blog entry...

More Stories By Charles Jolley

Charles Jolley is the creator of SproutCore and CEO of Sproutit, which provides consulting and software services for building SproutCore applications on the web. He has helped build some of the most popular RIAs on the web today.

Latest Stories
DX World EXPO, LLC, a Lighthouse Point, Florida-based startup trade show producer and the creator of "DXWorldEXPO® - Digital Transformation Conference & Expo" has announced its executive management team. The team is headed by Levent Selamoglu, who has been named CEO. "Now is the time for a truly global DX event, to bring together the leading minds from the technology world in a conversation about Digital Transformation," he said in making the announcement.
"Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
SYS-CON Events announced today that Conference Guru has been named “Media Sponsor” of the 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. A valuable conference experience generates new contacts, sales leads, potential strategic partners and potential investors; helps gather competitive intelligence and even provides inspiration for new products and services. Conference Guru works with conference organizers to pass great deals to gre...
DevOps is under attack because developers don’t want to mess with infrastructure. They will happily own their code into production, but want to use platforms instead of raw automation. That’s changing the landscape that we understand as DevOps with both architecture concepts (CloudNative) and process redefinition (SRE). Rob Hirschfeld’s recent work in Kubernetes operations has led to the conclusion that containers and related platforms have changed the way we should be thinking about DevOps and...
The Internet of Things will challenge the status quo of how IT and development organizations operate. Or will it? Certainly the fog layer of IoT requires special insights about data ontology, security and transactional integrity. But the developmental challenges are the same: People, Process and Platform. In his session at @ThingsExpo, Craig Sproule, CEO of Metavine, demonstrated how to move beyond today's coding paradigm and shared the must-have mindsets for removing complexity from the develop...
In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, led attendees through the exciting evolution of the cloud. He looked at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering m...
The next XaaS is CICDaaS. Why? Because CICD saves developers a huge amount of time. CD is an especially great option for projects that require multiple and frequent contributions to be integrated. But… securing CICD best practices is an emerging, essential, yet little understood practice for DevOps teams and their Cloud Service Providers. The only way to get CICD to work in a highly secure environment takes collaboration, patience and persistence. Building CICD in the cloud requires rigorous ar...
Companies are harnessing data in ways we once associated with science fiction. Analysts have access to a plethora of visualization and reporting tools, but considering the vast amount of data businesses collect and limitations of CPUs, end users are forced to design their structures and systems with limitations. Until now. As the cloud toolkit to analyze data has evolved, GPUs have stepped in to massively parallel SQL, visualization and machine learning.
"Evatronix provides design services to companies that need to integrate the IoT technology in their products but they don't necessarily have the expertise, knowledge and design team to do so," explained Adam Morawiec, VP of Business Development at Evatronix, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
"ZeroStack is a startup in Silicon Valley. We're solving a very interesting problem around bringing public cloud convenience with private cloud control for enterprises and mid-size companies," explained Kamesh Pemmaraju, VP of Product Management at ZeroStack, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Large industrial manufacturing organizations are adopting the agile principles of cloud software companies. The industrial manufacturing development process has not scaled over time. Now that design CAD teams are geographically distributed, centralizing their work is key. With large multi-gigabyte projects, outdated tools have stifled industrial team agility, time-to-market milestones, and impacted P&L stakeholders.
"Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Enterprises are adopting Kubernetes to accelerate the development and the delivery of cloud-native applications. However, sharing a Kubernetes cluster between members of the same team can be challenging. And, sharing clusters across multiple teams is even harder. Kubernetes offers several constructs to help implement segmentation and isolation. However, these primitives can be complex to understand and apply. As a result, it’s becoming common for enterprises to end up with several clusters. Thi...