Elegant MVC framework in JavaScript

Maverick is a lightweight open-source framework that enables the MVC pattern in JavaScript in a smart way.

Maverick lets you

  • separate application logic (controller) from views and data gathering (models)
  • create views and instantiate them with different context
  • route URIs to controllers using regular expressions
  • use centralized event handling
  • change URI on browser address bar without refreshing the page (fallback to updating the hash)
  • execute multiple model calls at a time and provide a single callback function
  • organize file structure the way you want (so that later you can combine all views, models and controllers into a single .js file in production for better page speed)
  • and much more.

  • MIT licenced.

  • Supports changing URI without page refreshes (via history.pushState)

  • Works with Firefox 3+, Chrome 5+, Safari 4+, Internet Explorer 8+.

  • Exports 5 global variables

    ($models, $views, $controllers, $uri, $routes)

  • Works with jQuery (1.4+)

    (but can be easily adapted to work with any other library)

Download Maverick Beta

Maverick's source code is hosted on GitHub.

Maverick was initially inspired by CodeIgniter, a similar MVC framework for the PHP language.