Combining client and server side development

I haven't as yet embarked on any client side development with Echo3; before I do, I have a few questions about what's possible.

1. Is it possible to have a server side program with a few client side components in it ? For example, can I have a server side ContentPane and put some client side Buttons, Labels, etc. in it ?

2. Can the opposite be done - can a client side program include one or more server side components ? E.g. Can I create a client side SplitPane and put a server side Table in it ? A related question - is there going to be a client side Table component ?

3. Is it possible to create a composite component with only client side components - the documentation has examples of server side composite components only. If a client side composite component is created, does it need a sync peer on the server ?

Thanks.

RK

tliebeck's picture

1.) Kind of. You can create

1.) Kind of. You can create an application-rendered component (ARC). The server will see it as a single component, but on the client the component will be rendered as an embedded client-side Echo application. The Extras RichTextArea is done this way. Some info here: http://echo.nextapp.com/site/node/63 . You cannot however add client side components to a server-side component directly.

2.) Haven't done it. It could be done though, kind of as the opposite above. It'd just be a server-side application wrapped in a custom Echo component. Not sure if this is possible yet until we "officially" support multiple server side apps embedded in a single page. (Supporting multiple server-side instances in a page is a todo for 3.0).

3.) Everything can be done on the client-side if you like. You can composite components in the same way you would on the server. The CSJS demo app has a ton of composited components in it: http://demo.nextapp.com/echo3csjs

Composite components

I am new in ECHO framework and sorry my english. I would like to create several composite components (e.g. something like JOptionPane, Wizards etc) both client and server side. Can you recommend me the best strategy in creation of these components (either use ARC components or extend client side components and of course the make the server side peers and other classes).

Thanks Phil

You should use Composite

You should use Composite (allows only 1 child, but it can be any type of other panel) or Panel for your base, and just layout the standard components (buttons, text fields, etc) as needed. You never have to touch the client side javascript or server-side peers unless you need to write a single component which behaves differently than the core ones. You can pretty much 99% of the time just use a combination of existing widgets to get the effect you desire. That's the beauty of Echo...

Oroborous.