This site is slow

Very sorry about the slowness this site is exibiting.  It’s been under preforming for some time and I’ve tried to work with it, but recently I’ve found it to be almost unusable, if not effectivly down.  Yesterday I was writing an RSS reader and spent a bunch of time trying to find what I thought was an endless loop in my logic.  Turned out the problem was just that I was using the feed from this site which was taking several minutes to return.


Creative Commons License photo credit: Gaetan Lee

I’ve purchased some new hosting space though (on a more highly rated provider), hopefully that will cure my woes.  I’ll be migrating everything over the next few days and with any luck it will be a seamless process.

Posted in Uncategorized | 1 Comment

UCMTube – Converting and Streaming FLV Files with Oracle UCM

Lately Digital Asset Management and more specifically media streaming has been a pretty hot item.  I’ve found myself in a number of conversations discussing Oracle UCM’s capabilities and how to integrate it’s features in to web sites.  The content server is an excellent platform for media storage, management and conversion, but when partnered with WCM it can become a single platform capable of handling the functional requirements of a YouTube or Flickr.

A little background on Oracle UCM Digital Asset Management

Before we go any farther, in the interest of saving me some typing I’ll now be using one of the more awkward acronyms in technology to describe Digital Asset Management, DAM.

I like to say that the content servers’s DAM features(hehe) are exactly that, Digital Asset Management features.  The DAM components handle the calls to the conversion engines and then also manages the resulting multitude of renditions.  They do not however actually convert anything on their own.  Oracle UCM like many other DAM applications relies on third party conversion tools to handle that work (usually Handmade’s Image Alchemy for Images and Telestream’s FlipFactory for video).  This is really an excellent design because the conversion engines end up being loosely coupled to the conversion server, allowing converters to be changed out, added or upgraded, without major changes to system.  With a few simple configuration changes they can also often be piggy-backed together, so that several different conversions actions can be set for the same content item.

From a high level here’s what a typical DAM process looks like with Oracle UCM.

  • A content author checks in an image or video
  • The file is identified as a digital asset needing conversion
  • The file is then passed over to the conversion server
  • The conversion server looks at the metadata to determine what rendition package and/or conversion need to occur(An image for instance might be converted to a large jpg and a smaller gif.  It might even have a watermark applied).
  • The conversion is executed.
  • The resulting renditions are packed up and sent back to the content server
  • When the content is viewing the content item, the DAM component adds an extra “Renditions” tab to review, download and in the case for video watch the different versions

That’s the high level overview, there are some more features there that I am glossing over, but the primary point is that the DAM components handle the management and the conversion engines handle the conversions.

The Delivery Question

Oracle along with many other ECM vendors, identify DAM as one of the four quadrants of ECM(doc man, records and wcm being the others).  In this view DAM is often seen as a sort of a close cousin to document management.  Digital assets are stored, secured and in Oracle’s case even converted just like regular documents.  But what about delivery..how does that factor in?  Would your average user log in to your content server to view a video or download an image rendition?  Possibly, but what if you’re running a web site out of that content server instance?  If doc man is DAM’s close cousin, could WCM be it’s girlfriend?

If you think about it, going back to the YouTube and Flickr references earlier, Oracle UCM has the capability to accept and store video and images, manage a conversion to a common web delivery format and then through Site Studio deliver that content back through a web site.  How does that differ from a what a YouTube or Flickr does and honestly how cool is that just in general? 

You’re getting off track, Isn’t this post suppose to be about streaming Flash?

Out of the box UCM’S DAM components convert and integrate with several streaming formats and servers: Windows Media, Quicktime and RealMedia can all be outputed from Flip Factory and if a streaming server is identified, the conversion server will copy the streaming file over.  Any calls to content server for the streaming format will return a url to the streaming server instead.

Very cool stuff, but there are a couple limitations with the Flip Factory and UCM DAM combo.

  • Flash FLV format is not an output format
  • Flash Streaming Servers are not a supported integration
  • There is not support audio conversion to a streaming format

