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.
Wednesday, February 24, 2010
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.
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.
Wednesday, December 30, 2009
Best Buy Remix API - AJAX and JSON
Best Buy has released an API for its product catalog, store finder, and search. There are some other features offered too. The API is nice and simple. It's REST based to keep things easy to understand and offers two formats, XML or JSON. (I need to note this right away. I don't have a public page for viewing since I've slacked on getting my new domain setup.)
Step 1, get yourself an API key.
Step 2, get jQuery.
I used the AJAX option in jQuery. It's easy to setup and you can specify a return type.
Here is the ajax call I setup that grabs page 1 of the results.
Make a call to jquery, I have 1.3.2. Setup a document.ready function and in there setup your ajax call. specify the type, url, I set the cache to true and the success: option. DataType will either be xml or json. This will match the format you choose in the URL you pass to Remix.
$(document).ready(function(){
$.ajax({
type: "GET",
url: ""http://api.remix.bestbuy.com/v1/products?page=1&apiKey=YOURKEYHERE&format=json&callback=?,
cache: true,
success: function(data) {
alert('test');
},
The simple thing for testing is just put an alert right here. If successful, the alert fires.
dataType: 'json"
)};
)};
Once you have everything working, just put jQuery's version of a "for" loop in. $.each
$.each(data.products, function(i,products) {
your formatting here. here's mine
$('').html("SKU: " + this.sku).appendTo('#results');
});
Results is my main div that I just add stuff too for testing. You'll want some formatting here.
Sunday, November 22, 2009
Flash CS3/Actionscript 3 Hover ALT TEXT
I needed to create some hover text over my buttons in Actionscript 3. I Google around and couldn't successfully find an AS3 version. I did find a AS1/2 version at kirpa.com. So I ventured out and did a quick write of my own.
First thing you need to know how to do is pass in multiple parameters on an "addEventListener". Then you just need to write a function to accept these parameters.
Here is what I did. I wrote a generic function called, HoverText. It accepts three parameters. The first is a text string, this is what I want the hover to display. The second is the X position of the hover text. The third is the Y position of the hover text.
HoverText(_text:String,capX:Number,capY:Number)
Since I knew the X & Y coordinates of the buttons and the hover text I wanted to pass in, it made the function really simple. I didn't have calculate anything. Just display at the proper spot.
In AS3 I put two MouseEvent eventListeners on each button, a MouseOver, and a MouseOut. All I had to do was create a function on the eventlistener to allow me to pass multiple parameters. This is a bit different than Javascript, but I figured it out.
Here are my two eventListeners for each button:
btn_1.addEventListener(MouseEvent.MOUSE_OVER, function(e:Event) { HoverText("This is my main hover text sentence",713,256);});
btn_1.addEventListener(MouseEvent.MOUSE_OUT, function(e:Event) { HoverText("out",0,0);});
The first one, Mouse Over, I setup to be the display of the hover text. The second one, is my mouse out. So I set this text to be "out". I could have probably done a NULL, but didn't.
Then my function takes the three params and generates a text field.
So the function has its three parameter pass ins. The first if the message I want to display. The second is the X coordinate. The third is the Y coordinate. You can see that I create a new dynamic textfield called "captext". I set the X and Y to the proper coordinates. Then the text to the string passed in. I turn the background on. Why you ask? If I don't, the background is transparent and the text blends right in. I set the text field to autosize in width and height from the "RIGHT", which means the top right corner of the text field.
I put in an "IF" statement too...if I'm passing in the "out" statement. I want the hover text to disappear so I just do a removeChild on the element I added on the mouse in event.
First thing you need to know how to do is pass in multiple parameters on an "addEventListener". Then you just need to write a function to accept these parameters.
Here is what I did. I wrote a generic function called, HoverText. It accepts three parameters. The first is a text string, this is what I want the hover to display. The second is the X position of the hover text. The third is the Y position of the hover text.
HoverText(_text:String,capX:Number,capY:Number)
Since I knew the X & Y coordinates of the buttons and the hover text I wanted to pass in, it made the function really simple. I didn't have calculate anything. Just display at the proper spot.
In AS3 I put two MouseEvent eventListeners on each button, a MouseOver, and a MouseOut. All I had to do was create a function on the eventlistener to allow me to pass multiple parameters. This is a bit different than Javascript, but I figured it out.
Here are my two eventListeners for each button:
btn_1.addEventListener(MouseEvent.MOUSE_OVER, function(e:Event) { HoverText("This is my main hover text sentence",713,256);});
btn_1.addEventListener(MouseEvent.MOUSE_OUT, function(e:Event) { HoverText("out",0,0);});
The first one, Mouse Over, I setup to be the display of the hover text. The second one, is my mouse out. So I set this text to be "out". I could have probably done a NULL, but didn't.
Then my function takes the three params and generates a text field.
var captext:TextField;
function HoverText(_text:String,capX:Number,capY:Number):void {
trace(_text + " " + capX + " " + capY);
if (_text == "out") {
trace("out");
removeChild(captext);
}
else {
trace("in");
captext = new TextField();
captext.x = capX;
captext.y = capY;
captext.text = _text;
captext.background = true;
captext.autoSize = TextFieldAutoSize.RIGHT;
addChild(captext);
}
};
So the function has its three parameter pass ins. The first if the message I want to display. The second is the X coordinate. The third is the Y coordinate. You can see that I create a new dynamic textfield called "captext". I set the X and Y to the proper coordinates. Then the text to the string passed in. I turn the background on. Why you ask? If I don't, the background is transparent and the text blends right in. I set the text field to autosize in width and height from the "RIGHT", which means the top right corner of the text field.
I put in an "IF" statement too...if I'm passing in the "out" statement. I want the hover text to disappear so I just do a removeChild on the element I added on the mouse in event.
Friday, September 4, 2009
Roll Out Customer Support
When a product rolls out, there is nothing in the world that can prepare you for the questions coming. You think you have a pretty good handle on the actual questions related to the product. It's the unknown questions that will freak you out and just make you shake you're head and think, WTF. Since our roll out a couple weeks ago, we have encountered a handful of legitimate bugs. The sort of things your try and catch in testing, but somehow make it through to the release. I have had several good learning questions. One thing we asked our users to do is, before you even try to enter something in the system, call me. Then when a user gets an assignment, call me. We did this because, 1. our whole organization is migrating to this system and we'll have new users. 2., it's just a confidence booster for our users to see. Yes it really is that easy to use the new system.
Then we have the resistance to changers. No matter what you do, it's going to suck. I had comments of, "It's a complete failure for us.", "the system doesn't work for me", "I thought this was supposed to be better", "I thought this was supposed to be easier", and my favorite, "I'll ask this question, but I"m going to do what I want anyway."
I and some of the supervisors have handled everything very professionally so far. No name calling or people storming off, we have answered every one's questions politely and when a bug (aka feature) is discovered we put in on our punch list to fix. We've even had to delve into the corporate Active Directory system to fix a few accounts because a few distribution lists were incorrectly setup.
All in all. It's very time consuming and tiring, but so far so good. We are starting to look at phase 1.1 requests outside of bug fixes. Users are excited about that. I think we may have to do some basic computer training after a few of my experiences. One of my users, I swear after you could guarantee the computer was actually plugged into the wall for power, it should have been taken away from the user. It is disturbing to know that some people whose job is to work daily with a computer and process all the business on it. Couldn't turn it on if you asked him/her too, much less do something that required thought.
One general thing I will bring up probably to management is this particular video, Inbox Zero. After helping the couple users who have asked to have some e-mail inbox rules setup, which is legit request in my book. There is nothing easy about it. Our department can use a few trick on how to manage an inbox. It's part art, part science, but very good practice. Till next time when I think I'll start at ground zero with this project and step everyone through start to finish (and my slow death) he he.
Subscribe to:
Posts (Atom)