Archive for the ‘javascript’ Category

Other publish

SignalR

Posted: October 23, 2013 in developing, javascript, mvc, signalR, web api
Tags: ,

About

ASP.NET SignalR is a new library for ASP.NET developers that makes developing real-time web functionality easy. SignalR allows bi-directional communication between server and client. Servers can now push content to connected clients instantly as it becomes available. SignalR supports Web Sockets, and falls back to other compatible techniques for older browsers. SignalR includes APIs for connection management (for instance, connect and disconnect events), grouping connections, and authorization.

Links:

  1. Getting Started with ASP.NET SignalR 2.0 (8 Tutorials)

    What is SignalR 2.0 and how to get started adding real-time functionality to a web application.

  2. Hubs API (6 Tutorials)

    This chapter contains information on using Hubs, the higher-level of the two communication paradigms used by SignalR

  3. Security (3 Tutorials)

    This chapter contains information on using authorization in SignalR.

  4. Performance and Scaling (5 Tutorials)

    This chapter contains information on performance and scaling in SignalR.

  5. Troubleshooting and Debugging (1 Tutorials)

    This chapter contains information on finding and fixing issues with SignalR applications.

  6. Extensibility (1 Tutorials)

    Extensibility and dependency injection n SignalR.

 

Source: http://www.asp.net/signalr

In this unit, we’ll cover the enhancements to ASP.NET in the .NET Framework 4. You’ll learn about changes to WebForms, AJAX and Dynamic Data and you’ll get introduced to ASP.NET MVC, now included in the framework.

http://msdn.microsoft.com/en-us/vs2010trainingcourse_aspnet_unit

Free Microsoft Training…

Courses by Topics

  • C# / XAML
  • HTML5
  • Virtualization
  • Managing Desktop & Devices
  • Server Infrastructure
  • Management & Security
  • Private Cloud
  • Business Intelligence
  • Collaboration
  • Licensing
  • App Development

Courses by Products

  • Windows
  • Windows Server
  • Visual Studio
  • System Center
  • SQL Server
  • Windows Azure
  • Office

Link: http://www.microsoftvirtualacademy.com/

Join me and Christopher Harrison (@geektrainer) for a free, full day online training event on Developing ASP.NET MVC4 Web Applications! There’s still space available, so register now.

MVA - ASP.NET MVC 4 Jump Start

Microsoft Virtual Academy (MVA) runs great, high quality live training events. Earlier this year, I had the opportunity to participate in the Building Web Apps with ASP.NET Jump Start with Scott Hanselman and Damian Edwards. For that event, we overviewed the Microsoft web platform, including a lot of new and preview features.

For this upcoming event, we’re going to be sticking closer to the curriculum for the Developing ASP.NET MVC 4 Web Applications certification exam (70-486) curriculum. Christopher is a full time, professional instructor (MCT, MCPD, MCITP) who’s helped people prepare for this exam, and we’re going to be basing the Jump Start content on what you’d learn in a 70-486 certification course.

Here’s an overview of what we’re planning to cover:

  • Overview of MVC
    • What is MVC?
    • How is MVC different from Web Forms?
    • Why use MVC?
  • Developing ASP.NET MVC 4 Controllers and Models
    • Creating Controllers
    • Adding Actions
    • Creating MVC Models
    • Working with Code First
  • Developing ASP.NET MVC 4 Views
    • Razor Syntax
    • HTML Helpers
    • Partial Views
  • Integrating JavaScript and MVC
    • Using AJAX
    • Using jQuery
  • Implementing Web APIs
    • Developing Web API Controllers
    • Calling HTTP Services from Client-Side Code
  • Deploying ASP.NET MVC Site Walkthrough
    • Creating a site on Windows Azure Web Sites
    • Deploying an ASP.NET MVC Application with Visual Studio Web Deploy
  • What’s Next and Resources
    • Sneak peak at Visual Studio 2013 (Preview) and ASP.NET MVC 5 tooling
    • A look at real-time communications with SignalR
    • Resources for keeping up with new ASP.NET releases

Note that this is a Jump Start to help you get started preparing for the certification exam, but with a one day event we’re only covering a portion of the content that’s on the exam. Don’t expect to watch this and breeze through the exam… but it’s a start.

And if you’re just new to ASP.NET MVC and want a full day (free!) day of training, this is a great opportunity. We’re working off some of the certification content, but you don’t need to be working towards the certification to take or benefit from the class.

To get you warmed up for it, here’s the one hour introduction to ASP.NET MVC 4 from the Building Web Apps with ASP.NET Jump Start this past February.

This was the first q/a that popped up for me when trying to solve the same problem using .net MVC as the source of my data. I realize this doesn’t solve the php question but it is related enough to be valuable.

I am using .net mvc. The blog post from Greg Brant worked for me. Ultimately you create an attribute :

[HttpHeaderAttribute("Access-Control-Allow-Origin", "*")]

That you are able to add to controller actions.

eg:

public class HttpHeaderAttribute : ActionFilterAttribute
{
   public string Name { get; set; }
   public string Value { get; set; }
   public HttpHeaderAttribute(string name, string value)
   {
      Name = name;
      Value = value;
   }

   public override void OnResultExecuted(ResultExecutedContext filterContext)
   {
      filterContext.HttpContext.Response.AppendHeader(Name, Value);
      base.OnResultExecuted(filterContext);
   }
}

and then using it with:

[HttpHeaderAttribute("Access-Control-Allow-Origin", "*")]
public ActionResult MyVeryAvailableAction(string id)
{
    return Json( "Some public result" );
}

Source: http://goo.gl/WBsnr

Other view of the problem in…