Home » support » General discussion » Building Own Generator ( ) 7 Vote(s)
| Re: Building Own Generator [message #50826 is a reply to message #50787 ] |
Fri, 25 April 2008 11:59   |
lukas Messages: 28 Registered: November 2007 Location: Switzerland |
Junior Member |
|
|
| lvanderree wrote on Thu, 24 April 2008 18:40 |
I am going to re-implement the edit-stores/readers
...
How do the other guru's like the new implementation of the edit-pages?
|
I leave you the choice if I'm guru or not:-) But I like it. Nice Job. I considered lazy loading a must-have for our project here, but on a long term view. The applications we have now aren't that big. But since you're on it, we'll move to pjs now to.
| Quote: |
At the moment I am very happy with the lazy-loading, which is possible because of the using.js script and the pjs-plugin. And I am very happy with the generated script ... which creates a new panel-object and registers it as a new xtype-object. (this is what I want to accomplish as well for the list-pages for the long-term).
|
I examined several lazy loading possibilities for my own diploma 2 yrs ago (basically the same topic i'm working in right now). From what I know about LL and Ext, I can say that your solution will work and scale very well. I'm excited about it.
But I'd like a second expertise from the "other guru's" (hi guys) here about a related yet different topic:
Since sfExtjsThemePlugin has lazy loading now, it'd be nice to have an app generator who does the same. The thoughts we made over here go a bit further, imagine this use case:
- Your app loads several List-Grids in a Tabbed Panel.
- The Filters are loaded east, a help text is loaded west.
- If the tab focus changes the filters and help text should change too.
- The components that display the filters and the help text should be exchangeable whitout changes to the app.
Our Solution looks like this:

In the UseCase above this would mean:
- Theres an openInWorkbench handler and a workbench channel.
- The tabbed panel has a consumer registered to the workbench channel.
- The consumer adds a tab for every item it gets from the channel. (consumers are plugins for ext.component)
- Each tab has a controller for the channel help and one for the channel filter.
- The controller fires on activate (onControllerIdActivated) and destroy (onControllerIdRemoved).
- The east panel is connected to the filter channel.
- The west panel is connected to the channel help.
- The filter channel has the handler addFilter(element)
- The help channel has the handler showHelp(identifier)
How is this connected with sfExtjsThemePlugin?
- addFilter is set as the filter_add_handler in app.yml
- The openInWorkbench is set as the grid_open_link in app.yml
- showHelp is called by the tabpanel if a tab is added.
What happens now:
On load all the related information is loaded too, the items are added to their channels, more precise to the components registered in the respective channel.
When the user changes or closes tabs, the id is passed to the channels by the controllers. The items which were loaded with the respective controller id are displayed or removed.
btw: consumer stores are no datastores or something like that: They usually just have to now which part of a layout (eg an accordion in a west panel) the consumer has to activate (in case of accordion: unfold or remove the one loaded with the controller_id, fold everything else)
What has a developer to code to make it work?
basically nothing:
- You can configure your channels in a yml
- You can add the Controllers and Consumers as plugins to the components.
- The code to register the Controllers, Consumers and handlers is generated.
- Various partials of sfExtjsAppElementsPlugin will provide an easy changeable app Framework.
- You have to code the handlers in your application, but there will be helpers.
- You will be able to configure several behaivours (e.g. what to do if a consumer has no item in store for a controller_id)
- Everything is an xtype, thus easy customizeable if you want special things (e.g. with consumers on components which need custom load / store actions)
Are There long-term todos?
- At the moment the whole channels have to be loaded statically. We will make it possible to add channels dynamically
- Connect this to StateProviders.
Now, do you...
...think this is usable to build symfony / sfExtjs*Plugin?
...know a more simple solutions? (if yes: how? Requirements: Intercomponent-communication but the components don't have to know each other.)
...have some more ideas / suggestions?
Thanks for looking into it. Your 2cents are worth a lot for us.
greetz
lukas
|
|
| |
| Re: Building Own Generator [message #50903 is a reply to message #24107 ] |
Sun, 27 April 2008 22:58   |
 |
lvanderree Messages: 652 Registered: June 2007 Location: Netherlands |
Faithful Member |
|
|
Well it took a while, but here my thoughts.
It took me a while to understand everything you described and I still don't have a full picture of how to implement everything, while keeping things flexible.
The thing is I don't think all modules (and views per module (list/edit)) will require a filter and a help-panel, or to be more precisely:
- some views might require other panels than a help or filter panel, some might require more than 2 extra panels, some maybe less.
Even though this makes things harder, I don't think it is wise to restrict ourself to the described layout.
Maybe we should extend the description of your use-cases to a real example to make things more clear. I think the city-country-example would be nice for this, this is simple and everyone can understand it.
A City has
- a PrimaryKey,
- a name (text) and
- is related to a country (foreign key)
A Country has:
- a PrimaryKey,
- a name (text)
I think there are two things very important for an application-plugin:
1. a window-manager (to handle the layout problems as described by me above) and
2. an event-manager as already described by you, but we might need to describe this more precisely (as said at the moment I can't tell how to implement things precisely).
Let me first further explain the window manager, although I haven't completely thought this out yet, but at the moment I see this:
The City-module has (just as most modules) a list and a edit(detailed)-view.
The City-List can have (as you described):
- a content-panel containing the (editable) grid -> for the content of the tab-panel
- a filter panel -> in the east
- a info panel -> in the west
- maybe a detailed panel -> in the south, but maybe you want to open these detailed pages as new tabs in the tab-panel.
- maybe you want to define even more panels in your layout (in that case north,east, south, west and content isn't enough, hence my idea about wanting this more flexible with some kind of window-manager)
Take now for example a City-Edit-page (with the content in the tab-panel)
- a content-panel contains the form -> tab-panel
- a info-panel -> in the west
(- a filter won't be necessary)
Now take for example a Country-Edit-page
- a content-panel contains the form -> tab-panel
- a info-panel can now contain E.G. a list of links to all cities which lie in this country -> in the west
For some applications you might want to have the panel-setup you described, but for others you might want to have other layouts, however you probably want to reuse your modules in different applications with different layouts, so the window-manager should in my opinion handle some kind of mapping of the panels a module has and the panels a layout has to offer.
One thing which can make this a lot easier however is to let all modules exist of only one content-panel (which can contain the info and filter panels). This way all other panels will of course automatically show-up with the content panel, when you select a certain tab (they are in fact part of that same tab).
If you want modules to exist out of multiple panels (in which your content panel is the only content for the tab, and the other panels are shown next to the tab-panel) you should find some way to implement a state manager which holds the current states of the other panels (E.G. the content of the filters). A solution to this can be to use card-layouts which show the corresponding panel of the content-panel, but what to do if for instance one view (E.G. list) contains a panel (filter) while another view (edit) doesn't contain a panel, not even an alternative for that same panel...
I think the first solution with only one content-panel which contains all other panels (grid/form and filter and info) would make things a lot easier, however also less flexible, since all panels are always along to each other.
For the event-manager I think there are three situations:
1. You want to have inter-module-communication (from panel to panel from the same module, E.G. from edit-page to list when saving a new item which reloads the grid)
2. Pretty similar, module-to-module-communication (E.G. when you change the name of a country you not only want to update the list (or edit-page if you made the change in an editable-grid), but you also want to update the corresponding cities (both list and edit-pages)
3. Last but not least, I think you want to be able to react on event send from the server, E.G. when another user added a new country, you want your country-list to automatically contain this new country.
This is all very well possible I think, with your description of channels with consumers and handlers. However I don't complete understand the handler-channel implementation.
Take for example a Country-module,
- the Country-List would have a country-changed-Consumer (to handle for new and changed cities events)
- an editable-Country-List would also have a country-changed-Controller (to throw events when a country is changed in the country-grid)
- a Country-Edit-page would have both a consumer and a controller for country-changed-events on the country-changed-channel.
The country-changed-channel should automatically be created when the first consumer or controller registers itself on the (at that time non-existing) channel.
In the same way you can add City-Edit-pages in this story, by letting them consume on the country-changed-channel. However this would probably make a big mess when you have multiple city-edit-pages and country-edit-pages with their country-list and city-list pages open. So maybe we should set some properties for channel, I am currently thinking of 3-4:
1. the module-name (E.G. country)
2. the event-name (E.G. added, changed, deleted, etc)
3. the id of the affected item
4. maybe a 4th can be a reference to the sender of the event (as is seen in a lot of event-handling implementations)
maybe these first two can define the channel name, and the consumer can decide itself what it does with the id-property(#3) but it gets all messages on the channel, or maybe it is even better to replace the 3th propertie by a class which can contain multiple (user defined) properties.
I haven't really thought about the option of events from the server, and how it would register itself, but it can make use of the same principles of consumers and controllers.
Maybe you can tell where handler come along in this story and of course what you all think about this.
Ps. please don't feel this as an attack, I just want to reflect my ideas and opinion, so we can add a new flexible plugin which is useful for many people.
Leon
|
|
| | | | | |
| Re: Building Own Generator [message #50972 is a reply to message #50966 ] |
Mon, 28 April 2008 17:31   |
clad Messages: 23 Registered: April 2008 |
Junior Member |
|
|
I all.
Since the beginning that i use sfExtjs2Plugin and sfExtjsThemePlugin i have the same problem and i know i'm not the same in this case.
the problem is that I don't know how to create a grid with data in a database with sfExtjs2Plugin .
sfExtjsThemePlugin create a grid but it's difficult to customize it...For exemple i don't know if we are forced to have the grid in a tabpanel (since new modification of generator) or if we can have only a grid (not in a tabpanel).
I don't know if we can put a listener to show details of a row like in this example http://extjs.com/deploy/dev/examples/form/form-grid.html
The simplest for me will probably be to create a grid with sfExtjs2Plugin but it's never work...
I know i must have a columModel and a datastore but there is no simple exemple on the net.
An other solution could be to use only js file and put in on symfony pages but i still have the same problem: i don't know how to do to make a liaison with a database with symfony...
such of questions with no responses....
If someone know how to do a grid with sfExtjs2Plugin or know if my question about sfExtjsThemePlugin are possible please post.
thanks by advance
Clad
[Updated on: Mon, 28 April 2008 17:35]
|
|
|
| Re: Building Own Generator [message #50981 is a reply to message #50972 ] |
Mon, 28 April 2008 18:26   |
 |
lvanderree Messages: 652 Registered: June 2007 Location: Netherlands |
Faithful Member |
|
|
| clad wrote on Mon, 28 April 2008 17:31 | I all.
Since the beginning that i use sfExtjs2Plugin and sfExtjsThemePlugin i have the same problem and i know i'm not the same in this case.
the problem is that I don't know how to create a grid with data in a database with sfExtjs2Plugin .
sfExtjsThemePlugin create a grid but it's difficult to customize it...For exemple i don't know if we are forced to have the grid in a tabpanel (since new modification of generator) or if we can have only a grid (not in a tabpanel).
I don't know if we can put a listener to show details of a row like in this example http://extjs.com/deploy/dev/examples/form/form-grid.html
|
As said before, this is all possible and certainly desired, however I cannot tell if it is all implemented yet. But you are free to change anything to your liking. Unfortunately since everything is in active development and not stabalised yet is very hard to provide you with more info or examples.
So for now you probably have to dive in the code yourself and look for what is already implemented or else make changes to implement it yourself
| clad wrote on Mon, 28 April 2008 17:31 |
The simplest for me will probably be to create a grid with sfExtjs2Plugin but it's never work...
I know i must have a columModel and a datastore but there is no simple exemple on the net.
|
for that the best example is probably
http://backoffice.kaffill.de/ext2/ext2
it would again require work from you to find out what is possible with the sfExtjs2Plugin, and how to implement the examples from extjs.com
| clad wrote on Mon, 28 April 2008 17:31 |
An other solution could be to use only js file and put in on symfony pages but i still have the same problem: i don't know how to do to make a liaison with a database with symfony...
|
I wouldn't recommend this, since it is not maintainable, when your project grows/changes, but this certainly is possible.
For that you still want to have a pager and other tools to transform the data from your database to json-data and setup an action.class.php to execute actions.
| clad wrote on Mon, 28 April 2008 17:31 |
such of questions with no responses....
If someone know how to do a grid with sfExtjs2Plugin or know if my question about sfExtjsThemePlugin are possible please post.
thanks by advance
Clad
|
I am afraid you have to dive a little deeper into Symfony and make some changes to the sfExtjsThemePlugin yourself or start trying to experiment with the sfExtjs2Plugin.
Leon
|
|
| | | | |
| Re: Building Own Generator [message #51220 is a reply to message #51143 ] |
Thu, 01 May 2008 17:35   |
 |
lvanderree Messages: 652 Registered: June 2007 Location: Netherlands |
Faithful Member |
|
|
Hi KRavEN,
I implemented credentials by simply re-using the code as written in the default theme. I haven't tested any code yet, but it should work just like normally in symfony. (if not, I probably haven't implemented it yet at all required places... which is a probably the biggest security issue right now)
The silk-extension looks nice, fine by me to implement it.
Does anyone has any thoughts about the licensing of extjs? and to make the sfExtjsThemePlugin part of Ext JS?
Ps. I've added it to trac: http://trac.symfony-project.com/query?component=sfExtjsTheme Plugin&order=priority
[Updated on: Thu, 01 May 2008 17:40] Leon
|
|
| | |
| Re: Building Own Generator [message #51273 is a reply to message #51269 ] |
Fri, 02 May 2008 16:33   |
 |
lvanderree Messages: 652 Registered: June 2007 Location: Netherlands |
Faithful Member |
|
|
As said, I haven' tested it yet.
You are probably doing it in the right way (since it isn't mentioned in the datastore), but the code in the generator presumably has a flaw.
I assume you now talk about grids not edit-pages (since you mentioned columns, not fields)
You probably want to take a look at:
_list_ajax_columnmodel.php: 49
I already had a todo there since I didn't trust it (don't know who wrote it this way), at line 50 a [?php-if-credential-check (php-template-code) is implemented, but below it all generator-code(<?phph) is placed which does not return any template code ([?php), till line 87 which closes the template-if
Everything gets added to the array $cmOptions, which has nothing todo with the if-credential-checks in the template.
I think best thing to solve this, is to start using the sfExtjs2Plugin for the grid as well. Just like I do in _edit_ajax_form_inner.php at line 61 is add the output of printXtypeEditField to the template-array $form_config['items'][] which gets processed at runtime (in the template) and is making use of the sfExtjs2Plugin.
This would require some rewriting, but it would be a nice start to this ticket http://trac.symfony-project.com/ticket/3432
You can also see this in your template, there will be a credential-check without any code within the if-statement....
If you need help, please ask me. I will continue my development in the edit-pages for now.
I think I first try to fix the open-panel->key-finder, and after that implement the drop-down-combo-boxes-autoloading and after that try to implement event-handlers. (Could use your help/ideas for that Lukas)
[Updated on: Sun, 04 May 2008 21:46] Leon
|
|
| | |
| Re: Building Own Generator [message #51359 is a reply to message #51287 ] |
Sun, 04 May 2008 16:17   |
 |
lvanderree Messages: 652 Registered: June 2007 Location: Netherlands |
Faithful Member |
|
|
Hi KRavEN,
are you willing to (help) re-implement(ing) the forms, as described at http://trac.symfony-project.com/ticket/3432#comment:3
This will solve your issue with the column-credentials and the other issues mentioned at trac. It will also again improve the maintainability.
Lukas, have you already got some ideas about how to implement a application-wide event-manager?
[Updated on: Sun, 04 May 2008 21:45] Leon
|
|
|
| Re: Building Own Generator [message #51381 is a reply to message #51359 ] |
Mon, 05 May 2008 02:42   |
 |
lvanderree Messages: 652 Registered: June 2007 Location: Netherlands |
Faithful Member |
|
|
I've started with the initial implementation of event-throwing. It works for now when saved.
For implementation test, please check:
http://fun4me.demon.nl/test/test_dev.php/city/create
or by editing an item, E.G.:
http://fun4me.demon.nl/test/test_dev.php/city/edit/id/74
You get a alert when you successfully saved an item, which is caught in the main-app (that is why it won't be shown from the grid, I don't listen to events there...)
the saved event can be used to reload the grid,
I am planning on also implementing a delete-event, which makes it possible to automatically close a edit-window/edit-tab (depending on your implementation)
Besides I am struggling with making autoHeight to work. There is a problem with forms within a border-layout: see http://extjs.com/forum/showthread.php?t=34561
I can set the height manually, but it should be possible to automatically resolve the height, isn't it...
For an example look at the grid with cities and click the add country button, which pops up a new window with height 0
[Updated on: Mon, 05 May 2008 03:06] Leon
|
|
| |
| Re: Building Own Generator [message #51424 is a reply to message #51359 ] |
Mon, 05 May 2008 15:42   |
lukas Messages: 28 Registered: November 2007 Location: Switzerland |
Junior Member |
|
|
Hi Leon,
i just wanted to say: sorry, but business is eating my time.
I've read your answer, and agree in most points. I'm now on a prototype today, which comes out of the considerations of your answers. It'll fully integrate with the latest svn of the theme plugin.
In the meantime my mate diego does the testing and a virtual appliance.
Then we'll give out a public demo, wiki and svn/source somewhen this week (expect). so we have something real (as "real" as software can be) to talk about.
Some other thing I also thought about: The licensing. Since you want to open a business, I'd consider it a good idea to go with the Extjs subproject: They do have a lot of interesting references ( http://extjs.com/company/customers.php ) who could help your marketing. From the technical site it could be good to be a "Partner" too. Since symfony is MIT-Public, I think there shouldn't be a problem with the symfony project.
We discussed also internally about it, and we'd like to be part in this by kinda triple play:
- sfExtjs2Plugin -> for symfony apps with some ext parts
- sfExtjsThemePlugin -> for symfony apps with generated modules (-> "a little bit more Extjs")
- sfExtjsAppElementsPlugin -> for symfony apps that are fully ext based (this is what we would like to maintain)
This triple play would give developers the ability to use the first, the first two or all three plugins, depending on what they want to do. (eg: for just some forms in ext, one could use sfExtjs2Plugin, for generator based grids sfExtjsThemePlugin is additionally needed. For a complete app containing Event- / Layout- and WindowManager, a help system, a login and profile functionality, you'd need sfExtjsAppElementsPlugin also.)
So that'd be my proposal on the licensing thing. I'd be glad if you could consider this proposition.
But I'd like to wait a little bit on cooking that high: Let's see how this works out and discuss it at the end of leons diploma time. (@leon: if you want, you could give a date-to-decide: not to soon to stop you from working, but soon enough to write it under "achievements" in your diploma-doc )
greetz
lukas
|
|
|
| Re: Building Own Generator [message #51427 is a reply to message #51424 ] |
Mon, 05 May 2008 16:06   |
 |
lvanderree Messages: 652 Registered: June 2007 Location: Netherlands |
Faithful Member |
|
|
| lukas wrote on Mon, 05 May 2008 15:42 | Hi Leon,
i just wanted to say: sorry, but business is eating my time.
|
no problem what so ever, good to hear you are busy with it.
| lukas wrote on Mon, 05 May 2008 15:42 |
I've read your answer, and agree in most points. I'm now on a prototype today, which comes out of the considerations of your answers. It'll fully integrate with the latest svn of the theme plugin.
In the meantime my mate diego does the testing and a virtual appliance.
Then we'll give out a public demo, wiki and svn/source somewhen this week (expect). so we have something real (as "real" as software can be) to talk about.
|
I am very interested in your results, and feel free to keep me updated or propose things This way we can possible also prevent double work and make things interact smoothly between each other.
I am currently implementing even-listeners making the grid and the opened edit-widows interact with eachother. First basic: when saved/deleted in editor -> reload grid. After that the other way around: when saved in grid -> reload editors, after that only corresponding editor/lists should be listening (depending on ids and module-names)
| lukas wrote on Mon, 05 May 2008 15:42 |
Some other thing I also thought about: The licensing. Since you want to open a business, I'd consider it a good idea to go with the Extjs subproject: They do have a lot of interesting references ( http://extjs.com/company/customers.php ) who could help your marketing. From the technical site it could be good to be a "Partner" too. Since symfony is MIT-Public, I think there shouldn't be a problem with the symfony project.
We discussed also internally about it, and we'd like to be part in this by kinda triple play:
- sfExtjs2Plugin -> for symfony apps with some ext parts
- sfExtjsThemePlugin -> for symfony apps with generated modules (-> "a little bit more Extjs")
- sfExtjsAppElementsPlugin -> for symfony apps that are fully ext based (this is what we would like to maintain)
This triple play would give developers the ability to use the first, the first two or all three plugins, depending on what they want to do. (eg: for just some forms in ext, one could use sfExtjs2Plugin, for generator based grids sfExtjsThemePlugin is additionally needed. For a complete app containing Event- / Layout- and WindowManager, a help system, a login and profile functionality, you'd need sfExtjsAppElementsPlugin also.)
So that'd be my proposal on the licensing thing. I'd be glad if you could consider this proposition.
But I'd like to wait a little bit on cooking that high: Let's see how this works out and discuss it at the end of leons diploma time. (@leon: if you want, you could give a date-to-decide: not to soon to stop you from working, but soon enough to write it under "achievements" in your diploma-doc )
greetz
lukas
|
Thank you for coming back to this. As far as I see it now I totally agree with you. I haven't really invested much time in licensing right now, I know the MIT-license will allow virtually everything and GPLv3 is more strict about what you can and cannot do (protecting your work somewhat more), but great idea to wait with the decision until I have graduated. That was my idea as well, but wanted to know in advance what you people are thinking about it.
About graduation, I think this will be somewhat delayed because of the amount of work still to be done... It will probably be at the end of August.
Leon
|
|
| |
| Re: Building Own Generator [message #51447 is a reply to message #24107 ] |
Tue, 06 May 2008 00:46   |
 |
lvanderree Messages: 652 Registered: June 2007 Location: Netherlands |
Faithful Member |
|
|
I 've started re-implementing the list-code in maintainable-style: creating new Js-Classes, like the edit-pages
For now please check listAjaxGridPanelJsSuccess.pjs
It is not used, nor finished yet! For now it returns the same code as the template, but nicer.
We can create 1 listAjaxGridPanelJs.pjs file (just like the current editAjaxJs.pjs file), which contains all code to show a grid WITH columnmodel, datastore, toolbars, renders, etc. I think this has my preference.
Then you can say
grid_panel = new Ext.Panel({xtype: 'listcitygridpanel'});
So you have the same amount of php files, but they end up in one listAjaxGridPanelJs.pjs file.
For the filter page you would again have a listAjaxFilterJs.pjs
Also for the related fields with drop-down-combo-boxes we can do the same and define new xtypes for them and use them in the above .pjs files.
Then to define the final page, with grid and filter, you would have a file called listAjaxJs.pjs which contains the definition for a new xtype with these panels.
I think this sounds nice.
Ps. shortcuts:
http://fun4me.demon.nl/test/test_dev.php/js/city/editAjaxJs. pjs
and
http://fun4me.demon.nl/test/test_dev.php/js/city/listAjaxGri dPanelJs.pjs
[Updated on: Tue, 06 May 2008 00:48] Leon
|
|
| |
| Re: Building Own Generator [message #51602 is a reply to message #51552 ] |
Thu, 08 May 2008 12:43   |
dan_bas Messages: 12 Registered: May 2008 Location: Italy |
Junior Member |
|
|
Hi lvanderree, it's my first time in this forum.
I'm following with interest your progress with your sfExtjsTheme plugin.
I'm recently started a new big project to develope a really big and complex web application and although we are only at the first release candidate version, I decided to use the 1.1 branch of symfony.
Now I'would like to know from you, if it will be possible in the short, that your plugin, that depends on sfExtjs2Plugin and sfPJSPlugin, also will work in this branch.
Excuse me for my bad english and thank you advance.
|
|
| |
| Re: Building Own Generator [message #51625 is a reply to message #24107 ] |
Thu, 08 May 2008 19:46   |
dan_bas Messages: 12 Registered: May 2008 Location: Italy |
Junior Member |
|
|
Thank you for your rapid response lvanderree.
| Quote: |
I am sorry, but I can't tell. I haven't tried...
|
I've already tried before, and I saw that Actually there are problems.
| Quote: | I am currently only working in Symfony 1.0.*, in the future (probably August) I want to upgrade to 1.1, but I am afraid it will take to much time for now to upgrade the complete plugin.
For now my goals are:
1. to first stabilise the code somewhat,
2. make it do what I need it to do for my graduation project
3. graduate
4. continue to improve the plugin (upgrade to sf1.1 is one of the improvements)
You are of course free to check out yourself if it works, and make changes to make it work. I am also willing to help you with this, but I really want to graduate someday not too far from now 
|
Ok, if you think that your graduation is more important than my needs, it's up to you 
| Quote: | Also other improvements and changes are welcome, and if anyone has any ideas/tips or feedback he is more than welcome to share them
|
Hmm.. I'm thinking to start with symfony 1.0 and make the upgrade (hopefully painless) to 1.1 in the near future, maybe in August looking at what happens in the meantime
Ciao
|
|
|
| Re: Building Own Generator [message #51626 is a reply to message #51625 ] |
Thu, 08 May 2008 20:12   |
 |
lvanderree Messages: 652 Registered: June 2007 Location: Netherlands |
Faithful Member |
|
|
Again a fast answer 
I have thought about it, but unless you can buy my graduation I will first continue to work on my project 
As said I will continue making the plugin more stable. I more and more get the idea about how to develop in php and javascript (I was pretty experienced in (chronicle order, and among others) basic, visual basic, Java and C#, but to do this really well is something different, javascript because it isn't really object-oriented even though ExtJs comes close, PHP because of the challenge to make the most out of the generator which results in usable templates and can reuse as much code as possible (by using libraries and other plugins)),
making it work on both all kind of servers as well as all kind of clients,
making the most of the generator to make fast development (eventually ) possible, while keeping it completely flexible.
I am not a big fan of CRUD, since it is not maintainable, and not a big fan of DSLs (even though creating this generator comes pretty close) and want to see if administration-generation can be a solution to improving development times (although at the moment I can say a good start-up is pretty cumbersome)
As said I will do my best to support everyone and hope to get useful feedback/ideas/implementations in return, with the idea to improve the plugin more and more.
Leon
|
|
| |
| Re: Building Own Generator [message #51785 is a reply to message #24107 ] |
Mon, 12 May 2008 02:17   |
 |
lvanderree Messages: 652 Registered: June 2007 Location: Netherlands |
Faithful Member |
|
|
The list has been reimplemented.
BE AWARE AN SVN-UPDATE WILL HAVE MAJOR IMPLICATIONS!!!
But now things are getting much nicer, if you ask me...
For a demo again see:
http://fun4me.demon.nl/test/test_dev.php
the pjs-plugin is now absolutely required, so I removed its config-option, which was obsolete.
There is a new config option: module_returs_layout
you can (and probably want to) disable this and define your own layout in the layout.php file, and only get a variable with the panel from the module's-action. It is enabled by default to show you results immediately without any setup.
See my example to see how to setup your layout.php once you disabled it.
partials which are obsolete (and soon to be deleted) are:
- _list_ajax_layout.php
- _list_ajax_gridpanel.php
(possibly more)
I left these in the repository for now, since not everything is implemented in the new style yet, and maybe we want to use it as a reference. Main functionality has been implemented you see a list and it can be easily setup.
I am aware that the create buttons don't function, and that editing a city will make the entire page reload.
This is because event handlers need to be implemented for this.
The gridpanel (with its stores and everything) is now defined in the listAjaxGridPanelJs.pjs file. All partials it uses should (eventually) have a _js suffix in their file name.
Still some todo's to possibly split related datastores/editors in their own pjs file, have yet to find a nice solution for them)
Attached is the source of the demo site.
Ps. please be aware of trac: http://trac.symfony-project.com/query?component=sfExtjsTheme Plugin&order=status
[Updated on: Wed, 14 May 2008 13:10] Leon
|
|
|
| Re: Building Own Generator [message #51928 is a reply to message #51785 ] |
Wed, 14 May 2008 01:48   |
 |
lvanderree Messages: 652 Registered: June 2007 Location: Netherlands |
Faithful Member |
|
|
At the moment the internet connections in Holland are very unstable due to a problem at one of our major providers, so if you can't reach the live demo, please try again some time later...
I've updated the svn with my latest code, which adds the possibility to open new edit-panels as a new tab-panel.
I think this is the way it should be done (with unobtrusive js, using classes and attributes in namespaces)
Please check out the live demo at:
http://fun4me.demon.nl/test/test_dev.php
Obviously thing aren't finished yet, only the links in the grid work, the buttons aren't re-implemented yet, but this can be done in a similar way.
event-handlers/firers should be further implemented, and the panel should update its title after loading is done.
the new layout.php (which contains the code to define the tabpanel and some event handlers) and the projects app.yml can be found in the attachment.
[Updated on: Wed, 14 May 2008 13:11] Leon
|
|
| |
| Re: Building Own Generator [message #51940 is a reply to message #51929 ] |
Wed, 14 May 2008 09:01   |
dan_bas Messages: 12 Registered: May 2008 Location: Italy |
Junior Member |
|
|
Hi lvanderree
| lvanderree wrote on Wed, 14 May 2008 01:51 | Please give some feedback.
What do you think of this implementation.
Can somethings be improved and if so, how?
Are there already some svn-updates/patches from you, or do you hate me for making these major changes... It's all for the greater good 
|
You are right, but I still have problems to run my layout.php with the various generators, templates and actions of the various moduls of my application, using your plugin.
My application must show a viewport in which a tab-panel contains four panels, none of which selected by default. It must be possible, by selecting panels, to display different contents from different modules, which for some panels must be grids.
Furthermore I thought to interact with the grids (to add and to modify data), not through new panels or tab-panels, but by opening windows.
What do you think, I am completely doing wrong ?
I know, you were waiting for some feedback and I am asking to you to waste your time with my problems 
|
|
|
| Re: Building Own Generator [message #51942 is a reply to message #51940 ] |
Wed, 14 May 2008 09:17   |
 |
lvanderree Messages: 652 Registered: June 2007 Location: Netherlands |
Faithful Member |
|
|
Hi dan_bas,
it is hard to say what you are doing wrong, if I can't see any of your code/results...
Please take a look at the latest test.tgz code. It contains a layout.php which uses a tabpanel.
In your case you probably want to preload some of the listMODULEgridPanelJs.pjs and/or editMODULEpanelJs.pjs from your modules by hard-coding them in your layouts include-section.
Then you can define your tabPanel with
items: [
{
xtype: 'listmodule11gridpanel',
title: 'title 1'
},{
xtype: 'listmodule12gridpanel',
title: 'title 2'
},{
xtype: 'listmodule13gridpanel',
title: 'title 3'
},{
xtype: 'listmodule14gridpanel',
title: 'title 4'
},
]
And you proabably don't need the line:
<?php echo $sf_data->getRaw('sf_content') ?>
but removing this line makes it impossible to open a link (from your grid) in a new browser-window. In that case you won't see the editor, but the same tabpabel with the 4lists.
We have to figure out a way to detect which page is being requested, and make the appropriate tab-page, or edit-panel be activated.
Leon
|
|
|
| Re: Building Own Generator [message #51955 is a reply to message #51940 ] |
Wed, 14 May 2008 10:49   |
clad Messages: 23 Registered: April 2008 |
Junior Member |
|
|
| dan_bas wrote on Wed, 14 May 2008 09:01 | Hi lvanderree
| lvanderree wrote on Wed, 14 May 2008 01:51 | Please give some feedback.
What do you think of this implementation.
Can somethings be improved and if so, how?
Are there already some svn-updates/patches from you, or do you hate me for making these major changes... It's all for the greater good 
|
You are right, but I still have problems to run my layout.php with the various generators, templates and actions of the various moduls of my application, using your plugin.
My application must show a viewport in which a tab-panel contains four panels, none of which selected by default. It must be possible, by selecting panels, to display different contents from different modules, which for some panels must be grids.
Furthermore I thought to interact with the grids (to add and to modify data), not through new panels or tab-panels, but by opening windows.
What do you think, I am completely doing wrong ?
I know, you were waiting for some feedback and I am asking to you to waste your time with my problems 
|
hi !
I'm trying to do the same thing like you, having several panel with several grid and for CRUD ,opening in a window and not in a tabpanel but it's difficult
|
|
| |
Goto Forum:
|