[web-devel] Evaluating Yesod and some issues with yesod-tableview.
Greg Weber
greg at gregweber.info
Tue Jul 19 18:12:23 CEST 2011
There is a pagination helper[1] that is maintained, although I personally
have not used it yet. The source code for haskellers.com is the largest,
most featureful site source code available [2] For the repeated form
elements you are trying to create multiple models at once? There is some
mass-input functionality available in the latest version of yesod-forms.
Since you are planning on asking lots of questions- please try to subject
tag your questions by component you are asking about (i.e. [Persistent]).
Also consider trying Stack Overflow or the Freenode #yesod channel for some
of your questions.
We always look forward to hearing about direct comparisons- those often end
up providing very useful feedback, and I don't know that anyone has done one
against PHP, although Blake Rain did start an application in PHP and happily
switched it to Yesod.
Greg Weber
[1]
http://pbrisbin.com/haskell/docs/html/yesod-goodies/Yesod-Goodies-Paginate.html
[2] https://github.com/snoyberg/haskellers
On Tue, Jul 19, 2011 at 8:49 AM, Anakreon Mentis <anakreonmejdi at gmail.com>wrote:
> For a week, in my free time, I want to evaluate Yesod.
>
> My plan is to rebuild in Yesod an application I have created with PHP.
> The application requires user authentication, access privileges for
> each user, forms and views for the data.
> Some forms should have repeated elements such as
> Persons
> Name1 Surname1 Age1
> Name2 Surname2 Age2
> ......
> Namen Surnamen Agen
>
> My understanding is that Yesod can not handle this use case yet. If
> this is true I intend to include a hidden filed which will contain the
> values of the repeated elements in json format.
> Also, the respective form elements will have no name to prevent the
> browser from submitting their value.
>
> Before that, I need to to have a table which will list entries from a
> db table. The table should support pagination and filters. The filters
> will be in a form like:
> Filters:
> Name [An* ]
> Age between [12 ] [100]
>
> The values displayed in the table should be limited based on the
> values provided in the filters fields.
>
> I found a project in hackage, yesod-tableview.
> It doesn't compile. The error message I get is
> Yesod/TableView/NumEntriesForm.hs:28:19:
> Couldn't match expected type `text-0.11.0.8:Data.Text.Internal.Text'
> against inferred type `[Char]'
> Expected type: [(Int, text-0.11.0.8:Data.Text.Internal.Text)]
> Inferred type: [(Int, String)]
> In the first argument of `selectField', namely `numbers'
> In the expression: selectField numbers (fromString prompt) mdata
>
> I fixed the problem by removing the form which I don't needed anyway.
> I intend to do more modifications on the package. Namely, I'd like to
> make the package configurable on it's templates in order to produce
> json instead of html.
> This would permit integrating the functionality provided by the
> package with javascript grid components such as
> http://trirand.com/blog/jqgrid/jqgrid.html
>
> In order to develop the project I will have to deal with
> authentication, authorization, forms, persistent and widgets. I hope I
> will not wear your patience with my questions.
> Freely accessible examples that achieve parts of the intended
> functionality of the test application, would be very useful.
>
> Regards, Anakreontas Mentis
>
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110719/675f8ea9/attachment.htm>
More information about the web-devel
mailing list