Hi Lift Community, I'm pretty new to the Scala/Lift world. My idea is to port a web application written by me in PHP to Scala/Lift. Unfortunately, the PHP version also has some functions which are used by some cronjob, i.e. from the command line.
So my first question is: Is there any possibility to access functions in a Lift webapp from the command line? My idea in a more general version is: I want to write some application which can be accessed in multiple ways: for example from the command line (as just described), from the web using "normal" xhtml pages, from the web using json requests etc. Of course, I want to write as less functionality as possible twice so there should be some core which has the "logic" (and probably some model/database in the background) and several interfaces (one command line interface, one webinterface, one json interface...) which should only act as translators. For example the web interface gets some (let's say POST) request, "extracts" the data needed to process the request and passes these date to the core. The core does something and returns the data needed for an answer. The webinterface takes these data and creates some xhtml page out of it. In contrast to that, the json interface "only" gets a request in json format, extracts the data, passes them to the core, gets the result and sends back a *json* answer. The command line interface will just take some command line arguments, extract data, pass them and answer with *some plain text*. So my second question is: How does this idea fit into the lift world? One reason for my questions: As I understood it, Lift is heavily bound to the webinterface part I described above. For example the snippets which seem to be one very important part of Lift can only work with xml/xhtml data. I hope you understand my ideas and questions, I'm still learning English ;-) Thanks in advance for all answers!! Julian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---