Users - Jpublish to Screens

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Users - Jpublish to Screens

cjhowe
Yes and no.

I think the main difference that you need to remember
is that jpublish is simply there to make html
documents, while the widgets (screen, form, tree,
menu) are put together so that other technologies can
take advantage of them.

In transitioning an application that made use of
jpublish so that it "just has to work", you should
take on the approach that the other applications have
done using the simplest "transitional" tool (in this
case screen.render and the continued use of ftl) as
the majority of the community has been web browser
centric.  However, as far as maintanence and
extensibility and reuse and all of the things that
Ofbiz has the potential to take advantage of (inside
and especially outside of the html world), you're
better off utilizing a widget approach.  Freemarker is
great for creating html, it's easy to use, etc.  But,
if you can store your presentation information in a
generic format it will be much more useful.

But, again if it just has to work in an html
environment, why are you updating away from jpublish?


========== Tibor wrote:
Hi Chris

Please tell me if I understood this properly:
you say that I should do my page declaration as a
combination of widgets,
widget-includes, decorators, instead of inserting bits
of pages (ftl) into a
base ftl ?

I think I'm not mistaken if I say that this is
probably the main difference
between jpublish and screens: there's an external
construction of the page.
some things were so practical though that I wished
they were still around.

It sounds like a nice idea but in practise is a lot of
effort and cutting up
than the usual template engine approach. where pages
are built with
combinations of includes inside the final template
(JPublish). Here the
construction is external and in my use case produces
more declarations than
code itself.

