cancel
Showing results for 
Search instead for 
Did you mean: 

Xforms tied to WCM?

ftoth
Champ in-the-making
Champ in-the-making
Hi,

I've been working with 2.0, and it appears that the ability to enter structured XML via Xforms is tied in with the whole optional WCM feature? Is this necessary? It seems like it would be handy to be able to use Xforms as part of the general CMS, without confusing the issue with web site management.

Is there a way?

Many thanks,

Fred
20 REPLIES 20

kvc
Champ in-the-making
Champ in-the-making
I think the key to helping you will be the introduction of our deployment module with our upcoming 2.0.1 maintanence release.  This will enable you to deploy (replicate) an entire web project to one or more remote Alfresco servers (and later, to remote file servers for a completely static deployment).  Then, you can look at deploying Alfresco in as part of a 3-tier production environment:  an SCM for development, WCM for content authoring and site staging and test (both code and content), and a standalone Alfresco repo (sans web client) for site hosted (the run-time).

In terms of DM vs. WCM repos, the goal is to enable knowledge workers to create and collaborate on documents in the context of a space, with a content rule that copies (preferrably, a locked down rendition in the form of a PDF) of finalized documents to one or more web projects.  This is enabled by executing a custom Javascript action today with 2.0.  We are looking to make this more wizard-based via a pre-built action in 2.1 (target May).  The key here is that end-users want to be able to set up their own spaces for purposes of collaboration, and the documents they create should be able to transparently be posted to one or multiple sites, which themselves will have unique directory structures that may or may not be known to the end-user that they will need to be "pushed" to one or multiple remote servers.

Let me know if any more questions or comments - good discussion.

Kevin

jcox
Champ in-the-making
Champ in-the-making
From the outside, it's always tough to tell the difference
between what's been implemented for a particular release,
and what's fundamental to the design (or the lack thereof!).

Hopefully, I can shed some light on things so you can evaluate
Alfresco 2.0.x with some additional context.  Our goal in 2.0.x
is to provide you with something useful, but it only scratches
the surface of some very powerful new core technologies we've
been developing.

First, let's take a step back from WCM for a moment, and talk more
generally about managing and viewing *any* kind of content.  After
that, let's circle back to WCM.  The ideas are highly related but
they are distinct.

The AVM manages a forest of Subversion-like object versioning trees.
This is not specific to managing web content;  ultimately, the source
code management system we're planning will use it as well, along
with everything else.  Transparency can be turned on/off on a per
directory level, so it isn't an all-or-nothing choice.  Right now,
what you see on the WCM side is just one configuration tuned for a
specific purpose.  Currently, we do not have much direct support
for SCM, but that is in the works, as we plan to develop Alfresco
within Alfresco as soon as it becomes feasible.  One of the basic
differences in the default SCM setup is that the user-level
"sandboxes" probably won't be transparent overlays of a "staging" area;
however, each user will still operate within a separate virtual
repository, and all users connected to a common project will be tied
to a staging area via workflows.  Thus, the WCM submit/review models
will still apply, but the emphasis will probably be somewhat different;
SCM is typically more concerned with text-based 3-way diffs/merges.

One big improvement coming up in 2.0.1 is that our support for
metadata has been greatly extended within the AVM.  This will make
it possible for future releases to do links management and dependency
management, and advisory locking efficiently, as well as support a
variety of deeper customizations (e.g.:  displaying custom meta
information on snapshots, fancier workflows, etc.).

The only major "WCM-specific" subsystem in Alfresco's 2.0.0 release
is the virtualization server; this allows you to see your web pages,
servlets, and JSPs in-context… just as if you were browsing the
"real" customer-facing website.   Whether you deploy AVM content
to a normal file system and/or serve content to end users directly
from a separate virtualization server is up to you.  The layers
between these subsystems are cleanly established, so you can set
things up exactly as you see fit.  The 2.0.1 release will include
some built-in deployment features, so hopefully this will become
clearer when you see it.


Ok, that said, our auto-generated XForms *are* currently bound too
tightly bound to the Alfresco webapp itself.    This is a byproduct of
trying hit a delivery date for this release.  Smiley Happy

