Archive for Tech

Oh hai gaiz, Im in Myamee!

// February 5th, 2009 // No Comments » // Software, Tech, Web

Guess what?  It’s dotCMS conference time again.  Good times.  I have traveled well, and am ready to do some liveblogging.  For what it’s worth, this year it’s more of a training conference, and I’ll be in the developer sessions.  I’ll pass on info as it’s useful, and will follow up in the end with some of the most useful things they showed.  They also changed the format this year, it’s a little smaller, and rather than being more of a show and tell conference, they’re trying to cater to more of us returning users with this involved how-to stuff.  Looking forward to it.  And to give you a taste of what’s to come, tomorrow is all about the plugin architecture.

PICT1754

I’d like to take a second to remind everyone that you can always join us in the IRC room, or on the mailing list, and there’s also the forum if you ever need help.  I’ll have a Flickr set started soon too.

Getting started this morning in the structures and relationships session.  I’ll try to limit updates to the time when we’re in breaks.

There are three different types of structures to be aware of: content, system, and widget structures.  Content structures are your normal, regular use structures.  System structures are ones that are built into the system, like Web Page Content, and Events, that tie into how the CMS (Content Management System) actually functions, so you can’t delete them.  Widget structures allow custom, dynamic elements, and are frequently used for creating a UI for macros (and as a result, are awesome).

Setting up a structure gives you the ability to tell the system what page to use for a detail page.  This detail page should be designed to pull in the content inode to display it.  This is important for use of things like the permalink macro (or trackback macro).  You can also set up a default review time on content.  This is good for anything that can be time sensitive, but should be used sparingly in my opinion, lest you get inundated with alerts to review content.

Some notes on fields: text fields are limited to 255 characters.  Text fields are the standard, one line fields, similar to what you use on forms for names and addreses.

Ate lunch.  Chili’s sucked, as normal.  I’m pretty sure I’ve never eaten at a Chili’s and been the least bit impressed.  Andres is going to go over setting up dotCMS an the Amazon EC2.  Basically, this is a way to host or set up a dev instance that can be a cheap alternative to a hosted site.  The pricing can be cheaper or more expensive than normal hosting, mostly depending on usage.  If you are looking into this, the ElasticFox plugin for Firefox is a must have for managing your servers once you’ve signed up for an account.  It is not recommended to run a site using a small instance to run anything besides a basic test server.  Small instances run ten cents an hour.  Any real site should look into large instances.  Using elastic IPs, you can point a domain name at your instance to use an actual domain name with the hosting on EC2.

For interested parties, I got a set up on Flickr for photos from the conference.  I totally have to give them credit on the conference swag too, the duffel bag was an awesome touch.

A Day with dotCMS 1.6.5

// December 2nd, 2008 // 5 Comments » // Software, Tech, Web

It was long coming and well worth waiting for.  On Halloween dotCMS released version 1.6.5, and feeling confident in the code base release, we finally tested and rolled out the upgrade on our production servers (I try not to jump on updates right away, just in case there are any surprise bugs that need to be worked out).  Naturally, we tested things out on our dev box first, were satisfied, and just before Thanksgiving we finalized the upgrade on our live server.  I can say with confidence that this upgrade has proven to be a nice kick in the butt, without a single hitch so far.  Even the improved edit mode interface hasn’t drawn any complaints for being “different.”

A peak at the new dotCMS 1.6.5 edit mode

A peak at the new dotCMS 1.6.5 edit mode

I’m among the people who think that 1.6.5 is really more like a 1.7 in that it’s not just a minor patch of the 1.6 codebase – there’s a lot of new crap.  Among things to look for:

  • WebDav is all new
  • Edit Mode is all new
  • Widgets have been added
  • Updated TinyMCE
  • Caching is now in memory instead of disk
  • Lucene index has been moved
  • PDF page output macro
  • A whole crap ton of other stuff

