FAQ
Hi All,

If you want to provide access over SSL with auth, i.e. for example a
desktop app posting and retrieving info from/to a Catalyst app what's the
best way?

REST or SOAP?

I want the same users that normalling login via a web browser and get a
cookie to be able to login via a "light" wee desktop app or some such?

Would you create a new interface/access point on the Cat site and use REST
or SOAP?

All new to me, so excuse the dumb questions.

Thanks.

Search Discussions

  • Aristotle Pagaltzis at Feb 4, 2008 at 1:14 pm

    * Gavin Henry [2008-02-04 12:05]:
    If you want to provide access over SSL with auth, i.e. for
    example a desktop app posting and retrieving info from/to a
    Catalyst app what's the best way?

    REST or SOAP?
    Well, the question you?re asking is actually REST or WS-*; SOAP
    is actually just an envelope format that can be used in both
    scenarios. Of course in practice no one uses SOAP for REST
    because it adds no value that you can?t get another way anyway.

    Anyway, between WS-* and REST, the answer is clearly REST, with
    the only exception being if you need to integrate with existing
    infrastructure that is already heavily geared toward WS-* ? in
    short, you?re in a Microsoft shop.
    I want the same users that normalling login via a web browser
    and get a cookie to be able to login via a "light" wee desktop
    app or some such?

    Would you create a new interface/access point on the Cat site
    and use REST or SOAP?

    All new to me, so excuse the dumb questions.
    I don?t know what you?re doing, so I can?t say if it?ll work for
    your case, but in the very least as a source of inspiration, take
    a look at Atompub. It?s a great example of how to structure a
    REST system, and in fact, with a little creativity, it is a close
    match for the great majority of scenarios in which people want to
    provide an API. The advantage is that there is already a bunch of
    code that implements Atompub, both on the client but also on the
    server ? see Catalyst::Controller::Atompub.

    But, as I said, even if it *really* doesn?t fit your needs, it
    gives you an idea for how a REST service should look like.

    Regards,
    --
    Aristotle Pagaltzis // <http://plasmasturm.org/>
  • Gavin Henry at Feb 4, 2008 at 1:33 pm
    <quote who="Aristotle Pagaltzis">
    * Gavin Henry [2008-02-04 12:05]:
    If you want to provide access over SSL with auth, i.e. for
    example a desktop app posting and retrieving info from/to a
    Catalyst app what's the best way?

    REST or SOAP?
    Well, the question you???re asking is actually REST or WS-*; SOAP
    is actually just an envelope format that can be used in both
    scenarios. Of course in practice no one uses SOAP for REST
    because it adds no value that you can???t get another way anyway.
    OK, thanks.
    Anyway, between WS-* and REST, the answer is clearly REST, with
    the only exception being if you need to integrate with existing
    infrastructure that is already heavily geared toward WS-* ??? in
    short, you???re in a Microsoft shop.
    Well, it might involve an Outlook Plugin (to right-click a calendar
    entry), a Thunderbird plugin with/for Lightening/Sunbird and a taskbar app
    all using wxWidgets, connecting to the central Catalyst App.
    I want the same users that normalling login via a web browser
    and get a cookie to be able to login via a "light" wee desktop
    app or some such?

    Would you create a new interface/access point on the Cat site
    and use REST or SOAP?

    All new to me, so excuse the dumb questions.
    I don???t know what you???re doing, so I can???t say if it???ll work for
    your case, but in the very least as a source of inspiration, take
    a look at Atompub. It???s a great example of how to structure a
    REST system, and in fact, with a little creativity, it is a close
    match for the great majority of scenarios in which people want to
    provide an API. The advantage is that there is already a bunch of
    code that implements Atompub, both on the client but also on the
    server ??? see Catalyst::Controller::Atompub.
    Cool, thanks will look at that.
    But, as I said, even if it *really* doesn???t fit your needs, it
    gives you an idea for how a REST service should look like.
    It's bascially to login, retrieve some db entries and post them back
    authenticated with a session etc. just like a normal session/cookie web
    login.
    Regards,
    --
    Aristotle Pagaltzis // <http://plasmasturm.org/>

    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive:
    http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/
  • Peter Sørensen at Feb 4, 2008 at 1:45 pm
    Hi,

    I am Using catalyst, TT and formbuilder.

    I am struggling with output in a textarea field and would like to
    "install" a new filter to TT to be used like:

    <td><textarea ........>
    [% FOREACH line IN subscribers %]
    [% line | undent %]
    [% END %]
    </textarea></td>

    I have tried the standard trim filter but this does not give the expected result.

    I found a post facing the problem, where Andy Wardley suggested a undent filter
    and supplied code for this.

    My problem is where to put this code so that TT will recognize this filter
    according to Catalyst.

    Do I need to install this as a new Plugin in TT?


    Regards


    Peter Sorensen/University of Southern Denmark/E-mail: maspsr@sdu.dk












    Med venlig hilsen

    Peter S?rensen
    Vid.medarb., IT-service

    Tlf. 6550 2858
    Fax 6550 2860
    Email maspsr@sdu.dk
    Web http://intern.sdu.dk/it-service/ansatte/ps-238/
    Adr. Campusvej 55, 5230 Odense M

    SYDDANSK UNIVERSITET
    _______________________________________________________________
    Campusvej 55 * 5230 * Odense M * Tlf. 6550 1000 * www.sdu.dk


    -----Oprindelig meddelelse-----
    Fra: Gavin Henry
    Sendt: 4. februar 2008 11:50
    Til: catalyst@lists.scsys.co.uk
    Emne: [Catalyst] Catalyst and Web Services?

    Hi All,

    If you want to provide access over SSL with auth, i.e. for example a desktop app posting and retrieving info from/to a Catalyst app what's the best way?

    REST or SOAP?

    I want the same users that normalling login via a web browser and get a cookie to be able to login via a "light" wee desktop app or some such?

    Would you create a new interface/access point on the Cat site and use REST or SOAP?

    All new to me, so excuse the dumb questions.

    Thanks.

    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/
  • Felix Antonius Wilhelm Ostmann at Feb 4, 2008 at 1:57 pm
    easy filters:

    package myApp::View::TT;

    use strict;
    use base 'Catalyst::View::TT';

    __PACKAGE__->config(
    {
    CATALYST_VAR => 'catalyst',
    ...
    FILTERS => {
    yesno => sub {
    $_[0] ? 'yes' : 'no';
    },
    onoff => sub {
    $_[0] ? 'on' : 'off';
    },
    },
    },
    );

    1;

    Peter S?rensen schrieb:
    Hi,

    I am Using catalyst, TT and formbuilder.

    I am struggling with output in a textarea field and would like to
    "install" a new filter to TT to be used like:

    <td><textarea ........>
    [% FOREACH line IN subscribers %]
    [% line | undent %]
    [% END %]
    </textarea></td>

    I have tried the standard trim filter but this does not give the expected result.

    I found a post facing the problem, where Andy Wardley suggested a undent filter
    and supplied code for this.

    My problem is where to put this code so that TT will recognize this filter
    according to Catalyst.

    Do I need to install this as a new Plugin in TT?


    Regards


    Peter Sorensen/University of Southern Denmark/E-mail: maspsr@sdu.dk












    Med venlig hilsen

    Peter S?rensen
    Vid.medarb., IT-service

    Tlf. 6550 2858
    Fax 6550 2860
    Email maspsr@sdu.dk
    Web http://intern.sdu.dk/it-service/ansatte/ps-238/
    Adr. Campusvej 55, 5230 Odense M

    SYDDANSK UNIVERSITET
    _______________________________________________________________
    Campusvej 55 * 5230 * Odense M * Tlf. 6550 1000 * www.sdu.dk


    -----Oprindelig meddelelse-----
    Fra: Gavin Henry
    Sendt: 4. februar 2008 11:50
    Til: catalyst@lists.scsys.co.uk
    Emne: [Catalyst] Catalyst and Web Services?

    Hi All,

    If you want to provide access over SSL with auth, i.e. for example a desktop app posting and retrieving info from/to a Catalyst app what's the best way?

    REST or SOAP?

    I want the same users that normalling login via a web browser and get a cookie to be able to login via a "light" wee desktop app or some such?

    Would you create a new interface/access point on the Cat site and use REST or SOAP?

    All new to me, so excuse the dumb questions.

    Thanks.

    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/

    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/


    --
    Mit freundlichen Gr??en

    Felix Antonius Wilhelm Ostmann
    --------------------------------------------------
    Websuche Search Technology GmbH & Co. KG
    Martinistra?e 3 - D-49080 Osnabr?ck - Germany
    Tel.: +49 541 40666-0 - Fax: +49 541 40666-22
    Email: info@websuche.de - Website: www.websuche.de
    --------------------------------------------------
    AG Osnabr?ck - HRA 200252 - Ust-Ident: DE814737310
    Komplement?rin: Websuche Search Technology
    Verwaltungs GmbH - AG Osnabr?ck - HRB 200359
    Gesch?ftsf?hrer: Diplom Kaufmann Martin Steinkamp
    --------------------------------------------------
  • Peter Sørensen at Feb 5, 2008 at 9:16 am
    Thanks that worked.

    Below just FYI.

    In the meantime I found, that the problem was related to my
    minor knowledge to TT. The reason I wanted to trim the output
    was, that the code:

    <td><textarea ........>
    [% FOREACH line IN subscribers %]
    [% line | undent %]
    [% END %]
    </textarea></td>

    produces NL in the textarea field. I changed this to:

    <td><textarea ........>
    [%- FOREACH line IN subscribers -%]
    [%- line | trim -%]
    [% END -%]
    </textarea></td>

    and got rid of the NL. I was'nt aware of this.

    regards

    Peter
    -------


    easy filters:

    package myApp::View::TT;

    use strict;
    use base 'Catalyst::View::TT';

    __PACKAGE__->config(
    {
    CATALYST_VAR => 'catalyst',
    ...
    FILTERS => {
    yesno => sub {
    $_[0] ? 'yes' : 'no';
    },
    onoff => sub {
    $_[0] ? 'on' : 'off';
    },
    },
    },
    );

    1;

    Peter S?rensen schrieb:
    Hi,

    I am Using catalyst, TT and formbuilder.

    I am struggling with output in a textarea field and would like to
    "install" a new filter to TT to be used like:

    <td><textarea ........>
    [% FOREACH line IN subscribers %]
    [% line | undent %]
    [% END %]
    </textarea></td>

    I have tried the standard trim filter but this does not give the expected result.

    I found a post facing the problem, where Andy Wardley suggested a
    undent filter and supplied code for this.

    My problem is where to put this code so that TT will recognize this
    filter according to Catalyst.

    Do I need to install this as a new Plugin in TT?


    Regards


    Peter Sorensen/University of Southern Denmark/E-mail: maspsr@sdu.dk












    Med venlig hilsen

    Peter S?rensen
    Vid.medarb., IT-service

    Tlf. 6550 2858
    Fax 6550 2860
    Email maspsr@sdu.dk
    Web http://intern.sdu.dk/it-service/ansatte/ps-238/
    Adr. Campusvej 55, 5230 Odense M

    SYDDANSK UNIVERSITET
    _______________________________________________________________
    Campusvej 55 * 5230 * Odense M * Tlf. 6550 1000 * www.sdu.dk


    -----Oprindelig meddelelse-----
    Fra: Gavin Henry
    Sendt: 4. februar 2008 11:50
    Til: catalyst@lists.scsys.co.uk
    Emne: [Catalyst] Catalyst and Web Services?

    Hi All,

    If you want to provide access over SSL with auth, i.e. for example a desktop app posting and retrieving info from/to a Catalyst app what's the best way?

    REST or SOAP?

    I want the same users that normalling login via a web browser and get a cookie to be able to login via a "light" wee desktop app or some such?

    Would you create a new interface/access point on the Cat site and use REST or SOAP?

    All new to me, so excuse the dumb questions.

    Thanks.

    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive:
    http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/

    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive:
    http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/


    --
    Mit freundlichen Gr??en

    Felix Antonius Wilhelm Ostmann
    --------------------------------------------------
    Websuche Search Technology GmbH & Co. KG
    Martinistra?e 3 - D-49080 Osnabr?ck - Germany
    Tel.: +49 541 40666-0 - Fax: +49 541 40666-22
    Email: info@websuche.de - Website: www.websuche.de
    --------------------------------------------------
    AG Osnabr?ck - HRA 200252 - Ust-Ident: DE814737310
    Komplement?rin: Websuche Search Technology
    Verwaltungs GmbH - AG Osnabr?ck - HRB 200359
    Gesch?ftsf?hrer: Diplom Kaufmann Martin Steinkamp
    --------------------------------------------------


    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedFeb 4, '08 at 10:49a
activeFeb 5, '08 at 9:16a
posts6
users4
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2021 Grokbase