We'd like to be able to make this fully pluggable so that you can use
our auto-generated forms within *your* webapp if you'd  like….
or use some other technology for data collection, such as fully customized
XForms, CGIs, custom servlets, or whatever combination of things suits
your needs best.

Interactive and/or automated data input is the "front end" of content
management in general, not just WCM.  As such, making it as modular
and re-usable as possible is essential.  The goal is to make it so that the
widgets we use in our webapp can be used in yours (and vice-versa).
We're working on it, but we hope that the current "front end" is at least
somewhat useful to you in its present state.

There are some other areas that we won't get to in the 2.0.1 release
at all, such as improvements to our workflow system, and supplying some
fancier workflows out-of-the-box… such as the ability to delegate
conflicts/merges to a third party.  This will be able to take advantage
of the underlying "forest of trees" design inherent in the AVM;
the virtualization server will play nicely with it too, so whether
the final application is WCM or SCM, the operations dealing with
review/modify/merge/submit will be fairly slick.

One inherent difficulty with producing a *platform* for DM/WCM/SCM
collaboration is that any demo that gets shipped can easily be
confused with the product itself.   I think this is inevitable to
some extent, but one thing that would help a lot is if we shipped
more demos & examples.   That way, we'd convey a better sense
of what's possible within what we've already got.   We're working on
that too;  in fact, one of our sales engineers just put together a very
pretty demo & showed it off to us today.  It's not clear whether this
will end up shipping with the product, or on some sort of online
"demo gallery".    User-contributed demos might be very cool too,
so if you think there would be value in something like this, please
let  us know.  Creating infrastructure to support this will take a little
bit of time, but if the community expresses a strong interest, we'll
try to accelerate that.

In the meanwhile, I hope I've helped to give you a better picture
of how stuff is set up internally, and where we're headed.    Your
feedback is greatly appreciated.  Keep it coming!

  Cheers,
  -Jon

ftoth
Champ in-the-making
Champ in-the-making
Jon, all,

Thanks very much for your detailed description of your future plans. I've been very happy with Alfresco, and I continue to look forward to new releases.

In the interest of keeping this discussion going, though, I would like to briefly describe my current situation. I am using Alfresco right now in development, and I would be pleased to get any feedback from the group.

First of all, our current choice of "delivery engine" is tomcat with struts2 and freemarker as the view layer. This is powerful, a known quantity, and supports any complexity necessary in our sites.

Right now I have two tomcat instances side by side. One is running alfresco 1.4, and the other is running struts2/freemarker.

One of the key enabling technologies that I get from Alfresco is the CIFS server. I have the Alfresco instance locally mounted, via CIFS. This is huge, because now we can deploy using anything we want!

Within Alfresco, I have a space that is the web root. Within that space I can use Alfresco to manage HTML snippets, freemarker templates, images, etc., in a folder hierarchy that corresponds exactly to the web site.

Outside of either environment, I have an ant script that simply copies from the Alfresco mount to the webapp in the delivery instance of tomcat.

This works perfectly, for now, though I would like to somehow move the functionality of the ant script into Alfresco. Perhaps a custom action of some sort?

So given what I've described above, what should I be thinking about in terms of moving to WCM in 2.0? I think that I understand that alfresco won't support deployment to static files until later this year, so I'm stuck there.

The multiple virtual sites, via sandboxes, is very powerful, but it appears that I can't use that without adopting virtualization and alfresco as the delivery engine? (Though I do remember one note somewhere about virtualization working with any "well behaved" java technology).

I will probably move to 2.0 for xforms if nothing else. But in my current "thought experiments" with this, there are some issues, right? As described above, I can't use all of the cleverness of xforms without the virtualization server, right? (I still don't understand that one!)

But what I can do, it seems, is use xforms to capture XML, and, once captured, use external techniques to process that XML in various ways. For example, if I had 10 XML press release files, it appears that I could transform them, aggregate them, etc., externally to alfresco, using the same techniques I've described above. I could, for example, simply export them to my delivery engine, and there write freemarker and backing beans in struts2 to achieve anything I need.

