I can tell you now, your end users don't give two hoots HOW you do it, as long as it works. The HOW is really for yourself and other developers. Best practices are not only techniques to make end users lives easier (and to be honest most best practices have little impact on the end user) but are there to help keep things organised and maintaineable.
That being said, you need to get a finished product out the door too. I'd rather have hard to maintain code delivered on time than the worlds most perfectly refactored and infinitely maintainable code delivered late. As long as it works. You can perfect later. On Mon, Nov 1, 2010 at 11:01 PM, Alex Pilon <[email protected]> wrote: > Doing it how Gareth suggested would work too.. the way he has presented it > indicates that whatever parameters for sorting the statuses essentially > dictate a "data source" for what you are showing... however depending on > requirements you might want to display the data differently, using grouping > headings or something to show what issues go with what. > > On Mon, Nov 1, 2010 at 16:52, Gareth McCumskey <[email protected]>wrote: > >> Personally I don't necessarily follow the idea of keeping all your actions >> "RESTful". If you were building a rest API then sure, but sometimes you need >> to get things done. >> >> That being said, this can still be done with a executeIndex action. Just >> check within it for "group by" parameters: >> >> public function executeIndex (sfWebRequest $request) >> { >> if ($request->hasParameter('group_by') >> { >> $this->issues_to_display = IssuesPeer::getIssuesByStatus(); >> } >> else >> { >> $this->issues_to_display = IssuesPeer::getIssues(); >> } >> } >> >> I am being deliberately obvious here just to make the example clear. You >> can pass criteria instead or any number of ways. >> >> >> On Mon, Nov 1, 2010 at 10:35 PM, Stan McFarland <[email protected]>wrote: >> >>> Hi all, hoping someone can offer some advice to a Symfony newbie. >>> >>> I have a issues table, with an attribute 'status_id' which links to a >>> status table (an issue can have a status of new, open, closed, >>> etc.) My customer wants to see a list of issues (easy - handled via >>> the issue/executeIndex action) but they also want to see a list of >>> issues grouped by status - in other words, a separate table of issues >>> for each status type, all on one page. >>> >>> So I can think of several ways to do it: >>> >>> - add an action to the issues module called "indexByStatus" with a >>> corresponding template; >>> - change the index action on the status module; >>> - add a new action to the status module. >>> >>> But what's the _right_ way? Someone told me that it was bad practice >>> to add actions - that it violated the notion of RESTful interface. >>> >>> Any suggestions would be greatly appreciated. Thanks! >>> >>> -- >>> 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 users" group. >>> To post to this group, send email to [email protected] >>> To unsubscribe from this group, send email to >>> [email protected]<symfony-users%[email protected]> >>> For more options, visit this group at >>> http://groups.google.com/group/symfony-users?hl=en >>> >> >> >> >> -- >> Gareth McCumskey >> http://garethmccumskey.blogspot.com >> twitter: @garethmcc >> >> -- >> 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 users" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected]<symfony-users%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/symfony-users?hl=en >> > > > > -- > Alex Pilon > (613) 608-1480 > > -- > 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 users" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<symfony-users%[email protected]> > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc -- 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 users" 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-users?hl=en