I called Telestream recently and asked about the FLV output and according to them, FlipFactory customers who desire FLV output can purchase an additional plug-in.  I’m not sure if any one has tested that add-on with the content server, or even if Oracle is even recommending it, but if it works then issue one probably has a pretty good solution.  And if FLV conversion is an option, then streaming server integration and even audio support become pretty easy issues to over come.

Continue reading

Posted in Digital Asset Management, Flash, Oracle, Refinery | Leave a comment

Forums, Ratings..Little Blog Update

I’ve been a little out of pocket the past few weeks and it’s cut back on my posting quite a bit.  Friday’s S3 post was my first in several weeks which is not ideal as I’d like to get a couple posts out each week.  Once I slip a few days writing, well it’s easy for me to slip a few more, so I’m hoping to get a little routine going again.

Posting aside, I’ve still have been working on some site improvements over the past few weeks.  COCM runs on WordPress and there’s no shortage of plugins and enhancements out there.  The blog currently has quite a few plugins installed, but only a few enabled.  I often download a couple, install them and see if they add to the site.  If they do I leave them on, but more often I usually just disable them.  I try and stay conservative with the user experience, with all those bells and whistles out there I’m really tempted to go crazy, but if they don’t add to the experience(which is really just reading) I don’t think they are worth it.

That said I’ve rolled out a couple new features which I think will add to your Content On Content Management experience.

Post Ratings  – Post ratings are a very cool little plugin from Lester ‘GaMerZ’ Chan.  The plug-in adds a little 5 star interface to the bottom of each post and page and it lets the user community throw a little rating on the post. 

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet) 

Five stars would indicate that you really liked what I wrote, one star probably means I need to work on things a little.  Obviously this feedback is mostly for me, though we will be able to create some side bar naviagation to display the most poplar posts.  The little stars are all AJAX enabled, so it’s just a click.  Give it a go.

Forums – I’ve been putting out some sample components and code examples and from time to time I recieve emails with questions or issues.  Though none of my little example projects are truely “supported”, I really would like to try and help answer any questions I can. 

In the upper nave you’ll now find a link to our forums where everyone can ask questions and hopefully recieve prompt, concise answers.  There are two forums, one for support questions specific to code examples I’ve posted on the site.  If its just a general “how would you go about doing X” type question, there is also a “General Dicussion” area.

Better Spam Control – It wasn’t too bad at first, but for the last few weeks my blog comments have been spammed pretty hard.  And not just the 70% of viagra spam…some really, really raunchy stuff. 

I’ve installed a plugin called Akismet for the comments and the new forums sport CAPTCHAs for each post.  I’m particulary impressed with Akisment as it basically reads the comments, then somehow magically decides if it’s spam.  So far so good, nothing has gotten through.

Ideas or Advice – If you have any ideas for the site or ideas for future components or examples, I’d love to hear them.  Send me an email or better yet, post somthing in the forums.

Posted in Blog | Leave a comment

Amazon S3 File Store Provider for Oracle UCM

A few weeks ago when I heard that Amazon launched their SimpleDB service, I have to confess that Amazon wasn’t really on my radar as technology company.  Maybe the marketing hadn’t caught up with me,  but I pretty much just buy books from Amazon….web services?  Come on.  When I started poking around, I came to realize that Amazon has some really, really cool services and that I must have been under a rock.

The service that perked my interest the most though was their Simple Storage Service or (S3).  S3 is, as the name indicates, a very simple storage service that allows users to store files along with up to 2k of metadata in the Amazon cloud(buzz) storage system.  Files can be as large as 5gb and are accessible via SOAP or REST services using either HTTP or bit-torrent protocols.  It’s not a free service, but the cost is very reasonable(they provide an online calculator to estimate your cost…I think you’ll find they are very cheap.  Total development cost for this little project was 8 cents).

