Critique

Although Malline is very elegant and sophisticated being, it has some drawbacks.

Graphical HTML editors
  • You can't edit Malline templates with Nvu or similar, but Erb files can be edited with most graphical html editors, since the delimiters <% %> can be parsed as tags.
  • However, Malline comes with a html2mn.rb -script, that converts HTML files to Malline templates.
  • Who uses these anyway?
Users & support
  • Malline doesn't have so many users than ERB does. That means there could potentially be more bugs.

Comments

by pepe, 2 days ago

the html2ml work same as convert already xhtml page 2 ml ?

xhmtl2ml ?

here my email jcolin at gmail

by Riku, 5 months ago

I committed the fix to the svn trunk. I will soon release a new stable version, if this fix really seems to work and doesn't break anything else.

by Riku, 5 months ago

Thank you for your bug report Andrew. I really should set up some kind of ticket system for bugs..

I can confirm the bug you found, and I can see the problem in code. There are some problems fixing it tho, Ruby 1.8.6 seems always segfault when running the fixed code :(

I try to find the error with Ruby and also fix the Malline bug without triggering the Ruby bug during this weekend.

by Andrew, 5 months ago

I have an application that uses Erb primarily for application layout and views, with a few Malline partials here and there.

Here's the situation I have that's causing problems.

I have a Erb layout, rendering a Erb view. Inside this view is a Malline partial, and then at the bottom of the view, the page footer (an Erb partial) is fragment cached.

Here's what the exception notifier is spitting back at me:

A ActionView::TemplateError occurred in residential#luxury_details:

undefined method `<<' for nil:NilClass
On line #35 of layouts/residential.rhtml

32:
33: </div><!-- end container -->
34: </div><!-- end wrap -->
35: <% cache(:controller => "residential", :action => 'footer') do %>
36: <div id="footer">
37: <p>
38:

/var/rails/bra/releases/20080214164521/vendor/plugins/malline/lib/malline/template.rb:61:in `add_unescaped_text'
/var/rails/bra/releases/20080214164521/vendor/plugins/malline/lib/malline/view_wrapper.rb:42:in `cache'
/var/rails/bra/releases/20080214164521/app/views/layouts/residential.rhtml:35:in `_run_rhtml_47var47rails47bra47releases472008021416452147app47views47layouts47residential46rhtml'

Even though this is in a Erb layout rendering an Erb partial, for some reason the cache call is ending up in the Malline code.

by Andrew, 5 months ago

Is there any place to post issues/bugs?

Malline & Rails 2.0
by Riku, 6 months ago

Malline have been reported to work ok with Rails 2.0 with the latest _unstable_ (svn trunk) version.

You can use filenames like index.html.mn.

by Andrew, 6 months ago

Does Malline work in Rails 2.0?

Why not Google Code/Group
by Robin, 8 months ago

If you want to setup a project tracker without too much pain, the easiest method is to create a Google Code project complete with subversion hosting, and a Google Group for hosting discussions. Malline is opensource so it meets the requirements for free hosting.

by Riku, 8 months ago

Robin: Sorry about a little delay and thank you for your fix. I committed that to svn trunk.

There is no any project page, yet. Maybe I will set up a Trac or similar system.

inline fix
by Robin, 8 months ago

This fix gets inline templates working with rails:

malline/rails.rb:31:(orig)
h.set_path(@current_tpl_path)

malline/rails.rb:31:(fix)
h.set_path(@current_tpl_path) if @current_tpl_path

Project Page?
by Robin, 8 months ago

Is there a project page to report bugs?

Malline does not like inline views:

render( :type=>:mn, :layout=>true, :inline => 'h1 "hello"' )

by Mike, 9 months ago

Excelent, is good to know that!

About performance
by Riku, 9 months ago

I have done some preliminary benchmarking between ERB and Malline. I used the templates from Beast to make the compare - rewrote the layout template, too.

Some of the tests are still in progress, but it seems that Malline is about as fast as ERB, maybe a little bit slower on some situations. The latest test tells that overall time taken on 500 page renders was 3% more with Malline than with ERB.

When the benchmarks are ready, I will publish the results here. However, I can already say that Malline is fast enough for production use.

by Mike, 9 months ago

What about performance?, there are Benchmark or something like that to get a idea.
That is unique drawbacks, I think

Write a new comment on this page