Again, a key enabler is the CIFS mount, which, from what I can tell, works in 2.0 as well, with the benefit of presenting all of the sandboxes. So once again, I can have the best of both worlds, without adopting alfresco as the delivery engine.

I would be very interested to hear back from folks on this! I keep hoping that I'm missing something fundamental. I would also be very interested in how others are dealing with these same issues.

Many thanks,
Fred

kvc
Champ in-the-making
Champ in-the-making
Fred:


To move to 2.0, you would:

1.  Create the directory structure of your website in an authoring sandbox
2.  Import any images, code, or other web resources
3.  Leverage forms to create your HTML snippets.  In the simplest case,
     you can have a single form that captures a title and body text and
     generates an HTML fragment.  This simple form can also have a
     "category" element, which would be a dynamic list of values that
     correspond to directories in the website.  This category element
     can be used via an output path expression to generate the HTML
     fragment in the appropriate directory.  Thus, a single generic "article
     form" can be used to create news articles ("/news/xxx.html"), a
     people article ("/corporate/profile/xxx.html"), an event article
     ("/events/xxx.html"), or anything else you want without having
     to have the end-user navigate around the website to put things
     in the right folder.
4.  Import any freemarker templates.  You can use continue to
     use freemarker as your view layer.  Freemarker templates are
     fully virtualizable and previewable within a sandbox.

Now, the benefits of doing this are five-fold:

1.  You now get proper staging of site changes.  In a sandbox, you
     can modify multiple things and test as if it were live.

2.  You now get support for multi-asset promotion.  In a sandbox,
     you can promote an entire change set.  This overcomes the
     problems associated with updating the site on an asset-by-asset
     basis.

3.  You now get support for task-based review of change sets. 
     Reviewers can now preview a future state of the site with all
     changes that will get commited if approved.

4.  You now get full site versioning and rollback.  Once things
     are approved, they are snapshoted and available for rollback.

5.  You now get (with our upcoming 2.0.1 release) integrated
     deployment to push a given snapshot to a remote server or
     servers outside your firewall.


