Wednesday, February 24, 2010

CRUD matrix and the value add

For a quick definition of a CRUD matrix visit Wikipedia. So how does a matrix help in process design? It helps from the very beginning. Starting with swimlanes, PPT, or Visio process designs, it can help you define your DAL. One thing I found handy when doing the matrix and process design is to have Excel open. This will allow you to put down some generic stored procedure names for DAL definition.

As a quick side bar, why stored procedures? It really helps with security. It's harder to crack a DB when using stored procedures than a select *. Plus it helps with data integrity. You have a defined data set going in or out. We create a procedures based on the CRUD. One for each letter.

Step 1 for us, create your header in Excel with 6 columns: 1. Table Name, 2. Drop Table, 3. Create, 4. Read, 5. Update, 6. Delete. In the first column, if you already have a DB and tables created, list out all the tables here. If you have not created a DB yet, this is perfect. Start with what you think you will need, for example, Project table, user table, customer table, project invoice table, user department table, etc....I think you get it from here.

Next, draw out some swimlanes, my suggestion is 3 lanes, Process, DB, and UI (Visio works perfect for this, but PPT works good too). Let me just note, this isn't perfect swimlane theory here, this is just a brief look at a way. In the top lane, map each process step. We are not putting a lot of detail. This is 10 mile up view. Step one may be Create document (manual task), step two is publish document to SharePoint (automated task), step 3 is write document data to DB (automated task), and so on.

So we'd create a second swimlane now called DB. In the DB lane we'll draw a line down from step 3, for create document in DB. This will required a Create Doc stored procedure. So now we have a procedure creating something...but where. So we flip back over to a spreadsheet and the list of tables. In which table or tables does all the data go? For the sake of this post, we'll say this is project data.

Step 1, create a procedures box in the spreadsheet and lets name this procedure, SP1 - create project doc. Now over in a matrix, we'll write SP1 in the Create column on the project table row. Depending on what is all contained in the project doc creation, you may also be writing to a secondary project doc table, a project customer table, and maybe even a project user table. All depends on how you have your table structure setup or this is a good what to start that design.

In the third lane, we use this for HTML page creation. As we go through, we may be able to create and reuse some UI pages. This just helps us document where all the interactions appear.

Basically you will continue to follow along on the Matrix spreadsheet and swimlane mapping until you have completed all your processes. It's a huge effort, but it will save time later in the project and it helps you know what to build for the DAL and UI. I will draw up some imagery and post it to a separate Web site and back link soon.

Thursday, February 4, 2010

AJAX jQuery and NyroModal

On my quest to build a GAP style play Best Buy Remix site, I came across the challenge of mimicking the "Quick Look". So yes, the first thought of mine was jQuery and how can I make this happen since I'm slowly loosing my desire to learn/program with PHP. A plain HTML page is great. No framework needed to serve it up (yes I understand jQuery is a framework, but no special server is require to make it happen).

Since we use jQuery and NyroModal at work, that was my first direction. Of course I stumbled a bit (well no need to elaborate) and I looked around for some other modal options. I came across
jQuery Tools, which had a cool modal feature, tabs, and some other useful things.

After still suffering from a brain freeze, I visited my favorite
jQuery for Designers Web site and struck out. So now I was forced to think. So I hunkered down and figured it out. Had to figure out how to code w/o using Google for once. LOL. Building off the AJAX call I did in the previous Remix post, i just added an onclick function to the image.

<a href="#"><img onclick="buildJerry(\''+this.sku+'\');" src="+this.image+" /></a>

In my build jerry function, i start an empty array and build a URL with the passed in SKU value from the function. Nothing fancy here. Add another AJAX call and using the .push() you can build the modal contents. Once you get the array built, make a manual call with NyroModal and set the content equal to the array and use the .join().

Here is the code.


function buildJerry(str) {

var struc = [];

var URL = "http://api.remix.bestbuy.com/v1/products(sku="+str+")?apiKey={YourAPIKey}&format=json&callback=?";
$.ajax({
type: "GET",
url: URL,
cache: true,
success: function(obj) {
$.each(obj.products, function(i,products) {
struc.push("<ul id="CssProductUL">");
struc.push("<li class="CssProductImage"><img src="http://www.blogger.com/+this.image+" /></li>");
struc.push("<li class="CssProductName">Name: "+this.name+"</li>");
struc.push("<li class="CssProductSKU">sku: "+this.sku+"</li>");
struc.push("<li class="CssProductRegularPrice">regularPrice: "+this.regularPrice+"</li>");
struc.push("</ul>");

}); // end find/each loop

$.nyroModalManual({
content: struc.join('');
});

},
error: function(data) {
alert("error");
},
dataType: 'json'
}); // end of ajax call



} // end BuildJerry Function

Saturday, January 23, 2010

JIT Information

Just in time information is a version of lean six sigma for service. It's similar to lean assembly in the manufacturing business, where parts are shipped in as needed and not stockpiled in huge supplies or capital outlay. JIT information allows for work to flow properly though a workflow and not get bogged down because of front-loaded crap data.

How to figure out where your JIT info spots are, you will need a map of your process and what data is required of that process. For example, you have a five step process. For step one of the process, you write down what is required for that step to be completed successfully. This is the information that is required for the initiation of the process.

Remember one thing, the data your can collecting or producing during the active step of the process, it's the next step of the process that is the beneficiary.

Once you have initiation information complete for step one, then you repeat this step for each of the process steps. You want to make sure you keep the data that is acquired at the step concise enough, but yet broad enough, to let the next step of the process understand what is going on and complete the step successfully.

As you work through each step, little be known, you are also working out the report or reports that will help provide insight into your process and operations.

This may seem obvious and simple to implement, but trust me, it's nothing like that. It will take months to nail down the proper information needed for each step and then report(s) design.