Some questions that might help you work out the best approach for the situation: - Will any of the data submitted by the user be stored in the database? - Will any of the data supplied by the webservice be systematically presented to the user? e.g. hotel detail pages
In Daemon apps we prefer to avoid includes in favour of webskins. For example a booking might be a webskn on a hotel content type or the user's profile, depending on what makes more sense for the developer. Forms that don't actually get saved to the database are defined as a "form" component - which work exactly the same way as a content type, except they don't have a database table. A front end form can be built for any content type or form using the formtools tag library ( http://docs.farcrycms.org/display/FCDEV40/Form+Tool+Tag+Properties) - ft:form and ft:object to output the UI, ft:processform and ft:processformobjects to handle posts. When we use webservices we usually encapsulate access in a component in project/packages/custom/ and work through that. It makes it much easier to react to API changes if you only have to go to one place. Blair On Fri, May 29, 2009 at 1:45 AM, adster <[email protected]> wrote: > > Hi All, > > I have been looking into using FarCry and the FarCry CMS for a site > rebuild that I will be starting shortly. The site deals with hotel > room bookings. > > The admin side of the Far Cry CMS looks amazing and I have got my head > around most of the developer chapters. The fact that I can 'scaffold' > backend forms and create content types etc looks good. > > One part of the new site I am buiding needs to incorporate a form > which includes a date picker, a couple of drop downs and possibly > another tick box for some options. Once submitted the form action > needs to go off and query a web service API in order to return hotel > availability based on the options entered. Currently the application > looks up a list of hotels and then passes the hotel ids into the API. > > As mentioned by a couple of posts on this group how do I go about > doing this on the front end of a site? For a start I need to create a > form. Easy to do on the admin but how is this done on the front end? > And where do I include all of the logic for the webservice call? > > I would also ideally like to grab data from the model layer and > incorporate that into the XML results returned by the API. Is all this > possible and can anyone point me in the right direction in terms of > docs or posts regarding this type of thing? > > Thanks in advance, > > Adam > > > --~--~---------~--~----~------------~-------~--~----~ You received this message cos you are subscribed to "farcry-dev" Google group. To post, email: [email protected] To unsubscribe, email: [email protected] For more options: http://groups.google.com/group/farcry-dev -------------------------------- Follow us on Twitter: http://twitter.com/farcry -~----------~----~----~----~------~----~------~--~---
