You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by "andy.way" <an...@yahoo.com.cn> on 2008/06/06 18:24:32 UTC

how to integrate lenya in a website

Hi, sir,

Our company plans to build a new CMS to manage the website. The website is
based on cocoon, and has a simple CMS which is builded by java, but I don't
think it fits for most people. So now we want to use lenya as a new CMS, how
can I do that??

Thanks in advance.

Best regards,
Andy.Way
-- 
View this message in context: http://www.nabble.com/how-to-integrate-lenya-in-a-website-tp17696306p17696306.html
Sent from the Lenya - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: how to integrate lenya in a website

Posted by so...@apache.org.
Integrating websites depends on how you define integration.

Integrating the websites from the (anonymous) consumer perspective
simply requires links between the websites.  (See below.)

Integrating the websites from a technical perspective may be adding
Lenya as a Cocoon application in your existing Cocoon installation.
Or just specifying both servers in the same DNS domain (e.g. either
cocoon.example.com and lenya.example.com or example.com/cocoon and
example.com/lenya.)

Integration for single-sign-on between the applications requires all
the applications to use the same directory/authentication service in
the same Cookie-wielding domain (same depth under same DNS domain --
see previous examples.)  Think about using an LDAP server for all
application authentication if this functionality is desired.
[Integration for single-sign-on between different Cookie domains is
possible, but requires more thought/software.]

"We don't know how to  make a link to our company's website."
Web link addresses (URLs) are in the format:
   "http://" + server name + path to application.
Links are provided by HTML's A (anchor) tag using the syntax:
   <a href="{link address}">{Clue where the link goes}<a>
such as:
  <a href="http://example.com/lenya">Our CMS</a>

If running multiple Web application servers on the same server using
only one IP Address, the addresses can be controlled by placing the
application servers (e.g. Lenya and Cocoon) behind another web server
(e.g. Apache httpd.)  Any Web administrator can configure the Web
server once you define what address should open each application.  Or
read Apache httpd's documentation to learn about controlling addresses
with virtual servers, proxying, and URL rewriting.

HTH,
solprovider

On 6/6/08, andy.way <an...@yahoo.com.cn> wrote:
>  By the way, we have installed lenya successfully, but we don't know how to
>  make a link to our company's website. Could you give me some advice or
>  recommend me some documents to read, please?
>
>  andy.way wrote:
>  > Our company plans to build a new CMS to manage the website. The website
>  > is based on Cocoon and has a simple CMS built in Java, but I don't think it
>  > is suitable for use by most people. So now we want to use Lenya
>  >  as our CMS.  How can I do that??
>  >
>  > Thanks in advance.
>  > Best regards,
>  > Andy.Way

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: how to integrate lenya in a website

Posted by "andy.way" <an...@yahoo.com.cn>.

By the way, we have installed lenya successfully, but we don't know how to
make a link to our company's website. Could you give me some advice or
recommend me some documents to read, please?


andy.way wrote:
> 
> Hi, sir,
> 
> Our company plans to build a new CMS to manage the website. The website is
> based on cocoon, and has a simple CMS which is builded by java, but I
> don't think it fits for most people. So now we want to use lenya as a new
> CMS, how can I do that??
> 
> Thanks in advance.
> 
> Best regards,
> Andy.Way
> 

-- 
View this message in context: http://www.nabble.com/how-to-integrate-lenya-in-a-website-tp17696306p17696552.html
Sent from the Lenya - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: how to integrate lenya in a website

Posted by Andreas Hartmann <an...@apache.org>.
andy.way schrieb:

[…]

> I use lenya2.0 (I can change, if 1.2 or 1.3 is more convenient). If I wanna
> remain the xml files in their current location, and just connect to these
> files through configuring lenya. Is it possible?

With 1.2, this is possible. You have to

- implement a custom DocumentIdToPathMapper which maps URLs to the paths 
of your documents

- create an initial sitetree.xml file


With 2.0, I'd strongly recommend to import the documents into the 
standard Lenya repository. Otherwise you'll have to tweak the classes in 
the sourcerepository module.


> If yes, how can I modify the servlet from cocoon to lenya?

