-
Ext JS Premium Member
- Join Date
- Dec 2007
- Posts
- 40
- Vote Rating
- 0
Alpha release of PHP Extjs wrapper library
Hi,
I here by want to announce the alpa release of WebTricks, a PHP ExtJS wrapper. This library can be used to create ExtJS objects with PHP. Please download the zip file below and try it yourself. An example is include in the zip file. I would love to see some feedback.
Download : http://www./do...icks_0.5.0.zip
API Documentation: http://docs./
Danny
-
Sencha User
- Join Date
- Apr 2008
- Posts
- 99
- Vote Rating
- 0
Hoi Danny,
Looks cool. The thing that I found a bit strange is the hierarchy.
System_Web_UI_ExtControls_Menu_TextItem where I would expect something like this
Ext_Menu_TextItem I saw the source of the demo. Mimics extjs quite good, with the downside that is a bit more verbose . Do you know of any current limitations?
You didn't release this as an Zend Framework component, but I like the fact that Zend_Form can be rendered as a dojo form (docs).
The nice thing is that it would be possible to bridge Zend_Form to System_Web_UI_ExtControls_Form_FormPanel, as far as I can see.
The license url doesnt work: http://www./license
-
Ext JS Premium Member
- Join Date
- Dec 2007
- Posts
- 40
- Vote Rating
- 0
Hi Bulle Bas,
These wrapper classes are part of a larger framework we use in our company, the naming convention is the same as in the .NET framework. So this is the reason of those longer class names.
All ExtJS functions are mapped, so you shouldn't run into limitations. However, I think it's better to extend the ExtJS javascript for larger ExtJS objects and not create those objects dynamically. It works best for generating dynamic forms, grids, toolbars and buttons, etc.
-
Sencha User
- Join Date
- Jan 2008
- Posts
- 64
- Vote Rating
- 0
I don't see any reasons why programmer should suck twice during the project development instead of spending reasonable amount of time and money on learning ExtJs.
You wrote a wrapper which allows PHP programmers to become familiar with ExtJs while continuing to write the programs in PHP instead of javascript.
First, PHP can not be mapped to Javascript 1 to 1. Java to javascript, C# to javascript and your PHP to javascript give you a small subset of javascript and ExtJs features
Second, you create "one more ing layer" - common antipattern which I used several times until I learned it, by the way. Instead of having chances to make an error in Extjs/javascript the programmer have chances to make a error using your wrapper as well as your wrapper can incorrectly translate the code to the javascript.
I believe your project can help some people - they want to write something simple in ExtJs, but they want to use PHP. Like a one page demo with a grid and form for grid editing, may be in different tabs.
My choice is to learn both the ExtJs and javascript as good as possible. The javascript gives incredible abilities to write small, simple and very extendable code. So I write the GUI using the original ExtJs, I create some kind of tools/helpers/conventions for my project(like a mini framework) and use best from inheritance/prototypes/plugins/mixins and so on for removing the code duplicate. And, of course, I separate the GUI from the server side so I can mimic the AJAX requests/responses while developing the UI.
I use the server side as a JSON wrapper around the database in simple projects.I use MVC where V is rendering the JSON in more complex projects. And that is the simplest way to using the right tool. I understand that there are reasons why the PHP is for server side and javascript is for GUI. It is simplier for me to learn another syntax instead of learning tons of wrapper like PHP-ExtJS or PHP-MySql or PHP-Http Caching.
So I recommend everyone to learn the original ExtJs and reading it sources
-
Ext JS Premium Member
- Join Date
- Dec 2007
- Posts
- 40
- Vote Rating
- 0
Hi ZeusTheTrueGod,
First of all, I recommend everyone to learn ExtJS and javascript development. For complex objects it's it best to extend the basis ExtJS classes with your own javascript classes.
However there are a lot of cases where ExtJS forms, grids, etc. need to be dynamically generated on the server side. For instance a content management system where the content editor is a dynamiccaly generated ExtJS component of a content template stored in the database. In those cases this PHP wrapper library kicks in, for users it will be easier to generate those ExtJS components dynamically based on i.e. information stored in the database.
I recommend everyone who is currently generating ExtJS components on the server side to try out this library and of course hope it works for you!
-
Ext JS Premium Member
- Join Date
- May 2009
- Location
- The Netharlands
- Posts
- 265
- Vote Rating
- 7
Creating a wrapper for ExtJS is definitely no simple task. When I started developing ext4yii we were faced with the same questions of anti pattern that is stated above. Although a wrapper is a good solution for some, we found it difficult to convince developers to use ExtJS components and function that are wrapped in PHP.
The first and immediate reaction we got was: "Why learn wrapped function names instead of learning the js?". Of course questions like this can be answered with reason and explanation but at the end one ends up with more questions.
We chose to implement "server-side ExtJs" in a different way, hoping to keep the productivity and skip, or at least minimize the learning effort as much as possible. The final result of our product will be available soon as we are finalizing documentation and support issues. Take a look at http://www. if you like.
BTW: There are two other ExtJS wrappers out there: php-ext and extphp.
-
Ext JS Premium Member
- Join Date
- Dec 2007
- Posts
- 40
- Vote Rating
- 0
Originally Posted by gevik
The first and immediate reaction we got was: "Why learn wrapped function names instead of learning the js?". Of course questions like this can be answered with reason and explanation but at the end one ends up with more questions.
Please do learn to ExtJS javascript syntax. Because all config options of the ExtJS objects are mapped, the wrapper is extremly easy to use when you know the ExtJS syntax.
Originally Posted by gevik
We chose to implement "server-side ExtJs" in a different way, hoping to keep the productivity and skip, or at least minimize the learning effort as much as possible. The final result of our product will be available soon as we are finalizing documentation and support issues. Take a look at http://www. if you like.
I've taken a look at your Ext4Yii project. You implemented the same anti-pattern in the project, even adding a new layer, that is the XML syntax which you use to create the ExtJS compontents. So people who know PHP and/or ExtJS have to learn your Ext4Yii XML markup. Wouldn't that be even harder to do?
-
Ext JS Premium Member
- Join Date
- May 2009
- Location
- The Netharlands
- Posts
- 265
- Vote Rating
- 7
There we go with the reasoning.... Just to make it clear.... I was not trying to take a shot at your framework or any other, any layer on the top of ExtJS either XML or PHP will be anti-pattern for some and a blessing for others.
Ext4Yii is not harder since the code completion does most of the UI definition for you and the focus of Ext4Yii is to develop business apps instead of just UI definition.
-
Ext JS Premium Member
- Join Date
- Dec 2007
- Posts
- 40
- Vote Rating
- 0
Hi Gevik,
Ok, I see, we are on the same side here ;-) Well the wrapper was a blessing for me to create server side config objects, so I decided to release it.
I'm now working on a PHP content repository engine. Hope to release tha
|