On Mon, Oct 1, 2012 at 2:46 AM, ADmad <
admad...@gmail.com> wrote:
>>
>> I think JsHelper should be left aside too, but some functionality
>> should stay. I consider (a) buffering and (b) AJAXish (plus
>> pagination) functions somewhat usefull most of the time.
>>
>> a. In fact, I consider this one an added value.
>
> Yes buffer() was the only feature I used too, but its no longer required as
> same can be achieved using view blocks now.
Yup, I read what Mark said, and I noticed the same thing :P
>> b. DRY is the key here, Many applications today, use AJAX or AHAH
>> techniques heavily, and I think functions like request() are nice to
>> have around.
>
> You can easily write DRY js code too, jquery plugins ftw.
> JsBaseEngine::request() is just wrapper for $.ajax() so just use that or the
> other convenience functions for ajax.
>
> Mark mentioned that ajax pagination was another useful convenience, which
> can be achieved with just 2 lines of jquery:
> $("#paging").on("click", "a", function() {
> $("#content").load(this.href);
> });
Speaking of not repeating code, I know it is fairly easy to build this
kind of js pagination scripts where the only variables could be some
short strings, the selectors and the URI. But, to speak the truth, the
only _convenient_ method I can miss is request(), which can not be so
easily replicated in a DRY way with view blocks; where you have to
consider the magic provided by _parseOptions(), _prepareCallbacks()
and _mapOptions() safe functions.
>> I hope Asset Compress sleeps in the core in 3.0 :)
>
> Imo its fine as a separate plugin, makes maintenance easier.
> Perhaps the only thing required is moving it under CakePHP account like
> DebugKit.
Yeah! I meant for it to be in the cakephp github account, not inside
the core codebase, sorry for the misunderstanding.
--
Ber Clausen