顯示具有 dev 標籤的文章。 顯示所有文章
顯示具有 dev 標籤的文章。 顯示所有文章

2010/05/28

MySQL 5.x Repair Cheat Sheet

If you upgrade MySQL or move the database around, you are most likely need to do those operations:

Backup

mysqldump -u root -p --default-character-set=utf8 databasename > data.sql

Restore

mysqldump -u root -p --default-character-set=utf8 databasename < data.sql
if database is larger then 100MB, this works better:
mysql -u root -p
#mysql> use the_database
#mysql> source data.sql

Check, Repair & Optimize All Tables in All Databases

If you need database server up, use mysqlcheck:
mysqlcheck -u root -p --auto-repair --check --optimize --all-databases


Or you can make it offline and do a better check:
service mysqld stop
myisamchk /var/lib/mysql/the_database/*.MYI
service mysqld start

Repair single table

mysql -u root -p
#mysql> use the_database
#mysql> repair table the_table


Reference:
http://www.felipecruz.com/repair-mysql-database.php

2010/05/24

MySQL 5.1.x & unicode

In our recent upgrade from 5.0 to 5.1.47, the new version behaves differently and it screw up character set when user submit info from our web app powered by .NET.

After digging around for a afternoon, this is how to fix it:

vi /etc/my.cnf


And add those lines to the config:

init_connect='SET collation_connection = utf8_general_ci'
init_connect='SET NAMES utf8'
default-character-set=utf8
character-set-server=utf8
collation-server=utf8_general_ci
skip-character-set-client-handshake


There are other options for collation besides utf8_general_ci such as utf8_unicode_ci. See this article:
http://dev.mysql.com/doc/refman/5.1/en/charset-unicode-sets.html

Reference: http://rhyous.com/2009/11/05/how-to-create-a-utf-8-unicode-database-on-mysql/

2007/09/21

Drag & Drop, Sorting, In-place Edit using JavaScript

click to play the MacOS 8AJAX and Web 2.0 is the hottest technical jargon this year (2007). All the sudden everyone has to talk about community building and develop those dynamic scripting effort.
In fact, back at 10 years ago (1997) Desktop.com had the vision and actually build up a business for what Google app is trying to do today. Back at the time some people from the North think it's crazy and useless for fat desktop-like applications to run on the web.

Well, those people might be 50% correct, desktop.com is no longer in business and you can only see it at web archive (the original desktop.com Web OS); however the same old techiques (now can be called AJAX), isn't a joke anymore.
As I bring back my old little Mac Kernel back to life, it is still works like a champ in FireFox and IE 7. Allow popup window for the moment and click the image above to bring some of your good old memory back...
I did it for fun and learning back at 199x. It's advanced JavaScript then and now. It were a mod from someone from German (sorry, no longer has your name to credit you). And Yes, the work is almost 10 years old and is still way cool.
Here's another old school and yet still in good hand piece: "ToolMan DHTML Library". The small yet snippy JavaScript allow you to create Drag & Drop, Sorting, Edit in Place. Best of all, it's old :)

Thanks Tim for showing off the work.

2007/08/20

Process Monitor by Mark Russinovich and Bryce Cogswell (SysInternal)

SysInternal is been around since DOS date. And yet still active and hard core as they always are.

Their recent production: Process Monitor, I'm adding it into my must have toolbox - it allows you to watch windows processes and track 'em Comprehensively.


Process Monitor is an advanced monitoring tool for Windows that shows real-time file system, Registry and process/thread activity. It combines the features of two legacy Sysinternals utilities, Filemon and Regmon, and adds an extensive list of enhancements including rich and non-destructive filtering, comprehensive event properties such session IDs and user names, reliable process information, full thread stacks with integrated symbol support for each operation, simultaneous logging to a file, and much more. Its uniquely powerful features will make Process Monitor a core utility in your system troubleshooting and malware hunting toolkit.

2007/01/24

ASP.NET AJAX 1.0 Released

Final release of ASP.NET AJAX 1.0 (aka "Atlas") shipped this morning. You can download it here.

See Scott Gu's article for more details.

2007/01/03

F5 debugging of ASP.NET applications on IIS7 Vista

Basically, this is the quickest way to fix back F5 debugging on IIS7/Vista:
1. Install Visual Studio 2005 SP1 update;
2. Install required IIS components such as Windows Authenication;
3. Make the web application to run under Classic mode.


Check out Mike Volodarsky's article for a complete load-down.

2006/04/11

What Is A Permission, by Keith Brown

http://www.pluralsight.com/wiki/default.aspx/Keith.GuideBook.WhatIsAPermission


Throughout my discussions of access control and ACLs in this book, I will often talk about permissions as numbers. For example, I might talk about 0x1FF as being a set of permissions, or granting "permission 1 and 2" to someone. What I'm doing is being very generic and using literal access masks or numbered permissions. I'm not specifying just what types of objects I'm talking about; I'm just talking about how access control works for all different types of objects.


So let's make this concrete and look at some examples of permissions for some specific types of objects in Windows. Let's start with, oh, a registry key. Peeking at a Win32 header file called winnt.h shows us the following1:

 // excerpt from winnt.h
#define KEY_QUERY_VALUE (0x00000001)
#define KEY_SET_VALUE (0x00000002)
#define KEY_CREATE_SUB_KEY (0x00000004)
#define KEY_ENUMERATE_SUB_KEYS (0x00000008)
#define KEY_NOTIFY (0x00000010)
#define KEY_CREATE_LINK (0x00000020)

Let's also look at the permission definitions for a thread:

 // excerpt from winnt.h
#define THREAD_TERMINATE (0x00000001)
#define THREAD_SUSPEND_RESUME (0x00000002)
#define THREAD_GET_CONTEXT (0x00000008)
#define THREAD_SET_CONTEXT (0x00000010)
#define THREAD_SET_INFORMATION (0x00000020)
#define THREAD_QUERY_INFORMATION (0x00000040)
#define THREAD_SET_THREAD_TOKEN (0x00000080)
#define THREAD_IMPERSONATE (0x00000100)
#define THREAD_DIRECT_IMPERSONATION (0x00000200)

If you wanted to grant Alice permission to create a new registry key under some existing key, you'd edit the existing key's DACL and add an ACE ( What Is An Access Control List ) that grants Alice the KEY_CREATE_SUB_KEY permission. Pretty simple. But look at those permissions again and tell me how you'd grant Alice the permission to delete the key she just created!


That's right, the registry subsystem doesn't bother defining a permission for deleting a key. That's because it's such a common permission (most secure objects can be deleted) that it's included as part of a standard set of permissions that are common across all types of objects. Here are the standard permissions that are allowed to be put in an ACL:

 // excerpt from winnt.h
#define DELETE (0x00010000L)
#define READ_CONTROL (0x00020000L)
#define WRITE_DAC (0x00040000L)
#define WRITE_OWNER (0x00080000L)
#define SYNCHRONIZE (0x00100000L)

Compare the numerical layout of the standard permissions to the specific permissions defined for registry keys. Note how the standard permissions all fall in the upper word of the 32 bit mask, while the specific permissions are defined in the lower word. Notice the same technique is used for the thread permissions. You see, each class of object is allowed to define up to 16 specific permissions, and they must all be in that lower word, so they don't conflict with permissions Microsoft has already defined for all objects, such as the standard permissions shown above.


The standard permissions are really quite straightforward. Let me briefly explain what they mean. READ_CONTROL ("Read Permissions") controls whether you can read the owner and DACL in the object's security descriptor. If you don't have this permission, you're not even allowed to see what permissions you do have! WRITE_DAC ("Write Permissions") and WRITE_OWNER ("Take Ownership") say whether you're allowed to change the object's DACL or take ownership of the object by changing the owner SID to be your own SID (for more detail, see What Is Ownership ). SYNCHRONIZE says whether you can wait on an object (this is most often used with synchronization objects such as a mutex or semaphore). By limiting SYNCHRONIZE access, you can prevent an untrusted user from grabbing a mutex that your program depends on and deadlocking you. And DELETE is pretty obvious.


Let's say you want to grant Alice permission to read a registry key. It'd make sense to grant her a combination of the following:



  • KEY_QUERY_VALUE
  • KEY_ENUMERATE_SUB_KEYS
  • KEY_NOTIFY
  • READ_CONTROL

If you binary OR these values together, you'll end up with 0x00020019. This would be the access mask you'd put into the ACE ( What Is An Access Control List ) to grant Alice read access to the key. For an example of code that modifies an ACL programmatically, check out How To Program ACLs .


Look at the following access mask and try to figure out what it means: 0x00130000. The answer is in the following footnote2. Now try to decode this one: 0x00000001. Surely this one is easier! Oh wait, I didn't tell you what type of object we're talking about. I mean, if it were a registry key, this would be KEY_QUERY_VALUE -a fairly benign permission to grant, at least compared to THREAD_TERMINATE! You see, given a random permission mask, you really can't tell what it means unless you know the type of object to which it applies, unless it simply consists of standard permissions, which are defined centrally for all objects.


With this in mind, think about a permission mask that would be generic enough to grant read permission to any type of object in the system, including registry keys and threads. For a registry key, we'd want 0x00020019, as we calculated earlier for Alice. But for a thread, it'd be 0x00020048. That's a very different mask. As you can see, because no two types of objects can be expected to have the same sorts of permissions, at first glance it'd be impossible to treat objects polymorphically with respect to permissions. But if you look a bit further into winnt.h, you'll find the following rather interesting definitions:

 // excerpt from winnt.h
#define GENERIC_READ (0x80000000L)
#define GENERIC_WRITE (0x40000000L)
#define GENERIC_EXECUTE (0x20000000L)
#define GENERIC_ALL (0x10000000L)

What do you think would happen if you added an ACE to a registry key's DACL that granted Alice GENERIC_READ? Think about it for a moment. If you guessed that the system would convert the access mask from 0x80000000 to 0x00020019 before storing the new DACL in the metadata for the registry key, then you'd be correct. You see, each class of object in Windows defines a mapping from these four generic permissions onto standard and specific permissions. This allows us to make statements like, "By default, I'd like to grant full control to SYSTEM and myself for any object I create. Oh and I'd also like Alice to have read access as well." Here's a text representation of just such a DACL:

 grant SYSTEM 0x10000000
grant Keith 0x10000000
grant Alice 0x80000000

It turns out that Windows makes a statement like this for every process! You see, inside the token ( What Is A Token ) is a default owner and DACL that are used whenever you create new objects3. For example, if you were to create a thread, how would the system know what the DACL for that thread should look like? Well, it looks at this default DACL that's tucked away inside your token.


Here's what a default DACL would look like for me on my laptop4:

 grant SYSTEM 0x10000000
grant Keith 0x10000000

So by default, any new threads that I create, or semaphores, shared memory sections and so on, start life with DACLs that specifically grant my account and SYSTEM full control. Nobody else will be able to touch the objects I create, barring specially privileged users such as administrators ( What Is A Privilege ). Note that hierarchical systems like the file system and registry instead use ACL inheritance to come up with a default DACL; this ensures that permissions remain consistent through the branches of the hierarchy. See What Is ACL Inheritance for the details.


The default DACL is one of the few mutable bits of data in a token. In most cases you shouldn't ever need to change this DACL, as it's already about as tightly secured as it can be. If you ever find the need to adjust it, you'll want to look at the Win32 function SetTokenInformation.




  1. I've omitted three permissions that are specific to 64-bit Windows for brevity.
  2. DELETE, READ_CONTROL, and SYNCHRONIZE.
  3. By "objects" I mean any object that has a security descriptor ( What Is A Security Descriptor ), such as a process, thread, mutex, etc.
  4. If you want to do this experiment, you should download the Token Dump component from my website. I don't know of any built-in tool that shows this information.

2005/08/05

Web 2.0 of Visual development

Visual development has been a standard process for many professional web application development team. Since 1995, techniques and tools have been developed and been improved.

We're in the process of taking the basic building blocks to the next level. Ajax style features will certainly be the part of the mix.

1. Ajax: A New Approach to Web Applications
Take a look at Google Suggest. Watch the way the suggested terms update as you type, almost instantly. Now look at Google Maps. Zoom in. Use your cursor to grab the map and scroll around a bit. Again, everything happens almost instantly, with no waiting for pages to reload.

Google Suggest and Google Maps are two examples of a new approach to web applications that we at Adaptive Path have been calling Ajax. The name is shorthand for Asynchronous JavaScript + XML, and it represents a fundamental shift in what’s possible on the Web.

2. Prototype
Prototype is a JavaScript framework that aims to ease development of dynamic web applications. Featuring a unique, easy-to-use toolkit for class-driven development and the nicest Ajax library around, Prototype is quickly becoming the codebase of choice for Web 2.0 developers everywhere.

2005/02/03

Writing Effective Use Cases

by Alistair Cockburn (Paperback)
Addison-Wesley Pub Co; 1st edition (January 15, 2000)

Editorial Reviews

Amazon.comAlistair Cockburn's Writing Effective Use Cases is an approachable, informative, and very intelligent treatment of an essential topic of software design. "Use cases" describe how "actors" interact with computer systems and are essential to software-modeling requirements. For anyone who designs software, this title offers some real insight into writing use cases that are clear and correct and lead to better and less costly software.

The focus of this text is on use cases that are written, as opposed to modeled in UML. This book may change your mind about the advantages of writing step-by-step descriptions of the way users (or actors) interact with systems. Besides being an exceptionally clear writer, the author has plenty to say about what works and what doesn't when it comes to creating use cases. There are several standout bits of expertise on display here, including excellent techniques for finding the right "scope" for use cases. (The book uses a color scheme in which blue indicates a sea-level use case that's just right, while higher-level use cases are white, and overly detailed ones are indigo. Cockburn also provides notational symbols to document these levels of detail within a design.)

This book contains numerous tips on the writing style for use cases and plenty of practical advice for managing projects that require a large number of use cases. One particular strength lies in the numerous actual use cases (many with impressive detail) that are borrowed from real-world projects, and demonstrate both good and bad practices. Even though the author expresses a preference for the format of use cases, he presents a variety of styles, including UML graphical versions. The explanation of how use cases fit into the rest of the software engineering process is especially good. The book concludes with several dozen concrete tips for writing better use cases.

Software engineering books often get bogged down in theory. Not so in Writing Effective Use Cases, a slender volume with a practical focus, a concise presentation style, and something truly valuable to say. This book will benefit most anyone who designs software for a living. --Richard Dragan


Topics covered:


  • Introduction to use cases
  • Requirements
  • Usage narratives
  • Actors and goals
  • Stakeholders
  • Graphical models for use cases
  • Scope for use cases (enterprise-level through nuts-and-bolts use cases)
  • Primary and supporting actors
  • Goal levels: user goals, summary level, and subfunctions
  • Preconditions, triggers, and guarantees
  • Main success scenarios
  • Extensions for describing failures



  • Formats for use cases (including fully dressed one- and two-column formats)
  • Use case templates for five common project types
  • Managing use cases for large projects
  • CRUD use cases
  • Business-process modeling
  • Missing requirements
  • Moving from use cases to user-interface design
  • Test cases
  • eXtreme Programming (XP) and use cases
  • Sample problem use cases
  • Tips for writing use cases
  • Use cases and UML diagrams
From Book News, Inc.
A specialist in object technology presents software developers with a current guide to writing use cases as a means of capturing the behavioral requirements of software systems and business practices. Covers key elements of use cases, a style guide with suggested formats, a list of time-saving writing tips, a set of use case templates with commentary, and learning exercises with answers to clarify important points.Book News, Inc.®, Portland, OR

2005/01/03

The Five Dysfunctions of a Team: A Leadership Fable

by Patrick M. Lencioni "Not finance. Not strategy. Not technology. It is teamwork that remains the ultimate competitive advantage, both because it is so powerful and so rare..."

Editorial Reviews

Amazon.com
Once again using an astutely written fictional tale to unambiguously but painlessly deliver some hard truths about critical business procedures, Patrick Lencioni targets group behavior in the final entry of his trilogy of corporate fables. And like those preceding it, The Five Dysfunctions of a Team is an entertaining, quick read filled with useful information that will prove easy to digest and implement. This time, Lencioni weaves his lessons around the story of a troubled Silicon Valley firm and its unexpected choice for a new CEO: an old-school manager who had retired from a traditional manufacturing company two years earlier at age 55. Showing exactly how existing personnel failed to function as a unit, and precisely how the new boss worked to reestablish that essential conduct, the book's first part colorfully illustrates the ways that teamwork can elude even the most dedicated individuals--and be restored by an insightful leader. A second part offers details on Lencioni's "five dysfunctions" (absence of trust, fear of conflict, lack of commitment, avoidance of accountability, and inattention to results), along with a questionnaire for readers to use in evaluating their own teams and specifics to help them understand and overcome these common shortcomings. Like the author's previous books, The Five Temptations of a CEO and Obsessions of an Extraordinary Executive, this is highly recommended. --Howard Rothman

Product Description:
In The Five Dysfunctions of a Team Patrick Lencioni once again offers a leadership fable that is as enthralling and instructive as his first two best-selling books, The Five Temptations of a CEO and The Four Obsessions of an Extraordinary Executive. This time, he turns his keen intellect and storytelling power to the fascinating, complex world of teams.

Kathryn Petersen, Decision Tech's CEO, faces the ultimate leadership crisis: Uniting a team in such disarray that it threatens to bring down the entire company. Will she succeed? Will she be fired? Will the company fail? Lencioni's utterly gripping tale serves as a timeless reminder that leadership requires as much courage as it does insight.

Throughout the story, Lencioni reveals the five dysfunctions which go to the very heart of why teams even the best ones-often struggle. He outlines a powerful model and actionable steps that can be used to overcome these common hurdles and build a cohesive, effective team. Just as with his other books, Lencioni has written a compelling fable with a powerful yet deceptively simple message for all those who strive to be exceptional team leaders.

See all Editorial Reviews

2004/09/02

Developing Microsoft ASP.NET Server Controls and Components

by Patrick M. Lencioni "Not finance. Not strategy. Not technology. It is teamwork that remains the ultimate competitive advantage, both because it is so powerful and so rare..."

Editorial Reviews

Amazon.com
Once again using an astutely written fictional tale to unambiguously but painlessly deliver some hard truths about critical business procedures, Patrick Lencioni targets group behavior in the final entry of his trilogy of corporate fables. And like those preceding it, The Five Dysfunctions of a Team is an entertaining, quick read filled with useful information that will prove easy to digest and implement. This time, Lencioni weaves his lessons around the story of a troubled Silicon Valley firm and its unexpected choice for a new CEO: an old-school manager who had retired from a traditional manufacturing company two years earlier at age 55. Showing exactly how existing personnel failed to function as a unit, and precisely how the new boss worked to reestablish that essential conduct, the book's first part colorfully illustrates the ways that teamwork can elude even the most dedicated individuals--and be restored by an insightful leader. A second part offers details on Lencioni's "five dysfunctions" (absence of trust, fear of conflict, lack of commitment, avoidance of accountability, and inattention to results), along with a questionnaire for readers to use in evaluating their own teams and specifics to help them understand and overcome these common shortcomings. Like the author's previous books, The Five Temptations of a CEO and Obsessions of an Extraordinary Executive, this is highly recommended. --Howard Rothman

Product Description:
In The Five Dysfunctions of a Team Patrick Lencioni once again offers a leadership fable that is as enthralling and instructive as his first two best-selling books, The Five Temptations of a CEO and The Four Obsessions of an Extraordinary Executive. This time, he turns his keen intellect and storytelling power to the fascinating, complex world of teams.

Kathryn Petersen, Decision Tech's CEO, faces the ultimate leadership crisis: Uniting a team in such disarray that it threatens to bring down the entire company. Will she succeed? Will she be fired? Will the company fail? Lencioni's utterly gripping tale serves as a timeless reminder that leadership requires as much courage as it does insight.

Throughout the story, Lencioni reveals the five dysfunctions which go to the very heart of why teams even the best ones-often struggle. He outlines a powerful model and actionable steps that can be used to overcome these common hurdles and build a cohesive, effective team. Just as with his other books, Lencioni has written a compelling fable with a powerful yet deceptively simple message for all those who strive to be exceptional team leaders.

See all Editorial Reviews

2004/08/10

Accessing Custom Site Templates through the Sharepoint API

Using custom site templates in Sharepoint is a really powerful feature. You can customize your WSS site through frontpage or the web UI and save the site as a template. By default the template is stored in the top-level site template gallery of the site you customized.

This template can be exported as an ".stp" file and imported on other top-level websites. But you can also place the template in two other locations. The three locations for site templates are:
Top-Level (WSS) Site Template Gallery Sharepoint Portal Server Template Gallery Sharepoint Virtual Server TemplatesTo enter the template into the Portal gallery go to Portal > Site Settings > Manage security and additional settings > Manage site template gallery and upload your ".stp" file (read on to find out why this is useless).

To enter the template into the Virtual Server Templates open the commandline at the directory \Program Files\Common Files\Microsoft Shared\web server extensions\60\BIN and run stsadm -o addtemplate -filename \sitetemplate.stp -title sitetemplate

You can run stsadm -o enumtemplates to verify that your template was added, and you'll also notice that it's been given a name like "_GLOBAL_#1". If you've added a template to the Sharepoint Portal Server Template Gallery (#2 above) you'll notice that this template is not listed when using stsadm.

  • Team Site, STS#0
  • Blank Site, STS#1
  • Document Workspace, STS#2
  • Basic Meeting Workspace, MPS#0
  • Blank Meeting Workspace, MPS#1
  • Decision Meeting Workspace, MPS#2
  • Social Meeting Workspace, MPS#3
  • Multipage Meeting Workspace, MPS#4
  • Business Activity Services Team Site, BAS#0
  • SharePoint Portal Server Site, SPS#0
  • SharePoint Portal Server Personal Space, SPSPERS#0
  • SharePoint Portal Server My Site, SPSMSITE#0
  • Contents area Template, SPSTOC#0
  • Topic area template, SPSTOPIC#0
  • News area template, SPSNEWS#0
  • News Home area template, SPSNHOME#0
  • Site Directory area template, SPSSITES#0
  • SharePoint Portal Server BucketWeb Template, SPSBWEB#0
  • Community area template, SPSCOMMU#0
  • sitetemplate, _GLOBAL_#1 <- My custom template on the Virtual Server

When you look at the Sharepoint SDK for the SPSiteCollection.Add method there is a parameter for sitetemplate. In the example they've used "STS#0", which indicated that the method expects the Name property of the SPWebTemplate, and that it makes a selection from the templates on the virtual server. So if you want to create a site with the template you just deployed with stsadm, specify "_GLOBAL_#1". If you find it uncomfortable to use this generated name a simple mapping can be applied like this:

string template = "My Template Title";
SPGlobalAdmin globalAdmin = new SPGlobalAdmin();
SPWebTemplateCollection webTemplates
= globalAdmin.VirtualServers[0].GetWebTemplates(lcid);
foreach(SPWebTemplate t in webTemplates)
if (t.Title.CompareTo(template) == 0) template = t.Name;

So what do you specify if you want to apply one of the templates in the Sharepoint Portal Server Template Gallery? After all, it's more user friendly to expose templates here than through the command line interface (if you're not doing complex automated deployments that is). Well by looking in the Gallery UI in Site settings you'll notice that the Name property of the template you've uploaded is TemplateName.stp. Supplying this as a parameter to the SPSiteCollection.Add method will not work. The template won't be found.

The only way to get a hold of these templates are by accessing the SPSite of the portal (either by using context site or creating a new object). You'll find these templates by using the SPSite.GetCustomWebTemplates method. The problem is that SPSite has no way of applying a template other than in the constructor. That leaves you with manipulating the SPSite.RootWeb object after you've created the new SPSite.

But now you've got two different SPSite objects; the portal and the top-level site you just added. Because the templates are stored on the portal SPSite object they cannot be accessed on the top level website. This is because the method SPWeb.ApplyWebTemplate(SPWebTemplate obj) actually is just an overload that reads the SPWebTemplate name property as a string and passes it down to the SPSite object, which in turn looks up in it's own template gallery.

So the conclusion is that for top-level websites you have to deploy your templates using stsadm. Then what's the use of the Sharepoint Portal Server Template Gallery? Beats me. I haven't actually found any of the templates I've added to that list anywhere else than in the SPSite object of the portal root site.

2003/08/22

Book Review: Good to Great

Good to Great: Why Some Companies Make the Leap... and Others Don't
by Jim Collins

Good to Great is a great business management book. The book is actual a 2nd part of Professor Collin's research report. In his early research's observation (also booked as "Build to Last"), the "Built to Last" companies he choose had always been great (for reasons, of course). In this book, he further analyze for those good companies (but not yet great) what's missing.

The Good-to-Great concepts are:



  1. 5 Level Leadership: where leaders channel their ego needs away from themselves and into the larger goal of building a great company. Note: If Donald Trump is your role model I do not recommend this book for you.

  2. First Who ... Then What: first get the right people on the bus, wrong people off the bus, right people in the right seats and then figure out where to drive. This is similar to Buckingham's "Select for Talent" and "Find the Right Fit" in his book First Break All The Rules.

  3. Confront the Brutal Facts (Yet Never Lose Faith): have faith that you can and will prevail in the end, and at the same time have the discipline to confront the most brutal facts of your current reality.

  4. The Hedgehog Concept: simplicity within the three circles of What you are deeply passionate about, What drives your economic engine and What you can be the best in the world at.

  5. A Culture of Discipline: when you have disciplined people, thought and action, you don't need hierarchy, bureaucracy and excessive controls.

  6. Technology Accelerators: technology should be used as an accelerator of momentum, not as a creator of it.

  7. The Flywheel and the Doom Loop: building momentum over a span of time leads to breakthroughs while shortcuts seldom do.

I highly recommended this one...

2003/06/21

Book Review: Kotler on Marketing

Kotler on Marketing : How to Create, Win, and Dominate Markets
by Philip Kotler

Kotler is the maestro in marketing. In fact, he is one of first fews who gave the "new profession" a clear defintion and objectives.

The organization and prose of the book make it an enjoyable read, not at all academic and stuffy. Many MBA Marketing Strategy courses are using it as text, and it is comprehensive and insightful as to the new challenges of marketing.

The book is organized into four parts:

Part One: Strategic Marketing - including sections on building profitable businesses through world-class marketing; using marketing to understand, create, communicate and deliver value; identifying market opportunities and developing targeted value offerings; developing value propositions and building brand equity.

Part Two: Tactical Marketing - developing and using market intelligence; designing the marketing mix; acquiring, retaining and growing customers; designing and delivering more customer value.

Part Three: Administrative Marketing - planning and organizing for more effective marketing; evaluating and controlling marketing performance.

Part Four: Transformational Marketing - adapting to the new age of electronic marketing.

Whether you read the book from cover to cover, or add it to your reference library and just read specific sections, you will find it full of useful theories, practical advice and many current examples.

update: 1/11/2004
中文譯: 科特勒談行銷─如何創造、贏取並主宰市場

2003/02/06

Data-binding to public fields... yes or no?

To bind or not to bind to fields? This seems to be a source of constant debate, with folks in both camps. I get a mail roughly every six months in one form or another on this one. Today was that day.

I happen to be in the camp that disagrees that we should support binding to fields, because public fields are not a recommended practice. While they maybe convenient for quick and dirty code, they do not version. Using properties instead allows you to change the access logic, and data storage behind the covers, as well as add validation logic when a value is assigned. Furthermore, accessing properties feels pretty much the same, and do not have any performance overhead. Thankfully we have an FxCop rule to call out public fields as errors. Another reason, why I happen to in the disagree camp is overall consistency within the framework. For example, the property grid does not display fields.

Aside: One of the reasons why data-binding support is limited to properties happens to be the fact that all of data-binding is built around PropertyDescriptors and not on direct reflection. This allows someone to implement ICustomTypeDescriptor to provide a different OM for the purposes of data-binding than the true set of properties present on the CLR type. For example, DataRowView implements ICustomTypeDescriptor to surface its columns as pseudo-properties that are visible to ASP.NET's data-binding infrastructure (such as GridView/DataGrid columns and DataBinder.Eval). Without this, DataRowView would have two properties - DataView and Index (and the second is the only one remotely interesting for data-binding).

The web service proxies generated using wsdl in v1.x however (and unfortunately) generated only fields, and not properties. This is probably the most significant argument in favor of supporting binding to fields. In Whidbey however, this has been finally fixed, and properties are also generated.

I am curious what the general opinion is, and whether there is any chance for consensus on this subject!

I'll take advantage of this opportunity to voice a small gripe I have with C#. I'd really like the language to provide a shortcut for implementing properties where the compiler generates the get/set accessors and underlying private field in much the same way it does for events. For example, when all you want is a simple read/write property:

public property int Count;

and this can then be converted to a full-fledged property without changing the public OM of the type as needed.

2002/03/12

Book Review: Design Patterns

Design Patterns: Elements of Reusable Object-Oriented Software (Addison-Wesley Professional Computing Series) (Hardcover)
by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides

Say no more...Gang of four's classic must read.

2002/02/23

Under the Hood of Content Management Systems Part II – The CMS Landscape

Choosing the right Content Management System (CMS) can significantly improve the way an organization manages and shares information internally and externally. This sharing of information, implemented correctly, can lead to critical improvements in sales, support, partnering, hiring, marketing, and investor relations.


The number of Content Management applications available on the market today is staggering. All of the major software vendors have their own version of a CMS as do many midsize software companies. This breadth of available CMS software offers a wide range in functionality, complexity, and price. There is now a CMS solution for every business need. Finding the ideal CMS solution that fits the specific needs of the organization’s content strategy is critical.


Before any Content Management System is demonstrated or chosen, the organization should first examine all of the business requirements for such a system. Long term goals should be defined for the CMS and factors such as IT resources, training needs, integration needs, hardware, content writers, and web developers should be considered. By not fully taking into consideration the business needs, organizations may select the wrong CMS and then be forced to spend large amounts of money to customize it to fit business requirements. It is better to fully research the intended uses of the system and purchase a CMS that already fits specific business requirements. Costs in licensing, installation, configuration, and maintenance are major factors in determining which CMS solution is right for your objectives. In the long run the CMS should be modeled around your organization’s business process rather than the other way around. A well thought out CMS strategy will also help in getting buy-in from executive management and employees.


The following is a general list of CMS solutions on the market today. These systems, which range in price from free to approximately $500,000 in licensing fees represent a representative sample of the types of CMS solutions available.


Please note: the categories and systems below are not exclusive of each other. Many products span multiple categories.



Enterprise Content Management Systems


For mid- to large-size organizations with dozens to hundreds of staff writing and managing content, an Enterprise Content Management System (ECMS) will automate tasks involved in managing large scale content deployments. These systems are powerful applications with custom workflow controls, powerful templating modules, object caching, clustering, and documented methods for integration with organizational applications. Most Enterprise Content Management Systems will also have modules for detailed reporting, user groups with specific roles/permissions, and versioning.


Lotus Workplace Web Content Management


This system, previously called Aptrix, provides a tight integration with both WebSphere and Lotus / Domino systems. LWWCM has one of the most intuitive interfaces on the market allowing for easy training and maintenance. Customizable tabbed forms enable users of most technical backgrounds to easily create and manage content across the site. This system dynamically renders static content for the live site. As a fairly new system to IBM, this CMS is currently lacking good documentation and training programs.


http://lotus.com/products/product5.nsf/wdocs/homepage



Microsoft Content Management Server


The largest software provider in the world has come out with many powerful server applications for its business customers within the last several years. The Microsoft Content Management Sever is a powerful CMS, based on NCompass purchased in 2001, for organizations that utilize the Microsoft Platform. This system provides one of the best application frameworks on the market with well documented APIs, open code, clear database integration, and industry standards in interoperability and formatting. Editing tools for the CMS integrate with Internet Explorer allowing users to edit the website from within the browser. In their typical fashion, Microsoft is coming from behind in this industry making significant improvements in this system with every iteration.


http://www.microsoft.com/cmserver/



Global Content Management Systems


Multiple web sites with content in various languages targeted at a variety of audiences around the globe can be difficult to manage. Powerful CMS solutions with strong templating components, Unicode compliance, distributed architectures, complex workflow, and multifunctional formatting tools allow managers within organizations to manage web sites that provide information to users around the globe with localized designs and content. Significant improvements have been made in this category of content management over the past two years as more and more companies strive to enable global companies to cater to worldwide customers and employee bases. These systems are designed specifically for large multinational organizations with thousands of employees, hundreds of thousands of documents, and websites with thousands of pages.



Interwoven TeamSite


For many organizations, TeamSite is the Content Management standard. With the latest release, TeamSite 6.0, Interwoven has enabled users to customize the interfaces of its powerful Content Management Solutions. With tools for versioning, user security, web content editing, document sharing, media administration, and publishing – TeamSite has become one of the most recognized names in web site management. Extractable is an Interwoven partner.


http://www.interwoven.com



Stellent


Stellent’s Content Management System is an end-to-end solution that delivers content quickly. Flexible tools for templating and workflow make it possible to maintain growing volumes of content from a wide variety of sources and make that content accessible across an entire enterprise. Stellent’s powerful versioning functions are also ideal for application deployments. One of the powerful functions that makes Stellent stand out in the CMS world is its integration with the underlying folder structure on the server. User can save documents from editors (MS Word) to a directory on the server and the CMS will automatically categorize, format, and upload the document to the system.


http://www.stellent.com



Application Content Management Systems


If a site requires dynamic functionality such as ecommerce, CRM, personalization, security features, and/or integrated applications, a Content Management System specializing in application management and integration is required. There are many Application Content Management Systems that easily integrate content tools with enterprise and e-business applications for a seamless solution. As the web becomes more and more functional, sites are requiring robust functional components with dynamic data and more and more Content Management Systems are starting to have application management components.



Vignette


Vignette V7 is an integrated platform of applications and web services to create and manage information, business processes, portals and applications. The Vignette Command Center is a configurable, role-based management console that enables business and technical users to manage virtually all of their electronic assets and delivery applications through one interface. What Vignette makes up for in developing dynamic sites, it lacks in versioning. Vignette users often need to write or integrate their own versioning system.


http://www.vignette.com



WebSphere Portal


IBM’s WebSphere is more of an Application Server than a Content Management System. But this powerful set of applications has several impressive Content Management features. With WebSphere organizations can create secure customer portals with dynamic content that are easily managed by users throughout an organization.


http://www-306.ibm.com/software/info1/websphere/index.jsp?tab=products/portal



Document Content Management


Large organizations that share content with partners, internal staff, distributors, and/or customers have content in many different formats. A powerful Document Content Management System allows enterprises to share information in virtually any format over the web, across the network, via email, and/or through powerful versioning systems. Collaboration tools integrated directly with the document creation process allow multiple people within an organization to contribute content to the same document in well-defined and easy to use workflow processes. Powerful collaboration tools enable users to not only create content but associate all available meta information with processes and content components.



Documentum


Document, now a division of EMC, has for a long time been one of the biggest players in document management. Their powerful tools allow large organizations to automate many of the functions involved in collaborative information creation and management. Tightly integrated tools allow users to create documents, or components of a document (ie. an Executive Summary), in most popular formats and selectively/securely share this information across or outside the organization. With a large focus on customer support, Document excels in offering training, documentation, and consulting services.


http://www.documentum.com



FileNet


One the first players in the content management market, FileNet is deeply ingrained in a lot of large organization information sharing structures (80 of the Fortune 100). FileNet tools are built around the needs of large diverse organizations and great for implementing standards in content structures, workflows, and storage.


http://www.filenet.com



Specialty Content Management


Some CMS solutions are built with specific content in mind. Unique pieces of content such as Property Leases, Digital Movies/Music, and Electronic Design Automation content have distinct rules, workflows, and management requirements. For organizations with content that requires management components different from traditional CMS solutions, specialty systems may be the answer.



InterWoven MediaBin


MediaBin is a Digital Asset Management (DAM) solution used by marketing organizations to manage large amounts of digital assets (Images, Movies, Music, Collateral Templates, etc) and marketing content used to promote products and brands. With MediaBin, extended marketing teams easily catalog, manage, transform, and distribute digital assets, including photographs and logos, audio and video, datasheets and ads, presentations and documents.


http://www.interwoven.com/products/dam/



SumTotal Learning Content Management system (LCMS)


Formed from the merger of Click2Learn and Docent, the SumTotal Enterprise Suite helps organizations manage the content used to educate audiences such as employees, partners, and customers. This robust system provides friendly tools for managing learning content such as movies, manuals, and presentations. This system not only focuses on sharing information, but also improving productivity.


http://www.sumtotalsystems.com/



Custom Content Management Systems


All Content Management Systems require developers to perform configuration and integration before they can be used by an organization. In many cases unique requirements or budgetary constraints make out of the box Content Management Solutions inappropriate for achieving the organization’s business goals. Custom CMS solutions enable organizations to satisfy specific critical requirements and maintain a high level of future flexibility. There are development tools such as Rich Text Editors (WYSIWYG), workflow components, and versioning libraries that make custom CMS development the right solution for many organizations. OpenSource CMS solutions, such as OpenCMS and the Apache Cocoon Project allow developers to customize pre-built CMS functions to fit specific needs. Examples of Custom CMS solutions and components include:



Entry Level Content Management Systems


Smaller organizations with simple objectives require low priced CMS solutions that fit the basic requirements for managing websites without related IT costs. Systems in this category require a high level of easy-to-use interfaces that do not necessitate classes and technical support for implementation. Most CMS solutions in this category will lack complex workflows, detailed reporting, clustering, and/or personalization. Instead these systems will focus on the core functions such as editing and publishing. Entry level systems have come along way in the past two years and are a great fit for a wide variety of organizational needs.



Macromedia DreamWeaver/Contribute


This excellent package provides friendly editors with simplified tools for deploying data to public websites. DreamWeaver has a well-deserved reputation for being one of the best WYSIWYG (What You See Is What You Get) editors on the market. Advanced configurations allow developers to create security around template components to ensure specific users and editing only the content that pertains to them. Contribute brings workflow and publishing components to the DreamWeaver editor to enable users with varying levels of technical backgrounds to manage web content.


http://www.macromedia.com/software/contribute/?promoid=home_prod_contribute_082403



Ektron


Ektron was one of the first companies to bring Rich Text Editing to the web and has since created several components to perform common content management functions. Ektron has such a demonstrated lead in the WYSIWYG market that many of the higher end CMS tools mentioned above have integration options for Ektron components. The company's entry-level software costs below $500 for five users, but this version comes without publication user/group permissioning and deployment scheduling.


http://www.ektron.com/cms300.aspx



If you have any questions about CMS options or need assistance in researching your company’s CMS requirements, please contact us at mtsai@extractable.com.


- Ming Tsai




Additional Resources - CMS Vendors



  • Atomz

  • BroadVision

  • Documentum

  • Ektron

  • FatWire

  • FileNet

  • IBM WebSphere

  • Ingeniux

  • Interwoven

  • Lotus Workplace Web Content Management

  • Macromedia

  • Microsoft

  • Midgard

  • Objectify

  • OpenCMS

  • Oracle

  • PaperThin

  • Percussion

  • Red Bridge Interactive

  • SimplyCMS

  • SiteWorks Pro

  • Stellent

  • SumTotal Systems

  • Vignette

  • WebWord

  • Zope

Other useful sites:



  1. http://www.Cms-forum.org

  2. http://www.cmswatch.com

 

2002/02/13

Under the Hood of Content Management Systems - Part I – What is a CMS?

Content Management Systems - these three words can create feelings of elation or frustration in internet professionals depending on their past experiences. Loosely defined, content management systems (CMS for short) are applications designed to make content publishing online easier and/or more structured. In the past several years, the term has been applied to a wide variety of software and database packages offering a wide spectrum of services and functionality.


Our two-part series of articles is designed to shed some light on CMS - its purposes, functions, broad categories, and current market players. This article begins with the basics, describing the functional components of content management systems. Part one is intended as a primer for people who want to understand how content management systems can help their business.


In part two, we will cover the broad categories of CMS. We will discuss the differences between enterprise platforms and their smaller competitors. We will also look at low-priced and open-source options. Finally, we will discuss some specific software packages that stand apart in a crowded marketplace.


What is Content Management?


As any web manager can attest, keeping web site content fresh is a tricky business. In many organizations, the individuals that seek to add new content are different than those that create content, who in turn are different than those that put it on the web site. The back-and-forth between owners, contributors, approvers, producers, and web owners can mean real delays in posting timely content, frustration that small changes take forever, and a significant investment of man-hours when multiple people are involved. Compound this with the integration of third parties, such as an interactive agency responsible for content production, and the end result may be a web site that stagnates with a lack of fresh content.


Content management systems are designed to increase efficiency in content publishing. Some systems are very tactical, making it easier for non-technical users to publish directly to the site (thereby obviating the role of "producer"). Others offer more comprehensive content workflow, making it easier for approvers and owners to be involved. The largest systems provide a comprehensive framework that integrates across the enterprise to deliver content to multiple sources, including a web site.


The Functions


In order to understand what content management systems do, we will describe their functionality starting with the most basic components. We will build on these to demonstrate how more and more robust systems supplement CMS functionality with complex management processes.


Content publishing - The heart of any CM system is the ability to publish content to a web site or intranet. At its most basic level, this provides users with the tools necessary to input content, view it for quality assurance, and push it live to the site. Typically, this means that a specific type of content is put in a specific place on the site in a specific format. A good example of this is a press release.


Press releases must be posted very rapidly depending on their nature. The originators of press release content (say, the investor relations group) may not be affiliated with the web group and may not be technically savvy. A simple form-based content publishing tool allows the content originator to use an online form (typically intranet-based with password protection) to input specific content into pre-defined areas. For a press release, these areas might include "title", "byline", and "body content". When users fill out the form and click the submit button, they are presented with a preview of the page. The content is automatically placed in specific areas of the page, formatted with the appropriate fonts, "wrapped" in the correct site design, and located in the correct part of the site architecture. By clicking "approve", the content is pushed live and the process is complete.


Even simple content publishing tools can have relatively complex technology on the back-end. The system must incorporate functionality to effectively link the site from the site navigation or an index page. In the above example, the "title" field will be used as a link from the press releases page of the site and incorporated dynamically. Many content publishing tools use databases to manage the content. Others will dynamically create "flat files", essentially simple text documents, which are read by the site.


A key limitation of this type of system is that it applies to specific types of pages that need to be updated frequently, such as press releases, events, and announcement sections of a site, rather than publishing to any page on a site. Full-site publishing (below) addresses this need.


WYSIWYG editing


Many types of software packages exist allowing WYSIWYG (What You See Is What You Get) web page development. Built as fully functional software applications, these tools allow users to build web pages without any real knowledge of HTML. Pages are built using a Microsoft Word- or PowerPoint-style editor, allowing users to format content and imagery on the page.


Some content management systems offer formatting controls allowing users to modify how content looks on the page. This can be as simple as allowing font choices, color choices, bold/italic/underline, etc. It can be as complex as full WYSIWYG editing allowing robust control for image placement, tables, and forms. Some WYSIWYG suites have incorporated many of the other functional components we describe in this article, turning them into functional CMS applications.


Full-site publishing


More robust systems take this concept of content publishing and extend it to all pages of the site. Essentially, the methodology for this type of system is similar to content publishing (above) with the addition of tools to allow users to access multiple pages across the site. Users typically access a directory tree to find the site area or specific page to modify. All of the modifiable pages are template-based, meaning that they share design templates that dictate content location, image location, etc. Multiple templates can be used for different areas of the site.


Integration of site


Wide CMS tools is serious business. This is best done as the site is being built out for the first time - retrofitting a site to integrate CMS can often mean rethinking how content, imagery, and navigation are used.


Workflow


Once a system is put in place allowing users to add content to a site, a key corporate requirement quickly presents itself: oversight. Workflow processes provide the communication framework allowing system-based approval processes that are critical for effective site management. In many corporations, approval requirements are varied. Even in a simple corporate structure, once a contributor creates new content, it may need to be approved by the content owner, legal, and site administrator. If any one of these approvers asks for revisions, the process must repeat itself. Workflow systems help to make this process efficient and easy. When a contributor submits content, an email is automatically sent to a predetermined approver or group of approvers. The approver reviews the content in the system and can either approve or reject it. If rejected, it is automatically sent back to the contributor with comments. If approved, it moves to the next person in the approval chain, and so on.


Because these systems are email-based, reviews and approvals can be completed very quickly, reducing the time that manual approvals can take. These systems also provide a documentation trail that many corporations now require for corporate accountability.


Version control


Version control provides a fail-safe mechanism for rolling back versions of content. If content is pushed live that is incorrect, site administrators can use version control systems to immediately go back to a previous version. These systems will often archive content indefinitely, allowing a content trail that can be used for corporate accountability. The biggest benefit of version control is speed. Fixing an error on a page can be as easy as pushing a button.


User Management


In a complex site development environment, system users must have a variety of permissions. These are typically assigned both vertically and horizontally. Vertical permissions define the role that users have as they access the system. A simple role hierarchy might be:


¨ Author - An Author is permitted to create and modify content. All content modifications by an Author must be approved.


¨ Editor - An Editor has same permissions as an Author. In addition, an Editor is permitted to approve/deny content modifications from Authors. Editors may be able to promote content to the live environment.


¨ Administrator - An Administrator has all of the permissions as the above two roles. In addition, Administrators may create/delete/modify users as well as modify template-based content such as navigation.


Horizontal permissions typically permit users to access different sections of the site. Corporate Communications users, for example, may only be permitted to modify content within the Investor Relations and About Us sections of a site. Corporate Communications users will be a mix of Authors and Editors. Administrators typically have all-site access.


User management not only defines the permissions that users have, but usually provides the security infrastructure governing site access. This includes password protection and integration with corporate access protocols.


Multiple Combinations


The CMS components described above represent the range of functionality that different systems offer. How individual CMS packages differ is dependant on how these components are combined as well as the scale at which they are offered. Some packages offer all of these functions, but are only capable of working with small sites. Others offer one or two functions targeted at large enterprises.


In our next edition of Extracts, we will discuss the various categories of CMS platforms as well as highlighting some of the most well-known software packages. If you have any immediate questions about content management, please feel free to contact me at mtsai@extractable.com.


2002/02/03

Book Review: The Object Primer

MUST HAVE!

The Object Primer
by Scott W. Ambler

Even though object-oriented programming (OOP) has been around for many years and is taught in the computer science programs at colleges and universities, there are still many developers who do not know it. What this means is that those who are now performing the migration to OOP are primarily old dogs that need to learn the latest tricks. This book is perfect for that task, Ambler writes very clearly and covers all of the major aspects of OOP.
There are two outstanding features of the book. The first is the clear writing style and the second is the completeness of coverage. Not only are the fundamentals of OOP covered, but the Unified Modeling Language (UML) is also introduced. Since the U in UML could now be considered a representative for Universal, most developers need to be able to understand it. Ambler also covers some of the basic features of design patterns, components, use cases, object-oriented analysis, object-oriented design and object-oriented testing. These are generally considered to be advanced topics, but as presented here are well within the level of an introductory book.
The only negative point is the significant amount of duplication that is done. For example, on page 410 there is a boxed region for the definition:

Subject Matter Expert (SME) - A person who is responsible for providing pertinent information about the problem and/or technical domain either from personal knowledge or from research.

An excellent definition, but the problem is that it was already defined on page 35 and was used many times in the pages between 35 and 410, especially in the chapter on gathering requirements. There are many similar situations throughout the book, so many that I often considered segments redundant.

This book could also be used as a textbook in a course on the principles of object-oriented programming without using a specific language. Some Java code is used, but it is very skeletal and is used to demonstrate the initial steps in constructing your application from the design principles.

Mercury簡易改裝

有同好有一樣的困擾 - 如何使用自己的data logging軟體,因此寫了這篇來分享我的簡易改裝。 Background 雲豆子 MERCURY roaster 烘豆機的設計是使用自行開發的軟體,來:1. 操控風門/火力; 2. data logging/自動烘焙。 ...