- MVC home: http://www.asp.net/mvc/
- Download the most recent MVC build: http://www.microsoft.com/downloads/details.aspx?FamilyID=3b537c55-0948-4e6a-bf8c-aa1a78878da0&displaylang=en
- Really good tutorials: http://www.asp.net/learn/mvc/
- Setting up IIS6 with MVC: http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx (Tip: Read the whole article!)
- MicroSoft's page (link found in Global.asax.cs!): http://www.asp.net/learn/mvc/tutorial-08-cs.aspx
- Phil's MVC-centric blog: http://haacked.com/
- Scott's MVC-centric blog: http://weblogs.asp.net/scottgu/archive/tags/MVC/default.aspx
- Melvyn Harbour's MVC: http://weblogs.asp.net/melvynharbour/archive/tags/MVC/default.aspx
- Simone Chiaretta: http://codeclimber.net.nz/Default.aspx
- Plus... My own posts: http://springboardpillow.blogspot.com/search/label/mvc
Friday, January 29, 2010
Setting Up MVC
Having moved to the RC version of ASP.NET MVC 2.0, I've been looking around for resources (some repetition follows):
Google Data And Client Libraries
Quick link for those looking to get the Google .NET API:
- http://code.google.com/p/google-gdata/source/checkout
svn checkout http://google-gdata.googlecode.com/svn/trunk/ google-gdata-read-only
- Client Libraries, for languages like Java and .NET: http://code.google.com/apis/gdata/docs/client-libraries.html
- Authentication "ClientLogin" sample code: http://code.google.com/apis/gdata/docs/auth/clientlogin.html
- Getting started: http://code.google.com/apis/accounts/docs/GettingStarted.html
- Data API -account feed: http://code.google.com/apis/analytics/docs/gdata/gdataReferenceAccountFeed.html
- An interesting abalytics blog post: http://analytics.blogspot.com/2009/08/api-sometimes-you-just-gotta-explore.html
I've now been attempting this fun for a little while and there seems to be a fair bit of mis-direction around the Google .NET APIs. My (and others, it seems) main concern is that the .NET APIs seem to cater very well for most Google Labs/Apps uses, except for Google Analytics. Issue #1 being how to even get access/login with .NET. I have since discovered the actual Analytics .NET libraries, so the links are here. However, currently, it's important to note that the links above don't directly link to the libraries you really need.
- Browse the SVN code library online: http://code.google.com/p/google-gdata/source/browse/#svn/trunk/clients/cs/lib/Release
- Checkout the code from here: http://code.google.com/p/google-gdata/source/checkout
It's important to note that you will need Subversion ("SVN") installed to do this and the path to use is: http://google-gdata.googlecode.com/svn/trunk/ - Google "GData" project home: http://code.google.com/p/google-gdata/
It is important to note that the "Downloads" tab here will not get you the Google Analytics library - you need the "Source" tab, which will take you to the SVN link above. - Google Code blog from April 2009 about the new Data Export API: http://googledataapis.blogspot.com/2009/04/google-analytics-data-export-api-has.html
- The StackOverflow post which got me there: http://stackoverflow.com/questions/791125/google-analytics-api-and-net
The code I used to get an authentication token from the Google Analytics Service is:
using Google.GData.Analytics;
AnalyticsService analyticsService = new AnalyticsService(ConfigurationManager.AppSettings["ApplicationName"]);
analyticsService.setUserCredentials(ConfigurationManager.AppSettings["Email"], ConfigurationManager.AppSettings["Password"]);
string analyticsAuthToken = analyticsService.QueryClientLoginToken();
return analyticsAuthToken;
Wednesday, January 27, 2010
Transforming XML Browser-Side
I like using XML and XSLT and find it a simple and powerful way to produce friendly, web-centric content. My utopia would be an easy to develop SQLXML output, which can be pumped as directly as possible to the browser, which then uses XSLT client side to render XHTML.
Currently, this is possible by using (for me) C# to pull the SQLXML content from the DB (I'm using T-SQL, ie: MSSQL http://msdn.microsoft.com/en-us/library/ms345117(SQL.90).aspx), processing it using the .NET XML transformation API (http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=63) and pushing the produced XHTML to the browser.
This approach is good because any extraneous processing or user values, validation, security and browser differences can be catered for, while removing strain on the browser. It's important to note that asking the client to do the XSL transformation isn't a great idea because browsers like Mobile Safari will ask a remote service to do the transform, which slows things down and will obfuscate a lot of data away from your app.
However, if you want to go ahead with having the browser do the heavy XSLT lifting, the best place to start is:
- Get the browser to do the transform: http://www.w3schools.com/xsl/xsl_transformation.asp
- D. Pawson XSLT help: http://www.dpawson.co.uk/xsl/sect1/sect1.html
Posting Data From Server Side
Just a quick link, but might bolster this with more useful stuff later...
Monday, January 25, 2010
LINQ, LINQ2SQL, LINQ2XML. It's linky...
Boning up on LINQ and I'm finding bits all over the place. So, another personal haven of links and hopefully useful info now resides on this post...
Sunday, January 24, 2010
Generics
Generics. They're generic. Sssss...
Good link:
Something I was wondering about recently was how to define constraints upon multiple generic types. Eg: If I have a class definition with more than one generic:
public class MyClass
How do I specify constraints (restrictions to the base types which the generic types can inherit from)? Answer (from the link above [5th code paragraph]):
public class MyClass
where T : String
where K : IComparable
Easy when you know how.
Thursday, January 21, 2010
OOooooh!
And here begins the chronicling (or listing) of Object Oriented Design, patterns and practices of stuff what I fink are good and that...
Wednesday, January 20, 2010
SQL Trees
Ok, so it's been bugging me for ages, I'm just going to start compiling all the SQL tree structure knowledge here. I might have started this in a previous post, and will try to find that, if I did, and aggregate the posts sometime...
Friday, January 08, 2010
Subscribe to:
Posts (Atom)