Wednesday, October 19, 2011

Corona Roadmap Poll

  • In-App Purchase support for Android
  • Improvements to Physics API (friendlier collisions, etc.)
  • Improved transitions: pause/resume methods
  • Improvements to Sprite API
  • MapView support (Android)
  • Improved WebPopup behavior
  • OAuth support
  • Exposed table of active timers
  • Integrated advertising
  • System capabilities API
  • Payment integration Android (Paypal,etc)
  • Analytics
  • Split Features. Don't wait to have feature parity on both Android/iOS. We can live with wichever is
  • Add "2.5d" image transforms
  • Improvements to image saving API
  • Physics: simplified collision detection for "non-physical" cases
  • Improvements to Corona debugger
  • Support for compressed textures
  • Improved line drawing API
  • Support for Android softkeys
  • OpenGL shader support
  • iTunes library support
  • On-device debugging
  • Misc. improvements to core API usability
  • Page Flip
  • Improved Text Fields
  • New Corona UI Features
  • Curve Fitting
  • Object Fill
  • Bezier Manupulation
  • Procedural Graphics
  • Fluid Dynamics
  • Reconstruction of Arbitrary Topology using NURBS
  • LOD Rendering for terrains
  • Bon Jour
  • Device IP
  • BT Stack
  • Timer pause/resume
  • Apple Push Notification
  • Local Notification
  • OpenFeint for Android
  • Tinting
  • Access to bitmap data
  • Contact List (Address book)
  • Email attachments
  • Better XML parser
  • Give Carlos a raise
  • Live Wallpaper for Android
  • Camera objects overlay (video, camera)
  • Better Text Metrics
Created on Oct 19, 2011

Thursday, October 13, 2011

T-SQL Tree Into XML

My previous post contained a link to a Microsoft article detailing how to get well structured XML directly from T-SQL. This post is about getting a tree of data from T-SQL into XML. FOR XML EXPLICIT cannot be used (without major headaches) but a simple recursive function and a SELECT can be used. Here's where I poached my solution from:

  • http://stackoverflow.com/questions/2409228/generate-structured-xml-document-from-hierarchical-table-data-t-sql/2425180#2425180
In short, my code is something like this (generic code for a wider audience):
CREATE function [dbo].[SelectCategoryChild](@categoryid as int)
returns xml
begin
    return (
        select
            categoryid as "@id",
            parentcategoryid as "@parentcategoryid",
            title as "@title",
            dbo.SelectCategoryChild(categoryid)
        from category
        where parentcategoryid = @categoryid
        for xml path('category'), type
    )
end
GO
SELECT
    categoryid AS "@categoryid",
    '' AS "@parentcategoryid",
    title as "@title",
    dbo.SelectCategoryChild(categoryid)
FROM category
WHERE parentcategoryid is null and siteid = 1
FOR XML PATH ('category'), root('categories')
The code above works for a single table created from the statement (references and indices omitted for clarity):
CREATE TABLE [dbo].[Category](
[CategoryID] [int] IDENTITY(1,1) NOT NULL,
[ParentCategoryID] [int] NULL,
[Title] [varchar](150)
)
CategoryID is the primary key,
ParentCategoryID references the CategoryID and provides theone-to-many tree structure, a NULL value indicates the node is a root node (top-level) in the tree,
Title is simply some data (in this case the name) of the node.

T-SQL FOR XML EXPLICIT

An excellent example of producing well formatted and structured XML direct from SQL where a non-tree structure is in use. I have used this to get a complex series of document information out in a specific format.

More Often Than You Think