Saturday, November 26, 2005

 

OPML Output now working [OPML]

For the people who use my AJAXTagger, OPML Support is fixed. There was a problem with my instanceof method of javascript which would mean that it would not work in IE6 and IE7. This all stemmed from the fact that Internet Explorer doesn't support __proto__ javascript construct. This is a bit of a problem because I don't know how to workout what an object in Javascripts parent "type" is.

Technorati Tags
[feed], [feed], [feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, , , , , , , , , , , , ,

My Related Documents
, , , , , ,

Related Amazon Books
Head First Design Patterns: /, DOM Scripting: Web Design with JavaScript and the Document Object Model: /, JavaScript for the World Wide Web (Visual QuickStart Guides): /, Professional JavaScript for Web Developers: /, JavaScript: The Definitive Guide: /, Sams Teach Yourself Javascript in 24 Hours (Sams Teach Yourself S.): /, DHTML Utopia: Modern Web Design Using JavaScript & DOM: /, Explorer's Guide to the Semantic Web: /

Related Images From Flickr

Thursday, November 24, 2005

 

Google Search: c# instanceof [OPML]

A couple of people have come to my site with the query "c# instanceof". I know how I get found for this. I copied an "instanceof" javascript method and talked about it in one of my entries.

The only relation to c# that I can think of would be the "is" and "as" keywords.

"is" can be used to test what type of object an object reference is. For instance [no pun intend, or thought of I think :)] a developer could write:
if(m_car is MiniCooper)
{
...

they would be saying that if the m_car variable is of the type MiniCooper then do something.

The "as" keyword is used to "cast" a type to another type. So you could write

if(m_car is MiniCooper)
{
MiniCooper mc = m_car as MiniCooper;

The "as" keyword is slightly differnt to the Explicit cast (MiniCooper mc = (MiniCooper) m_car; because if the cast dosn't work with an "as" then the mc local variable will be null, rather than throwing an "InvalidCastException".

I hope this helps.



Technorati Tags
[feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, , , , , , , , , ,

My Related Documents
,

Related Amazon Books
UML Pocket Reference: /, BusinessObjects: The Complete Reference (Complete Reference S.): /, Microsoft Visual C# .NET (Core Reference): /, Visual C#.NET Language Reference: /, Successful Keyword Searching: Initiating Research on Popular Topics Using Electronic Databases: /, Automatic Keyword Classification for Information Retrieval: /, DHTML Utopia: Modern Web Design Using JavaScript & DOM: /, JavaScript: The Definitive Guide: /

Related Images From Flickr

 

Google Search: .net framework for xbox 360 [

I have had a lot of hits from Google when people menation the .net framework and the XBox 360.

I might as well say what I know about it all. Nothing :(

I would have thought that the .Net Framework on the XBox 360 wasn't even on Microsoft's radar. After all the XBox 360 is on a different Chip Architecure and they have only just managed to get x86 64bit support via the .Net 2.0 framework.

Maybe I am wrong though, you never know.

Technorati Tags
[feed], [feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, , , , , ,

My Related Documents

Related Amazon Books
Quake 4 (Xbox 360): The Official Strategy Guide: /, Programming C#: /, Windows Forms Programming in C#: /, Halo 2 Hacks: /

Related Images From Flickr

 

Ebay API... Can't really think of much. [

After talking about the fact that the Ebay API has been made "free" to access, I had high hopes to make some programs to access it. Well I haven't had any cool ideas yet about what to do with it.

EBay is quite dynamic, so I can't integrate it into my Blog statically so I can't benifit from potentially extra hits that I might get from it from search engines and the like. The only thing I can think of is to provide an AJAX style interface from each of the books that I am showing from Amazon.

I think what it is is that I am not too interested because I don't think I could make commision from it. I know this isn't the best reason to do the programs, but I do make my programs to serve my needs first. Take the AJAX Tagger as an example, I created it to help ME give extra information to my readers.

Anyway, if I think of any ideas I will post them here.

Technorati Tags
[feed], [feed], [feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, , , , , , ,

My Related Documents
, , ,

Related Amazon Books
Ajax in Action: /, Make Money on eBay UK: The Inside Guide To Getting Started, Buying and Selling Successfully on eBay.co.uk: /, AJAX/REST Patterns and Best Practices: /, Mining Amazon Web Services: Building Applications with the Amazon API: /, Professional Web APIs with PHP: Google, EBay, Paypal, Amazon, Yahoo, Fedex: /

Related Images From Flickr

Tuesday, November 22, 2005

 

Could it all be done in XAML [

After having a little success with my example with XAML binding directly into Amazons webservice I am thinking that I might be able to automatically bind directly to other services that expose a REST interface. And if I can do that with very little code I might be able to make my AJAX Tagger completly in XAML without a hint of C#. I hope the WPF [Windows Presentation Foundation] will let me do that.

What do you reckon, do you think it can be done?

Technorati Tags
[feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, , , , , , ,

My Related Documents
, , , , ,

Related Amazon Books
Pro Service-oriented Smart Clients With.NET 2.0: /, Mining Amazon Web Services: Building Applications with the Amazon API: /, Professional Web APIs with PHP: Google, EBay, Paypal, Amazon, Yahoo, Fedex: /, Service-Oriented Architecture: Concepts, Technology, and Design: /, Service-oriented Architecture: A Field Guide to Integrating XML and Web Services: /, Programming Indigo: The Unified Framework for Building Service-oriented Applications on the Windows Platform Beta Edition: /, Web Services and Service-oriented Architecture: The Savvy Manager's Guide: /, AJAX/REST Patterns and Best Practices: /, Pragmatic Ajax: /, Head Rush Ajax: /, Professional Google API: /

Related Images From Flickr

Monday, November 21, 2005

 

Amazon Search in XAML [

I have just been playing with some XAML databinding. I was interested by the Channel 9 Example which creates an RSS reader in just a couple of lines of XAML

I hooked it up to Amazons REST API. I had a couple of problems with it that I will go into later. But what follows is the XAML that I used [also it can be downloaded from my server]:


<StackPanel
xmlns="http://schemas.microsoft.com/winfx/avalon/2005" xmlns:x="http://schemas.microsoft.com/winfx/xaml/2005" Margin="10">
<StackPanel.Resources>
<XmlDataNamespaceManager x:Key="NS">
<XmlNamespace Prefix="a"
Uri
="http://webservices.amazon.com/ AWSECommerceService /2005-10-05" />
</XmlDataNamespaceManager>
<XmlDataSource x:Key="Amazon" XmlNamespaceManager="{StaticResource NS}"
Source="http://webservices.amazon.co.uk/onca/xml?Service=AWSECommerceService&
AssociateTag=cnetfra-21& AWSAccessKeyId=[SUBSCRIPTION ID]&
SearchIndex=Books& Keywords=AJAX& BrowseNode=71& ResponseGroup=Request,Large,Images& Sort=salesrank& Operation=ItemSearch"
/>

<DataTemplate x:Key="TitleTemplate">
<TextBlock TextContent="{Binding XPath=a:ASIN}" />
</DataTemplate>
</StackPanel.Resources>

<Label Content="{Binding Source={StaticResource Amazon}, XPath=/a:ItemSearchResponse/a:OperationRequest/ a:HTTPHeaders/a:Header/@Name}" FontSize="24" FontWeight="Bold" />

<DockPanel DataContext="{Binding Source={StaticResource Amazon},
XPath=/a:ItemSearchResponse/a:Items/a:Item}"
Height="300px" >
<ListBox DockPanel.Dock="Left" Binding.XmlNamespaceManager="{StaticResource NS}"
ItemsSource="{Binding}" ItemTemplate="{StaticResource TitleTemplate}" IsSynchronizedWithCurrentItem="True" />
<TextBox Name="Contents" Text="{Binding XPath=a:ItemAttributes/a:Title}" Wrap="True" Width="Auto" />
</DockPanel>
</StackPanel>

The major problem that I had was that the AMAZON API has a default namespace, therefore to be able to use XPath against the datasource you need to include a NamespaceManager so that the XPath queries are resolved correctly. Once this is done everything is really simple.

Now this example I have created leaves a lot to be desired, but you can see how easy it to create.

Technorati Tags
[feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, , , , , , , , , , , , ,

My Related Documents
, , , ,

Related Amazon Books
Programming Windows Presentation Foundation: /, Service-Oriented Architecture: Concepts, Technology, and Design: /, Service-oriented Architecture: A Field Guide to Integrating XML and Web Services: /, Mining Amazon Web Services: Building Applications with the Amazon API: /, Professional Web APIs with PHP: Google, EBay, Paypal, Amazon, Yahoo, Fedex: /, Amazon Hacks: /, MCAD Training Guide 70-320: Developing XML Web Services and Server Components with Visual C#.NET and the .NET Framework: /, Expert Service-Oriented Architecture in C#: Using the Web Services Enhancements 2.0: /, RSS and Atom Hacks: /, RSS and Atom: Understanding and Implementing Content Feeds and Syndication: /

Related Images From Flickr

Sunday, November 20, 2005

 

Google Search: threads in javascript [

One of the searches that came in to my blog was "threads in javascript". I have writte about this previously on my blog. Basically, I couldn't find anything that would allow "threading" in Javascript.

The closest I could come up with was to create a set of queues (that mimic threads). These queues hold items of work that need to be carried out and once every 250ms or a developer configured amount, the queue will ask a worker object to find out what work needs to be carried out. If there is work to do then it will start the task, if work is already being executed from the queue, then the work will not initiate the task.

Check out my AJAX Tagger 2.0 and see psuedo threads in action.

If someone else has any ideas about threading in Javscript I would love to hear it.

Technorati Tags
[feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, , , , , , , , ,

My Related Documents
, , , , , , , , ,

Related Amazon Books
Ajax in Action: /, JavaScript for the World Wide Web (Visual QuickStart Guides): /, Head First Design Patterns: /, DOM Scripting: Web Design with JavaScript and the Document Object Model: /, DHTML Utopia: Modern Web Design Using JavaScript & DOM: /, Communication and Computer Networks: Modelling With Discrete-Time Queues: /, C# Threading Handbook: /, AJAX/REST Patterns and Best Practices: /, Head Rush Ajax: /, Ajax for Dummies (For Dummies S.): /

Related Images From Flickr

This page is powered by Blogger. Isn't yours?