Marko 4.0 is here 🚀 🎉

Michael Rawlings
Mar 3, 2017 · 2 min read

The latest release of Marko, the friendly (and fast!) UI library from eBay is now available!

If you’ve not heard of Marko, it is a library for building component-based user interfaces for the web with a focus on speed and ease of use. Marko is a perfect fit for Node.js and for building multi-page apps, but it is also a great fit for single page apps. We support both an HTML-like syntax as well as a concise syntax (think haml/jade/pug).

Try it out online and keep reading to find out what’s new.

  • Integrated support for components: seamlessly transition from a plain HTML view to an interactive component.
  • Single-file component definitions with an easy path to multi-file if the code outgrows the single file.
Image for post
Image for post
A single file component. No boilerplate, you don’t even reference Marko. Play with it here.
  • Targeted rendering modes: Components compiled for the server render to an HTML stream (yielding 5–50x faster server renders than other UI libraries). Components compiled for the browser render to one of the fastest Virtual DOM implementations.
  • Virtual DOM optimizations: static sub-trees are only initialized once. Diffing of static sub-trees and attributes are short-circuited.
  • An ultra-trim runtime. Compiled components only import exactly what they need from the Marko runtime. This allows us to add new features with virtually no extra bloat for existing apps.
  • Seamless handoff from the server to the browser. All component state and input is efficiently serialized and sent to the browser so that the browser page can instantly boot with no additional re-render required.
  • Smart isomorphic dependencies: views/components know what dependencies they need for rendering vs mounting. If a view only needs to be rendered on the server, it won’t be sent to the browser, but any associated stylesheets or client-side logic will be.
  • 90% test coverage with nearly 2000 individual tests covering Marko, its parser (htmljs-parser) and its DOM reconciliation (morphdom).

Thank you!

Marko 4.0 is a huge release totaling well over 1000 commits and countless hours of discussion and planning with our terrific open source community. Let’s give a shoutout to Austin Kelleher who is joining Patrick Steele-Idem, Phil Gates-Idem, Martin Aberer, and myself (Michael Rawlings) as the newest maintainer on the project.

We, the maintainers, would like to thank everyone who contributed to this release whether it be through early adoption, reporting issues, discussing design and direction, improving documentation or implementing new features. In particular, @charlieduong94, @mindeavor, @scttdavs, @seangates, @juliocanares (CTO of Riqra, which is already running Marko 4.0 in production), @hesulan, @ramses0, @Eldar-X, @StarpTech, @jsumners, @ianvonholt, @tinovyatkin, @westtrade, and @johnjv.

We’re excited to see what you build with Marko. Tweet at us using the #MarkoJS hashtag or tag @MarkoDevTeam. Join us and the community of developers on our Gitter chat room to discuss Marko and get support from others in the community!

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store