7/24/2008
LifeCycle Solutions - Home ( the software development blog )
 

<July 2008>
SunMonTueWedThuFriSat
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

Subscribe to this feed:

RSS 2.0 | Atom 1.0 |CDF





Add to Technorati Favorites

Wednesday, December 12, 2007

One of the fun things about working at LifeCycle is the constant exposure to a wide range of technologies.  We have clients in just about every vertical market you can name, so we see a variety of "cool stuff" on a regular basis.  For example, one of our clients, Global Security Systems, offers an emergency communications solution called ALERT FM

ALERT FMALERT FM is a product created out of necessity -- after Hurricane Katrina hit in 2005, the founders of Global Security Systems knew there had to be a better way to get emergency information out to people.  In many areas, the communications infrastructure was partially or completely destroyed; however, even in the hardest-hit areas, most people could still get information through their FM radio stations.  Building on this, the company created GSSNet, a network of existing FM radio stations that could be used to transmit data over the FM airwaves. 

Global Security Systems now offers ALERT FM, a suite of tools for sending and receiving messages over the GSSNet backbone.  For receiving alert messages, the company currently offers an inexpensive battery-powered receiver, a USB stick with a built-in ALERT FM receiver and a wall-mounted device that can be used in schools and businesses.  Out of the box, users can receive weather alerts and other important information for their area.  For sending alert messages, the company offers a personalized web portal to state/federal/local government and businesses in the private sector.  Government users, like state and county emergency agencies, can generate their own alert messages to be broadcast in their area (e.g. notifying people to stay away from an area due to a hazardous chemical spill).  Companies in the private sector can also use the portal to send out their own "private" alerts, making ALERT FM a good solution for companies concerned with alerting their employees in the event of a disaster.

If your company is formulating a disaster recovery or business continuity plan for 2008 and beyond, you should get in touch with ALERT FM -- it's a very effective way to quickly broadcast information to your employees when other means of communication aren't available.  ALERT FM is one of the coolest things we've had an opportunity to be a part of in 2007.

Posted by Brian Parks

I recently had an ASP.NET project with the following requirements:

- Build 2 CSV files from SQL Server data based on parameters specified by the user
- Build a ZIP archive containing these files and allow the user to download

It's been a while since I'd worked with ZIP archives in ASP.NET, so I thought I'd share the solution.  One of the best libraries I've found for creating a wide range of compressed files is SharpZipLib. There are numerous examples of compressing files located in the file system with SharpZipLib, but this project required me to build the archive in-memory in order to avoid unnecessary disk I/O.  Here's how it's done:

string summaryResult = BuildOrderSummary(); string detailResult = BuildOrderDetail(); string fileName = "Orders.zip"; Encoding ascii = Encoding.ASCII; MemoryStream memOutput = new MemoryStream(); ZipOutputStream zipOutput = new ZipOutputStream(memOutput); zipOutput.SetLevel(5); //convert the strings into byte arrays byte[] headerFile = ascii.GetBytes(summaryResult); byte[] detailFile = ascii.GetBytes(detailResult); ZipEntry summaryEntry = new ZipEntry("OrderSummary.csv"); ZipEntry detailEntry = new ZipEntry("OrderDetail.csv"); //add the summary file to the ZIP archive summaryEntry.Size = headerFile.Length; zipOutput.PutNextEntry(summaryEntry); zipOutput.Write(headerFile, 0, headerFile.Length); //add the detail file to the ZIP archive detailEntry.Size = detailFile.Length; zipOutput.PutNextEntry(detailEntry); zipOutput.Write(detailFile, 0, detailFile.Length); //clean up the ZIP stream zipOutput.Finish(); zipOutput.Close(); //clean up the memory stream memOutput.Close(); //send the ZIP file back to the user Response.ContentType = "application/zip"; Response.AddHeader("content-disposition", "attachment; filename=" + fileName); Response.BinaryWrite(memOutput.ToArray()); Response.Flush(); Response.End();
Posted by Brian Parks

© 2006 LifeCycle Solutions, LLC | All Rights Reserved