That confused me too. Sent from my Kindle Fire
_____________________________________________ From: Jakub Jankiewicz <jcu...@onet.pl> Sent: Sun Feb 26 13:28:23 GMT+08:00 2012 To: "Roger Martín" <rg1...@gmail.com> Cc: aikiframework-devel@lists.launchpad.net Subject: Re: [Aikiframework-devel] Progress in new engine Did you use the name v8 in the code, you should change than name because v8 in engine use by google chrome. On Sun, 26 Feb 2012 00:17:37 +0100 Roger Martín <rg1...@gmail.com> wrote: > Hi folks!! > > I pushed a new version of engine v8. It's in a EXPERIMENTAL STAGE. It > doesn't work,yet.... > After Bassel feedback about markup, and with some ideas of Jakub, i > re-thing engine and make this changes. > > Advances in engine > - a load_parameters method allow select the markup style, disable and > enable parse. I add as experimental (only a mockup a feature to > convert widgets from current aiki into engine V8. > - Note that parsers can be added in line 377 (@todo use a config var) > - the render is more elegant (see parseWidget to see how a entire > widget is parsed). > > Advances in markup > - engine can understand various markup style (see > aiki_get_markup_codes).Now understand: > aiki; (TAG( PARAMETERS ) TRUE-BLOCK )else( FALSE-BLOCK )TAG) > and (tag( )tag) and of course, without else block. > aiki2: (TAG( para {TRUE-BLOCK}else{FALSE-BLOCK})TAG) sorry, > don't work c style : > (TAG(COND){true-block}else{false-block}TAG) asp: > <%TAG(COND){true-block}else{false-block}%> > > - function extract_markup is a function that with a given a widget > content and a markup style extracts the first markup tag sliced in: > initial text,tag, parameters block, if-true-bloc,if-false-block ,rest > of text. > The different parser (view,script, permission ) will receive three > parameters: parameters array,if-true-block,if-false-block, > That allows a easy "else function" for all parser, and all will > receive the parameters, > > - function extract_parameters ( a improved mtoken functions). It > allows all type of parameters: > (viev( bluemarine,es ) .... > (t("Hello")t) > (sql({"SQL":"SELECT ..", "pagination":"1"} ) here the code )else{ no > records fount ) > (if( aiki->is_debug_on() ) > and you can mixed all!! > > - There is a eval parameters function that converts all parameters in > real values. Parameters can be: > 1) a list of values separated by , > 2) a value can be: integer,float,false,true,delimited string, array, > json, aiki->object call, and a function > for example: > 1,2,false,"foo",'bar', "foo'bar', {1,2,3}, aiki->site, > substr(foo,bad),{"foo":"bar"} > (i don't have develop all this features..but if you see code i can do > soon). > > What does it mean? > These step are important. See, as example, how to develop a new > parser, called "permission" > 1) add in line 377 a new parser as "permission" => "parse_permission" > > 2) create a function > function parse_permission ( $permission, $true, $false) > if ( in_array (aiki->membership->permision, $permission) ){ > return $trueBlock; > } else { > return $falseBlock; > } > > 3) use in widget > (permission( admin, editor ) You have permission )else( not > authorized ) > > > > Conclusion > --------------------- > - The tasks to render a page are divided in functions: select widgets, > extract markup, eval parameters.. > - All markup are 'standardized': they have a 'else block', and > parameters. Widgets can be written in a coherent style. -- Jakub Jankiewicz twitter: @jcubic www: http://jcubic.pl _____________________________________________ Mailing list: https://launchpad.net/~aikiframework-devel Post to : aikiframework-devel@lists.launchpad.net Unsubscribe : https://launchpad.net/~aikiframework-devel More help : https://help.launchpad.net/ListHelp
_______________________________________________ Mailing list: https://launchpad.net/~aikiframework-devel Post to : aikiframework-devel@lists.launchpad.net Unsubscribe : https://launchpad.net/~aikiframework-devel More help : https://help.launchpad.net/ListHelp