AWG Blogs

Sunday, July 25, 2010

Using WDS for VMware Server Deployment

The goal was to follow this excellent walk-through -- http://www.oakdome.com/lab/?page_id=78 -- to capture and deploy a Windows XP image (as a test) from and to a guest in the free VMware Server.

Everything went real well except for a few stumbling blocks.

First, I found out through much googling that it's acceptable, even preferred to run the WDS on a separate server than the DHCP server. Perfect. My DHCP server is a CISCO router anyway. For some reason I thought they had to be on the same server and a Windows one at that.

Then, I had to setup the guest to use the right nic. Again, I found out that I need to run Manage Virtual Networks as Administrator (on Vista) or else the Automatic Bridging options are greyed out.

Then I learned through a few threads on social technet that the reason the Windows Deployment Services Image Capture Wizard would freeze after checking the Upload image to WDS server checkbox and entering the server name is because the network connection is not setup. I hit shift-F10 and did ipconfig, and there was no network. The solution is to export the currently loaded boot image from the WDS to a temp directory. Then make sure you have WAIK (for Vista) installed on the WDS or another server to which you copy the wim file image. Then copy all the files from C:\Program Files\VMware\VMware Tools\Drivers\vmxnet to c:\temp\vmxnet. Then C:\Program Files\Windows AIK\Tools\PETools>imagex /mountrw c:\capture\capturebootimage.WIM 1 c:\image
Then
C:\Program Files\Windows AIK\Tools\PETools>peimg /inf=c:\temp\vmxnet\*.inf /image=c:\image\Windows
Then C:\Program Files\Windows AIK\Tools\PETools>imagex /unmount /commit c:\image
Then copy back the image, and reimport it into the boot images of WDS, naming it something like "Boot image with VMXnet drivers." Then when you PXE boot choose that image from the menu.

This same process has to be done for the deployment image. But this time, since you are using the Vista boot image, the command has to be run from a Vista or later OS apparently, or else you get PEIMG failed to complete the operation with status code 0x800703fb. when attempting to inject the drivers. I managed to inject the drivers by installing WAIK on a Windows 7 Ultimate VM, with VMware tools installed, from which I injected the vmxnet drivers. Be sure to do c:\windows\system32>imagex /mountrw c:\temp\boot.wim 2 c:\image -- Note the "2." Evidentally, there's a second image in the boot.wim that came with the Vista sources, which contains the WDS image. Note that the boot.wim file was copied from the Vista 32 DVD sources NOT the Windows 7 sources. The latter will not work.

Tuesday, July 6, 2010

Set clientJsLocation when using HTML_AJAX in XAMPP

Please remember to set clientJsLocation, e.g.:
$server->setClientJsLocation('C:/xampp/php/PEAR/data/HTML_AJAX/js/');


Or else, you will get an error like: Unable to find javascript file: .\pear\data\HTML_AJAX\js\HTML_AJAX.js

HTML_AJAX 0.5.6 with XAMPP 1.7.3.

The only thing I can think of that causes this is reinstalling HTML_AJAX-beta via pear install? Otherwise, I guess it's understand we should always set the path. Now you know. (speaking to self)

Friday, July 2, 2010

WSS 3.0 Incoming Email -- Must use FQDN