Great, but what does S3 have to do with Content Management?

S3 is essentially a content repository as a service.  Obviously it does not meet all the requirements for a full blown content management system, but from the perspective of the things you absolutely need in a content repository(security, metadata, storage) to the things you’d like to have(high availability, high reliability, unlimited storage) it really does make for an excellent repository. 

I also really like the concept of being able to store the metadata with the content revision, it’s certainly not a requirement or even a common practice with most CMSs, but it just adds another layer of redundancy down the road.  I’m getting a little away from the theme of the post here, but the fella over at “Me and Content Management” had a great post on this concept and I have to agree with his thoughts.

So would it be possibly to take the robust content repository features of S3 and bundle them with a content management system?  Use the content management system as the front end, managing user security, contribution, workflows, delivery…all the great things that content management systems do, but then also utilize S3 as the content repository leveraging it’s power.

Enter Oracle UCM File Store Providers

One of the neat features of Oracle UCM 10gr3(also formerly known as Stellent v8), was the new concept of File Store Providers.  Earlier versions of Stellent forced a simple yet elegant configuration where the original files were stored in a protected folder structure known as the vault and the web accessible versions which might just be a copy of the original or a multitude of transformed versions are stored in a “weblayout” folder.  This set up works very well and I am sure is still employed by most Content Server instances.

One of the problems with this design was that it did not offer many options as far as drive space, each file has at least one copy in the vault and in the weblayout, so you automatically have to double your space projections.   Probably not a huge problem for word and text content, but start using the content server for Digital Asset Management and space requirememts definitely rise on the priority list.  Enter 10gr3 with file store providers and you now have a variety of storage options.

  • Content can be stored without a web version
  • Content can be stored in the database
  • Content can be stored half in the database half on the file system

File Store providers are essentially a configurable abstraction layer from the content server to wherever you want to store your content.  The really neat thing about them though is that they appear to be a planned area of extensibility for the content server.

My S3 File Store Provider

A File Store provider for Amazon S3 seemed like such a logical enhancement to the content server that I had to give it a go.  Unlike service handlers, filters and all the other goodies in Bex’s book and the How to Components, I know of no best practices for File Store providers, so I’m a little on my own here.  Basically, if you use my project as a template, I am not sure I did it things “Oracle way” (or even if there is one).

In setting up the project I tried to figure out how Oracle configured and registered it’s JDBCStorage class, which is the primary object used in the database provider.  My set up consists of a class called SimpleStorage which implements the ExternalStorageImplementor and CommonStoreImplementor interfaces.  The File Store and classes are then registered in two tables: a mergeable table located in a component resources called FSStores and a non mergeable resultset found in the defaultFileStore’s provider.hda file(an install filter in the component handles the edit for you).  Most of the methods required by the interface are pretty straightforward; store here move there, etc…though there are handful of others that represented many hours of starting at the system audit window(addFilesystemPathInfo for one).

For the actual S3 communication I used and bundled an open source API called JetS3t.  JetS3t is an excellent API which I would highly recommend for all your Java/S3 needs.  In addition to the API, JetS3t includes a little GUI called Cockpit.  I’ve included it with the API in the component so you can use to take a peek at your S3 buckets.  You’ll find it in the lib/bin folder.  Site note: Thanks JetS3t team…your API worked great.

From a sort of overview perspective the provider works as so:

  1. A user checks in a piece of content flagged for S3 storage
  2. The vault content item is immediately stored on S3 along with up to 2k of it’s metadata(a config entry determines the fields to include)
  3. If all content is to be stored in S3, the web version is then also stored on S3, otherwise it is written to the web layout folder
  4. When the indexer attempts to access the vault file, it is retrieved and written out to the vault folder.
  5. When a user views the content information page, or tries to access the web layout rendition, the web layout version is retrieved and saved to the web layout folder
  6. A scheduled task then runs behind and deletes any vault or weblayout files which are stored on S3, but have not been accessed in a preset number of minutes.

