All posts tagged ‘Frameworks’

File Under: CSS, HTML, UI/UX, Visual Design

Simplify Responsive Design With ZURB’s ‘Foundation’ Web Toolkit

Foundation 4. Image: Screenshot/Webmonkey.

ZURB has released a major new version of its popular Foundation framework, a web development toolkit for quickly building responsive websites. The new Foundation v4 is a ground-up re-write that sees ZURB taking a mobile-first approach.

Like its erstwhile competitor Bootstrap, Foundation offers a set of HTML and CSS building blocks you can use to quickly develop basic site structure and design — layouts, typography, forms and other common design elements are all available.

There are three ways you can try out Foundation 4. You can download the straight compressed CSS and use that as a starting point for your own customizations. Alternately you can customize your build of Foundation, including only the elements you need; or you can install the SASS version of Foundation and customize it within your SASS code.

If you’re upgrading from Foundation 3 be sure to read through ZURB’s migration guide as the syntax for the grid and other elements has changed.

The real power of Foundation 4 doesn’t really come into play unless you go with the SASS option. Thanks to SASS’s “mixins” concept you can now use the grid tools in Foundation 4 without littering your HTML with the various (purely presentational) grid class names. Using Foundation 4 within your SASS project also makes it dead simple to use only the components you need, for example, you can include the grid mixins, but skip the typography if it’s not to your liking.

Be aware that the new mobile-first approach in Foundation 4 means browsers which don’t support media queries will only get very basic styling for the grid and other UI elements. Yes, that pretty much only affects IE 8. But, if your project needs more robust support for IE 8, there is a modified version of Foundation 4 with support for IE 8 (alternately, you could stick with Foundation 3).

It’s also worth noting that, because Foundation 4 is such a departure from the previous version, ZURB plans to continue supporting Foundation 3 for some time.

If you’ve got questions about Foundation 4, head on over to the official site and check out the documentation. You can also explore the code on GitHub — Foundation is one of the top 20 most-starred projects on the site.

Twitter Adds Responsive Design Tools to Bootstrap 2.0

Twitter is gearing up for the release of Bootstrap 2.0, the second major version of its popular open source front-end toolkit for web developers.

Bootstrap 2.0 will arrive Jan. 31, but if you’d like to take it for a spin today you can help test the pre-release build. Just head on over to GitHub and checkout the branch, 2.0-wip.

Bootstrap is designed to help you get your website up and running as fast as possible. Somewhere between a CSS framework and a “theme,” Bootstrap offers an HTML, CSS and JavaScript base for your designs, including built-in forms, buttons, tables, grids and navigation elements. Among Bootstrap’s more impressive tricks is the grid layout tool, which is based on the 960 grid system, with support for advanced features like nested and offset columns.

Bootstrap 2.0 will solve one of the bigger complaints about Bootstrap 1.0 — it was not responsive. To embrace a more responsive approach for mobile devices, Bootstrap is moving to a flexible 12-column grid system. The 2.0 release also includes some updated progress bars and customizable gallery thumbnails, but perhaps the best news is that, at just 10kb (gzipped), Bootstrap 2.0 remains an impressively lightweight framework.

While Bootstrap offers good browser support, with all the modern options covered you should be aware that it won’t work with Internet Explorer 6. To see some real world examples of what you can do with Bootstrap, head on over to the unofficial showcase, Built with Bootstrap on Tumblr.

Photo by Mike Love/flickr/CC.

File Under: Frameworks, Mobile

New Frameworks Give Mobile-Web Apps a Boost

Sencha Touch, the new mobile-website framework, shows off its multidevice mojo.

Apple’s campaign to make native mobile apps seem sexier than the temperamental world of the mobile browser has been very successful. Tens of thousands of developers have been lured to the company’s App Store as a result.

However, the rapid rise of a number of impressive client-side JavaScript frameworks make it possible to build cross-platform, fast and lightweight mobile applications that run in the browser and, in some cases, equal the functionality of native apps.

Since these frameworks deliver content through the browser, there are no bizarre App Store approval processes or installer packages to contend with, and you really can “write once, run anywhere.” Any mobile operating system with a modern browser is game — iOS, Android, WebOS, it doesn’t matter.

Sure, for most games and animation-heavy apps, native is still the way to go. But for all other kinds of content, even complex stuff like maps and videos, the mobile web may be the better choice.

The latest entry into the mobile-framework field is Sencha Touch, brought to you by the same people that created Ext JS, jQTouch and Raphael, all of which have been combined under the name Sencha.

Sencha Touch, released this week, bills itself as “the first HTML5 framework for mobile devices,” which isn’t quite true. Several other mobile frameworks make use of HTML5 APIs like offline storage, or companion APIs like geolocation. But Sencha is nevertheless well worth a look if you’re thinking of building a cross-platform mobile app.

