Sencha Touch Custom Layout Manager

Sencha Touch Framework provides various layout managers like ‘hbox’, ‘fit’ etc.

You might be curious how to add your own layout manager. addLayoutMnanager? registerLayout? …

The answer is as simple as the usage of them, because Sencha is smart enough to use the Hollywood principle design pattern. The Container class implements the private method getLayout that will use your own layout or ‘default’ as fallback.

Continue reading

Sencha Theming Customization of any xtype

If you’re developing Sencha Touch Applications you might be in need of using custom icons inside any container.
Sencha Touch provides a clever machinery for that. This “theming framework” consists of following tools:

  • css3: cascading stylesheets
  • sass: that is an extension of CSS3 to make CSS more compact
  • compass: CSS authoring framework written in Ruby

Continue reading

Heroku deploy / pre-compile custom assets

If you deploy your Rails Application to Heroku, you might obtain following error that is actually logged into the log and can be printed by heroku logs:

2012-12-01T19:14:19+00:00 app[web.1]: Completed 500 Internal Server Error in 3ms
2012-12-01T19:14:19+00:00 app[web.1]: 
2012-12-01T19:14:19+00:00 app[web.1]: ActionView::Template::Error (blueprint/blueprint/screen.css isn't precompiled):

Continue reading

Visitor Pattern Revisited

Today, I encountered the visitor pattern in the SLD implementation inside Geotools. This is reason enough to consider this pattern in the world of Ruby. Especially because I read recently this post where visitor is supposed to be more an antipattern that a pattern. This is because Ruby supports extension of objects at runtime. Nevertheless, I need to check it out!

A simple implementation of a Visitor is accomplished in 3 steps:

Continue reading