Content can also be moved to and from S3 by preforming an Update and just changing the storage rule.

So what good is this thing?

I am pretty excited about this component because I think it’s a concept with some potential.  Couple your existing content management system with the ultimate content repository.  You get unlimited enterprise class, scalable storage at a very reasonable cost without the infrastructure and staffing requirements that go along with it.  I like to imagine future content server instances using a limited “working” storage area storing only content being actively used with terabytes of content stored out on S3.  No more SANs or the endless list of non-technology related headaches they bring.

I think we could also envision scenarios where content is managed in S3 by a content management system, but then read and accessed directly by other systems, potentially on different sides of the planet?  My knee-jerk reaction to that is that it sounds like a bad practice, but if it’s secured properly, why not?

Bandwidth and performance are probably the two things that would need to be watched in this sort of model, but I just don’t think they would prove to be much of a problem for the majority of content items.  Large files could potentially pose a performance problem, but how much more noticeable would downloading a 25mb file be if it had to come down from S3 first?  I am not sure most users would notice.

Something that may only interest me 

S3 is SOAP/REST based service…Imagine that, a protocol/service being used to retrieve content?  I hope the JSR170/283 fans take notice.

How to get it

The component is available for download here.  I should be clear that this is one of the more complex projects I’ve developed for the site and it hasn’t exactly gone through any stringent QA testing(it’s just me).  Like all my sample projects, it’s provided without warranty or support and I recommend you test it out thoroughly on a dev environment first.  My development(and testing) environment was a WIN2003 server, Oracle UCM 10GR3, Oracle 11g DB environment, but  I am fairly confident that the component will run on just about any environment that the Content Server will.  We just might need to switch out some jars.

You may have noticed from the nav, that this site now has a forums section.  If you do encounter an issue, please feel free to post it so the support forum.  I’ll get an email and maybe be able to help.

Here’s the download link:

Amazon S3 File Store Provider for Oracle UCM

Posted in File Store, Oracle, S3, Stellent | Leave a comment

Yahoo Begins OpenID Support

Yahoo announced Wednesday that they will being supporting OpenID authentication.  This is obviously a pretty big deal for OpenID supports as now any of the 250 million Yahoo subscribers(including the 2489 members of yahoo’s intradoc user’s group) will be able to use their Yahoo accounts to sign in to other sites.

OpenID is a very cool concept that allows user’s to control and carry their own user name and authentication credentials.  You pick your ID, your authenticating provider and then can use those same credentials with any site that supports OpenID.

This is an excellent video I found on YouTube, explaining the process..OpenID according to Dave(no relation):

I really, really like the idea of being able to take your ID with you to any site.  It would make most of our lives much easier; one user name, one password.  Further I think as the process evolved, we’d find OpenIDs to be a reliable way to identify people on the web.  If I post on the Intradoc messageboard and then the Oracle ECM board, is there any way to determine that both David’s are the same?  Not really, unless I share more personal information in my profile. 

As great as all those things are I still have some reservations about OpenID.  I think there are a couple problems that in it’s present form prevent OpenID from being a fit for many business.

The Security Question

Fundamentally OpenID is a secure process and if your user’s select a reputable provider like Yahoo or Verisign there shouldn’t be an issue.  The thing is though that you have to ask yourself; how much do you trust your users?  They get to pick their authentication provider so there’s no way to ensure their authentication process is up to your organization’s standards.  Probably not a big deal if you’re running a blog/wiki/messageboard or some other social site.  If a users compromises their ID maybe just some spam posts from Nigeria, but how much access would you be willing to give them? If you can’t control the authentication process, would you let them administer or moderate your site?  Many companies have security and compliance standards, which I am not sure OpenID can meet given that thier users would control how and where they authenticate.

Advertising