I'm still very new to screens but It seems at first
use that SOC has been a
bit mixed up (Mixing declarations of BSH, conditions
and declartion of
ftl's) .
or is this one new separation I'm just not used to yet
?
I'm interested in hearing users experience with the
screen-widget compared
to the jpublish ?

Thanks for your thoughts
Regards
Tibor

If you're using the widgets at their current potential

> and simplying your .ftl for reuse, there really
> shouldn't be a need to use screen.render.  That
> command appears to have been made for a quick/simple
> transition from pages.get.  Most of the time, if a
> screen.render is used inside a list iterator, you
> would probably benefit by using the form widget(of
> course conceeding to some current style limitations
> which is more likely to see improvement over non
> declaration ftl includes) and excluding another ftl
> altogether.  If a screen.render is used outside of a
> list iterator, then you might benefit from breaking
up
> your ftl for reuse anyway.
>
> ========== BJ Freeman wrote:
>
> Just a thought. Then declaration would make it
> difficult to use
> components in other modules.
> In my stuff, I call screens in other modules, but
for
> the most part to
> use my own.
>
> tibor katelbach sent the following on 3/13/06 3:56
AM:

> > Thanks for the answer Jacopo
> > any idea if this will be implemented in a future
> release?
> > Thx
> > Tibor
> >
> > On 3/13/06, Jacopo Cappellato <tiz at sastau.it>
> wrote:
> >
> >>Hi Tibor,
> >>
> >>yes I think that (at the moment) this is the only
> way to implement 'ftl
> >>includes'.
> >>
> >>Jacopo
> >>
> >>tibor katelbach wrote:
> >>
> >>>Hi
> >>>I'm transforming our Jpublish Structure into
> Screens
> >>>one thing that was quite simple that now seems a
> bit heavy to me, if I'm
> >>>not mistaken when I want to include a simple ftl
> into my page.
> >>>
> >>>Before I'd just have to do this
> >>>${pages.get("/templates/navg1-img.ftl")}
> >>>
> >>>where as now I have to
> >>>${screens.render
> >>
>
>>("component://myapp/widget/CommonScreens.xml#navg1-img")}
> >>
> >>>and declare my nav1-img as a screen
> >>><screen>....</screen>
> >>>
> >>>isn't there a way to go directly to the ftl
without

> passing through a
> >>>declaration?
> >>>
> >>>maybe something like this
> >>>${screens.render("/templates/navg1-img.ftl")}
> >>>
> >>>Thanks for the help
> >>>Tibor
> >>>
> >>>
>
>
>>>------------------------------------------------------------------------
> >>>
> >>>
> >>>_______________________________________________
> >>>Users mailing list
> >>>Users at lists.ofbiz.org
> >>>http://lists.ofbiz.org/mailman/listinfo/users
> >>
> >>
> >>_______________________________________________
> >>Users mailing list
> >>Users at lists.ofbiz.org
> >>http://lists.ofbiz.org/mailman/listinfo/users
> >>
> >
> >
> >
> >
>
------------------------------------------------------------------------

> >
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.ofbiz.org
> > http://lists.ofbiz.org/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.ofbiz.org
> http://lists.ofbiz.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ofbiz.org/pipermail/users/attachments/20060313/a6656d2b/attachment-0001.htm
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Jpublish to Screens

oceatoon
Thanks Chris
very interesting response, I completly understand the multiple channel output approach for ofbiz.
but indeed I am only intersted by the html output, but I thought screens and widgets were the way to go and I just went on using what was proposed in Sequoia.
do you think I should stick to JPublish ? now I'm done and have both versions running, but please tell me which one would be the best choice to make?
Thanks for sharing experience
Tibor

On 3/13/06, Chris Howe <[hidden email]> wrote:
Yes and no.

I think the main difference that you need to remember
is that jpublish is simply there to make html
documents, while the widgets (screen, form, tree,
menu) are put together so that other technologies can
take advantage of them.

In transitioning an application that made use of
jpublish so that it "just has to work", you should
take on the approach that the other applications have
done using the simplest "transitional" tool (in this
case screen.render and the continued use of ftl) as
the majority of the community has been web browser
centric.  However, as far as maintanence and
extensibility and reuse and all of the things that
Ofbiz has the potential to take advantage of (inside
and especially outside of the html world), you're
better off utilizing a widget approach.  Freemarker is
great for creating html, it's easy to use, etc.  But,
if you can store your presentation information in a
generic format it will be much more useful.

But, again if it just has to work in an html
environment, why are you updating away from jpublish?


========== Tibor wrote:
Hi Chris

Please tell me if I understood this properly:
you say that I should do my page declaration as a
combination of widgets,
widget-includes, decorators, instead of inserting bits
of pages (ftl) into a
base ftl ?

I think I'm not mistaken if I say that this is
probably the main difference
between jpublish and screens: there's an external
construction of the page.
some things were so practical though that I wished
they were still around.

It sounds like a nice idea but in practise is a lot of
effort and cutting up
than the usual template engine approach. where pages
are built with
combinations of includes inside the final template
(JPublish). Here the
construction is external and in my use case produces
more declarations than
code itself.

I'm still very new to screens but It seems at first
use that SOC has been a
bit mixed up (Mixing declarations of BSH, conditions
and declartion of
ftl's) .
or is this one new separation I'm just not used to yet
?
I'm interested in hearing users experience with the
screen-widget compared
to the jpublish ?

Thanks for your thoughts
Regards
Tibor

If you're using the widgets at their current potential

> and simplying your .ftl for reuse, there really
> shouldn't be a need to use screen.render.  That
> command appears to have been made for a quick/simple
> transition from pages.get.  Most of the time, if a
> screen.render is used inside a list iterator, you
> would probably benefit by using the form widget(of
> course conceeding to some current style limitations
> which is more likely to see improvement over non
> declaration ftl includes) and excluding another ftl
> altogether.  If a screen.render is used outside of a
> list iterator, then you might benefit from breaking
up
> your ftl for reuse anyway.
>
> ========== BJ Freeman wrote:
>
> Just a thought. Then declaration would make it
> difficult to use
> components in other modules.
> In my stuff, I call screens in other modules, but
for
> the most part to
> use my own.
>
> tibor katelbach sent the following on 3/13/06 3:56
AM:

> > Thanks for the answer Jacopo
> > any idea if this will be implemented in a future
> release?
> > Thx
> > Tibor
> >
> > On 3/13/06, Jacopo Cappellato <tiz at sastau.it>
> wrote:
> >
> >>Hi Tibor,
> >>

> >>yes I think that (at the moment) this is the only
> way to implement 'ftl
> >>includes'.
> >>
> >>Jacopo
> >>
> >>tibor katelbach wrote:
> >>
> >>>Hi
> >>>I'm transforming our Jpublish Structure into
> Screens
> >>>one thing that was quite simple that now seems a
> bit heavy to me, if I'm
> >>>not mistaken when I want to include a simple ftl
> into my page.
> >>>
> >>>Before I'd just have to do this
> >>>${pages.get("/templates/navg1-img.ftl ")}
> >>>
> >>>where as now I have to
> >>>${screens.render
> >>
>
>>("component://myapp/widget/CommonScreens.xml#navg1-img")}
> >>
> >>>and declare my nav1-img as a screen
> >>><screen>....</screen>
> >>>
> >>>isn't there a way to go directly to the ftl
without

> passing through a
> >>>declaration?
> >>>
> >>>maybe something like this
> >>>${screens.render("/templates/navg1-img.ftl")}
> >>>
> >>>Thanks for the help
> >>>Tibor
> >>>
> >>>
>
>
>>>------------------------------------------------------------------------
> >>>
> >>>
> >>>_______________________________________________
> >>>Users mailing list
> >>>Users at lists.ofbiz.org
> >>>http://lists.ofbiz.org/mailman/listinfo/users
> >>
> >>
> >>_______________________________________________
> >>Users mailing list
> >>Users at lists.ofbiz.org
> >> http://lists.ofbiz.org/mailman/listinfo/users
> >>
> >
> >
> >
> >
>
------------------------------------------------------------------------

> >
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.ofbiz.org
> > http://lists.ofbiz.org/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.ofbiz.org
> http://lists.ofbiz.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ofbiz.org/pipermail/users/attachments/20060313/a6656d2b/attachment-0001.htm

_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Jpublish to Screens

Firas A.-2
Hi Tibor,

A couple of months ago I posted a request for help with a problem very
similar to yours. I totally agree with you on your comments in this matter.

I solved my problem by editing the source code responsible for this
misbehavior. Unfortunately, I can't share my solution with you, since the
class containing this problem has undergone other, more extensive
customizations. If used, it would most likely brake some of your code
elsewhere.

But if you're intrested in a solution and don't mind toying with the source
code, here's the source of the problem:
FreeMarkerWorker.renderTemplateAtLocation()

Basicly you need to help FreeMarker find your ftls by supplying the right
template loader. You may find these resources helpful:
http://freemarker.sourceforge.net/docs/pgui_config_templateloading.html

http://freemarker.sourceforge.net/docs/pgui_misc_multithreading.html


Good luck!

</Firas>

________________________________________________________Original Message
Message: 6
Date: Mon, 13 Mar 2006 17:07:37 +0100
From: "tibor katelbach" <[hidden email]>
Subject: Re: [OFBiz] Users - Jpublish to Screens
To: "OFBiz Users / Usage Discussion" <[hidden email]>
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset="iso-8859-1"

Hi Chris

Please tell me if I understood this properly:
you say that I should do my page declaration as a combination of widgets,
widget-includes, decorators, instead of inserting bits of pages (ftl) into a
base ftl ?

I think I'm not mistaken if I say that this is probably the main difference
between jpublish and screens: there's an external construction of the page.
some things were so practical though that I wished they were still around.

It sounds like a nice idea but in practise is a lot of effort and cutting up
than the usual template engine approach. where pages are built with
combinations of includes inside the final template (JPublish). Here the
construction is external and in my use case produces more declarations than
code itself.

I'm still very new to screens but It seems at first use that SOC has been a
bit mixed up (Mixing declarations of BSH, conditions and declartion of
ftl's) .
or is this one new separation I'm just not used to yet ?
I'm interested in hearing users experience with the screen-widget compared
to the jpublish ?

Thanks for your thoughts
Regards
Tibor

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users