I wanted to be able to send email from my Outlook to a WSS discussion list. After much testing and troubleshooting with various configurations (and a lot of googling) I came to realize that (barring any workarounds that I'm not aware of) the CA - Operations - Incoming E-Mail Settings - E-mail server display address MUST match the machine FQDN! It cannot be the machine's DNS name. I tried adding the DNS name of the machine here, and email would just get bounced back (or get stuck in the Queue since I didn't have the smart host configured and this is not an Exchange server).

So as a result, I can send email using discussions@mymachine.fq.dn -- but NOT discussions@mymachine.dns.name.

I'm sure there are workarounds, but they might involve fiddling with Exchange servers and/or DNS servers that are outside of my control.

Now that I think about it, it makes sense that the WSS doesn't understand the DNS implications; why should it? On the other hand, why can't WSS figure out that mymachine.dns.name is the local server? Hmmmmm. Perhaps it's an IIS 6 SMTP limitation...

Saturday, June 5, 2010

MyEDB - NO Indexes to be Managed

This is because in My Entity Database all Entities are defined in a single index table called entity, which provides the link between the types and properties. The actual values of an entity reside in type tables which themselves are all indexed on their value column.

So, no indexes to add and manage. That eliminates probably 50% of a DBA's duties...

ref: http://myedb.blogspot.com/2010/06/myedb-no-indexes-to-be-managed.html

Friday, June 4, 2010

Errors when adding FormView to SmartPart with AJAX

When I added a FormView control embedded in an UpdatePanel in a User Control, in a SmartPart with AJAX I got the following error when attempting to switch to Edit mode:
Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_ctl00_xxxx'. If it is being updated dynamically then it must be inside another UpdatePanel.
I never did find a solution to this problem. But I found that if I cleared out the web parts out of the Web Part zone, then readded the smart part that appears to have fixed the issue.

I did run into other issues when adding multiple AJAX-enabled SmartParts to a Web Part zone, such as the entire zone blanking out other than the one control when switching to Edit Mode. Again, clearing out the controls and re-adding them, seems to resolve these issues, although I fear they'll crop up again...

Sunday, May 23, 2010

The Original MVC

The MVC is the object of somewhat of a religious ferver in the web development community. Many frameworks -- e.g. Zend Framework, CodeIgniter, etc. -- appear to me to be attempts at literal instantiations of the paradigm. Those frameworks have little appeal to me because they lock the developer into this single way of doing things. When the inevitable time comes that that way is not appropriate, the developer must resort to the framework's many workarounds, e.g. helpers or plugins (to plug the leaks? :)), extended classes, or hacks.

I wondered if the MVC is being used as it was originally intended so I researched it and read some of the creator's comments.

The MVC wasn't even called the model-view-controller; originally it was the model-view-editor. Additionally it was conceived by Trygve M. H. Reenskaug to solve the problem of network problems of the yards of the Aker Group in Norway. I think the idea got over-subscribed to by wannabe developer purists and their disciples, and as a consequence was bastardized into the impractacal forms we see depicted today around the internet.

Now, I admit, I haven't done complete dilligence on this research and so my conclusions may be premature or inaccurate. But when I see what I perceive to be serious inconsistencies between a implementations/interpretations of a model, I have to question whether the model as we know it is itself in its purest form.

For example, the Zend Framework, in which I'm no expert, apparently presupposes a single view delivered to a user at one time. If the model data must be aspected on the page, the developer has to use helpers or the ActionStack or some other hack to get the data on the page. I think this is a too-strict, too-literal, and consequently untenable, implementation of the MVC.

By contrast, the author of MVC appears to indicate multiple views presented can be the norm:
A user task may commonly be better performed with several Views present on the screen at the same time. The user will want to manipulate these Views through pointing at them, through selection in menus, or through some other means. Commands like selection typically apply to several Views at the same time. The purpose of an Editor is to establish and position a given set of Views on the screen, to coordinate them and to provide the user with a suitable command interface.

Some comments by Reenskaug lead me to wonder whether the MVC or MVE is applicable to web development at all:
Conversely, a view should never know about user input, such as mouse operations and keystrokes. It should always be possible to write a method in a controller that sends messages to views which exactly reproduce any sequence of user commands. http://heim.ifi.uio.no/~trygver/2007/MVC_Originals.pdf
How can we conclude that a PHP script can be an implementation of a "view" then? Is this what Reenskaug meant when he referred to the "perverted variants" of his model found in texts? http://heim.ifi.uio.no/~trygver/

Sunday, May 16, 2010

CodeIgniter versus MyEDB

CodeIgniter like most CMS's and their underlying frameworks assumes entities are mapped to tables in relational databases. MyEDB presumes the MyEDB model of data (http://www.myedb.com).

CodeIgniter like most (PHP based) CMS's assumes the view (in the MVC pattern) is composed of templates in the form of PHP files (some CMS's use non-PHP files but are nonetheless PHP interpretable in some form) which are passed parameters ala Smarty. MyEDB uses XSLT.

CodeIgniter allows the user/developer to invoke a single entry point to the system through a single controller class action pair. MyEDB allows the client to invoke a series of class action pairs, in essence multi-action controllers (maybe like Spring multiactioncontrollers? but more specifically multiple controllers) to be executed iteratively in sequence through the HTTP posting of appropriately named array variables, specifically class method pairs.

In CodeIgniter (and Zend Framework, and CakePHP, and... you get the picture) the view is an intrinsic component of the controller (defeating the notion of controller view independence). In MyEDB, the "view" is abstracted from the "controller" by a series of processing steps (see image below), ensuring total flexibility. In short, in MyEDB you are not chained down to a single way of doing things from an MVC perspective!

MyEDB Source
myedb.com