This little module help you create JavaScript templates using the lightweight microtemplating JavaScript library designed by John Resig.
Create a module defining a theme for your JavaScript template and use some JavaScript to manipulate it.
More information about the JavaScript library : http://ejohn.org/blog/javascript-micro-templating/
There isn't yet a Drupal project that integrates this fast and powerfull librairy.
Code tested with http://pareview.sh/ script :
http://pareview.sh/pareview/httpgitdrupalorgsandboxtocab2407171git
Project page: https://www.drupal.org/sandbox/tocab/2407171
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/tocab/2407171.git microtemplating
Manual reviews of other projects :
- https://www.drupal.org/node/2414107#comment-9565261
- https://www.drupal.org/node/2413011#comment-9565479
- https://www.drupal.org/node/2413889#comment-9565567
Thanks!
Comments
Comment #1
tocab commentedComment #2
tocab commentedComment #3
mouhammed commentedPlease add the project name to the git clone instruction.
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/tocab/2407171.git microtemplatingThird party library shouldn't be in your module. Use libraries module. See here https://www.drupal.org/node/1342238
Comment #4
tocab commentedgit clone corrected.
For the library, it is not directly accessible from an URL (see http://ejohn.org/blog/javascript-micro-templating/) that's why I can't use this method.
Comment #5
PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #6
tocab commentedComment #7
tocab commentedNew commit : Fix an error due to a pareview correction.
I can't add spaces before or after "/" in microtemplating.js because it breaks the regular expression...
So I now get some errors on pareview, but they can't be fixed.
Comment #8
klausiReview of the 7.x-1.x branch (commit f65d486):
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
manual review:
So the inclusion of the library is a blocker right now.
Comment #9
tocab commentedHi klausi,
thanks for your review.
Point by point :
Regarding the planned developments I perhaps misnamed the module which should probably better be 'js_templating' or something like this. What do you think ?
But I think the microtemplating "library" should be kept like this, because there is no other way of integrating it, and because it is well-known in the world of "javascript templating".
Comment #10
tocab commentedComment #11
klausiI see, so looks RTBC to me otherwise. The project page could be a bit more descriptive, informing about the use case etc. See https://www.drupal.org/node/997024
Assigning to dman as he might have time to take a final look at this and do the single project promotion.
Comment #12
dman commentedI see your point about the third-party include, and I'd let that slide as the benefit of having it as a file there is greater than the reasons not to.
However, one page of code still is incredibly short. So short that half your code is just the help hook. I love doing sexy help hooks, but it really leaves this module pretty trivial to use as a project application.
I know there are a few existing projects of similar size that *just* add another hook_library like this does, but those alone would not pass these criteria if used as a project application either. But I do take your points about it's purpose.
Like Klausi - I think this would benefit from an example use case or demo before it would be really ready for release and consumption. It looks like your help text in README.md is halfway there.
I would suggest that if you were to provide a page or a test mini-module that demonstrates this utility in action that could be sufficient to push it over the line from "trivial" into "useful and usable". As your README states, this currently does nothing until a developer adds more code. So - if you provided that working code then we would be winning.
Also just as an idea - would you be able to use/expose this library to use as either/both a text filter or a field formatter? Either of those would be a lot clearer to use for site builders, and that approach is a lot more Drupally than just saying you can only use this as an appendage to your own custom theme code.
If this suggestion does not make sense (I really can't tell) then that is because your project page currently is a bit of a mystery, it doesn't really tell me what this does in terms of input or output, or why or when I would want to use it. So describing a real world use case on the project page to explain why this module would be used would also help this project a lot, and would be closer towards getting past the "too short, can't be tested, and does nothing" exemptions needed with this application.
So, if you were to provide a real-working mini-module using this, either as code or verbatim in the project page, then with Klausi's RTBC, it would just scrape in OK I think.
That would make it testable ("It works!") and that would be a stable place for a first release to build from as you describe in #9.
It's not policy to use a project application to promote a module that - as currently presented for evaluation - doesn't actually do anything tangible yet.
Comment #13
tocab commentedHi dman,
Thank you for your response.
I've added an sub-module with a real-working example : a pure frontend todo list application.
After enabling the microtemplating_example module, go to /todos for the demo.
I hope it would help.
Thanks,
Comment #14
nabil.sadki commentedAutomatic review
Review of the 7.x-1.x branch (commit f01fc3b):
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
Source: http://pareview.sh/ - PAReview.sh online service
Comment #15
tocab commentedThanks for the review nabil,
but as I said in #7, those errors, reported by pareview, can't be fixed.
Comment #16
klausiDon't forget your project page; example module looks good, back to RTBC.
Comment #17
dman commentedThat looks excellent tocab!
This example of usage is clear, and all the code (both original and mini-module) is very readable and meets Drupal expectations well.
(I feel) This little extra support addition takes this module from another "meh" third party integration thing to a well-supported plugin that folk will be able to re-use!
Thanks for your patience and timely response here.
Good luck, and I hope to see your project page grow as you add some real-world uses!
Thanks for your contribution, tocab !
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #18
tocab commentedThank you.
I will take a look at those links and update the project page accordingly.