Ajax for Business Logic

Sunday, February 19, 2006

I created a JavaScript Wrapper for my C# Business Logic classes. You specify which dll to "wrap" and the wrapper spits out javascript.

The result is that you can write near-C# language in JavaScript! I have all the public classes, constructors, public constants, public methods and public properties available client side in javascript.

The methods and constructors are just "empty" functions that check if the correct number of parameters are specified and then perform a synchronous web service call. The web service then invokes the constructor or method and returns the resulting value.

This means that you don't need to write hundreds of web services and web service methods when you need to interact with the business entities and business logic.

In respect to security the wrapper only wraps public classes and namespaces. And furthermore it checks that a [Wrap] attribute is present.

For even more security WSE provides a mechanism to digitally sign SOAP messages.


Creating an instance of Business.Logic.ContractSale using the constructor that takes an id as parameter, invoking Validate() and Accept(DateTime oDateAccepted) on the instance.

  var oContractSale = 
    new Business.Logic.ContractSale(iCSal_Id);

  if (oContractSale.Validate()) {
    oContractSale.Accept(new Date());
  else {
    alert("Sales contract is not valid!");

Creating a new instance of Business.Logic.InvoiceSale setting properties and invoking method Save() on the instance.

  var oInvoiceSale = 
    new Business.Logic.InvoiceSale();

  oInvoiceSale.DateInvoice = new Date();
  oInvoiceSale.Amount = 150;
  oInvoiceSale.Currency = Business.Logic.Currency.USD;


Tuesday, February 14, 2006

I am considering a new name for OutPost, what do you think about Hijax.NET?

OutPost 1.2

Monday, February 13, 2006

Version 1.2 now available.

A screenshot of The iGoogle Demo
Screenshot of "The iGoogle Demo" in the demo project

  • Support for client event validation.
  • Support for server event validation.
  • Support for form validation.
  • Support for inputs with type=image.
  • Support for object databinding.
  • Full cross-browser support without need for ATLAS scripts.
  • Added Session support on first post back.
  • Added Response.Filter to take advantage of differences on first post back.
  • Support for Netscape.
  • Support for Opera.
  • Support for Opera.
  • Support for Visual Studio 2005
  • Support for both ASP.NET 1.1 and ASP.NET 2.0
  • Support for HTTPS/SSL

Please give feedback!