I don't quite understand this question - do you mean how to "merge" your 
existing application with Lenya?

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: how to integrate lenya in a website

Posted by "andy.way" <an...@yahoo.com.cn>.
Thank you for your replies and your patience. Because I'm a beginner of
lenya, my questions maybe a little naive. 

I use lenya2.0 (I can change, if 1.2 or 1.3 is more convenient). If I wanna
remain the xml files in their current location, and just connect to these
files through configuring lenya. Is it possible? If yes, how can I modify
the servlet from cocoon to lenya?

THX....

andy.way
-- 
View this message in context: http://www.nabble.com/how-to-integrate-lenya-in-a-website-tp17696306p17904578.html
Sent from the Lenya - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: how to integrate lenya in a website

Posted by Andreas Hartmann <an...@apache.org>.
andy.way schrieb:

[…]

>  If I
>  just want to using lenya for its WYSIWYG editor, how can I merge it
>  into my website?

If your existing website is strictly read-only, the probably easiest way 
  would be to run both servlets in the same engine and migrate only the 
content (XML documents) to Lenya. You won't get full-featured WYSIWYG in 
Lenya, though, without migrating the presentation layer.

You request the XML documents from your application, e.g.

   <map:generate src="lenya-connector:…"/>

The lenya-connector source factory would use some inter-servlet 
communication facility to get the source from Lenya. You'd probably have 
to extend Lenya to provide an appropriate API.


> Or if the implementation of such connectors tends to
>  expensive, and I need to convert the website to lenya, how can I do
>  that?

If you want to migrate the website to Lenya, there are two ways:

1. Put your application in a publication and tweak it until it is editable.

2. Start with a blank publication and re-build your website, using the 
components you already have.

I think I'd prefer option 2, but this depends on the complexity of your 
application.

> Do I need to import all the xsp, xsl, xml files into the
>  lenya's repository?

That depends on whether you want to edit them via the CMS. Usually only 
the XML files are stored in the content repository, but this is up to you.

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: how to integrate lenya in a website

Posted by "andy.way" <an...@yahoo.com.cn>.

>> With 1.2, this is possible. You have to
>> 
>> - implement a custom DocumentIdToPathMapper which maps URLs to the
>> paths of your documents
>> 
>> - create an initial sitetree.xml file
>> 
>> 
>> With 2.0, I'd strongly recommend to import the documents into the 
>> standard Lenya repository. Otherwise you'll have to tweak the
>> classes in the sourcerepository module.
>> 
>> 
>>> If yes, how can I modify the servlet from cocoon to lenya?
>> I don't quite understand this question - do you mean how to "merge"
>> your existing application with Lenya?

 Thank you, sir. Yes, I meant that, I'm sorry for my expression. If I
 just want to using lenya for its WYSIWYG editor, how can I merge it
 into my website? Or if the implementation of such connectors tends to
 expensive, and I need to convert the website to lenya, how can I do
 that? Do I need to import all the xsp, xsl, xml files into the
 lenya's repository?
 
 Could you give me some more details, or could you recommend me some
 tutorials to read, please? Thanks again...
 
 andy.way
-- 
View this message in context: http://www.nabble.com/how-to-integrate-lenya-in-a-website-tp17696306p17998677.html
Sent from the Lenya - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: how to integrate lenya in a website

Posted by Andreas Hartmann <an...@apache.org>.
solprovider@apache.org schrieb:
> You did not mention which version of Lenya is installed.  Assuming
> 2.x, someone else must provide specifics about importing.  My
> experience is with Lenya 1.2 and 1.3.
> 
> "most of the files are xsp, xml, or xsl."
> All versions of Lenya natively handle XSP, XML, and XSL files because
> all versions of Lenya are based on Cocoon 2.1.  (Cocoon 2.2 has
> difficulty with XSP.)
> 
> How best to import depends on your XML files:
> 1. The files might remain in their current location or be imported
> into Lenya's data structure.
> 2.  A new resource type could read the files in their current format,
> or you could transform the XML files into the Lenya's standard XHTML
> format/resource type.
> 3. Lenya depends on a "sitetree" to translate URL document paths.
> Lenya 1.2 can build a sitetree document from a hierarchical directory
> structure.  Lenya 1.3 uses a flat data structure and dynamically
> generates the sitetree from "indexes" describing the relationships.  I
> believe Lenya 2.0 uses a static sitetree document to translate URL
> paths to UUIDs for locating XML documents in a flat datastore.  As
> mentioned, someone else needs to provide details about sitetrees in
> Lenya 2.0.