The other thing I think is going to happen is that we’re going to start seeing(and perhaps we already are) ad-word advertising on the provider’s login pages and I think things will be very interesting when that happens.  Let’s say you’re signing in to Amazon or some other commerce site with OpenID, when does that normally occur?  Right before you’re getting ready to make a purchase.  Advertisers will have the ability to throw up a message the moment a customer makes a buying decision.  I am no online marketer, but I think I would pay a premium to reach customers who are initiating a purpose.  They’ve already made a decision to spend money, all I need to do is pull them away from the site they’re on and bring them to mine.  If I’m Buy.com, I’m getting OpenID ads that look at the referring site’s URL and if it’s Amazon, my message is “Forget Amazon, we’ll give you X% off whatever you were about to get at Buy.com”.  Maybe it’s a two sided coin, Amazon could do the same thing, but if I’m an online retailer, I think I would definitely invest in OpenID advertising if my competitors support it and wait as long as possible before I do.

Just needs to Mature

I think as OpenID matures and more major players like Yahoo begin to support it, these issues will be resolved.  If there was a way to some how validate that providers are implementing certain security standards and potentially even know what their advertising policies are, companies would have the ability to say “we support OpenID, but unfortunately your provider is an unknown to us”.

What do I know?

Let me know what you think.  I have to confess that I just recently set up my own OpenID and that most of my knowledge is from reading online.  If I’m way off base I’d love to hear from you.

Posted in Identity, OpenID | 3 Comments

Oracle Buys BEA

Wow..I have to admit that I didn’t think that one was going to happen.  Out at OpenWorld in November, the general conses from the folks I talked with was “Why does Oracle even want BEA?”.  Obviously it eliminates one of or the(not sure where IBM compares) biggest competitor in the Portal and Application server market, but they now have quite a bit of product overlap, especially with their portals.

Take a look at Oracle’s potential future Portal Product line:

Oracle Portal

Oracle Webcenter Framework(is it a portal? is it a framework?  I’m sure there’s a debate, but I’m including it)

BEA Weblogic Portal

Aqualogic Portal

I think things are going to be a bit confusing for a little while, especially if you are trying to select a portal application.  Which one has the brightest future?  Or will they all continue to be emphasised(at least in the short to medium term), like JD Edwards and Peoplesoft.

If I’m a BEA customer(which I am not, but Ironworks is a BEA partner), I would be pretty excited.  If the transition goes anything like the Stellent acquisition, you can expect a lull in product development for about a year as they get everyone settled and then a steady stream of new functionality and product road maps.  Support has been excellent as you reach the same folks as before.  Again I haven’t worked with BEA to have a comparison, but I really liked working with Stellent and so far I have have the same opinion of Oracle.

Posted in Content Management | Leave a comment

Blog Tagged

Billy Cripe from Oracle has put me and some other folks on “blog tag” notice.  I need to write eight things about myself and then tag eight others.  Unfortunately, I have to confess to not knowing too many other bloggers, so I think I am going to end up being a dead-end in the chain.

Anyhow here are eight things about me:

1. I’m a US Army veteran.  I was in the reserves from 95 to 01 and had a kick ass job as a broadcast journalist.  Despite being in the reserves I was actually pretty active and sent quite a few places(including a 7 month deployment to Kosovo in 2000).

2. I play the drums(poorly) and used to live in Baltimore, MD where I was part of a band called Modest Proposal.

3. My wife is a molecular biologist. 

4. I once hosted an all request radio show in Panama(see Army in item 1).  Panama was crazy for ‘Iris’ by The Go-Go Dolls in 1999.

5. Also Army related….I had the opportunity to briefly cross the border in to North Korea

6. I like many different types of music(except country), but if I need to get some work done there’s nothing better than the Beastie Boys.

7. My favorite author is Jared Diamond….I highly recommend “The Third Chimpanzee” and “Guns, Germs and Steel”.

8. I love Scotch, specifically the Isleys…Laphroiag is probably the most commonly available one.  They have a distinctive smokey peat flavor.

