Slide show from Bill Scott from his book Designing Web Interfaces.
Also, an awesome post showing 30 essential controls. Must get better at combining controls from Yahoo, and jQuery into .net framework. There's much better stuff out there.
Wednesday, February 4, 2009
Tuesday, January 27, 2009
CSLA for Silverlight
Just noticed this article by Rockford Lhotka in a blog feed regarding a new brand of CSLA for Silverlight.
Here's the CSLA site description of CSLA Light. Enables the transparent communication of the Silverlight XAML UI with CSLA.Net business objects.
Maybe good for a sample project.
Here's the CSLA site description of CSLA Light. Enables the transparent communication of the Silverlight XAML UI with CSLA.Net business objects.
Maybe good for a sample project.
Monday, January 12, 2009
User Interface Advice
I have often found myself getting lost in the myopic creation of great new functionality, without considering where it fits in the overall design. Sometimes, without checking if the users of the application even use it?!?
Tuesday, December 23, 2008
Chunking Data Accross the Network
A recent project involved sending large PDF documents across several firewalls into an HTTP handler for display. Unfortunately, the remoting service cannot handle more than 10 Mb of data at a time. While the most elegant solution may be streaming through a WCF Service, this was not an option at this time. The second most promising solution as chunking the data across the network.
Here's my implementation, where the server portion sits behind a firewall communicating through a remoting service to a HTTP Handler, which renders a PDF document. This same technique could be used for any type of file especially considering constraints with File Uploader controls.
Server - ChunkBytes function takes three parameters: document ID (to look up path), Maximum chunk size, and offset position.
ChunkBytes(docID as integer, maxChunk as integer, offset as integer) as Byte()'first convert file to document streamDim documentStream as FileStream = New FileStream(fileLocation, FileMode.Open, FileAccess.Read)Dim newArray as Byte()'if the offset position is greater than the length return NothingIf offset > documentStream.length - 1 thennewArray = NothingElse'create the chunk as a byte arrayDim byteCount as integerIf maxChunk > documentStream.length - offset'if we're on the last chunk, the array size will be smallerbyteCount = documentStream.length - offsetElse'otherwise set to maxChunkbyteCount = maxChunkEnd If'create the new array with the correct sizenewArray = New Byte(byteCount - 1) {}'position the file stream to the correct positiondocumentStream.Seek(offset, SeekOrigin.Begin)'read the chunk from the filestream into the new arraydocumentStream.Read(newArray, 0, byteCount)End IfReturn newArrayEnd Function
The client in our case is on the HTTP Handler inside the ProcessRequest sub. Each chunk is written directly to the http context, however in another setting you could collect the chunks in another array and output as needed.
'create the maximum chunk size the network can handle we're using 10 MbDim maxChunk as Integer = 10 * 1024 * 1024Dim offset as Integer = 0'get the length of the documentDim documentLength as Integer'now get the first chunkDim documentBytes as Byte() = DocumentByte.ChunkBytes(ID, maxChunk, offset)'keep getting the next chunk until the function returns nothingDo Until documentBytes Is Nothing'write the result to the contextResponse.BinaryWrite(documentBytes)'incriment the offsetoffset += maxChunk'get the next chunkdocumentBytes = DocumentByte.ChunkBytes(ID, maxChunk, offset)Loop
Image Rendering: Bicubic Interpolation
This article shows a quick fix for IE7 image rendering. The CSS fix applies bicubic interpolation algorithm for image rendering. I used it like this, img {-ms-interpolation-mode:bicubic;}
The first image demonstrates a bicubic interpolation implementation.
I honestly had to look up this wiki article regarding bicubic interpolation.
Thursday, December 11, 2008
Silverlight Toolkit
While I've built a simple Silverlight control, we didn't get to use it because they don't want customers to have to download the Silverlight.
However, this could be very cool and an easier use of the technology with the Silverlight toolkit. I use the Ajax toolkit everyday, I'm sure this one could be just as helpful.
Tuesday, November 18, 2008
Design Process
This refactoring iteration is also the step which many project planners fail to allocate enough time for in their planning.
Subscribe to:
Posts (Atom)