All in all, it’s like 322 different changes, fixes, and additions. Nothing to sneeze at.  And it all matters.  First off, compared to 1.6.0.10, it’s substantially faster on both the front and the back end thanks to the improved caching.  And it flat out blows away 1.5, so if you’re still lingering on that version, I suggest an upgrade pronto.  The speed is coupled with a less noisy log as well, making it easier to tell actual errors from random chatter from the system.  They went through and completely refactored the WebDav interface, so if you use it for bulk adding files or live editing, you should notice a substantial boost in speed there, as well as the ability to autopublish files uploaded through it (great for photos for photo galleries, or live editing things like CSS (Cascading Style Sheets) or VTL files).  The upgrade process itself didn’t feel overly painful either.  One thing that has been a constant complaint was that the system was a little overly painful to actually upgrade, especially from much older revisions.  What I can say is that going from 1.6.0.10 was about the fastest and smoothest upgrade I’ve done so far (that wasn’t just a simple maintenance patch).  SVN update, copy back some server settings, ant clean and deploy, reindex, and we were pretty well off and running (on top of that, I was also switching SVN branches as well).  I could have probably even gotten away with using my old Lucene index, but, fresh system seemed to call for a fresh index.  Interesting side note, I was talking with Chris Falzone over at Edinboro, and he thought upgrading from 1.5 straight to 1.6.5 proved easier than going from 1.5 to 1.6.

My apologies for no real stats on this on my end, but prior to rolling out the upgrade live, I did do some load testing against our 1.6.5 test server using Apache JMeter, and the results were excellent.  I was able to run up about 100 threads within a 30 second time period without drops.  Actually, the machine I was testing with crapped out before the server in some cases.  I also saw some stats that Jason, their lead developer, shared on the mailing list after testing it with Siege that I’ll pass on:

I wanted to share some performance numbers with you.

The test was run on a server with 8 GIGs Ram Dual Quad-Core Xeon E5320 / 1.86 GHz processor running the latest Ubuntu LTS. The server had Postgres 8.3 install locally and Java 5 64bit.

dotCMS configuration

JVM 1536M of memory for the start and max of the heap. The connector was set to 380 Max thread and the Db had 390 max db connections.

The benchmark tool used was siege. We ran siege on 2 separate boxes each with 180 concurrent connections and 0 delay between the connections, so the traffic was a full 360 users attempting to hit the server throughout the entire test. For those who use siege this was the command siege -f urls.txt -r 100 -c 180 -b -i. I will attach the urls used for the test. They were a mix of urls from a starter site. The test was of course performed on our lan. There were 3 switches between the server and the machines running siege.

The total test results were
Total Transactions : 35987
Availability : 99.97%
Average Response time : 0.85 seconds
Total Concurrency : 313.12

Here are the individual numbers from each siege machine.
Transactions: 17996 hits
Availability: 99.98 %
Elapsed time: 97.50 secs
Data transferred: 145.27 MB
Response time: 0.85 secs
Transaction rate: 184.57 trans/sec
Throughput: 1.49 MB/sec
Concurrency: 157.58
Successful transactions: 17996
Failed transactions: 4
Longest transaction: 28.39
Shortest transaction: 0.00

Transactions: 17991 hits
Availability: 99.95 %
Elapsed time: 97.65 secs
Data transferred: 145.22 MB
Response time: 0.84 secs
Transaction rate: 184.24 trans/sec
Throughput: 1.49 MB/sec
Concurrency: 155.54
Successful transactions: 17991
Failed transactions: 9
Longest transaction: 29.46
Shortest transaction: 0.00

We also have some similar numbers with 1.6.5 running on VMWare ESX Server. We will be sharing them soon here. Need to gather all the compiled data for it and specs for the test.

On of the two big, important updates you’ll see a lot of is the much improved edit mode interface, seen above.  Gone are the clunky, vertically columned edit, preview, and live mode buttons.  They’ve moved to the top, and been replaced by a clickable side bar that lets you hide the whole side console completely.  Some much needed UI facelifting was applied with nicer icons and a splash of color.  On the page, container interfaces are squared up nicer, and dropdowns were (mostly) eliminated in favor of one click editing, sorting, and deleting.  That doesn’t sound like much, but if you did much with Flash, you probably fell prey to the dreaded layer monster, where the popups would pop “under” the Flash interface, making it hard or impossible to click the options there.  All in all, the changes were largely cosmetic, somewhat functional, and much needed.  It just feels a little more put together now.

