[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fastcgipp-users] Question about multi selections

From: Eddie Carle
Subject: Re: [Fastcgipp-users] Question about multi selections
Date: Fri, 06 Jan 2012 17:35:38 -0700

On Sat, 2012-01-07 at 01:14 +0100, Volker Schreiner wrote:
> Imagine you are creating a user element that can be added to one or
> more groups. I would prefer to give the creator the option to select
> one or more groups from a <select name="group" size="6" multiple>
> instead of selecting one group and adding the remaining groups
> afterwards with multiple calls and clicks. In PHP you have the ability
> to give the select a name like name="groups[]" and the selected items
> get inserted into an array with the name groups. There you get all
> selected itmes.
> The current way fastcgi++ library handles the parameter parsing is a
> subset of the functionality you can use with PHP. It does not support
> the whole spectrum that html or http gives you.
> I think it is not neccessary to break everything to implement this
> feature. Just implement a third type of post data (file, form, and
> formmulti or something like that) and in case a parameter is already
> set with this parameter you create a std::list<std::string> that
> contains the multiple values for this parameter. This list can be
> accessed by a second data() method that returns a pointer to the
> std::list and not to a const char pointer.
> I think the amount of work that is needed to implement this feature is
> not that high as the acceptance of the fastcgi++ library will grow.

Well, you've convinced me. It does seem to have a purpose and would not
be all that difficult to implement. I like your idea for using the POST
type indicator to identify a multi, but what would be a similar solution
for GET data in the query string? Moreover, I don't know if I would use
an std::list. Why not just an std::deque? Do you have a specific
motivation for suggesting an std::list?

As far as fastcgi++ becoming more widely accepted, I think we all know
that won't be happening any time soon. C++ is not a language that
mainstream web developers will ever really embrace as the skills for its
effective use do not exist widely enough within the community. It will
always be relegated to the fringes of web applications and I couldn't be
happier for it. It's what makes it special. I'd take badly written PHP
over badly written C++ any day.
        Eddie Carle

reply via email to

[Prev in Thread] Current Thread [Next in Thread]