Archive for May, 2008

David Chappell on Software + Services

I had a chance to see David Chappell speak at the Microsoft offices in Downers Grove this past week. If he is coming anywhere near you to talk on Software + Services, I recommend that you go see the talk. I’ve got a summary of what he covers here, but you’ve got to see him in person to get the talk. The man is an amazing communicator and helped me connect some dots that I hadn’t quite connected in a while-whether that was due to sloth on my part of great speaking on David’s part, I don’t knowJ.

Anyhow, here’s a few hundred words explaining some of what I got out of it.

Training Date: May 20, 2008, 1-4 PM

Location: Microsoft offices, Downers Grove, IL

Presenter: David Chappell, http://www.davidchappell.com/

Summary

The reliability of the Internet, relatively low cost of connectivity, and widespread presence of high bandwidth connections has provided a path for application architectures to evolve. Specifically, this set of changes allows application vendors to provide common applications to end users. Today, these common applications include e-mail, CRM, storage, web site hosting, mapping (ex. 1 Main St., Mundelein, IL), and database hosting. Providers host these services on the Internet, also called the ‘cloud’ by the software services community. These services commonly provide the following features:

  • Data mobility: Consumers own their data and can change providers or move the data in house as needed.
  • Application integration: The service in the cloud is part of a larger application used at the enterprise.
  • Application customization: The service in the cloud may allow the consumer to customize the application to handle special business needs.

Two terms describe the different business models for the services in the cloud: Software as a Service, SaaS, and Software + Services, S+S. SaaS offers a complete software package in the cloud. SaaS instances may allow for integration and customization. SaaS does not provide much of a role for corporate IT departments outside of application development. S+S describes a hybridization between today’s common model of self-hosting applications and the SaaS world. SalesForce.com offers an example of a SaaS application. SalesForce.com manages all the data, the application uptime, etc. An S+S example is a bit more involved, but probably more common for businesses as it allows for control of the perceived competitive advantages of a business.

S+S includes the types of applications that use cloud services as well as custom, in-house services. For example, a business could host Exchange Server locally but make use of a service provider to handle advanced Exchange functionality such as Outlook Web Access, web calendaring, or discussion lists.

With terminology and ideas covered, what else does a business need to look out for? The business should evaluate the service provider in the same way that they would evaluate a packaged, installable software. Beyond that the consumer needs to decide if the service meets their needs.

In both packaged software and services, one must look at how the vendor is trying to lock in the consumer. This lock in happens in different ways. They may lock down data, making it difficult to move to a new vendor. They may also create a platform type of lock in. The platform lock in can cause many different kinds of problems. If the lock in is through the tooling and programming languages, a consumer may find it difficult to port customizations to equally good platforms. Likewise, it may prove difficult to find reasonably priced developer talent. For example, SalesForce.com uses the Apex programming language. Apex is specific to SalesForce.com and isn’t commonly available elsewhere. Other tools, like Microsoft Dynamics CRM and Google Apps, use common extension languages, allowing for a larger developer pool. Microsoft Dynamics uses .NET based languages and Google Apps uses Python.

Leave a comment

Data Structures

I have a friend who teaches Computer Science. One of the things we’ve discussed is the need for students/entry level hires to really understand basic data structures. This is true even though most popular languages do the basic ones quite well (linked list, hashtable, queue, stack). A consequence of these things being in most languages is that many of today’s students aren’t being required to actually build these data structures as part of their education. Many problems in the work place involve situations where one needs to know the characteristics of the data structure in order to implement the most efficient algorithms. One acquires this knowledge through actually building the data structures at least once.

I believe that many of the folks who grew up programming for the web are getting to a point where their script skills will need to fill in these gaps in their education. Browser apps are approaching desktop applications in terms of presentation, interactivity, and capability. The next step in the evolution of browser applications will require developers to have knowledge of the basic data structures and their variance implementation options. The reason: unlike the desktop languages we all use, the browser’s programming language, JavaScript, doesn’t have any of these. (If I’m mistaken, let me know!)

Right now, I’m reviewing the data structures and algorithms that I learned during the first two years of college. I’m also trying to bring myself up on my level of understanding JavaScript. I think that some of these diversions might prove interesting to the world at large. Today, I’ve implemented a linked list. A linked list has the following characteristics:

  1. Add at the front or end of the list takes O(1) time.
  2. Extraction of the nth element takes O(n) time.
  3. Insert at a given position, k, takes O(k) time.
  4. Delete at a given position, k, takes O(k) time.

Linked lists are effective when typical usage of the list is in scanning all elements. A linked list is ‘nice’ to memory management. That is, the room needed for the list + one more linked list node is:

Z = (size of node) = ((size of data) + (reference to next node))

(total memory in use when adding a node) = Z x (number of nodes + 1)

This is an improvement over the typical JavaScript Array type whose worst case characteristics for adding one more element to the list is

Z = (size of node) = (size of data)

(total memory needed when adding a node) = Z x ((2 + growth size) x number of nodes)

In many algorithms for array growth, the algorithm calls for a doubling of the array’s allocated memory. The reason that so much memory is required is that arrays require contiguous memory in order to maintain O(1) lookup time at any given element.

A Doubly Linked List Implementation

A doubly linked list is a list that one can use to go both forward and backward from one node to the next. To accomplish this, I’ve created three classes:

function LinkedListNode() {

}

 

LinkedList.LinkedListNode = {

Data: null,

Next: null,

Previous: null

};

 

LinkedListNode keeps track of the data, the Next, and the Previous nodes. The algorithms involved all assume that the linked list Next and Previous members will only be other LinkedListNodes or null.

function LinkedListIterator(){}

 

