Login Register

Rails/Django/Smarty/JS? helpers

Hi folks!
I interested in "Rails/Django/Smarty/JS? helpers" section from GSoC Ideas list. But my proposition is to make PHP Classes and helpers that will simplify work with a framework.
For example, like Projax for Prototype and PQuery For JQuery.
If community is interested in my idea pls let me know;)

We're interested!

Hey Alex,

Awesome. Sketch out some more details about what you'd try to achieve and how... would you focus on AJAX or Dijit or something different?

- Rob :)

Great!

The main goal is to make library of PHP helpers for different things which can be obtained with Dojo, so peoples will be able to use Dojo without writing any Javascript code.

For beginning we can focused on Dojo Core and implement helpers for often used Ajax things like: different simple responsers, autocompletion, in place editing, form validation etc. Then we can add helpers for Dijit widgets. The range of application for such library is very wide. Anyway it can't be completely implemented during GSoC, but GSoC can be a good starting point for it.

I already have a name for library - Pojo, or Pojox, Pojax (because Pojo already means Plain Old Java Object. so what? We can replace it!)!:)) Simple and nice name. (Yes i stole an idea from Projax and PQuery:)

I think that community response will be good:)

We already have the most important thing - the good name! The rest is simple - just implement it!:)))

Best regards, Alex.

More details

Hi Alex,

The name is the easy part, just like the colour of the bikeshed!

How will these tags fit into a template framework like Smarty? I'd hope people aren't still mixing code and presentation in this day and age... (I've avoided PHP for a few years now).

How would you architect the system? Have a single 'new PHPDojo()' object? Does it depend on a particular MVC-style development? ie. an autocomplete has to contact a view, in rails they're named but would you put in a URL or a function?

Which are the most important tasks to do first, and why? Getting some of the trickier problems out of the way earlier might overcome some of the design hurdles.

- Rob :)

Ok

Hey, Rob, it was a joke about the name!;)

Yes, you are right. Well planned architecture of the system is very important to make a good and maintained product. At this phase i'm talking about general idea, not about it implementation in particular cases. Of course it can be implemented for Smarty as a set of tags, no problem. But Smarty is not utopia. In the easiest way it can be implemented as a class with it methods or functions that will be called from document.

Ususally peoples talk not about code and presentation mixing but about LOGIC and presentation mixing. I think that function call from HTML document (or even {php}$pojax->autocomplist($params);{/php} for Smarty) is not a mixing. In many cases it is a good and easy solution.

About MVC. Generally i didn't think about it yet. Yes, it will be good to adopt this library for using in modern MVC-based php frameworks.

Of course the most important task, as you mentioned, is a planning of whole library architecture. It should allow using library in many cases (plain HTML, Smarty, different frameworks, etc.). Architecture will define all further work.

>Have a single 'new PHPDojo()' object?
It depends on architecture. But i think that such library should be divided into several parts.

Maybe it is unreal to implement full set of features during SoC, but we can build a good base for further development.

Best regards, Alex.