Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I'd like to share "Easy authcache" module to the community.
It's extends authcache module http://drupal.org/project/authcache by implementing it's
api (that is not very usefull) and allows to get with ajax some objects. For now it supports
view, blocks, comments. Also provides api (hooks) that allow to implement authcache in cuctom module with only 3 functions with out writing any js code. Also I'm going to share documentation for authcache and this module.
It's extends authcache module http://drupal.org/project/authcache by implementing it's
api (that is not very usefull) and allows to get with ajax some objects. For now it supports
view, blocks, comments. Also provides api (hooks) that allow to implement authcache in cuctom module with only 3 functions with out writing any js code. Also I'm going to share documentation for authcache and this module.
Comment | File | Size | Author |
---|---|---|---|
#8 | easy_authcache.zip | 20.32 KB | igor.ro |
#2 | Easy Authcache documentation.pdf | 135.88 KB | igor.ro |
#1 | easy_authcache.zip | 25.17 KB | igor.ro |
Comments
Comment #1
igor.ro CreditAttribution: igor.ro commentedEasy Authcache is module that makes authcache implementation easy,faster and makes it comportable with drupal community modules.
Advantages of module differs it from Authcache:
1. It makes unnessary for developer to write client side callbacks for authcache module (js functions).
2. Makes server side callback as hook (drupal style).
3. Includes all modules.
4. Handle js files and settings, needed for retrived with ajax html, on final page.
5. Handle url context dependent code.
6. Provide api to handle theme functions, you need, with authcache.
Disadvantages of module differs it from Authcache:
1. Makes bootstrap FULL on authcache ajax callback. That can make slowly then authcache manual implementation.
2. Can lose some js Drupal.settings after authcache ajax result.
3. Higher, then for manual authcache implementation can be, load on client side (js code).
Comment #2
igor.ro CreditAttribution: igor.ro commentedDocumentation with description how easy authcache works.
Comment #3
apadernoHello, and thank you for applying for a CVS account. I am adding the review tags, and some volunteers will review the code, pointing out what it needs to be changed.
Did you submit a feature request for each of the features you think missing in the existing project, and that you implemented in the proposed module?
Comment #4
igor.ro CreditAttribution: igor.ro commentedHello thanks for your work.
No I do not post feature request for all features I did with this module, because modules have different goals.
Authcache allow to create fast ajax requests, by writing custom code, and because of skipping bootstrap steps. For example you can load just SESSION_INiT bootstrap step and then include modules we need. Easy authcache allways make FULL bootstrap and it's goal is to implement ajax getting very fast, to meet deadline. In other words Authcache is lowlevel and Easy authcache is high level tools.
But you are right, as soon as I have posted module for cvs account I'll ask maintainer of Authcache module to review code.
I have used this module on 3 projects and my colleges on 2 other projects. And because they are happy, I think it is good enought to be in community.
Thanks.
Comment #5
apadernoThank you for your reply.
Comment #6
apadernohook_uninstall()
, or doesn't implement it to remove the Drupal variables it defines.Comment #7
igor.ro CreditAttribution: igor.ro commentedThanks.
Going to fix asap.
Comment #8
igor.ro CreditAttribution: igor.ro commentedI have fixed issues.
Hope code is good ehought for detailed core reivew.
Thanks
Comment #9
igor.ro CreditAttribution: igor.ro commentedAnyone, I need community review, please.
Thanks.
Comment #10
mlncn CreditAttribution: mlncn commentedHello Igor,
I'm sorry; you've waited a long time and have clearly put effort into this code. It is definitely ready to be shared as a real project with issue queues. Thank you for your contribution and patience and good luck with your Drupal coding!
benjamin, agaric
Comment #11
zzolo CreditAttribution: zzolo commentedHi @igor.ro, thanks for the application and patience. Congratulations, you have been approved. Great work on your code and we look forward to your contributions to the Drupal community!
The following points are recommendations for when you do put your code on drupal.org and develop it further; these are not requirements, simply suggested improvements based on my experience and knowledge of the existing Drupal community. Also, please read further about CVS access and resources.
Please read the following resources to make sure you know how to use CVS and the specifics to the Drupal CVS infrastructure, as well as how to be a good module maintainer on Drupal.org. The Drupal community is very large and dynamic; we welcome you as a module maintainer and hope that you embrace and challenge the Drupal community and continue to contribute.
Thanks to the following people who helped review this application, it is very appreciated:
--
Note: Please be patient with the CVS application process. It is all done by volunteers. Our goal is not to be arbitrarily slow or meticulous. Our goal is to get you CVS access and ensure that you are and will become a more responsible Drupal contributor. For a quick reference on what I look for in a code review, please see this article, or read the handbook page on how to review for reference.
Comment #12
apadernoI was going to report this points, but my connection had problems.
Drupal variables are not initialized in
hook_install()
;variable_get()
accepts a parameter that is used as default value when the variable has not been set.json_encode()
.Comment #13
igor.ro CreditAttribution: igor.ro commentedThanks.
This is good present on New Year.
Merry Christmas.
Comment #14
igor.ro CreditAttribution: igor.ro commentedThanks zzolo for review.
All your issues are absolutly right. Thanks. Will fix asap.
Comment #15
igor.ro CreditAttribution: igor.ro commentedThanks kiamlaluno for your review.
Especially for your it's specification.
I had reasons to do that way.
For example.
1. About variables on install, it makes me useful to remember what variables I had to remove on uninstall. But I've clear minds that it makes us to store default values in DB and potentially makes it slow.
2,3. You are absolutely right about comments and function calls. Thanks.
But there are a few functions I can not change name because they called according authcache callback function name agreement.
And that agreement differs from drupal ones.
4. You are right.
5. I'll check. But as I remember now authcache used js code to convert objects to json and that code is crappy, it makes
. So I had problems with default json_encode(); and had to write my own.
6. I thinking it is good practice to make files as small as we can and include on demand. But sure I'll check your idea ;)
7. This is principal point for easy authcache module to do not use behaviours, because we need to get dynamic regions asap and only once - on document ready. Behaviors will make run it on every ajax return ;) So this is not clear drupal way but it is necessary do be that way.
Thanks.
Comment #16
zzolo CreditAttribution: zzolo commentedHey, to check out how to use Drupal.behaviors correctly, look at the "Drupal.behaviors practical example" section on http://drupal.org/node/205296
Comment #17
igor.ro CreditAttribution: igor.ro commentedModule released thanks to every one Easy Authcache
Comment #20
apadernoI am giving credits to the users who participated in this issue.