Web Dev Matters and Me

Web Development Matters - HTML, XML, C#, .NET, AJAX/Javascript(jQuery), CSS, XML-XSLT

ME - LIFE,Philippines, Tokyo, ECE, PhilNITS/JITSE,情報処理, 日本語

things about Philippines, gaming, C# development and web development, how to make money in stock trading

Web Dev Matters and Me

Learning Silverlight 4.0 from 1.0

Finally! Maybe I should thank my previous manager. Now I have this much awaited chance to continue my Silverlight 1.0 experience to Silverlight 4.0 and maybe 5.0. When Silverlight was on pilot version, I was enthusiast enough to apply it to a task, 2008 (I'm still on Tokyo that time). It was completely a client-side thing, that I have to make AJAX request just to make a server-side request and back to XAML.

I noticed the great addition since version 1.0. There are many controls now, which I also expected. I remember my nostalgic 1.0 days making animations using simple ellipses, rectangles, some fills and few images. Now, there are controls. I'm starting to feel that, it was like an ASPX/Windows Form hybrid which have mutated over time , but for good.




But, I still have something that I'm expecting Silverlight team to draw. I'm sure every youtube fans already know that they can record a video using their computer's built in camera and have it uploaded in youtube servers. I've long expected Silverlight to have this, without having users make a custom control, at least for the part that accepts the data binaries and have it collected at serverside (like aspx posted file, or wcf way).

Or maybe, I'll just implement one, if I can grab some reference on how to use video devices and have the stream buffered and then send to server.



 

Get XML results for your Query (SQL 2008)

I'm still find it hard to squeeze all available optimization on my site. I successfully had facebook plugins in it after trying, and now I'm staring at the SQL Server database, which can be a potential bottleneck to my web app.


So, maybe it would be nice if I can simply get my query as XML and pass it directly to be rendered. This will eliminate additional mappings and will free me some rendering process too, which is sweet! ^_^



So, how to do it? Very simple...just use "FOR", "XML PATH" and TYPE

so, in this sample query...



         SELECT 'TEST Title' as title
        ,'SAMPLE Description' as [description]
        FOR
        XML PATH(''),
        TYPE
        


will produce 

<title>TEST Title</title>
 description SAMPLE Description </description



Simply replace the hard-coded string to column-names and you're making XML queries in no time. So, instead of mapping everything to some object/classes, I'll have this coupled by the presenter page to the view. Now, the only problem I have is to wait for weekends to continue doing my xslt site.






 

Decoding Google's querystring

Everytime we search our web companion google, our form from google's page is posted to another page handler. It was really hard to know what informations are obtained on process since it is doing a POST (probably to get few information that the users cannot set, plus the logging for querystring based request).

FB Connect