This is an interesting concept, can't wait to test/consume some of the services on https://datamarket.azure.com/!!
Tuesday, November 23, 2010
Thursday, November 11, 2010
Nhibernate SQL Server 2008 connection string
Not rocket science, just something that is useful to know.
NHibernate.Driver.SqlClientDriver 10 true NHibernate.Dialect.MsSql2008Dialect true 60 true 1, false 0, yes 'Y', no 'N' NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu
Data Source=localhost;Initial Catalog=LoanApp;User ID=rortiz;Password=test_1983;
Wednesday, November 10, 2010
JavaScript gotcha
If you are using arrays of objects, make sure the last parameter doesn't end with a coma, for example:
test : [
{ myvar: 1},
{ myvar: 2},
{ myvar: 3},
]
This will work fine on Chrome and Firefox, but IE will consider the array to have an extra object . If your code uses the length of the array then it will crash because the last object will be null. How did I figure it out? The hard way...
Saturday, October 30, 2010
Cross domain XMLHttpRequest
It's not possible to use the ArcGIS Server REST API if your parameters have more than 2048 characters and you select HTTP GET. Of course, the REST API UI provides you the option to do an HTTP POST. But how do you do this programmatically?
You use a proxy!! ArcGIS Server provides you one here. More information oh how a proxy works can be found on the Yahoo Developer Network.
I named this post Cross domain XMLHttpRequest because in the context of ExtJS, the ScriptTagProxy doesn't support HTTP POST calls. Therefore, you would use HttpProxy (with a POST method) to access the proxy on the local server. Remember to pass the parameters as properties (instead of concatenating them to the URL).
Friday, October 22, 2010
ArcSDE Views use the incorrect field data type
I've been creating a lot of ArcSDE 9.3 views lately, but it came to my attention that sometimes sdetable creates a field in the view using an incorrect data type. In other words, if the base table has a Double field, the view will show the same field as a Long. What do you do when this happens? It's a nightmare, but one thing you can do is access the table SDE_column_registry and fix the data type there. Just find another field with the target data type and copy the row information.
It would be interesting to see if this happens in ArcSDE 10, which I'll be doing next!
Thursday, October 21, 2010
Concatenating, Minifying and Optimizing JavaScript
Doing this is as important as making sure your code compiles :). I've been reading several articles on how to do this, and they all present different approaches, this is what worked for me:
2) Compress the files: YUI Compressor is the best choice. For it to work correctly I had to use the --charset flag.
1) Concatenate the .js files: I use the copy command; however, it adds some extra characters that later need to be removed for YUI Compressor to work. It does the trick for now though.
2) Compress the files: YUI Compressor is the best choice. For it to work correctly I had to use the --charset flag.
3) Set the content expiration date (using IIS). In my case I set it to expire after 20 days.
4) Finally, enable gzip compression. At first I thought I would need to gzip the files, but it turns out that II5 does this for you. Setting it up is not really straight-forward, check out the section Scenario 1 of this article for IIS 5.0 instructions.
Monday, October 11, 2010
Visual Studio 2010 Extensions
There is a great new feature on Visual Studio 2010 called Extensions (that I just discovered haha). It's pretty cool, specially since there is a gallery from where you can download extensions. My favorite one right now is JSLint. If you are also doing JavaScript development, you'll find it useful as well.
To get started on this new feature, go to Tools and then click on Extension Manager.
Subscribe to:
Posts (Atom)