Now, the virtualization server is *not* required for your run-time environment.  In fact, we don't intend for you to have to use the virtualization server in your run-time (of course you can, but that's not what's it's target use is for).  In the run-time, you can have any servlet engine serving your web app … and in the run-time, you can do this directly off a mounted CIFS drive (remember, web projects - including all snapshots - are viewable through CIFS; and, for the run-time, read performance of assets in a sandbox is signficantly faster (minimal 3x) over a normal Alfresco space.

I highly recommend trying this out.  In this model, you can continue to leverage normal spaces as well … those spaces can be used for document collaboration and management, where finalized docs are promoted into a web project, which is responsible for managing the source code (the entire directory tree) of your site and support staging, preview, workflow, snapshoting, and deployment.

Let me know if any more questions.  Super good thread here.


Kevin

ftoth
Champ in-the-making
Champ in-the-making
Kevin,

Thanks very much for your helpful guidance. I am learning more about
Alfresco every day, and I'm very pleased.

In the hopes that you and others are still following this thread, I want to
drill just a little deeper on the subject of the virtualization server.

You say above that it's not required for my production environment.

But what I think I'm seeing is that as long as my production environment
is something other than alfresco, the virtualization server can NOT be
used to preview my site.

Again, I can use Alfresco to manage my freemarker templates, content
snippets, etc., but as long as those components require MY environment
(i.e. struts2 and associated custom logic) to operate, the virtualization
server is of no value to me.

To be clear, imagine this simple scenario, a typical "about" page:

In my "about" space, I might have a header, a footer, and a content block.

They are stitched together with freemarker include tags.

So far, so good, right?

But say that my page also has (a silly example) a "quote of the day"
section. And there's all sorts of struts2 logic and database tables and
on and on, to support this incredibly valuable function.

So, somewhere in the content freemarker template, I have something like

${quote.todaysQuote}

The quote bean is in my world (struts2), and not in Alfresco's.

I can still use Alfresco to manage the template that contains
the above snippet, but there's no way the virtualization server is ever
going to be able to preview that page, right?

I keep putting question marks in, because I'm really not completely
sure that you guys don't have yet another trick up your sleeve, so
please dazzle me!

What IS the virtualization server doing, anyway? I think I understand parts of it:

Alfresco builds the "eyeball" links in such a way that the virtualization
server can figure out what page and what sandbox is being requested.
But that's on the Alfresco side.

The virtual server logs give me the impression that there's some RMI
going on, which makes sense. So I'm guessing that the virtualization
server just decodes the URL and then requests the appropriate
documents from Alfresco. But there must be a fair amount of complexity
in there, right? Essentially, the virtualization tomcat instance is using
Alfresco as its resource for content.

So, if I'm right, and I can't use your virtualization server to preview
my site, then why can't I build my own?

What if you gave me the ability to completely customize the URL that's
built for the eyeball? Then the preview could be anything at all! Even
ruby or php!

Again, please tell me what I've missed, and, as always, I appreciate your time.

Thanks,

Fred

kvc
Champ in-the-making
Champ in-the-making
Hmmm … enabling alternative preview environments (PHP, Ruby, .NET, etc.) is definately a good idea … and exactly where we're heading 2H07.

But that shouldn't be required for you to be able to virtualize your web app.  Is your bean accessible to the web app (contained in your Alfresco web project in your WEB-INF dir)?  There's no Alfresco specific app logic - the examples in the sample content are just that - examples.  Nothing is really required there.  The only thing that is required now is to use our Java API (or their RMI interface) to fetch assets from your web project for rendering (alternatively, they can of course be read off the CIFS interface).

I'm forwarding this post to our virt server engineer, Jon Cox.  We'll get this sorted straight away!

Kevin

ftoth
Champ in-the-making
Champ in-the-making
So you're saying that I can put my complete webapp in Alfresco?

This means lots of jar files, config files, property files, etc., all the stuff
that normally lives in WEB-INF, and it will "just work" with the virtualization
server? I had certainly never thought of that!

Maybe it would help if I understood more about what the virtualization
server is actually doing.

Somehow you've altered tomcat so that all of its requests for resources,
including classloaders, etc., go through to Alfresco?

Is this a change to the tomcat source (i.e. a forked version)?

You may or may not know that in struts2, some or all URLs can be completely
virtual. For example, you might have a request for /a/b/c. And there is
nothing out there content-wise in that location. Instead, a struts action
interprets that path and redirects to the view layer, etc.

All that will work with the virtualization server?

Thanks, I'll look more closely and give it a try.

Fred

ftoth
Champ in-the-making
Champ in-the-making
Well, I had high hopes, but I have to report failure.

I took an existing, working struts2 webapp, zipped it up, and imported it into
a newly created web project.

The import worked flawlessly.

However, the app does not run within the virtualization server. The first
and most obvious problem is that freemarker is not processing the
templates.

If I hit the eyeball on a freemarker template, the virtualization server
displays the raw content (i.e. the freemarker markup).

So, all the content is there, but none of the functionality.

As discussed above, this is what I expected given my current understanding
of how the virtualization server appears to work, though Kevin seemed to
think otherwise.

I look forward to your comments.

Thanks,

Fred

ftoth
Champ in-the-making
Champ in-the-making
One correction to the above:

There is an error in the virtualization server log indicating that
"struts.properties" is not being found:

Mar 29, 2007 10:13:03 AM org.apache.struts2.config.DefaultSettings <init>
WARNING: Could not find or error in struts.properties
Could not load struts.properties:java.io.FileNotFoundException: /media/alfresco/cifs/v/stest/VERSION/v-1/DATA/www/avm_webapps/ROOT/WEB-INF/classes/struts.properties

The file does exist, however, so I have no idea what's going on
(it's in WEB-INF/classes/struts.properties).

Does that complex path look correct?

Thanks,

Fred

ftoth
Champ in-the-making
Champ in-the-making
One more note before I leave this for a bit:

I tried the same test using the minimal sample application,
"struts2-blank-2.0.1.war", which is available from the struts2
distribution.

It also failed with the same error (can't find struts.properties)
and the application does not run within the virtualization server.

Perhaps struts2 is not "well behaved" in some way?

Thanks again for your help.

Fred