Showing posts with label development. Show all posts
Showing posts with label development. Show all posts

14 December 2007

PowerCollections: Introduction

If you're still not aware of the Wintellect PowerCollections, now is the time. This library was designed to extend the standard class library with new containers and pre-written algorithms. A list of the containers with short descriptions follows:

  • Bag<T> - is a collection that contains items of type T. It's like a set, but allows duplicate values.
  • BigList<T> - provides a list of indexed items, like the standard List class. However, BigList is optimized for efficient operations on large lists, especially for insertions, deletions, copies, and concatenations.
  • Deque<T> - is an implementation of so-called Double Ended Queue. That means, in a Deque, items can be added to the beginning or end equally efficiently, regardless of the number of items in the Deque. However, a Deque is a little bit slower than a List when being indexed to read elements.
  • MultiDictionary<TKey, TValue> - is a class that associates values with a key. Unlike a standard Dictionary, a key can have multiple values (Enumeration) associated with it.
  • OrderedBag<T> - is a collection that contains items of type T in a sort order, and allows duplicate values in it.
  • OrderedDictionary<TKey, TValue> - is a collection that maps items of type TKey to items of type TValue. Only one value (which can be null) per key is allowed. The inner structure is a balanced binary (sorted) tree. Unlike Dictionary, keys of this collection are compared through the compare function, not by hash.
  • OrderedMultiDictionary<TKey, TValue> - is a collection like OrderedDictionary, but allows more than one value per a key. All these values are stored in sorted order as well as keys.
  • OrderedSet<T> - a collection that stores items of type T in sorted order, and doesn't allow duplicates.
  • Set<T> - is a collection that just stores unique items of type T. Items are compared through the Comparable interface or the Equal method.
Here is at least one container that was implemented not merely to benefit in its unique functions or conceptual features, but because of performance. I'm talking about the BigList vs List competition. I'm gonna test their performance in the coming article.

9 November 2007

XForms standard

Recently I ran across the XForms term and became interested in.
I found out that the term means a new standard to be used in the web, and to be included in the XHTML 2.0 standard. The XForms approach allows developers to use the MVC pattern without any additional coding/scripting taking into account dynamic control-data loading (AJAX-like). This aims to simplify the web-forms development by far, and (that is more important) to give users a cutting-edge standard that doesn't seem to be differently interpreted by companies alike Microsoft.

I've found a good article describing this standard, not too far:
http://en.wikipedia.org/wiki/XForms

28 August 2007

The BackgroundWorker's slip

Today I've faced a problem with the BackgroundWorker class. Or two problems..
First, the IsBackground property of its thread is set to true - that means that the thread will be terminated immediately when the process tends to close. That problem could be solved simply:

Thread.CurrentThread.IsBackground = false;

But the second.. the second is that the RunWorkerCompleted handler is called asynchronously, and will never be called if the thread is aborted due to the application's closing. That's why it is a bad idea to write to the log in such event handler - the log will never state whether the thread has been cancelled, crashed due to an error or finished successfully.

To solve these two problems I offer to implement own version of BackgroundWorker, that will have synchronous and asynchronous "OnComplete" calls, at least. And won't run background thread.

Will try to do that later and update the post.

9 June 2007

Adobe Apollo Applications examples

Here you may see all that stuff. I really enjoyed the Fresh application which is kind of skinnable RSS-reader (a real desktop application, a little bit slow though).

I ought to add that the "real desktop application" is an illusion created by its visual representation. At the bottom there is pure HTML and Javascript. I think it is kind of Adobe's implementation, I haven't found any difference though. To the point, it seems the Apollo is good at showing standard web-pages (with font anti-aliasing and slow-rendering scroll)

17 May 2007

jQuery rocks

Just to make a note - it would be convenient to use the jQuery library next time I need to write more or less complicated javascript code block. It simplifies document node access, manipulating with DOM, gives an ability to implement queer visual effects with one line of code.

List of useful links goes below:

One more note - there are lots of plugins for the javascript library. Just use Google Search :-).

15 May 2007

Drill'em all

I've just noticed, that it would be a very useful program - the program which allows to learn as much of words-synonyms as it possible, on a particular subject. For example, all the kinda "good" epithets like "good", "nice", "pleasing", "pleasant" etc, and with division by target noun - human, thing or phenomenon (something else?). It resembles the "activator" feature, but ought to be more friendly to user and aimed on learning only.

Interestingly, what kind of interface and conception of interaction could be used for such software. Has someone got an idea?