Posts tagged with '.NET'
(This is a cross-post of a blog that was originally posted to the Couchbase Blog - Upcoming #Couchbase Events in Austin, Houston and New York City)
I’m going to be in New York on October 8th and Texas from October 10th to October 13th. If you’re in either of those areas and interested in NoSQL and Couchbase, now is a good chance to attend some sessions, visit some great user groups, and ask me questions in-person.
Here’s where I will be in between meals of beef brisket (image by Arnold Gatilao, licensed through Creative Commons):
-
October 8th, 2016: Code Camp NYC - presenting "Full Stack Development with .NET and NoSQL" (which I have presented before, you can check my blog post history for some of the videos).
-
October 10th, 2016: Austin .NET User Group (ADNUG) - also presenting "Full Stack Development with .NET and NoSQL" .
-
October 11th, 2016: Austin Node.JS User Group presenting "Full Stack Development with Node.js and NoSQL" (which I have also presented before, you can check my blog post history for some of the videos).
-
October 12th, 2016: Houston.js presenting "I Have a NoSQL Toaster" (which I have presented before, and is based on Matthew Revell's session of the same name).
-
October 13th, 2016: Houston .NET User Group (HDNUG) again presenting "Full Stack Development with .NET and NoSQL".
A great NYC conference! Four great Texas groups! I’m going to bring whatever stickers and swag that I can fit in my luggage with me, and I may even just bring the CouchCase along too.
(This is a repost of content that was originally posted on the Couchbase Blog: Upcoming #Couchbase Events in Chicago)
I’m going to be in Chicago for most of next week. If you’re in Chicago and interested in NoSQL and Couchbase, now is a good chance to attend some sessions, visit some great user groups, and ask me questions in-person.
I won’t be at Wrigley Field (the above image was doctored :), but here’s where I will be:
-
September 6th, 2016 at 12pm: Chicago Geekfest presenting "I Have a NoSQL Toaster" (which is my version of Matthew Revell's session of the same name)
-
September 7th, 2016 at 6pm: Chicago .NET Developers presenting "Full Stack Development with .NET and NoSQL" (which I have presented before, you can check my blog post history for some of the videos).
-
September 8th, 2016 at 7pm: Lake County .NET Users Group presenting "SQL for JSON"
Three different sessions and three great Chicago groups. There will be some surprises in store, and I’m going to bring whatever stickers and swag that I can fit in my luggage with me.
If you're in Chicago, why not tweet me and say hi!
Hey, did you know that I'm a Microsoft MVP? As an MVP, sometimes Microsoft lets me do some cool stuff.
For instance, they let me write some blog posts about Couchbase with Windows and .NET for the MVP Award Program Blog! There are three total parts, and part 1 was just published.
So go check it out, subscribe to the MVP Award Blog, and most importantly, download Couchbase and try it out today.
I always want to thank fellow MVP Travis Smith for being the technical editor for these posts! He provided some great feedback, and he's an overall great guy!
I'm trying to familiarize myself with node.js, since it seems to be in use by a lot of Couchbase customers. I heard that Visual Studio code had some pretty good node.js support built in, so I decided to give it a shot.
I already had node and npm installed on my Windows machine. I don't remember why. If you aren't sure if you do, open up Powershell (or cmd) and try:
node --version
and
npm --version
(If metaphors help you, I think of node as ASP.NET and I think of npm as NuGet)
If neither of those commands works, then you can install node with Chocolatey NuGet: choco install nodejs
The next easiest thing you can do is create a file with text editor, say "app.js". Put this into that file:
var msg = "Hello, world!"; console.log(msg);
Woo. Now back at the command line, type:
node app.js
And guess what it will write out? If you guessed "Hello, world!" then give yourself 10 points.
So, what good is this? Well, you can now write programs in JavaScript outside of a browser. A lot of people use this to write server-side JavaScript, for example. They might use a framework like Express (which, back to the metaphors, I think of as ASP.NET MVC). You can use npm to install express and an npm "start" command to run your Express app. I may blog more about that later, after I play with it some more.
I have a web page on domain A and, say, a Json endpoint on domain B. I would like domain A to make an Ajax request to domain B, but when I try that, I get an error message, as shown here:
Some options:
- Make the request server-side instead of client side.
- If you have control of the endpoint, add "Access-Control-Allow-Origin" to the response header.
- Use jsonp (you may still need control of the endpoint if it doesn't support jsonp already).
Let's explore the jsonp option. Here's a similar request to the one above, except this time it's using jsonp.
It does not raise an error.
The way jsonp works is a little wacky, but the main thing you need to know is that you need to specify a callback function. jQuery handles this automatically on the client side. Here's how I handle it on the server side with ASP.NET MVC using the Mvc.Jsonp package.
Notice three things:
- SomeController inherits from JsonpControllerBase
- GetAllItems return type is JsonpResult and has a "callback" string parameter
- The Jsonp function from the base class and how callback is passed to it.
The benefit is that you can now do cross-domain scripting. So far the drawbacks seems to be that:
- It's limited to GET requests
- Error handling may take some extra work
- If there is no Jsonp endpoint, then you either have to make one or you're out of luck.
I'm giving it a shot on Ledger, and seems to be working fine so far.