Dropping More SharePoint Links into My Blog Bucket

Influenced by recent events, I’m taking SharePoint links off of my active TODO list. My strategy is pathetically simple: don’t do a thing with SharePoint until the next version comes out based on the forlorn hope that the next version will come with a big apology for all previous versions in the form of new, pronounced levels of usability and elegance. Meanwhile, these:

My Humble Java

rent a car bulgaria
Buy this book at Amazon.com!I am satisfied with my grasp of Java. Grown men walking around in a cheesy t-shirt with a 1980s-style iron-on transfer of James Gosling stretched across their chubby bellies will quickly scoff at my low expectations of just how much Java can do. This is what I want Java to do:

  • Load Excel spreadsheets from the command line and ‘shred’ them into XML files written to disk according to a declared specification (in another XML file).
  • Load XML and XSLT files from the command line and generate more XML files singly or in batches.

What you really see here is that I want Java to process XML and Office documents (in a Linux environment). You do not see any desires to run my code in some kind of massive, memory-leaking application server (from IBM). You do not see any desire to use famous design patterns to connect to a database with a half-dozen configuration files. No desire for writing a GUI destined for the Web using graphical drag-and-drop metaphors that “protect” me from JavaScript and XHTML.

My extensive investments in .NET technologies and a PHP framework leave me with ‘humble’ Java-related goals. Back in 2006, I expressed amazement with writing for the command line in .NET—well, here I am again with Java. I know Java programmers will scoff again at this but I actually condescend to the Java language through C#. I see Java as small and ‘cute’—while most “real” Java programmers work in teams of three or more tending to massive, enterprise-wide “solutions” with girders of tiers creaking and groaning.

The table below contains online resources that led me to this tiny morsel of satisfaction:

Java interactive command-line input At the time of writing, I have not yet used the technique mentioned here: “While Java is generally used to create applets, servlets, and general-purpose applications, you may occasionally need to create applications that interactively communicate with a user at a command-line…”
Shell game: Read user input directly from the command line in Java Another classic from 1999.
The Java XPath API

This went a long way toward helping me write a generic utility class that returns a NodeList with XPath queries. My .NET investments in XML served as guidance—condescending guidance.

It was here that I learned that some Java libraries require try-catch blocks (instead of less verbose if-then ‘gates’): “Notice also that these methods can throw several checked exceptions that I must declare in a throws clause…”

How to load a jar file at runtime JAR files are like DLLs. I can already easily load DLLs using my poor-man’s version of Windows Workflow Foundation. So naturally (and condescendingly) I looked for the way to do the equivalent in Java.
Dynamic loading of class and jar file “To load a class dynamically is straightforward. Just make sure the classpath is defined when your program starts up.” The challenge of understanding the Java ‘class path’ was not so small and cute—more on this below.
Jar Class Loader The obligatory Source Forge project that is supposed to my timesaver. The Apache Foundation surely has to have something here.
URLClassLoader (Java 2 Platform SE v1.4.2) In case Source Forge and my Apache friends fail me, I might have to writing a little class loader myself. I’m pretty sure URLClassLoader will be involved.
StringUtils The Apache Foundation is dead serious about Java: “The Commons is an Apache project focused on all aspects of reusable Java components.”
Packaging Programs in JAR Files Eventually I had to calm down and figure how to run one JAR file—instead of working on loading multiple files. In “Adding Classes to the JAR File’s Classpath,” my assumption was that I would get some idea why –classpath was being ignored and the entry in the manifest was not…
Java Tip 105: Mastering the classpath with JWhich—JavaWorld “Whether they would admit it or not, beginner and veteran Java developers alike have at some point (usually at the worst possible moment!) been tricked by the onerous classpath. As the number of dependent third-party and user-defined classes increases for an application, and the classpath becomes a dumping ground for every conceivable directory and archive file, it’s not always obvious which class the class loader will load first.”
Apache POI—Java API To Access Microsoft Format Files

Last, but not least: “The POI project consists of APIs for manipulating various file formats based upon Microsoft’s OLE 2 Compound Document format using pure Java. In short, you can read and write MS Excel files using Java. Soon, you’ll be able to read and write Word, PowerPoint and Visio files using Java. POI is your Java Excel solution as well as your Java Word solution. However, we have a complete API for porting other OLE 2 Compound Document formats, and welcome others to participate.”

This project is actually mentioned in Java Posse #215.

“SyncToy, File Synchronization and the Microsoft Sync Framework” and other links…

SharePoint - printing - DispForm.aspx

Liam Cavanagh: “At the core of SyncToy is Sync Services for File Systems. Although initially created as a tool to enable photographers to keep images in sync over devices and computers, users have since started to use to synchronization other files such as documents, browser favorites, multimedia, spreadsheets and for some corporations even large CAD drawings. You can think of SyncToy as a nice UI wrapper built on top of Sync Services for File Systems.”

“Learn how to develop on SharePoint”

Marc: “For the first time in a long time, I have some down time so I am going to try to block of some time in the coming weeks to do so. Where to start? Paul Andrew blogged about a series of 10 MSDN webcasts covering SharePoint for .NET Developers.” Not only can you not download these videos, but you also must register yourself to view the “past event”… Update: It turns out you can hunt and click for downloadable versions in a Silverlight-based site for SharePoint developers.

Orbeon Forms is a Java-Heavy Solution for XForms Development

To install Orbeon Forms you need an application server that runs on Java version 1.4.2 (or later) and implements the Servlet API 2.3 (or later).” The FAQ states that “You are free to use Orbeon Forms only for its XForms functionality, but you can also leverage more of Orbeon Forms to build your forms-based application.” It seems convenient to have a “lite” version of Oberon Forms just for XForms stuff.