Example of the Widget Modal Window

Example of the Widget Modal Window

The other big change is somewhat related, and that’s the addition of widgets.  Widgets have been discussed before, usually as pieces of Web Page Content that are just designed to be dynamic.  This is all well and good, but it didn’t really allow for proper segmentation of functional elements of a site.  Now, widgets are properly defined with a structure.  You set them up like structured content, except your fields basically serve as the variables for a macro.  Think of it as a UI for macros.  The primary difference being a macro can be embedded in content, while a widget goes in place of content.  Why this is so awesome is because one, like I said, it allows you to properly segment dynamic tools for your site, and two, even though a macro is only like a line of code, we all know that for some people one line is just one line too many.  This let’s them fill out a simple, non-threatening form, and see results.  The interface itself is cool, as adding a widget brings up a nice little modal window with all the widgets defined available right there in the page.  Plus, any container can be widget enabled, so that you can make containers fairly multipurpose, in the event that you want one container on a particular page to do something different, but still adhere to a basic layout option.

Speaking of the modal window, I would love to see this applied throughout the site to get rid of popups all together.  Get rid of the content search popup forms for reusing content. Use a modal window for quick adding or editing of content.  It makes people feel connected when they don’t physically have to juggle windows, especially when in some cases (like adding a picture to content), the popup adds information to a different popup below it, and it doesn’t go away when you click it, so you don’t actually get any feedback from the system that a change has taken place.  So there’s a wishlist item from me.

What makes this so worthwhile is that there is a definite maturing of the code base taking place.  The attention to the UI of edit mode, while not changing substantially in a functional way so much, shows dotCMS becoming a much more professional system that cares as much about the user experience as the functionality.  This is an excellent sign as we get ever so closer to what should be a real dam breaker of a version 2.0 next year (hopefully), and the rate of progression is fairly steady.  Like I said, rather than being 1.6.5, this would really almost qualify as a 1.7 in my books, but hey, I don’t do the versioning.

Extending the pageContent() Macro in dotCMS

// September 19th, 2008 // No Comments » // Software, Tech, Web

Here’s my latest nugget of info to help you extend dotCMS.  This isn’t anything complex by any stretch of the mind, but it should be a little time saver for those of you looking into doing blogs, archives, or anything else where you have several pages of content to flip through.  By default, dotCMS comes with a nice little macro called pageContent() that allows you to pull in a list of content, and get a set grouping of results based on where they fall in the sort order.  The only failing was that you had to write your own way to go back and forth with results.

No longer!  With this simple, handy macro, you can automatically get forward and backward navigation after you’ve written your foreach() loop for the pageContent() results.  It makes use of a few of the variables that are created when you run pageContent().  You can supply your own text for the navigation links, as well as give it a custom class name that will automatically be applied to all the elements so that you can format it as you wish.  The code for the macro itself follows below the example.  Here’s a sample of it in use, and what it looks like:
#set($showPageNum = "true")
#set($pageLinkVar = "year=${yearVar}&")
#pageContentNavigation("$page")

Example of the navigation macro

Example of the navigation macro