Sencha offers built-in support for the geolocation API and the offline storage API, and takes advantage of CSS 3 for smaller, image-less design elements. Because all the major mobile platforms — iOS, Android and WebOS — use similar WebKit-based browsers, there’s little to worry about when it comes to support for cutting edge features like HTML5 and CSS 3. Even when Firefox arrives on mobiles, you should expect support to be on par.

Sencha has some demos available if you’d like to see what’s possible. The GeoCongress demo makes use of the geolocation API to find out where you are and then show a list of your senators and representative. There’s also a very slick Solitaire demo that shows how to preserve an app’s state using the HTML5 local storage API.

The Sencha Touch code is available under a GPLv3 license. If you’d like to experiment with the code, head over to the new Sencha Touch site and grab a copy.

If Sencha Touch doesn’t cover all your bases, there are several other frameworks out there that do similar things. Although not specifically geared to mobile-web apps, SproutCore can be used to create lightning-fast mobile-web apps.

SproutCore generated quite a bit of interest a few years ago, when Apple incorporated it into the company’s MobileMe tools like It’s also the framework behind Kiva’s Loan Browser tool.

If you’re used to jQuery-style JavaScript, SproutCore will look a bit strange at first. Like server-side frameworks such as Rails and Django, SproutCore is based on the model-view-controller (“MVC”) paradigm. As with other frameworks in this category, SproutCore cuts down on latency by moving business logic to the client, but in keeping the MVC pattern of server-side frameworks, SproutCore should make developers feel right at home.

On the downside, SproutCore does not degrade at all. If anyone shows up to your mobile site with JavaScript disabled, they’ll see a blank page. SproutCore also lacks support for WAI-ARIA, which means it doesn’t offer much in the way of accessibility tools.

SproutCore is written in Ruby. You can grab a copy from the SproutCore site, or install it as Ruby “gem.”

Another possibility is iWebKit, which offers many of the same features you’ll find in other frameworks, but puts more emphasis on Apple’s mobile devices. Unfortunately, while most iWebKit apps will work just fine in Android, the built-in UI elements are clearly iPhone-specific.

Like the others iWebKit is customizable. You can always dive into the CSS files and tweak things to your liking (though doing so may call in to question the benefit of using a framework in the first place).

Another framework worth noting is Apple’s own PastryKit. Although PastryKit’s UI isn’t cross-platform, it does have some nice tools for iPhone-specific web apps. Keep in mind, though, that PastryKit is not officially documented. Daring Fireball has a nice video overview, and developer David Calhoun has dug a bit deeper into how PastryKit works.

Before you rush off to develop a mobile-web app, it’s worth pointing out that there are definitely some significant advantages to native apps — whether its on iOS or Android. Native apps have access to lower-level system tools (in the iPhone’s case, that means stuff like the accelerometer, gyroscope and more). If your apps need those tools, then by all means, use native code.

If you’re not writing an app that makes heavy use of platform tools, the web is a viable option. And, thanks to frameworks like Sencha Touch, SproutCore and iWebKit, building a cross-platform mobile-web app doesn’t have to be a Herculean task.

See Also:

File Under: Programming

Where Do You Stand In The Framework Holy War?

Programming frameworks have become more widely used recently. As with anything popular, there was an inevitable backlash. Now, as we sit in the midst of a holy war, you’re probably wondering which side to choose. Hopefully Webmonkey can help.

First, what is a framework? Careful, even that’s up for debate. Essentially, a framework is a set of code that simplifies common programming tasks. The most common examples are for JavaScript and include jQuery and Prototype. Server side languages get in on the action, too, like Ruby on Rails and Django.

Now that you know what frameworks are, read below and choose a side in the great debate!

1. You are an anti-framework zealot

You believe frameworks keep people from learning how to program in a language. Instead of newbies understanding JavaScript, they only know jQuery, for example. You also complain that there is too much unused functionality in frameworks. Programmers should only have the code they need, you say.

Summary: Frameworks make code fat and lazy.

2. You are an unapologetic framework supporter

You believe frameworks are there to make your life easy. You don’t want to learn the language, you want to make stuff work. Writing your own code takes too much time. Frameworks have done all the hard stuff—why not use one?

Summary: Frameworks make programming easy.

3. You are Switzerland—totally neutral

Why can’t we all just get along? This debate makes no sense to you because you don’t care how someone else codes. If someone wants to use a framework, let them. If someone wants to start from scratch, that’s okay, too.

Summary: Frameworks are fine, but you don’t need to use one.

Which one are you? Once you decide, go and vote your favorite up or down.

See also:

File Under: Uncategorized

Rails 2.1 Has Been Released

The latest version of the popular web framework, long awaited in some circles, is now available, half a year or so after 2.0.

Significant new features include built-in handling of time zones; improvements to caching; named_scope functionality in ActiveRecord, and more.

It’s neatly synchronized with the release of Ruby 1.8.7, which includes support for SSL/TLS, experimental provision for passing a block to a proc, and quite a bit more.

See Also: