March 2004 - Posts

You want to build your own PC next time? Make it small....
24 March 04 10:19 AM | MikeD

This is too cool. There are a ton of projects on this website about building small PC's, but this one was sent to me in particular. I was fascinated by the process, but what he did at the end of the project seemed to be the biggest trick of all. 

http://www.mini-itx.com/projects/windowsxpbox/

Filed under:
Flame Warriors
19 March 04 04:50 PM | MikeD | 1 comment(s)

There are 10 groups of people in the world, those who blog and those who don't....

Actually according to Mike Reed, there are 90 types of Flame Warriors.

I suppose I may sometimes come across as an Evil Clown.

Filed under:
Report rendering engines
19 March 04 03:38 PM | MikeD | 2 comment(s)

I'm investigating reporting options.

We have the following requirements:

  • our client software must be able to run offline (disconnected from the server) and produce reports.
  • the reporting engine must take a report definition and bind to a DataSet as the source data.
  • the rendered report should be viewable, printable, and emailable, and exportable to PDF, HTML, and various text formats

We're looking at Crystal Reports and SQL Reporting Services.

To me, it looks like the ability to work offline removes SQL RS from the contest. Is there a way to distribute the SQLRS rendering engine on the client so it can work offline?

 

Filed under:
SQL Reporting Services - Expression language?
15 March 04 12:06 PM | MikeD | 2 comment(s)

I'm starting to use SQL Reporting Services. I've got some textboxes that I want to format nicely for an address, for example.

Unit
Street
City Region PostalCode
Country

All this needs to be in one textbox. If Unit or Street is null, then there should be no blank line.

So, I've got an expression in my Textbox Value property:

=Fields!Unit.Value + IIf(Fields!Unit.Value=““,““,chr(13) + chr(10)) + Fields!Street.Value + chr(13) + chr(10) + Fields!City.Value + “ “ + Fields!Region + “  “ + Fields!PostalCode.Value

It sorta works, I just tried out the chr(13) + Chr(10) bit and it does put in a carriage return. I'm now seeing if I can use IsNull() [first crack at that is that it doesn't exist] and IIf() does exist.

My question to the blogsphere is this: what expression language is used in SQL RS? VBA? It doesn't look like .NET. Is there a reference anywhere as to what functions are available?

Mike

Microsoft Security slide deck
11 March 04 08:53 AM | MikeD

From Dana Epp...

Microsoft has released a slide deck and white paper on their Application Security Assurance Program.

Microsoft founded the Application Security Assurance Program (ASAP) to inventory, assess, and-when necessary-ensure resolution of security vulnerability issues found in line-of-business applications. Topics include the program's criteria for assessing applications, the participants in the review process, the requirements for a secure application environment, lessons learned while evaluating applications at Microsoft, and best practices for enhancing the security of applications in development.

This stuff is from the Microsoft IT group, which is the group that runs Microsoft's network infrastructure. The slide deck contains lots of good practical actions.

Smart Client Offline Application Block
03 March 04 06:01 PM | MikeD

It appears that Microsoft has published the Smart Client Offline Application Block, even though the Patterns and Practices Group says it is “Coming Soon“. The block itself is available for download here.

This page provides an overview of the Offline Application Block, which is intended to serve as an architectural model for developers who want to add offline capabilities to their smart client applications. The block demonstrates how to:

  • Detect the presence or absence of network connectivity.
  • Cache the required data so that the application can continue to function even when the network connection is not available.
  • Synchronize the client application state and/or data with the server when the network connection becomes available.

The block has various pieces, but the essential subsystems are:

Connection State Management - a mechanism that determines when the user is connected to the network or not, as well as a mechanism for the user to specifically direct the system to be online or offline.

Service Agent Management - a registry of Application Service Agents, which are classes that broker service requests which may be fulfilled remotely when online or locally when disconnected. A ServiceAgent class performs any tasks locally, within the block. These tasks can include creating and queuing the Payload, updating the local cache or retrieving all the data necessary to satisfy the request from the local cache. When designing a new offline block, developers should derive a new Application Service Agent class from the ServiceAgent class provided by the Offline Application Block.

Message Data Management - manages transactional data stored in a queue and provides infrastructure for adding the capability to synchronize data to the server. Included in the block is a defined interface IQueueStorageProvider, and four providers that implement this interface: InMemoryQueueStorageProvider for storing queued messages in memory only, IsolatedStorageQueueStorageProvider that persists messages in Isolated Storage, MSDEQueueStorageProvider, which stores queued messages in an instance of MSDE (or SQL Server), and MSMQQueueStorageProvider, which uses Message Queuing for storing messages.

Reference Data Management - a subsystem which provides reference data to the application even while offline. This system includes classes that represent the reference data cache itself, as well as classes to load/refresh the reference data when connected, and persist changes to Ref Data that can be made in the client.

This looks like a pretty good block, judging by the documentation at least. I haven't cracked the code yet.

 

Syntax and semantics
01 March 04 07:06 PM | MikeD
A great article by Eric Lippert on understanding programming languages - and the difference between syntax and semantics.
Filed under:
RAIL
01 March 04 06:54 PM | MikeD | 2 comment(s)

RAIL is the Runtime Assembly Instrumentation Library, which is a project from the University of Coimbra, and which implements “an API that allows CLR assemblies to be manipulated and instrumented before they are loaded and executed.”

One of the examples they give is to add a prologues and epilogues to method calls. I suppose this would be useful for profiling or logging certain method calls. There's more to it than that for sure. This looks interesting.

//Create the RAssemblyDef instance for the Teste3.exe assembly
RAssemblyDef rAssembly = RAssemblyDef.LoadAssembly("Teste3.exe");
//Get the RType object of the FooBar type
RType rtd = rAssembly.RModuleDef.GetType("FooBar");
//Create an array of RParameter objects
RParameter [] paramsz = new RParameter[1];
//Set the first element of the array
paramsz[0] = new RParameter(0,rAssembly.GetType("System.String"));
//Get the method which code is to be inserted at the start of the method
RMethodDef rmd0 = (RMethodDef)rtd.GetMethod("WriteToScreenBefore",rAssembly.GetType("System.Void"),paramsz);
//Get the method which code is to be inserted at the end of the method
RMethodDef rmd1 = (RMethodDef)rtd.GetMethod("WriteToScreenAfter",rAssembly.GetType("System.Void"),paramsz);
//Get the method to instrument
RMethodDef rmd2 = (RMethodDef)rtd.GetMethod("MyMethod",rAssembly.GetType("System.Void"),paramsz);
//Create the CodeTransformer object nCodeTransformer
cc = new CodeTransformer();
//Set the transformations to make in the code
cc.InsertAtMethodStart(rmd0);
cc.InsertAtMethodEnd(rmd1);
//Apply the change to the code
rmd2.Accept(cc);
//Save the new assembly
rAssembly.SaveAssembly("Teste3.exe");

 

Filed under:
More Posts