So that’s a little about me…sorry again for my lack of other blogs to tag..I’ll have to work on that.  Meanwhile Bex Huff has tagged 8 Minneapolis bloggers….wow…how many blogs do you read every day?  Perhaps he could loan me some to tag:)

Posted in Content Management | Leave a comment

Templating with Fragments

I’ve been playing around with an idea for a little while, one which I’m not actually 100% sold on yet, but I figured I would put it out there.  It has to do with Site Studio templates and how one might go about deploying abstracted, consistent HTML across all templates in a site.  Ideally what I’m really looking for is template inheritance, something to allow me to create a base template that I can then build other templates from and on top of.  Unfortunately Site Studio doesn’t really provide that kind of functionality, or at least does not have a method described to support it.

The current process for template development goes something like this:  Designers take their HTML and paste it in to a new Site Studio layout template, contributor areas are identified and regions/elements are added.  Functional areas of the page are broken out in to fragment controls.  It’s a fairly organic way of developing a web page, one which makes sense and is easy to understand by most everyone.  The problem for me though is that as multiple templates are added to the site, they usually employ a common structure and design of which usually a significant portion ends up having to be duplicated on each template.

A big deal?  It’s certainly not the end of the world, but perhaps there’s a more elegant method.

I’ve been tinkering with using fragments or more specifically fragment snippets a little differently then they are more commonly used right now.  Instead of pasting in the HTML directly in to the layout template like I normal, I start by creating a new “base layout” and in it I created a series of drop point, reference snippets for each of the opening and closing tags used in the structural formatting for the page.

Base Layout Fragment Example

As you can see from the table above, the fragment holds seven snippets which house the foundational structure of the template and could be re-used on every page in the site.

With the base layout fragment complete, I then created a sub layout which could be used inside the base layout’s structure.  Again nothing to fancy, it’s basically a div that contains a place to put a title and some content.

Container Fragment Example

This fragment, which I am calling a container fragment, also allows for an ID attribute for the container’s div to be passed in.  This is cool because when I added the fragment to the page I did it three times; twice next to each other in between the “Start of Body” and above “Body Divider” snippets and then once after the “Body Divider” snippet.  Using CSS I set the two upper container fragments to float side by side and lower one to take up the entire lower portion of the page.

So just to recap, I created two fragments both of which contain only HTML, added them to the page 4 times(1base fragment 3 container fragments) and interspersed the container fragments in beween snippets from the layout fragment.  Looking at the template in design view, you would see that the only HTML present is the HTML,HEAD and BODY tags that the designer adds.  All HTML has been abstracted from the template.

From there I added a region to the page, wrapping it’s open and closing region tags before and after the “Start of Main” and “End of Main” snippets.  With the region in place, I then went and added elements in between the various snippets.  Between the “Start of Title” and “End of Title” snippets(both in the containers and on the page) I added text elements.  In side the container, after the “End of Title” snippets, I added WYSIWYG areas.  More traditional functional fragments like static lists or navigation could also be placed in between the layout or container snippets also.

Once the region is in, content can be assigned and the layout template can be used to render pages.  Instead of having 5-10 similar templates with similar HTML though, with this design all HTML is added once and then can be re-used multiple times.  All pages should display in a consistent format and global changes can be made to the design of all pages from a single location.

So what’s the downside?  Well there might be a performance impact, it’s just not completely clear if it’s negligible or at what point it will become noticeable.  Fragment snippets are really just nodes in an XML file which are rendered using a XPATH expression and Site Studio’s ssIncludeXML IDOC function.  The couple fragments I’ve used in my example probably aren’t going to cause a problem, but using this design has the potential to add a great many more snippets to a template then one would normally see.  How many is too many, I’m just not sure yet….so far it doesn’t seem to be a problem though.

I’m going to keep evaluating this design and will have some follow up posts down the road.  If anyone has any similar stories, post a comment or send me an email, I’d be very interested to hear your thoughts.

