I think better to keep pure php where possible. Aiki Markup is silly. On Fri, Sep 14, 2012 at 8:18 AM, Jakub Jankiewicz <[email protected]> wrote: > Hi all, > > I just have meet with aiki once again, It was bad, believe me. I report > 3 bugs, I couldn't force myself not to. > > But then I had idea. From some time a was thinking about new OCAL and > looking at it, I thought that I can make it even more simpler. My code > that have a logic look like this: > > $app->get('/clipart:id', function($id) { > return new Template('main', array( > 'content' => new Template('detail', function() use ($id) { > global $app; > $query = "SELECT * FROM openclipart_clipart WHERE id = > $id"; > return $app->db->get_array($query); > })) > }); > }); > > main and detail are Mustache templates in file /template/{name}.template > > I mean look at this shit. It simple when you look at it as for php, but > why we need php? can we just put > > > get[/clipart:id] { > return Template("main') { > content => Template("detail") { > root => sql(SELECT * FROM openclipart_clipart WHERE id = :id) > tags => sql(SELECT name FROM openclipart_tags WHERE id = :id) > } > } > } > > or something similar. Why I need to put $app->run(); (BTW: I put it > into destructor it doesn't work) > > > I wanted to make abstraction over Clipart and User and add more classes > so I will end up with MVC that I hate (mostly because of the MVC > frameworks) but it can look like this is much better. > > This pattern is repeated over and over, for Sinatra for Ruby then other > languages copy that so they look something similar but use different > syntax. > > And people add MVC to it so they systems are very complicated, but all > they do is have request and pull stuff from database and add some logic > to it. > > We can create something like this, that will have new language, and use > hosting language that it's everywhere - php, Shit we can make it work > on PHP 5.2. Writing new language if you have parser generator is not > that hard. > > Using this we will have everything in one file but we can allow to > split it up. And template will be Mustache so everybody will know it, > we can dedicate this system to Bassel. > > Look at the shit I propose for new Aiki > http://aikiframework.org/wiki/Aiki_markup_2 > and compare it with this. > > > -- > Jakub Jankiewicz, Web Developer > http://jcubic.pl > > _______________________________________________ > Mailing list: https://launchpad.net/~aikiframework-devel > Post to : [email protected] > Unsubscribe : https://launchpad.net/~aikiframework-devel > More help : https://help.launchpad.net/ListHelp >
-- Jon Phillips 王✳ http://fabricatorz.com ✳ skype: kidproto ✳ irc: rejon +1.415.830.3884 (global) ✳ +86-187-1003-9974 (beijing) _______________________________________________ Mailing list: https://launchpad.net/~aikiframework-devel Post to : [email protected] Unsubscribe : https://launchpad.net/~aikiframework-devel More help : https://help.launchpad.net/ListHelp