LinkedListIterator.prototype = {

_current: null,

Current: function() {

var retval = null;

if (this._current != null)

{

retval = this._current.Data;

}

return retval;

},

Next: function() {

if (this._current != null)

{

this._current = this._current.Next;

}

return this._current != null;

},

Previous: function() {

if (this._current != null)

{

this._current = this._current.Previous;

}

return this._current != null;

},

HasData: function() {

return this._current != null;

}

};

LinkedListIterator allows one to go forward and backward within a LinkedList. The iterator can become invalid when it runs off the front or back of the LinkedList.

function LinkedList(){}

 

LinkedList.prototype = {

_head: null,

_back: null,

_length: 0,

Add: function(data) {

var newNode = new LinkedListNode();

newNode.Data = data;

if (this._head == null)

{

this._head = newNode;

this._back = newNode;

}

else

{

newNode.Previous = this._back;

this._back.Next = newNode;

this._back = newNode;

}

++this._length;

return newNode;

},

RemoveAt: function(index) {

var currentIndex = 0;

var nextNode = this._head;

while (nextNode != null && currentIndex < index)

{

++currentIndex;

nextNode = nextNode.Next;

}

if (currentIndex == index)

{

nextNode.Previous.Next = nextNode.Next;

if (nextNode.Next != null)

{

nextNode.Next.Previous = nextNode.Previous;

}

}

return nextNode;

},

Length: function(){

return this._length;

},

InsertAt: function(index, data) {

var currentIndex = 0;

var nextNode = this._head;

var newNode = new LinkedListNode();

newNode.Data = data;

 

if (index == 0)

{

// Insert at head

if (this._head == null)

{

this.Add(data);

}

else

{

newNode.Next = this._head;

this._head.Previous = newNode;

this._head = newNode;

++this._length;

}

}

else if (index >= this._length)

{

// Add to the end.

this.Add(data);

}

else

{

// Insert in the middle

while (nextNode != null && currentIndex < index)

{

++currentIndex;

nextNode = nextNode.Next;

}

if (currentIndex == index)

{

nextNode.Previous.Next = newNode;

newNode.Previous = nextNode.Previous;

newNode.Next = nextNode;

nextNode.Previous = newNode;

++th
is
._length;

}

}

return nextNode;

},

GetIterator: function(){

var retval = new LinkedListIterator();

retval._current = this._head;

return retval;

}

};

Finally, this is the linked list data structure. It allows you to insert at a given location, remove a given item, add an item to the end of the list, and can create a bi-directional iterator to allow you to walk the list from front to back and to the front again. Since I’m a Windows guy, I tested out the structure using cscript.exe.

function DisplayList(list)

 

{

 

var iterator = list.GetIterator();

 

 

if (iterator.HasData())

 

{

 

do

 

{

WScript.Echo(iterator.Current());

}

while(iterator.Next());

 

}

}

 

 

function TestLinkedList()

{

var list = new LinkedList();

list.Add(15);

list.Add(“Hello, World!”);

WScript.Echo(list.Length());

DisplayList(list);

WScript.Echo(“—”);

list.InsertAt(1, new Date());

DisplayList(list);

WScript.Echo(“—”);

list.RemoveAt(2);

DisplayList(list);

WScript.Echo(“—”);

}

 

TestLinkedList();

If you need a refresher on linked lists and their variants, Wikipedia has a good write-up that I won’t repeat here.

 

 

 

Leave a comment

Group is gathering momentum

In case anyone in Lake County, Illinois/Kenosha County, Wisconsin reads this blog, I’d like you all to know that the LCNUG group is already gaining momentum. To give some people an idea of how fast things can move, I’d like to take some time to explain what is going on. I’ll post (when I remember to do so) about what is going on with the group and how we are doing as we go through our gestational phase.

The first thing I did was pick a ‘dream venue’. In this case, I wanted a local location with great parking, centrally located, and with space to host a largish group. The local community college was my first choice. I sent a message to the head of the CLC Computer department who put me in contact with their .NET instructor, John North. John and I talked about what a .NET User Group is, when they meet, etc. He then worked with his department and got us a location. CLC has a charter that includes working with the community. His department used this reasoning to get approval for the LCNUG to meet on the last Thursday of the month for every month except November and December (dates are November 20 and December 18 in these cases). Once this was done, I set out to contact the local developer community so that we could have some attendees at our first meeting.

In the process, I found out that another local programmer, Tim Stall, had just started meeting with his coworkers for the same reasons as me-driving to downtown Chicago or Downers Grove is a bit far for folks who work in Lake County. Tim and I found each other by contacting our local Developer and Architect Evangelist. At this point in time, that’s Dave Bost and Larry Clarkin. Dave and Larry made sure that Tim and I got on the same page. They also looped in Keith Franklin, who runs CNUG, so that we could get linked from their site. This all happened over the course of a few hours. I’ve also got people sending me messages and asking to help out.

Why do I bring this up? I thought that anyone else looking to start a .NET Users Group would be interested in finding out what does it look like from the time one says ‘we need a group in this area’ to actually getting a group together. I started the process when I contacted CLC on April 17, 2008. At this point, I’ve got the following things ‘done’:

  • Scheduled a venue through the end of the year
  • Contacted Microsoft
  • Setup a web site
  • Setup an account on CodeZone.
  • Setup an account on INETA. FWIW, their ‘register a .NET user group’ form is busted. I’m looking for alternate ways to register. Fortunately, I have some avenues to investigate.
  • Have some feelers out for sponsors.

Doing this isn’t too hard. Like I said, I’m also starting to get help from others. I don’t want this to be the ‘Scott Seely’ show. I want a group where I and other like me can learn and socialize.

I’ll let you know how everything works out.

Leave a comment

Follow

Get every new post delivered to your Inbox.