Baratine and JSP/templating?

51 views
Skip to first unread message

Rick M

unread,
Jun 30, 2015, 4:54:17 PM6/30/15
to barat...@googlegroups.com
So, what's the appropriate way to integrate page rendering (JSP, or any other template engine)? What's the "new hotness" in Java sever-side development? Or is this truly outside the scope of Baratine's intended use?

TIA,
Rick

Scott Ferguson

unread,
Jun 30, 2015, 5:06:54 PM6/30/15
to barat...@googlegroups.com
On 6/30/15 1:54 PM, Rick M wrote:
So, what's the appropriate way to integrate page rendering (JSP, or any other template engine)? What's the "new hotness" in Java sever-side development? Or is this truly outside the scope of Baratine's intended use?

Page rendering would belong in an app-server layer that uses Baratine as a backend. In that configuration, Baratine is basically a SOA platform, or like a programmable redis (or programmable mongo or cassandra.)

Baratine as an app-server is intended to be focused on REST (or JSON/websocket) queries from a client, not a page-rendering app-server.

Basically, we're trying to keep it as simple as possible, without dragging in the servlet/JavaEE complexity.

-- Scott

TIA,
Rick
--
You received this message because you are subscribed to the Google Groups "Baratine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to baratine-io...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rick

unread,
Jun 30, 2015, 5:15:41 PM6/30/15
to barat...@googlegroups.com

> On Jun 30, 2015, at 14:06 , Scott Ferguson <cauch...@gmail.com> wrote:
>
> On 6/30/15 1:54 PM, Rick M wrote:
>> So, what's the appropriate way to integrate page rendering (JSP, or any other template engine)? What's the "new hotness" in Java sever-side development? Or is this truly outside the scope of Baratine's intended use?
>
> Page rendering would belong in an app-server layer that uses Baratine as a backend. In that configuration, Baratine is basically a SOA platform, or like a programmable redis (or programmable mongo or cassandra.)
>
> Baratine as an app-server is intended to be focused on REST (or JSON/websocket) queries from a client, not a page-rendering app-server.
>
> Basically, we're trying to keep it as simple as possible, without dragging in the servlet/JavaEE complexity.

Sure, that makes sense.

I develop web-apps mostly for fun these days, or for my own side-business projects. I'd like to build a "facebook-lite" for my employer, and I started to do it in Baratine as a way to learn it. Usually, I'd use Resin and SpringFramework (and Hibernate).

I love the idea of building the REST API first, and layering the web front-end on top of that (my day job is writing iOS and OS X apps, and they usually talk to REST APIs).

I think I saw some stuff in the Baratine docs about making calls to the Baratine service that don't go through HTTP REST calls, is that right? There's a Java client that abstracts the actual communications mechanism?

Especially in the early days, I'd like to just integrate the Baratine code with my Resin/Spring webapp. Is that possible? Or do they have to be run as separate processes? The way Baratine works is still a little magical to me.

Sorry for the basic nature of my questions. I'm poking at this when I have a few spare cycles here and there.

--
Rick


Scott Ferguson

unread,
Jun 30, 2015, 5:33:56 PM6/30/15
to barat...@googlegroups.com
On 6/30/15 2:15 PM, Rick wrote:
>> On Jun 30, 2015, at 14:06 , Scott Ferguson <cauch...@gmail.com> wrote:
>>
>> On 6/30/15 1:54 PM, Rick M wrote:
>>> So, what's the appropriate way to integrate page rendering (JSP, or any other template engine)? What's the "new hotness" in Java sever-side development? Or is this truly outside the scope of Baratine's intended use?
>> Page rendering would belong in an app-server layer that uses Baratine as a backend. In that configuration, Baratine is basically a SOA platform, or like a programmable redis (or programmable mongo or cassandra.)
>>
>> Baratine as an app-server is intended to be focused on REST (or JSON/websocket) queries from a client, not a page-rendering app-server.
>>
>> Basically, we're trying to keep it as simple as possible, without dragging in the servlet/JavaEE complexity.
> Sure, that makes sense.
>
> I develop web-apps mostly for fun these days, or for my own side-business projects. I'd like to build a "facebook-lite" for my employer, and I started to do it in Baratine as a way to learn it. Usually, I'd use Resin and SpringFramework (and Hibernate).
>
> I love the idea of building the REST API first, and layering the web front-end on top of that (my day job is writing iOS and OS X apps, and they usually talk to REST APIs).
>
> I think I saw some stuff in the Baratine docs about making calls to the Baratine service that don't go through HTTP REST calls, is that right? There's a Java client that abstracts the actual communications mechanism?
It's currently com.caucho.baratine.client.BaratineClient. (We'll
probably be changing it in minor ways before the 1.0 release.)

BaratineClient implements the io.baratine.core.ServiceManager interface.

So using it would look like:

client = new BaratineClient("ws://10.0.0.100/s/pod");
MyService myService =
client.lookup("remote:///my-service").as(MyService.class);

>
> Especially in the early days, I'd like to just integrate the Baratine code with my Resin/Spring webapp. Is that possible? Or do they have to be run as separate processes? The way Baratine works is still a little magical to me.

In theory, you can have Baratine in the same JVM, but you'd need to use
Resin 5 because of class compatibility, which is basically waiting for
Baratine to stabilize since they're both built on the same base.
>
> Sorry for the basic nature of my questions. I'm poking at this when I have a few spare cycles here and there.
>
That's fine. Since we've been refactoring/simplifying the Baratine APIs,
the docs are a bit disjointed.

-- Scott
Reply all
Reply to author
Forward
0 new messages