Results 1 to 6 of 6

Thread: Building Spring/Laszlo Apps

  1. #1

    Default Building Spring/Laszlo Apps

    Anyone using laszlo and spring mind sharing some of their architecture ideas or experiences?

  2. #2

    Default Laszlo + Spring

    I've been using Spring and Laszlo, but I'm not sure if my approach is the best use of the combined technologies. Specifically, I am looking at the laszlo data binding and rpc methods of interacting with the backend, and wondering if conventional Spring usage fits the bill.

    Essentially, I am using the same stack as the Spring samples: Dao->Domain->Controller->Model+View. I've found an AbstractXmlView, and I'm using that to feed laszlo XML 'views'.

    I think that the architecture coincides with this article:
    http://osteele.com/archives/2003/08/rethinking-mvc

    If you are using an RIA with client side logic, and have the ability to talk to the server with soap, xml-rpc, java-rpc or http, is there a better alternative than serving up XmlViews? (by the way, it appears that laszlo uses httpclient to talk to the web server).

    Thanks.

  3. #3
    Join Date
    Aug 2004
    Location
    Ankara, Turkey
    Posts
    24

    Default

    I guess that you are referring to "AbstractXsltView", as I could not find a "AbstractXmlView" in the Spring distribution 1.1.2. Is that so? Also, can you please describe briefly how you use it?

    What I am planning to do with my current knowledge is:
    Code:
    public class LaszloController extends
    org.springframework.web.servlet.mvc.Controller {
        public ModelAndView handleRequest(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException{
    
              <prepare the XML &#40;I am using JDOM>,
               doc = my XML document &#40;JDOM Document object&#41;
               new XMLOutputter&#40;&#41;.output&#40;doc,response.getOutputStream&#40;&#41;&#41;;
               response.getOutputStream&#40;&#41;.close&#40;&#41;;
               return null;
        &#125;
    &#125;
    This way I can return the XML to Laszlo (or whatever else), and
    consume in a Laszlo dataset. I guess there must be a better way though,
    because the Controller above is primarily intended to be used in a
    HTTP browser(expecting HTML) I guess.

    Also, some questions:
    - How to handle large datasets? I mean, if there are 5,000 employees
    of XML produced, how to handle this in Laszlo (andSpring)?
    - Can Hessian, Burlap, or HttpInvoker be used for this purpose?

    Thanks,
    Turgay Zengin

  4. #4

    Default Spring + Laszlo

    I found an AbstractXmlView at:

    http://www.sateh.com/index.php?node=5

    This sounds like the way your are going, which works fine. It is particularly nice if you are using other view technologies, like jstl. With regard to large DataSets and the like, the trade-off is more client resources and longer load time for faster and more responsive app with less round trips. It depends on your users and how they need to work.

    I haven't tried hessian or burlap, so I would be curious to hear about your experiences.

  5. #5
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    71

    Default

    using AbstractXsltView without actually setting an xslt will just output the XML.

  6. #6

    Default

    Quote Originally Posted by stueccles
    using AbstractXsltView without actually setting an xslt will just output the XML.
    Cool - thanks for the tip.

Similar Threads

  1. Beandoc crashing (on its samples!)
    By aaime in forum Container
    Replies: 17
    Last Post: Oct 7th, 2005, 07:21 AM
  2. Replies: 29
    Last Post: Apr 12th, 2005, 05:24 PM
  3. Handling the 'this should never happen' case in web apps
    By Stefan Arentz in forum Architecture
    Replies: 1
    Last Post: Dec 16th, 2004, 07:00 AM
  4. How do I download sample apps?
    By standev in forum Web
    Replies: 2
    Last Post: Dec 6th, 2004, 11:39 AM
  5. Using spring for standalone apps
    By tv in forum Architecture
    Replies: 1
    Last Post: Sep 29th, 2004, 05:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •