jQuery AJAX form serialization example

25 05 2009

By Stephen Trembath

Just a quick example of using jquery to submit form data without a postback which may (or may not!) be of interest…

It is useful in this case because the page is very big (the page to process a lead/ticket), and we want to avoid doing post-backs wherever possible. It finds all elements in the pnlChecklist panel which have an attribute named ‘metaid’, e.g. <asp:DropdownList runat=”Server” metaid=”Spyware risk” />. It submits the data as a serialized string (metaid1=value1&metaid2=value2) to a very basic code-behind page, which splits and saves the data, and then returns a script for evaluation on the client-side. It’s pretty heavily snipped to make it a little clearer.

Client-side:

<a href="javascript:;" onclick="DoAudit();">Send System Audit to Customer</a>

function DoAudit() {
            var id = $('#<%=Me.hiddenSupportRequestID.ClientID%>').val();
            var serialized = '';
            $('#<%=Me.pnlChecklist.ClientID%> [metaid]').each(
            function() {                 
               var attrib = $(this).attr("metaid");
               serialized += attrib + "=" + $(this).val() + "&";
            }
            );
            $.get(ajaxUrl, { method: 'getaudit', supportrequestid: id, data: serialized }, function(data) {
                // Handle the response
                eval(data);
            });
            return false;
        }

Server-side:


        SecureSession.ValidateOrRedirect()
        Select Case Request.QueryString("method")
            Case "getaudit"
                        Dim data As String = Request.Params.Get("data")
                        Dim htData As Hashtable = AjaxUtils.SplitSerializedPostData(data)
                        ......
                End Select
                Dim script As String = "alert('Test');"
                Response.Write(script)
       End Select




BizBlox 1.7: New fundamentals

6 04 2009

The BizBlox OR/M API has been in development for 5 years and is actively used in many commercial enterprise and light weight applications around the globe. The key premise of BizBlox has always been to keep databases simple. NO MAPPING, no complexity, no scripts. Its funny that layers on top of nHibernate like Fluent and even the Microsoft Linq for SQL have been trying to get this right over the last year or so – but BizBlox did it this way from the beginning. Naming parity; where classes names should match table names; property names should match column names makes perfect sense for a lot of applications and the complexities which a lot of object relational mappers introduce makes life hard for developers; both initially and especially further down the track in maintenance. Also, removing the need for special mapping scripts or weird GUI mapping tools. Just export your SQL from the enterprise manager/management studio and you’re done. Developers can just concentrate on developing business logic.

Pixoüt have just released BizBlox 1.7 on Google Code. The new version delivers greatly increased performance and flexibility, with major improvements to the DataObject caching algorithm, the addition of column attributes to the DataObject class, and the ability to handle a greater range of data types.
BizBlox 1.7 now caches information about the structure of a DataObject, including properties and column information. This information was previously loaded using reflection on every Load() and Save() of a DataObject, but it is now cached in a DOInfo object the first time an instance of that DataObject is created. While there is a minor performance penalty on the very first load of an instance of the type in the App Domain, subsequent performance will be improved as there is no locking or reflection on any object.

BizBlox 1.7 also introduces column attributes in DataObjects, including PrimaryKey(), Persists() and Identity() attributes. The PrimaryKey() attribute provides flexibility in selecting the UID column for the DataObject. The Persists() attribute allows the addition of custom properties to a class that are not saved to the database. The Identity() attribute allows the use of a SQL Server Identity (auto-incrementing) column, by excluding that column from an insert/update.

You can find out more about BizBlox by going to the BizBlox home page. BizBlox is an open source database mapping framework developed by Pixolüt Industries.





Open letter to Senator Conroy

26 03 2009

This blog has never been political, however I am irate that one stubborn senator who clearly does not represent the will of the general public, or even any minority group – can continue to waste vast amounts of our money. Every day this ridiculous exploration continues costs Australians hundreds of thousands of dollars.

This is just another slap in the face after the last government launched their multi million ($185,000,000) dollar client side filtering software which was not only broken by a child the week it was released – today has shown that the take up rate for the software was abysmal and further – the whole thing was fundamentally flawed (read more).

When can the government FINALLY realize it is NOT in the IT business. Market forces exist for a reason – if you want to find a brilliant internet filter which parents can use – put it out to tender for existing vendors who have years of expertise in the space. Spend the money on public education and public awareness – which is what the government SHOULD be doing with our money. Heaven forbid you actually try to catch online criminals by funding the federal police appropriately.

Ultimately parents have the responsibility to protect their children and there are many free and paid products which do a spectacular job such as OpenDNS (www.opendns.com)…

As a citizen, taxpayer and parent I am FURIOUS!





Pixolut: HUGE REBRANDING

25 03 2009

www.pixolut.comPixolüt Industries is proud to present their new website with a great new visual style and branding – building on the theme of the second generation Pixolüt logo launched in 2003 with a fresh new photographic style.We have created the new site to better convey the areas of the business and the values and essence of our brand.

Visit the new site today and please let me know what you think.

You can still get the ‘flat 2009′ style logo at our store for the next month or so until we launch the new branding cloting and accessories.





Why we moved to Google Code

29 12 2008

We have been using SourceForge for a long, long time hosting all our Open Source projects. It was a tough decision to move away from SourceForge, however as our teams and projects grew – and as time went on – we felt SourceForge had lost touch with some of the fundamentals of software development for the sake of monetization.

