[Laszlo-dev] Re: For your review: Laszlo Database API spec

Max Carlson max at laszlosystems.com
Wed Oct 26 09:34:47 PDT 2005


Hi Don,

Wow - I'm glad I got a chance to get back online and read your blog 
entry.  It's very well thought out.  I really appreciate your 
contribution!  Replies below:

Don Dwoske wrote:
> Max, I've posted an initial response on my website. 
> 
> I'll put some more thought into it over the weekend and post some more 
> next week.
> 
> http://www.loraxis.com/cgi-bin/don-blog.cgi/2005/10/21#20051021-laszlo-rest

I totally agree with making each id a resource that has its own path, e.g.:

/contact/myrecords/42?action=delete

Instead of:
/contact/delete/myrecords?id=42

I also like your proposed changes to the /schema method.

I'll make these changes in the next rev, once I get back from my 
(partial) vacation.

> The basics are that I think the spec goes a little too far, and does 
> some non-RESTful types of things.  
> A companion project to Laszlo which does this part :
> 
>     can automatically sync with
>     the back-end.
> 
> 
> Would be a very useful tool, but it should be more standards (REST) 
> compliant and require smaller changes to Laszlo itself.  This custom XML 
> protocol is a bad idea, IMO, but being more REST compliant is a great 
> one.   

Strictly speaking, this won't require changes to the Laszlo core.  At 
first, I'd like to see a reference back-end.  Eventually, I'd like a 
lightweight, optional LZX component built on top of dataset.

The intent is to have a common protocol for communicating incremental 
changes to and from a record-based data source, such as a SQL database. 
  I'm not aware of any open REST protocols to do this, so I made up my 
own.  If you're aware of any, let me know - we always try to use 
existing standards where they suit our needs.

We want to make it as easy as possible (even transparent) for developers 
to bolt Laszlo (especially SOLO) applications onto an existing 
record-based data model with minimal effort.  It's inspired a lot by 
Rails' implementation of the ActiveRecord pattern.

> is a great project, just not something Laszlo should be tightly coupled 
> with, IMO.  
 >
 > Rife and Rails can do those things without too much
> difficulty, and we need to keep in mind that Laszlo should work with any 
> REST service and endeavor to be as easy as possible to integrate with 
> them.  Having a homegrown XML/ REST protocol just for Laszlo goes in the 
> wrong direction, I think.

> What you are proposing is not easy, and I'd rather suggest that someone 
> take the time to build some Rails components for REST which Laszlo could 
> consume... which is likely being done by someone right now.  Getting 
> Rails to speak XML / REST is much easier (and better) than doing 
> something from scratch using PHP or similar.


I agree, except this homegrown protocol isn't just for Laszlo.  It could 
be used with any front-end that speaks HTTP - not just Laszlo.  Later, 
we'll do the extra work in Laszlo to make a version of dataset that 
transparently speaks the protocol as the dataset is altered.

I'd love to see a Rails implementation!  IMHO, Rails has a bit of a weak 
spot now in that the only web services it automatically supports are 
XML-RPC and SOAP - not RESTful XML.

Then again, like most things in Rails this is probably fairly easy to 
implement.  An article will be showing up on XML.com soon that should 
partially address this.

Eventually, I hope to see the protocol implemented across platforms 
including rails, PHP and Java, with a wide variety of client 
implementations.  Of course it has to be good enough for people to want 
to adopt it.

I really want to see if I can get you on board with this as a protocol 
outside Laszlo.  If you think about it from that perspective (and we 
make it more REST-ful as mentioned above) would you use it?  What else 
is missing?

Regards,
Max Carlson
OpenLaszlo


P.S. Isn't open source wonderful?  I just love the fact that we can have 
this conversation in the open, all in service of making the web a better 
place.  Not to mention I can harness the knowledge of the community at 
large and get great feedback such as yours.  Yay!


More information about the Laszlo-dev mailing list