Posted in Fragments, Oracle, Site Studio | Leave a comment

Fun with Content Server Localization

Oracle / Stellent Content Server provides some pretty robust localization support.  I’m often suprised how much functionality there is to support localized data.  Strings and dates can be returned in a variety of languages and formats all based on the user’s locale.  Schema/DCL data also support multiple locales, both through the javascript version of the lc function and also through display rules in the view.  The level of localization support and easy of use reminds me of what we tend to see from some of the European CMS vendors, who for obvious reasons seem to place a greater priority on localization.

The one issue I’ve run in to though is when developing web sites in Site Studio I find it’s hard to tap in to all of that wonderful localization functionality without changing the default system locale.  The problem appears to be that the localization is based on the user and since all anonymous users are essentially using the same account, they all appear to have the same locale.  I’ve read some posts on how to change the user’s locale by updating a cookie, either server side or by Javascript, but to be honest I’m not super crazy about that method.  Odds are everything will work fine 99.99% of the time, but what if a user has cookies disable or if the user is actually a search crawler which is ignoring cookies? It’s probably not going to work so well.

Enter the IdcLocale object

Changing the user’s locale during a service execution is actually an extremely easy thing to do.  Localization data is held in the IdcLocale object(intradoc.common package), which is stored during exection as a cached object named “UserLocale”.  If you wanted to access a user’s IdcLocale object, the syntax looks something like this:

IdcLocale MyLocale = (IdcLocale)context.getCachedObject("UserLocale");

Changing the locale take a couple more steps.  You first need load a new IdcLocale object specific to your locale and then you need to overwrite the old one.  Creating a new IdcLocale object is pretty simple, you use the LocaleResources object and call the static method, getLocale.  It takes a single argument, the name of the Locale you’re loading:

IdcLocale ItalianLocale = LocaleResources.getLocale("Italiano");

Once you have the new IdcLocale object, you only need to overwrite the old one and your locale is changed :

context.setCachedObject("UserLocale", ItalianLocale);

Putting it in action

I’ve put together a sample component which adds functionality for changing the user’s locale dynamically.  In tinkering with user locales, there are two customizations which I think can come in handy.

The first is customization is a filter attached to the ‘afterInitLocale’ event, which is fired right after the user’s locale is set during a service call and I’m pretty sure was put there specifically for changing the locale. In the component, the filter looks for a local binder value called ForceUserLocale. If it’s there and it’s a valid Locale name, then it swaps out the current user’s IdcLocale object with a new one. Post-switch, the service continues it’s execution evaluting the new Locale object.

The other customization basically wraps that same code in a new IDOC script function called setLocale. SetLocale takes a single argument, LocaleName, which is of course the name of a valid locale in the system. Calling the function immediatly switches out the user’s Locale with a new one. This is pretty cool if you’re working on a web page or template and wish to show the same or multiple strings in different languages.

Using the new setLocale function, the following code would display the same string on the same page in different languages:
<$setLocale("Italiano")$>
<$lc("wwPoweredBy")$>
<$setLocale("Italiano")$>
< $lc("wwPoweredBy")$>

Controllato dal sistema di gestione dei contenuti
Powered by Content Management System

Changing the Locale dynamically with a local binder value might not be the best fit for all implementations. If you install the sample component adding ForceUserLocale=Italiano to the URL will change the locale to Italian, which may or may not be undesirable. Nevertheless, I think the component demostrates some of the cool things you can do with the IdcLocale object.

The sample Anonymous User Locale component is can be downloaded here:
Anonymous User Locale Component

Posted in IDOC, Java, Oracle, Site Studio | Leave a comment

Site Studio Tips, Tricks and Hacks

I thought I would throw together a list of some of the things I do when setting up or even working with Site Studio.  Nothing too crazy or ground breaking, just some things I do to make life a little easier while I’m developing.

Use Real Names for Section IDs