Here’s the code to get you going.  Just paste it into your /[$DOTCMSROOT]/dotCMS/WEB-INF/velocity/dotcms_library_ext.vm file, or wherever else you’re loading your custom macros, restart the server (if needed), and get going.  There are any number of ways you can modify it to suit your needs, so go nuts!  You can copy the code below, or download the pageContentNavigation_macro.vm file.

  1. ## Macro:       pageContentNavigation()
  2. ## Author:      Michael Fienen
  3. ## Date:        08.09.19
  4. ## Version:     1.0
  5. ## E-mail:      fienen@gmail.com
  6. ## Website:     http://www.supersatellite.com/
  7. ## Description: Creates a "Previous/Next" style navigation after calling the pageContent() macro
  8. ##
  9. ## Required Parameters:
  10. ##     $currentPage  - Integer value for the current page number.
  11. ##
  12. ## Optional Parameters:
  13. ##     $prevPageTxt  - Text for the previous page link. Default: "« Previous Page"
  14. ##     $nextPageTxt  - Text for the next page link. Default: "Next Page »"
  15. ##     $showPageNum  - Show the page number between the navigation links. Default: "false"
  16. ##     $pageLinkVar  - Any necessary parameters to pass to the page for the query. Should end with an "&".
  17. ##     $pageVarName  - Variable name in the URI (Uniform Resource Identifier) for the page number. Default: "page"
  18. ##     $pageNavClass – Customizable CSS (Cascading Style Sheets) class name for the navigation and its elements. Default: "pageContentNav"
  19. ##
  20. #macro(pageContentNavigation $currentPage)
  21.   #if(!$UtilMethods.isSet($pageVarName))
  22.     #set($pageVarName = "page")
  23.   #end
  24.   #if(!$UtilMethods.isSet($prevPageTxt))
  25.     #set($prevPageTxt = "« Previous Page")
  26.   #end
  27.   #if(!$UtilMethods.isSet($nextPageTxt))
  28.     #set($nextPageTxt = "Next Page »")
  29.   #end
  30.   #if(!$UtilMethods.isSet($pageNavClass))
  31.     #set($pageNavClass = "pageContentNav")
  32.   #end
  33. <div class="${pageNavClass}">
  34.   #if($hasPreviousPage == "true")
  35.     #set($prevPage = $math.sub($currentPage,1))
  36.   <span class="${pageNavClass}Link ${pageNavClass}Prev"><a href="$VTLSERVLET_URI?$!{pageLinkVar}&amp;${pageVarName}=${prevPage}">$prevPageTxt</a></span>
  37.   #end
  38.   #if($showPageNum == "true")
  39.   <span class="${pageNavClass}Num">$currentPage of $totalPages</span>
  40.   #end
  41.   #if($hasNextPage == "true")
  42.     #set($nextPage = $math.add($currentPage,1))
  43.   <span class="${pageNavClass}Link ${pageNavClass}Next"><a href="$VTLSERVLET_URI?$!{pageLinkVar}${pageVarName}=${nextPage}">$nextPageTxt</a></span>
  44.   #end
  45. </div>
  46. #end

Getting My Guru On

// September 3rd, 2008 // No Comments » // Tech, Web

Like I mentioned, .eduGuru is sucking up a lot of my writing time right now.  So, for those of you missing out, here’s some of the stuff I’ve thrown down the pipes over there.  I usually manage a post a week, with several ideas currently in the works.  So much writing, so little time…

Google Chrome Is Not What You Think

Google Chrome Comic ScreencapThe web design world let out a collective cry yesterday.  To some, it was a squeal of delight.  To others, it was a groan of despair.  At issue was Google’s new brainchild (and latest step towards WORLD DOMINATION), Chrome.  If you have been hiding in a hole since Labor Day, Chrome is Google’s attempt to enter the web browser market by dropping a “lightweight,” WebKit based browser designed to function more efficiently in an increasingly modern web environment (while at the same time trying to drag us kicking and screaming back into the browser wars that defined the late 90s).  They made a bit of a goof in their release cycle, and let the cat out of the bag a bit early the other day (it could have just as easily been planned to stir the pot for the couple days leading up to the Beta release on the 2nd).  Like many things Google related, the idea is quite idealistic, and has a ton of potential.  But just the same, new browsers always pose a number of issues.

Read the rest of this entry »

Getting Synthy with Virtual Tours

PhotoSynth ScreenshotThose of you who have kept up with some of Microsoft’s new toys (or who read my Twitter), have undoubtedly heard of a new little Seadragon based photo interface they have been working on in conjunction with the University of Washington called Photosynth.  This new spatial photo organization system sent the tech word abuzz when news, video, and a tech demo began passing back and forth across sites like Digg and Slashdot.

