You should read about Symfony components, which already provide pretty much exactly what you're asking for here. It doesn't sound like you've worked with much beyond plain actions and templates so far. Also check out Symfony slots.
On Sun, Mar 7, 2010 at 10:57 AM, Evgeny <[email protected]> wrote: > I have leaved my own framework and join Symfony about 0.5 year ago. > I'm very glad to bla-bla-bla... But one thought never leave my head: > page composing is very uncomfortable. What is the work of web > developer at all? Compose the page from some blocks and make interact > them with user, isn't it? > > I try to explain principles I used to solve this tasks, and, please, > help me to understand, is it possible to port them into Symfony? I > think, that they at least interesting: > > Component - something that returns HTML (XML, JSON, ...). It always > return something visible or readable by client (browser). It is > renderer. > > Action - something that interact with user (process his request). It > is action as is. It acts. > > Module - set of renderer+actions+templates+parameters (that may be > used by renderer,action or template). > > Module Instance - instance of certain module, placed in certain AREA > with certain set of parameters in certain page (see below. > > Page - named page (news, homepage, login, profile,...) that consists > of layout and modules instances placed on it. > > So, you can create any page, place your modules as you wish in this > page, confugire them, and interact with user via actions in this > modules. > > It is very simple, but very powerful. And has great advantage: it is > very convinient to compose and configure pages. > > Workflow is: > 1. create new module > 2. define it's parameters > 3. create renderer of module (if you need) > 4. create actions processor of module (if you need) > 5. register module > 6. create new page > 7. choose modules you wish to see on this page > 8. create their instances, place them in AREAs (defined in layout), > place them in that order you need (in area LEFT_COLUMN: news_list, > banner, weather_forecast) > 9. configure instances (news_count=5, banner_id=17, > weather_forecast=detail) > 10. for each instance choose template - default or custom > > You can place any number of modules instances in one page, same or > different modules. > > When user sends request, framework executes action, that do some > actions, and then redirect/forward to some page, or renders current > page. Rendering of page is process of executing renderers of all > modules instances, placed on this page. Then placing HTML that return > this renderers in layout areas. In definite order. > > > This is idea I used during working with my framework NextPage, and I > found no more convinient way to compose pages and process actions that > user requests to system. > > Please, help me to connect this idea with Symfony, and (Rolling Eyes) > it may be, Symfony team bring some principles to it? > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/symfony-devs?hl=en > -- Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
