Posts filed under 'WB Editor'
Too many debates are there about SOAP vs. REST, contract first vs. code first.
But here is my real life experience during developing WB Editor when it needs to connect web services through those famous RESTful style APIs.
First, the API documents usually have no schema definitions other than request and response XML examples. Examples are good for human to read. But after reading, where is the code that I can work with? I have to write code to parse those XML! - This is a pain. If there was schema, machine could generate client code stubs automatically. The nice “Add web reference” way.
Second, maybe the web service providers realized the issue mentioned above. Usually there are client libraries are also available, such as libraries for Java, for .NET, for PHP, for Python and for Javascript …. If using libraries, what is the differece between them to those C libraries ages ago? As long as the the library black box can talk to the server no needs to bother whether underneath it is HTTP, whether it is XML or binary.
I cannot imagine if in my company, when I publishing tones of web services to other departments or clients, I have to also deliver client libraries, for Java, for .NET ….
Tags: WB Editor, SOAP, REST, API, schema, Add web reference, web services
June 8th, 2007
My default SQL CE database was deployed to ClickOnce Data Directory. If changed the database schema, ClickOnce will deploy the new database and keep the old database file (in .pre folder). Here is the psuedo code to migrate schema:
if (IsFirstRun)
{
if (customMigrationORMergeNeeded)
{
string dataFolder = call the API
// Database from V1 of the app
string oldDatabase = Path.Combine(dataFolder,”.pre\db1.db”);
if (File.Exists(oldDatabase))
{
string newDatabase = Path.Combine(dataFolder,”db1.db”);
//perform the task needed with old and new one
DoPerformCustomMigrationORMergeAsNeeded();
}
}
What about removed the program from control panel? Data are all gone.
Looks like better to copy database file to the application data folder.
May 15th, 2007
In IE: open “Tools | Internet Options -> Security”, add the SharePoint sites in “trusted sites”
In firefox: open firefox browse to about:config find “network.automatic-ntlm-auth.trused-uris†modify the value and enter in SharePoint intranet sites that you must pass your username and password to. For some site i connect to i also had to add values to: “network.negotiate-auth.delegation-uris†“network.negotiate-auth.trusted-urisâ€
July 20th, 2006
During the WB Editor 2.5 testing, we found an interesting concurrency control issue. In this version, we allowed multiple program instance for ease of cross posting.
Now in multiple instance windows, user can setup blog server accounts differently. Which one is the winner?
“Last one wins” was disapproved by QA.
Maybe we need optimistic concurrency. I this case user will receive a dialog saying “another instance has modified the settings”, do you want to overwrite or discard or reload?
Another option is concurrency control with change notifications. Using FileSystemWatcher to detect changes of configuration file, but what should happen next in UI?
Tgas: WB Editor concurrency control Last one wins optimistic change notifications multiple instance blog cross posting FileSystemWatcher
May 10th, 2006