Microsoft’s Jeff Sandquist on Evangelism and other links…

Channel 9's Jeff Sandquist makes a pointMicrospotting.com: “Evangelism is not cheerleading. It’s not about raising your arms up and saying ‘This is awesome!’ Evangelists know where the warts are —they know the strengths and the limitations. The right evangelist understands what competitors are doing better…” I have downloaded hundreds of videos from technology evangelists—and I have the folio full DVD-R discs to prove it—and there are less than a handful of “right” evangelists. Number one on my list is Mike Taulty, check out his MSDN UK archive. Next is Scott Guthrie—his consistent Blog writing for Microsoft has no superior—this is a raw, real supremacy rarely seen among managers in corporations. The ASP.NET team seems to have broken away from the Channel 9 umbrella (once led by Jeff Sandquist) and have very interesting videos—in fact, this Chris Pels video, “How Do I: Determine Whether to Use a Web Site or a Web Application Project,” is one of the few videos I have ever seen that evaluates Microsoft products in a historical, comparative context.

Most evangelism seals the new, “cool” functionality in a vacuum and does not cover the very hard topic of transition from legacy in a “brown field.” It is easier to talk about the “green field” for elite programmers who have the luxury of working on brand new projects—and for the beginning programmers who have little experience (and legacy baggage). It takes command and mastery to actually place a product in historical context very quickly. Adding a historical dimension often adds human faces to technology which makes the details of the technology easier to remember.

“Vulnerabilities Could Expose Broad Range of Java Apps”

Dark Reading: “Researchers today revealed two new security vulnerabilities in the Spring Framework—a commonly used, open-source environment for developing Java applications. …The vulnerabilities could affect ‘countless’ enterprises and applications that use Spring, according to researchers at Ounce Labs, which makes source-code-analysis tools. The design flaws may eventually be found in other Java development environments as well, the Ounce researchers say.”

“Cuil’s 3 big mistakes”

Valleywag.com: “The launchpad implosion of Cuil on Monday is a lesson for startup founders. Cuil had a solid hook: A search engine with more pages than Google, built at a fraction of the cost. But by Tuesday, Cuil was The Little Search Engine that Couldn’t. What did they do wrong?” Back in 2006, we came out with “The Dunn Phraser Gun: Ed Dunn of Fooky.com.” Many of the complaints mentioned in that interview in 2006 are still going on in 2008.

Redesigning My XML-over-HTTP Data Access Layer for LINQ

To people firmly entrenched in the world of SOAP Web Services, a Java-centric, IBM-style SOA architecture—one big-ass server for multi-million requests per minute, my data access layer is utterly appalling—humorous even. I guess I’m lucky because I am unable to understand just how appalling it is. I was even crazy enough to write about (pieces of it) on my green-colored company web site—“Songhay.NET: An Overview of the Songhay Data Namespace.”

One of the craziest bits in the Songhay Data Namespace is a strategy in the form of ICommandHandler. This ‘Command Handler’ is frighteningly biased toward XML over HTTP scenarios. Using XML over HTTP (instead of SOAP XML) is like saying “I’m unemployed” to the Java Posse (just kidding guys). It’s like saying “I am complete idiot” to the architects of WS-Security (not really kidding here). So, now that you know what you are dealing with, here is the existing scenario (from the cloud into the data layer):

  • A strange, wild XML message arrives at the façade using the ICommandHandler strategy. The message could be a string, a navigable document (or any other type for that matter) stored in the DataCommandInput.PostData property.
  • The incoming post data is validated. My preference is to make a few XPath assertions against a navigable document.
  • The validated data might be parsed into a parameter array that will be used with a parameterized SQL string. (My Songhay.Data.Common namespace is designed to handle this.)

Now more crazy stuff: before LINQ was released I wrote SQL queries in text files and stored them as resources to be compiled in my data access assembly. This must be more stupidity for those who are comfortable with using stored procedures. But those people are likely writing a set of procedures for one big-ass system—their database is more likely to be huge and unique. In my little world, my databases are numerous, “small” (less than one million rows) and they have the same schema. So, for the sake of maintainability (over performance), it is better (for me) to have parameterized procedures compiled in the code so it can be reused for different databases of the same schema.

What LINQ to XML does for me is eliminate the need to write SQL statements to be compiled in an assembly. This is actually crazy. Implied here is something very daring: LINQ can replace all of the functionality I need in Transact SQL for SQL 2005—even the great, new XML functionality in SQL Server 2005. Here are some examples of this great functionality (from my notes):

This new work promises a few things:

  • I will never have to work with DataSet objects again (unless I have the burden of taking some job in a legacy-mired .NET shop).
  • All of my cute ways of generating XML in transact SQL will be replaced by LINQ to XML (System.Xml.Linq). This promises to be a clear, simple, powerful technological victory by Microsoft. No cheating. No politics. These victories are rare and should not be underappreciated.
  • A new design with LINQ will push my ICommandHandler façade into further isolation (probably into its own assembly). This allows me to improve upon (or simply unplug) my crazy code.

The acceptance of LINQ in my life has huge ramifications. Just for starters, I am willing to build a Microsoft-based ‘data server’ in the cloud (instead of the offline design I have now) instead of something on Linux simply because I am convinced that a LINQ-based data access world is easer to maintain that any other options I have seen. In order to save my time, I am even willing to pay a premium for this efficiency instead of struggling with something Miguel de Icaza and his posse puts together years later with Mono and MonoDevelop, an IDE, by the way, that is not guaranteed to work on my non-OpenSUSE flavor of GTK.