Read the rest of this entry »

E-mails, E-mails Everywhere and Not a One to Spam.

Email Obfuscation Code ScreenshotIt was brought to my attention the other day that there are some concerns about e-mail addresses published on our college’s web site and the effect it has on spam.  It turns out the filters here run through about 10,000,000 emails a day, about 7% of which are passed on as being actual, legitimate messages.  We are not a huge campus, but I’m going to guess that many of you would see a similar ratio.  Naturally, this has brought up conversation of obfuscating e-mail addresses.  We’ll set aside the “closing the gate after the horse got out” metaphor for now, because techniques can always help prevent spam from hitting new addresses, so at least that way we can lighten the load for our new users.

Read the rest of this entry »

Here’s a Big Fat Digest

// August 12th, 2008 // 1 Comment » // Brain dumps, Creativity, Tech, Web, Writing

Okay, here’s a summary post to cover a bunch of different crap.  Turns out I’m very busy lately, and there have been some changes that will probably impact my normal blog posting routine.  I know… you’re heartbroken.  Now, I’m fully aware that I have no routine as it is, but I aspire to, and those aspirations are being interrupted somewhat.

So, the first big news is that I am now blogging “professionally” for .eduGuru, which is a web technology development blog sorta thing for higher education.  That means things that I used to talk about here will probably get diverted there.  Now, generic web stuff I’ll still post here, as well as things like dotCMS guides and my personal stuff will be here, so don’t panic or anything.  If anything, it means stuff around here will be less dry, and I’ll get to tickle your funny bone more.  And believe it or not, my first post is already up at .eduGuru.  I invite you to go read it, of course.  Here’s a snippet:

Is Hosted Search Really Ready for Prime Time?
Google Mini Summon Ninja ButtonIn my years that I’ve now spent in higher education, one universal truth I have found is that nothing quite moves a project along like when someone much more important and much less web savvy than you deems an issue worth addressing.  Such was the case only a couple months after I had started at the university, when the Director of Marketing noticed that new information she had put up on the site wasn’t coming up in search results, and the results that were hitting weren’t particularly relevant to the topic in the first place.  Thus, a mission was born, to find a way to make our search better, and to do it NOW.  That’s the other thing about people higher up than you, when they say jump, generally you jump…
[read the rest of this at .eduGuru]

Naturally, that will probably appeal to all two of you.  Something more interesting, however, is that I have a new play idea I am currently researching.  It’s the sort of thing that I feel has the potential to be great, too.  I just got the memoirs of the chap that’s at the heart of the story that I finally tracked down on interlibrary loan (I only found one copy for sale online, and it was over $200).  I have one other book that I need to track down a copy of as well.  Hopefully it will be everything I expect.  I will give you more information once I have a better idea of if it will pan out the way I hope it will.  Research must come first though.

I relaunched Penpedia tonight.  I decided Drupal was a little too robust for my needs, and I don’t have time to learn it to a degree to really leverage its power well.  I’m like a monkey with a jackhammer when it comes to Drupal.  Wordpress, on the other hand, I know inside and out, so I switched to that for the new system.  I was lazy and did not design the theme, though I plan on doing some work to customize it a little in the near future.  So if you’re a fountain pen person, go give the new site a look-see.

Brandon showed me a cool site the other day I’d like to share.  It’s an online stock trading game called UpDown.com.  Basically, it’s a total nerd type game.  Think fantasy football, only with stocks (but I have a fantasy football league going too).  You start with a million bucks, and see how well you can play the market.  This sounds stupid, only it isn’t.  For one, it’s actually kinda cool, because you really are fighting the system, and you have limited time to do it (the stock market isn’t open 24 hours a day after all).  Plus, it can help you get an idea of how to play the market, should you want to do it for real later, so it’s great practice, especially for you kiddos out there who actually understand the only way you will survive retirement is to have your own money.  So go check it out.