Archive for December, 2008

Is OEM A Developer/Programmer Skill?

I was reading "OMG… Ford Motor Company Admits They Are Just An OEM" over at Bex Huff's blog and I started thinking about the concept of OEM. I suppose developers act in a sort of OEM capacity every day.

I take jQuery and make it part of a larger solution. I might throw in some JSP. Perhaps I will use a little JDBC. And maybe I will decide to run it on a Windows platform. There, now I have covered the gamut from "free" to "for pay" and rolled it into a single solution. Now I wrap it with support, you know, so I can say I actually provide something more than a software dating service.

So far this does not seem like too much of a stretch to me. Let's go one level further down the stack and get a little more fine grained about our OEM discussion. Something further down than say products or projects and talk about methods and classes.

If I was a fairly new guy/gal (I'm a guy, and I don't plan on switching, not that there is anything wrong with being a gal, but I was trying to be PC, and how about we just move on, ok?), and I wanted to create a component that added a new navigation element to the menus in Content Server what would I do? Well, I AM new right, so I do not have this memorized. I hit google.com, live.com, pick your poison. I happen upon a recent article by John Sim, right about here. John talks about and shows code illustrating how to accomplish this task. I think finding, acquiring and making this work in your overall solution is a skill.

Let the flames begin. Some people call this a copy-monkey, no brains, couldn't figure it out for yourself, code PLAGERISM, etc., take your pick. That's all fine and dandy. I call it a skill. If I can get a person in an interview to demonstrate that they can exercise several avenues to find solutions, acquire and adapt these previous solutions into our current problem set and produce results for my paying customers I will hire that person every day of the week. Oh, and some people also call this ability to draw on previously solved issues something else…what is that…ah yes, experience.

I think this post was sufficiently random so I guess I will call it a day.

Using Java Server Pages With Content Server – And an Example

Setting up content server to execute a JSP (Java Server Pages) is relatively simple. There should be some amount of caution in deciding the Security Groups to enable for JSP execution. With a JSP you can very nearly do ANYTHING, so you want to make sure only trusted sources can check-in and execute as JSP in your content server.

Great, now that the marketing message is out of the way we should get down to business. Just how does one JSP enable the content server? Simple. In your admin server under general configuration place a comma separated list of Security Groups that allow JSP execution. This comma separated list should have no spaces. This list represents security groups which allow the execution of java server pages. Technically, you can check your JSP into any security group. But only those which are checked into these specific security groups will be allowed to execute.

If you will be working with Java Server Pages you will want to be aware of the internal tomcat server log location. These logs are very handy for troubleshooting JSP errors. A JSP checked in as a normal piece of content AND a JSP checked in as a part of a Site Studio site will both record errors here. These logs are located here:

<content server root>/data/jspserver/logs

You can download and try out this Sample JSP for Content Server.

Alphabetize or Sort Navigation Menus

The other day I was staring at the Administration menu trying to find the ‘Admin Server’ menu item. I am embarrassed to admit that the lack of alphabetical ordering in the menu list causes me to spend a lot of time spacing out starting at the Administration menu looking for the Admin Server menu item. Way too much time, unfortunately.


I have tired of this act for the last time, so I set out take a crack at creating a component that would reorganize the menus in alphabetical order. Originally, I was most interested in the Administration menu, but in the end the code just as easily allows for all the menus (those created by navBuilder) to be sorted.


This was the most unobtrusive way I could figure out to do this, and it seems to perform quickly enough on my machine (famous last words), but I could certainly imagine there are faster ways to accomplish this. I suppose there could be some kind of sort on insert of the menus, etc., but again, this was the fastest time to market effort I could come up with that works without a noticeable rendering deficiency.


The short discussion of how this gets done starts with an override and super include of ‘custom_finish_layout_init’. Then we set the load order to something really high so that our code takes effect after everything else. I did not do this the first time and the menu for configuration migration utility kept getting added in after the sort.


After that we need a function that takes a menu id and performs the sorting. So, the first problem really is not the sorting, it is the fact that this include takes place within a JavaScript function. This means we cannot just declare a function. To get around this I create JSON Object and give IT a function. Then we use this object to make our sort calls.


Anyway, I hope there were some interesting things in here and you might find this useful.


19NOV09_v2_AlphabetizeMenus.zip