The Source for Java Technology Collaboration

Home » java.net Forums » Mobile & Embedded » Blu-ray Disc Java

Thread: GRIN vs HAVI

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 6 - Last Post: Mar 17, 2009 9:54 AM by: billf Threads: [ Previous | Next ]
apena

Posts: 4
GRIN vs HAVI
Posted: Mar 16, 2009 2:04 AM
  Click to reply to this thread Reply

Hi,

Is GRIN a substitute of HAVI the common user interface library for MHP, or could both be used in the same application, for different purposes?¿where could I download it?¿is it inside PBP libraries?

thanks in advance

Greetings

Message was edited by: apena

billf

Posts: 107
Re: GRIN vs HAVI
Posted: Mar 16, 2009 8:11 AM   in response to: apena
  Click to reply to this thread Reply

> Hi,
>
> Is GRIN a substitute of HAVI the common user
> interface library for MHP,

No. GRIN is a scene graph, which is a very different thing from
a UI widget library like the HAVi widgets. UI widgets are things
like button, TextArea an such that have been around since at least
the days of Smalltalk-80. Using a scene graph to make a UI is the
architecture that underlies Flash, JavaFX and GRIN; this architecture
has found a lot of favor this century.

UI scene graphs are known for being well-suited for user interfaces that
are created by graphics designers. Their use tends to require less
software engineering, by allowing more to be done declaratively and
via scripting.

> or could both be used in
> the same application, for different purposes?

Yes.

> ¿where
> could I download it?

https://hdcookbook.dev.java.net

It's also described in chapter 23 of the HD cookbook by Zink et al - see
http://hdcookbook.com

> ¿is it inside PBP libraries?

No.

Out of curiosity, where did you hear of GRIN?

Cheers,

Bill

billf

Posts: 107
Re: GRIN vs HAVI
Posted: Mar 16, 2009 8:18 AM   in response to: billf
  Click to reply to this thread Reply

Oh, let me clarify - when I say "via scripting," I mean "scripting" as a style of programming, and not any particular language.

In our experience with Blu-ray Java, the Java language works great for scripting. I think it's a common misconception that scripting languages are somehow imbued with magical properties that make programming in them substantially easier - usually, it's more a matter of what you're trying to do, and how you go about doing it. Language details are comparatively minor.

Bill

apena

Posts: 4
Re: GRIN vs HAVI
Posted: Mar 16, 2009 8:47 AM   in response to: billf
  Click to reply to this thread Reply

Thank you very much @billf for your explanations. I work in the TV department of a Basque (north of Spain) i+D technology centre, in the development of an interactive e-goverment kind application that has to run in the actual comercial STB-s. We've recently bought HD-CookBook, but I heard something about GRIN when I found here: https://javatv-developers.dev.java.net/ an amazingly cool GUI demo which was made with LWUIT library, that if I'm not wrong, uses GRIN inside it.

Greetings,
Aitor

billf

Posts: 107
Re: GRIN vs HAVI
Posted: Mar 16, 2009 10:02 AM   in response to: apena
  Click to reply to this thread Reply

Hi Aitor,

Great! And, as they say in Northern Nevada, "Ogni Etori!" (There's a sizable Basque population in California East of the Sierras and in Northern Nevada, where my father lives, so I see that at the entrance to restaurants and such). If we can somehow help with the project, don't hesitate to ask.

LWUIT is actually unrelated to GRIN, though. LWUIT is another UI widget library. It was originally developed by Sun Israel for mobile phones, and is being adapted by them and promoted for use in TV. GRIN is totally unrelated to LWUIT - it was originally developed by me and my team in California. The first version of GRIN actually ran on an MHP device - we worked with NDS France (née Canal+ Technologies) and Technicolor on a demo that ran on a CanalSatellite set top, back in 2004.

GRIN is quite mature now - it's been used in a number of Blu-ray titles, for menus, games and other Blu-ray bonus material. GRIN is pretty ideally suited to many of the sorts of things one might wish to do on an MHP or Tru2way device, too.

One sticking point might be the version of Java... Can you count on Personal Basis Profile being available on your target STB? If so, great. If you're stuck with pJava, though, it might take a bit of adapting -- the first version of GRIN was written for pJava, but since then we've started using a couple of PBP APIs. Adapting it back isn't a big deal, but it's slightly annoying.

Cheers,

Bill

apena

Posts: 4
Re: GRIN vs HAVI
Posted: Mar 17, 2009 1:52 AM   in response to: billf
  Click to reply to this thread Reply

Hi Bill,

Nice to meet you, I'm surprised and glad that you know things about basque culture, being such a small "country"; but it's true that there is a lot of basque around the world and I love that they don't forget about their roots (the exact words would be Ongi Etorri!, which means Welcome).

Going Back to the thread ,thank you for your answer, it help me to see more clearly what is GRIN and what it is use for.

So if I want to use GRIN in one application, I have to include source code or compiled code into the application directory, in order to load in the STB, ¿correct?

The STB which I'm working is an Strong 5510 MHP, which has MHP 1.1.2 and therefore PBP 1.1., ¿is posible to use GRIN in this STB?

Cheers,
Aitor

Message was edited by: apena

Message was edited by: apena

billf

Posts: 107
Re: GRIN vs HAVI
Posted: Mar 17, 2009 9:44 AM   in response to: apena
  Click to reply to this thread Reply

> So if I want to use GRIN in one application, I have
> to include source code or compiled code into the
> application directory, in order to load in the STB,
> ¿correct?

Right.

In Blu-ray, a GRIN-based menu, when obfuscated (which reduces the size and the load time somewhat) a typical xlet comes in around 100K, and has an acceptable load time on even the slowest players. This model of bundling the library with the xlet has worked well, largely
because we were very strict about keeping the size of the library and the number of classes it contains to a minimum.

> The STB which I'm working is an Strong 5510 MHP,
> which has MHP 1.1.2 and therefore PBP 1.1., ¿is
> posible to use GRIN in this STB?

Absolutely. For the core library, just include the right source directories in your
build file.

There's some compile-time stuff you have to hook into your build system, too - notably
the GRIN compiler. That converts the text "source code" of the scene graph (the thing
that you use to declaratively build the UI) into an efficient binary representation. It also
builds image mosaics (see cookbook page 23-5 -- an image mosaic can really speed up
image load time).

Cheers,

Bill




 XML java.net RSS