Over 2008 I saw SourceForge move towards a services based model to attempt to support the projects which reside on it. In and of itself this is a great idea, however the real problem was that the world of web based applications had rocketed ahead whilst the core platform of SourceForge felt like it lagged behind.

Google Code was launched way back in August 2006 and has adopted the typical Google approach to its developer platform. This approach means that adding content, code and downloads is super simple and whilst the Issue Tracker in SourceForge was turned off for all our projects since it was so cumbersome, the Google Code Issue Tracker is just a joy to work with.

Overall, we feel that the impact on development and team collaboration will be vastly improved by making the move.

The Pixolüt Industries projects on Google Code are:

BizBlox

PreNIS

xReplace





Mobux transforms to Spiral Global

29 12 2008

From the birthplace of mobux, comes Spiral a portfolio of brilliant business units, pioneering branded solutions in the digital space.

The details…

Since its inception in 2005, mobux has opened its doors to many talented people, been embraced by an enviable portfolio of exceptional Australian brands and delivered tremendous, bleeding-edge digital campaigns.

This success, evolution and dynamic growth has resulted in a necessary change in our structure and scale.

It is, with great pleasure that we announce the creation of a new, uniquely-divisionalised business called Spiral.

Spiral Media – the only media business enabling brands to connect in the most relevant ways with the users of Facebook, MySpace, smsfun.com.au and mobux.com.au.

Spiral Digital – the only digital business built upon the solutions we have created for our own digital assets. From digital acquisition and retention programs through to basic, tactical promotional micro-sites Spiral can we create, design, develop and deliver.

Spiral Lab – our R&D and innovations business, which includes our consumer brand mobux.com.au and our own portfolio of social applications and other digital assets.

From henceforth, we shall be known as Spiral! We hope that this change will be of great benefit to you, as we continue our journey into the Digital Space…





BizBlox 1.6.2 Released

30 10 2008

Stephen has just updated the release of BizBlox on SourceForge

The major change in this release is that the BizBlox Builder will only update files which have changed code. For example, if we just add a column to a single table, we used to run the BizBlox Builder code generator and the code for every entity would be updated. This meant that we used to be updating source control with hundreds of files which had not actually changed.

Stephen has updated the code generation system to now only touch files which have changed and as such, source control updates are cleaner and simpler – especially with large enterprise projects where multiple developers are working on ‘DataObject’ entities or collections at the same time.

Find out more about BizBlox here!





SaaS Mentor can help…

14 10 2008

Last week I started SaaS Mentor consulting – a business designed to help other business owners succeed.

How?

I have been fortunate enough to work with the owners of various sized businesses over the past decade – I found that nearly all of these businesses faced similar problems; problems around effective sales process, marketing, time keeping and project management. The other major issue for them was the cost of IT and the people required to maintain it all. This cost generally hit those businesses at the worst possible time and it was not usually a small cost either…

The thing I noticed was that over the past year or so there has been an influx of really powerful business tools available on the internet which are provided as subscription services. This Software As A Service model is specifically suited to small-to-medium sized businesses since it reduces the need for in house servers and IT staff costs to maintain them. No big investments and great support.

The idea for SaaS Mentor came about when I started working on a simple approach to consulting for small-to-medium sized business which used several Software As A Service packages as the tools to provide a unique solution for a business problem. This consulting gave big results quickly and made the process of transformation easy.

So, If you know a business owner who may need some help, I would ask that you forward the link to this page on to them and let them know what we’re doing. If you feel like your business could benefit from this kind of strategy or that something in your business is not quite right, I would love to have a chat with you and see if what we’re doing could work for your business. Just email me: joe@saasmentor.com.au





BizBlox 1.6.1 Released

12 08 2008

New version of BizBlox was put up on SourceForge this morning with some changes which have been floating around in the source tree and some production versions for a while.

Special thankyou goes out to Chris Thomas for his input and Stephen Trembath for his updates and also for getting this release live.

Updates in this release:

+: Added implicit Find() call if Find() is not previously called on a DOCollection and an attempt is made to access an Object
+: Change SqlBuilder Join methods to only add a Join to the query once, regardless of how often an attempt is made to add it.
+: AddWhereIn() overloads, accepting arrays of strings and GUIDs
+: AddWhere(), AddWhereGT(), AddWhereLT(), AddWhereGTE(), AddWhereLTE() overloads which allow comparison between columns in the query
+: Add <Assembly:AllowPartiallyTrustedCallers()> to BizBlox AssemblyInfo

http://www.pixolut.com/bizblox





New Open Source Releases

6 05 2008

xReplace is a project I was working on for a very specific need – it turned out to be a procedural text editor to define a process of text manipulation which will be performed for multiple files described using XML. xReplace also supports third party plug-ins for extra features. I developed this tool because I had to create a reproducable ’search and replace’ style of text manipulation on thousands of content files whilst migrating a website from one CMS to another. Once I wrote the transofrmation script, I was able to rerun it over and over as the templates evolved up until the site went live. Becuase xReplace supports plugins, its also great for doing very specific yet repetitive tasks – there is an example plugin for creating ZIP files and source code to start making your own. There is extensive documentation in the installer.

BizBlox 1.6 has finally been released on SourceForge. It has been being used in production for a few months by several enterprise projects but everyone was working from the source. Thanks to Stephen Trembath for putting the new installer live on SourceForge.