Starting work on a new site, my first step is to go through and set up the known folder structure of the site.  This usually only takes a little while, but it helps me visualize how everything will work as I’m developing.  One thing that’s very important to me during this step and really throughout the build is to ensure I’m using logical names for the section ids and not just the default numerical ones that the designer will assign.  Down the road when debugging fragments or even reviewing content in the repository, numbers as section ids can be very confusing and will probably cost more time the it takes to just give them logical names.

Create a Templates Folder

When I am building out the site’s folder structure I also like to create a contributor-only templates section.  There I add a section for each template the site will use, actually creating the template and assigning it to the section during the process.  Often I will break up the template sections by how they are used, adding primary and secondary template parent sections.  If I have any html ready, I paste it in to the templates, adjusting any css, javascript or image paths during the process.

The templates folder allows me to get all my templates in and assigned to the site, but in a central location.  Templates can be added as a site asset, so this is a bit redundant, but having them in a folder allows me to assign region content, test custom properties and potentially navigation as well.

Use Fragments for Images, Javascript and CSS

When I start work on a site I usually have the luxury of receiving all of my html, css and some of my javascript pre-built from our user experience group which means I am not doing any serious HTML development in Site Studio other then some simple tweaks.  Since that’s the case, there’s no good reason for me to load what could be hundreds of individual site assets in to the content server.  It’s much easier just to load each set of assets in to fragments and then check them in that way.  In addition you can preserve any folder structure the assets already have, making tweaks to the template html a bit easier too.  Loading each asset individually is perfectly fine, but I thinks far easier and a little cleaner in the content server to load them in fragments.

When you save the fragments it’s assets are written out to the weblayout/fragments folder.  Once those assets are there, I just create a single “head” fragment which references the nessecary items from css and javascript assets, never actually referencing the css or javascript fragments.

One Fragment per Library 

I’m a fan of creating a new library for each fragment in my site.  I’ve done this differently in the past, creating more contextual libraries with multiple fragments, but I’m much happier now with the one fragment per library way.  Right off it’s much easier to manage fragment development with multiple developers.  Multiple fragments in a single library means that one developer can check out a library at a time thereby preventing other developers from working on other fragments in the same library.  

My biggest reasoning though has to do with change management.  If there are multiple fragments in a library all of them must be production ready to deploy.  You easily can find yourself in a situation where a change is occurring on one fragment, when a bug or another emergency change needs to happen on another.  If all the fragments are in the same library it can become a confusing mess.  If you stick with one per library you may have a few more libraries in the content server, but you’ll also have a great deal more flexibility.

Debug that JSP

This next part can be a little tricky and from an Oracle perspective is probably a bad practice.  Generally whenever I set up a new development environment also set up eclipse to debug the content server as well.  Bex Huff’s book “The Definitive Guide to Stellent Content Server Development” details how to configure eclipse for debugging so I am not going to cover that process here.  What I will talk about though is that if you are running a version of Eclipse with JSP support, you can also debug JSP fragments and layout templates just as easily as filters and service handlers.

This sounds great, but you have to remember that if you’re debugging and editing your fragments through eclipse, ultimately you’re also doing it in the content server’s area of the file system.  If you’re not careful this is an excellent way to loose your work.  If anyone else edits your fragment library or if they deploy your fragment through the Site Studio fragment administration page, any changes you’ve made on the file system will be immediately overwritten.  To counter the threat of loosing my changes, I make sure I always check out each item I’m debugging and frequently save my changes back to the fragment using the designer.  All that said, being able to debug with eclipse can make development so much easier the rewards far outweigh the risks. 

To set up JSP debugging, first follow the steps in Bex’s book to set up your eclipse environment and then just link the weblayout folder to your content server project.  From there you’ll find your fragment JSPs in the weblayout/groups/[your jsp enabled security group]/WEB-INF/fragments/[fragment name] folder.

Posted in Fragments, JSP, Oracle, Site Studio, Stellent | 6 Comments