background preloader

MVC

Facebook Twitter

CRUD Operations using Partial View and jQueryUI

Code-First Development with Entity Framework 4. .NET 4 ships with a much improved version of Entity Framework (EF) – a data access library that lives in the System.Data.Entity namespace. When Entity Framework was first introduced with .NET 3.5 SP1, developers provided a lot of feedback on things they thought were incomplete with that first release. The SQL team did a good job of listening to this feedback, and really focused the EF that ships with .NET 4 on addressing it.

Some of the big improvements in EF4 include: POCO Support: You can now define entities without requiring base classes or data persistence attributes.Lazy Loading Support: You can now load sub-objects of a model on demand instead of loading them up front.N-Tier Support and Self-Tracking Entities: Handle scenarios where entities flow across tiers or stateless web calls.Better SQL Generation and SPROC support: EF4 executes better SQL, and includes better integration with SPROCsAutomatic Pluralization Support: EF4 includes automatic pluralization support of tables (e.g. Jackalope: ASP.NET MVC Web Applications on the Desktop. Mono WCF Advent Day 5: expose and consume WSDLs - monogatari. WCF services can be exposed as a set of WSDL documents, and WCF client classes can be automatically generated by consuming such WSDLs. Today's topic is our WSDL support. It is not really perfect, but supporting code is there. ServiceDescription When you create a ServiceHost with your service implementation class, WCF creates an object of "ServiceDescription" that describes the service details, such as set of endpoints, debugging support and service throttling.

It is exposed as Description property of the ServiceHost instance. As I explained Day 2 a bit, a service class may implement more than one service contract interfaces. WSDL output and ServiceMetadataBehavior To explain how to do it, I have to explain "service behaviors". WSDL output support is represented as one of such an implementation of IServiceBehavior, namely ServiceMetadataBehavior. Run service.exe, and then visit in your browser. Svcutil.exe and clients On the client side, it is non-coding land. Introduction to HTML5 Development Using VS 2010, HTML5, jQuery Mobile and ASP.NET MVC 4 | Windows Store Apps - One Stop Shop. You can download from Windows Store at Mobile apps and HTML5 are two of the hottest technologies right now, and there’s plenty of overlap. Web apps run in mobile browsers and can also be re-packaged as native apps on the various mobile platforms.

Browser adoption for HTML5 features is accelerating rapidly. Many of the modern browsers (Chrome, Safari, Firefox, and Opera) already support between 75% and 90% of the feature set and this number is increasing daily. With the wide range of platforms to support, combined with the sheer power of mobile browsers, HTML5 is the “Write once, run anywhere” (WORA)solution. Modern mobile devices consist of powerful browsers that support many new HTML5 capabilities, CSS3 and advanced JavaScript. To see what features your browser supports, check out sites like html5test.com, caniuse.com. jquerymobile.com and html5please.com Creating a HTML5 application: Dean Hume - ASP.net MVC HTML5 Toolkit. If you haven't started playing around with HTML5 yet, you should definitely check it out. I've blogged about some of the features of HTML5 before, so if you take a look at this post, it should give you a fairly idea of what HTML5 is about.

I try and play around with ASP.net MVC as much as possible and this site is also written in MVC 2. One of the things that I thought about adding to MVC is the ability to have all the textboxes and controls updated to use HTML5. One of the great things about HTML5 is that even though some browsers do not currently support it, you will still be able to use it in your web applications and the browser will just handle it as a normal HTML control if it doesn't recognize it. So, I've finally got around to creating a proper project and solution for these controls.

Getting started Firstly, you need to add a reference in your project. Then, you simply call it the same way you would call a normal textbox in your MVC view. And any additional html attributes: Get MVC3 Razor Running on Mono - Nathan Bridgewater. Updated 10-18-2011 – added some more common issues I dug around a little to figure this out. Hopefully this will clarify all the steps required to get an MVC 3 Razor site running on Mono.

The main pitfall I ran into was gathering the additional dependencies and excluding Microsoft.Web.Infrastructure assembly from my deployment. Overall though it’s not too difficult to deploy your MVC3 app. In Summary: Install MonoBIN Deploy WebsiteConfigure Apache (or Xsp environment)Fire Up Your ServerErrors You Might See Install Mono If you haven’t done this yet, go grab it from the Mono downloads page. BIN Deploy Your Website For this, I just performed a traditional “Publish” from Visual Studio to a file system directory. System.Web.MvcSystem.Web.HelpersSystem.Web.Routing BIN Deploy Additional MVC3/Razor Dependencies Just like Scott Hanselman mentions in his BIN deployment post, add these additional libraries found in the MVC3 RTM.

NOTE: Do NOT copy the Microsoft.Web.Infrastructure assembly. . #! Fire It Up. Asp.net - Does the Razor View Engine work for Mono.