ErlyWeb v0.3 (note incompatibilities with older versions)

1 view
Skip to first unread message

Yariv Sadan

unread,
Dec 6, 2006, 7:44:08 PM12/6/06
to erl...@googlegroups.com
Hi list,

I'm happy to announce the release of ErlyWeb v0.3. This release mostly
has bug fixes (thanks to everybody who reported them!), but it also
has a few enhancements (nothing ground breaking :) ). You can download
the new release at http://erlyweb.org/erlyweb-0.3.zip or just do a svn
update.

Changes that introduce incompatibilities:

- The pre- and post-compile hooks have changed. To use them, you have
implement the before_compile/1 and after_compile/1 functions in the
app controller. As before, these functions accept a single parameter
indicating the last compilation time (or 'undefined' if the
last_compile_time option is missing). The pre_compile_hook and
post_compile_hook options that erlyweb:compile used to accept are now
ignored.

- The (optional) use_app_view/1 function in controllers used to return
'true' or 'false'. These possible return values have changed as
follows: 'default' indicates to use the default app view; 'undefined'
indicates to not use any app view; and a single atom other than the
two options above indicates the name of a different app view module to
use for top-level rendering instead of the default one. This allows
you to have multiple app views in the same application. (Note: the app
view behavior may undergo addition changes in a future version.)

Other changes:

- The 'report_errors' and 'report_warnings' compilation options are
now turned on by default in erlyweb:compile/2. To override this, you
can define the options 'suppress_errors' and 'suppress_warnings' (but
this isn't recommended).
- Fixed a crash that happens when erlydb_codegen is called directly
(outside erlyweb:compile) without the Options parameter
- Fixed the 'create new' link in the 'magic' component when the
appmode root is different from the app name.
- Fixed a bug to enable the use of records in controller files when
the -erlyweb_magic(on) attribute is defined (this was actually a bug
in smerl:embed_all/2).
- Fixed a bug such that if a controller function doesn't have a
corresponding view function, ErlyWeb now returns the result of the
controller function instead of crashing (this bug was introduced in
ErlyWeb 0.2.2). This is useful for bypassing the view layer and
returning to Yaws 'html', 'ehtml', etc., tuples directly from ErlyWeb
controller functions.
- Made a few code tweaks in erlyweb_view.et

Enjoy!
Yariv

David Pollak

unread,
Dec 7, 2006, 12:27:10 AM12/7/06
to erl...@googlegroups.com
Yariv,

You are a combination of a god and a madman. You rock. Keep up the
excellent work.

Thanks,

David

Roberto Saccon

unread,
Dec 7, 2006, 1:53:48 PM12/7/06
to erlyweb
Just tested the use_app_view/1 for custom templates and it works great.
I grabbed the custom template name from the subdomain (from the yaws
Arg header). And what happens when such a module does not exist ?
Erlyweb falls back to the default app template. Great !!!

regards
Roberto

Reply all
Reply to author
Forward
0 new messages