Now i working in a sample rails app, with a jamal plugin to make some
things:
> I start playing with jamal today. I forked it in github [1].
Great!
> Now i working in a sample rails app, with a jamal plugin to make some
> things:
I'm no expert in rails, but Georg and Dennis are using Jamal with
rails. So maybe they have already some code/plugins/helper ... I'll
talk to them.
> a) Create a rake task to make the client app scaffold (aka install):
>
> RAILS_ROOT/client/app/...
> RAILS_ROOT/client/test/...
> RAILS_ROOT/client/vendor/jamal
The testsuite is also something that has to be worked on. qunit ftw!
It should be nicely integrated within jamal and its deployment tools.
> b) Create a rake task to update assets. For example:
> Compile RAILS_ROOT/client/vendor/jamal in RAILS_ROOT/public/javascript/
> jamal.js
> Compile RAILS_ROOT/client/app/[controller|model|view]/*.js in
> RAILS_ROOT/public/javascript/client.app.js
George wrote an air application to do that cross platform, but I guess
it's already outdated. In the Jamal repository I've build that with
ant, at work we are using phing to do the job. We switched from dean
edwards packer to the yui compressor lately.
To improve performance you can even concat jquery.js + jamal.js +
client.app.js. You save two requests and fetching javascript makes the
browser very slow. Be sure to add caching header (try to prevent 304
Not Modified) and a revision number in the compiled js file. So that
the browser recognizes any new version of the javascript.
> c) Some rails helpers
> "include_jamal_core". The helper to make <script src...
Be sure to add the javascript at the very end of your body. This makes
your site render way faster ... YSlow ftw!
> d) Try to update assets live in development (ala Sass).
I don't know if I get this right. But I'm always working with the
original files within app, this means that there are lots of script
includes in the dev environment, but this is better for debugging. Be
sure to set debug: true in the jamal configuration.
> About restfull model, i read in the list that someout is working on
> it, but i can't find any code.
There isn't much but I already started to change the model:
http://jamal-mvc.com/browser/code/branches/sandboxes/teemow/
Thanks for your effort and have fun!
Cheers,
Timo
--
Timo Derstappen
The testsuite is also something that has to be worked on. qunit ftw!
It should be nicely integrated within jamal and its deployment tools.
http://docs.jquery.com/QUnit
To improve performance you can even concat jquery.js + jamal.js +
client.app.js.
You save two requests and fetching javascript makes the
browser very slow. Be sure to add caching header (try to prevent 304
Not Modified) and a revision number in the compiled js file. So that
the browser recognizes any new version of the javascript.
Be sure to add the javascript at the very end of your body. This makes
> c) Some rails helpers
> "include_jamal_core". The helper to make <script src...
your site render way faster ... YSlow ftw!
> About restfull model, i read in the list that someout is working on
> it, but i can't find any code.There isn't much but I already started to change the model:
http://jamal-mvc.com/browser/code/branches/sandboxes/teemow/
$j.m({Post: {}});
$('#post1').form_for('post').
label('title','Post title').text_field('title').
label('body', 'Body').text_area('body').
submit_tag();
$j.m.Post.find(1,function(data){
$(#post1).set_model(data);
}
Thanks for your effort and have fun!
I use rails+jamal, but i think i needn't a rails plugin.
of couse, your job is great!