What solprovider wrote about 2.0 is correct. A major difference to 1.2 
is that 2.0 doesn't support custom content paths. To integrate external 
content, you have to implement a Lenya repository (Node, NodeFactory 
etc.) that operates on this content.


> The first decision is whether you are converting the website to Lenya
> or just using Lenya for its WYSIWYG editing.  You can "link between
> Lenya and our website," but that likely requires more work to setup
> than a one-time conversion.

I strongly support this argument. The implementation of connectors 
(i.e., custom back-ends) tends to be very expensive.

-- Andreas



-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: how to integrate lenya in a website

Posted by so...@apache.org.
You did not mention which version of Lenya is installed.  Assuming
2.x, someone else must provide specifics about importing.  My
experience is with Lenya 1.2 and 1.3.

"most of the files are xsp, xml, or xsl."
All versions of Lenya natively handle XSP, XML, and XSL files because
all versions of Lenya are based on Cocoon 2.1.  (Cocoon 2.2 has
difficulty with XSP.)

How best to import depends on your XML files:
1. The files might remain in their current location or be imported
into Lenya's data structure.
2.  A new resource type could read the files in their current format,
or you could transform the XML files into the Lenya's standard XHTML
format/resource type.
3. Lenya depends on a "sitetree" to translate URL document paths.
Lenya 1.2 can build a sitetree document from a hierarchical directory
structure.  Lenya 1.3 uses a flat data structure and dynamically
generates the sitetree from "indexes" describing the relationships.  I
believe Lenya 2.0 uses a static sitetree document to translate URL
paths to UUIDs for locating XML documents in a flat datastore.  As
mentioned, someone else needs to provide details about sitetrees in
Lenya 2.0.

The first decision is whether you are converting the website to Lenya
or just using Lenya for its WYSIWYG editing.  You can "link between
Lenya and our website," but that likely requires more work to setup
than a one-time conversion.  Does your Cocoon website provide any
benefits that cannot be provided by Lenya?  (The answer must be "no"
because Lenya runs on Cocoon and has all the abilities of Cocoon.)

HTH,
solprovder

On 6/13/08, andy.way <an...@yahoo.com.cn> wrote:
>  Thanks a lot for your answer, I really appreciate. I still have another
>  questions. Our website is based on cocoon, so most of the files are xsp,
>  xml, or xsl.
>
>  If I want to use lenya as a new CMS, how can I import the old files of our
>  website? Do I need to rebuild the website again with lenya, or I can make a
>  link between lenya and our website?  I just want to use lenya's editor to
>  edit the xml files of our website in visual way ( that means I'd like to
>  generate an interface in lenya exactly looks like what it should be in our
>  current website).  Where can I put the xml files and xsl files, so that
>  lenya can implement the xslt, and then I can have the interface to edit the
>  xml files?
>
>  Best regards,
>  Andy.Way

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: how to integrate lenya in a website

Posted by "andy.way" <an...@yahoo.com.cn>.
Hi, sir,

Thanks a lot for your answer, I really appreciate. I still have another
questions. Our website is based on cocoon, so most of the files are xsp,
xml, or xsl. 

If I want to use lenya as a new CMS, how can I import the old files of our
website? Do I need to rebuild the website again with lenya, or I can make a
link between lenya and our website?  I just want to use lenya's editor to
edit the xml files of our website in visual way ( that means I'd like to
generate an interface in lenya exactly looks like what it should be in our
current website).  Where can I put the xml files and xsl files, so that
lenya can implement the xslt, and then I can have the interface to edit the
xml files?

Best regards,
Andy.Way


-- 
View this message in context: http://www.nabble.com/how-to-integrate-lenya-in-a-website-tp17696306p17827084.html
Sent from the Lenya - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org