Tag Archives: ASP.NET

MVC 6: Your Web Development World is About to Get Rocked!

If you missed the live-stream of our latest webinar on 7/22/2015, never fear! Check out the link below to get yourself up to speed with MVC 6. The webinar is led by instructor and skijoring enthusiast, Don Kiely, and I should warn you in advance …it will rock your world!

For years, Microsoft did its best in battling rapid changes with the Internet to keep its ASP.NET and MVC technology up to speed. However; it’s been nearly 15 years since ASP.NET first hit the web, and those changes simply became too dramatic to overcome.

Enter Visual Studio 2015, Microsoft’s way of throwing out the “old ASP.NET manual” and rebuilding things from the ground up. Visual Studio 2015 was released on 7/20/2015, along with the .NET Framework 4.6 and updated web development tools. With MVC being part of ASP.NET, it has strapped itself in and come along for the update adventure!

This massive update now sees MVC boasting new features like broad support for new web technologies, as well as editor updates for JSON, HTML, and JavaScript. It will also now be much easier and more fun (!) to write robust web applications thanks to tools like HTML5 and CSS.

So this is a big deal?

Absolutely! Not only is the jump from ASP.NET to ASP.NET 5 as significant as switching from Classic ASP to ASP.NET was, but this bad boy is also open source! MVC, Web API, and Web Pages have been combined into a single unified open source programming model, which is hosted on GitHub. There are new tag helpers, view components, simpler dependency management, dependency injection, and more!

As you can see, there is suddenly a lot of stuff to learn about the all new Visual Studio 2015. With our new webinar, you will get a high level look at the newest MVC 6 and ASP.NET 5 features, as well as a jumpstart on building web applications using the new Microsoft stack. Instructor Don Kiely will walk you through these new and exciting changes and features, and have you ready to be a Visual Studio superstar in no time.

Check out the link below (it’s free)…just be sure to turn the volume up to eleven!

http://www.learnnowonline.com/webinars

NOTE: Both MVC 6 and ASP.NET 5 are included with this release; however, you cannot yet use them for production purposes.

The RC1 (release candidate 1) for ASP.NET 5 is slated for release in November 2015, which will have a “Go Live License”. This “Go Live License” indicates that Microsoft is ready to fully support ASP.NET 5 and MVC 6 and that they are confident that users will be able to use the technologies for production applications.

A helpful roadmap of release dates can be viewed here:

https://github.com/aspnet/Home/wiki/Roadmap

About the Author:


zach2-300x225Zach Young
 manages the LearnNowOnline customer support department. In addition to making strange but surprisingly delicious smoothies, Zach divides his time between the LearnNowOnline recording studio, providing sales demos for new and existing clients, and ensuring that each customer is taken care of. In his spare time, Zach enjoys globetrotting with his wife, playing and recording music, and attempting to get the required 1.21 gigawatts for Doc Brown’s DeLorean.

 

What’s new in MVC 5.2

mvc

Microsoft’s very successful model-view-controller architecture, or MVC, has been their flagship framework for developing next generation Web applications—and Microsoft continues to improve it with version 5.2 released just over two months ago. If you’re still hanging on to MVC 4, you’re missing out on many new and exciting features, and Microsoft has made the path to upgrade easier than ever.

So what’s so exciting about MVC 5? Let me start by hitting you with some of the big improvements with this latest release. If you want even more information or want to see some demonstrations of these new features, please check out our MVC 5.2 courses with expert Eric Greene.

One ASP.NET

In MVC 5, Microsoft introduced a new project type called One ASP.NET. This project type has the goal of saving the Web developer’s time by reducing the clutter of many single-focused Web templates constantly growing within Visual Studio. One ASP.NET creates a more “a la carte” model for creating applications so the developer can start with core functionality, and then add more and more components as various features and functionality are required. This allows developers to combine ASP.NET Web Forms, MVC, Web API and other project templates into a single project and not be restricted to use only one of them.

Bootstrap

From the brilliant minds of the Twitter software engineers came a CSS and JavaScript framework that has quickly become one of the most popular tools for front-end development. Bootstrap provides user interface tools and controls that allow developers to build rich Internet applications that auto-respond to changing screen sizes and devices. It takes away the drudgery of constantly tinkering with the CSS and JavaScript code necessary to get your site to perform professionally for all of your users.

Microsoft now includes Bootstrap templates in MVC 5 so you can take advantage of all its features right out of the box. In fact, Bootstrap is now the default HTML/CSS/JavaScript framework bundled with ASP.NET MVC. Bootstrap is managed by NuGet which means it can be automatically upgraded as the technology advances. You can discover more about Bootstrap by taking a look at our Bootstrap 3.1 courses with expert Adam Barney.

ASP.NET Identity

Before ASP.NET MVC 5, Microsoft had promoted its Membership Provider to handle security, authentication, and roles for your Web applications. But with the ASP.NET Identity, they completely rebuilt their security solution to include a whole new range of features. It still contains all the core functionality for authentication and authorization, but it also extends to support new forms like two-factor authentication (2FA) and integrated authentication. With 2FA, you can require multiple forms of authentication like the Google Authenticator or SMS text messaging. Integrated authentication allows you to work with many existing third-party providers like Google, Facebook, and Twitter. It allows your users to access your site using credentials from these and other providers, freeing you from the responsibility of managing credentials, and not forcing your users to memorize yet another password.

New Filters

Authorization filters have been around for quite a while in ASP.NET and have been a staple for most developers who need to set up security for their Web applications. Authentication filters, on the other hand, are new to MVC 5. These new filters allow for programming logic to occur before the authorization filter, giving developers the ability to better identify and control users entering their site. For example, developers can now assign a new authentication principal (think of it like a role) to a user logging in prior to the authorization filter, giving them better control at the individual Action/Controller level. Think of the authorization filter as providing a more global security model, one that covers the site as a whole, while the authentication filter provides a more specific security model that can be applied at more localized level.

Another new filter enhancement is filter overrides. Filter overrides allow you to define filters that apply to most of your application, either at the global level or at the controller level, but then have the option to actually override or turn off those filters at the action level or controller level.

Upgrading from MVC 4

Microsoft has made upgrading easy and painless for the developer. In a nutshell, most applications will simply need to update their NuGet packages, plus make a couple of web.config changes, and they will be off and running. The NuGet services manage all the individual components or packages that your Web application utilizes, like Razor and Bootstrap, and make sure that they are all on the latest releases relative your version of MVC. Keep in mind that in addition to moving to MVC 5, there are minor releases coming out as well. At the time of this writing, there have been 5.1 and 5.2 releases, but by the time you read this there may be 5.3 available and beyond. Regardless, migrations at this level are equally straightforward in their upgrade process.

Keep in mind that in many cases the migration forward is a one-way proposition. With each upgrade, your application is exposed to more and more features and functionality, which means you can’t go back once you start using it. But hey, why would you go back, right?

Finally, it’s not just ASP.NET MVC that is gaining new features—ASP.NET Web API, Razor, SignalR, Entity Framework, NuGet and many others are also improving. LearnNowOnline can help you keep up with the latest releases so you can be the best Web developer you can be. Check out our complete course list.

 

About the Author


martyblogpic2-150x150Martin Schaeferle
 is the Vice President of Technology for LearnNowOnline. Martin joined the company in 1994 and started teaching IT professionals nationwide to develop applications using Visual Studio and Microsoft SQL Server. He has been a featured speaker at various conferences including Microsoft Tech-Ed, DevConnections and the Microsoft NCD Channel Summit. Today, he is responsible for all product and software development as well as managing the company’s IT infrastructure. Martin enjoys staying on the cutting edge of technology and guiding the company to produce the best learning content with the best user experience in the industry. In his spare time, Martin enjoys golf, fishing, and being with his wife and three teenage children.

Create Child Controls – Microsoft SharePoint 2010

Most web controls that have visual elements compose other controls into a greater whole. Every web control contains a Controls collection property that contains the controls of which it is composed.

The controls in the Controls collection are called child controls because a page is easily visualized as a tree of controls with the page as the root. Each node of the tree can have zero or more children.

Use the CreateChildControls to instantiate any child controls that your web control contains.

The first two things that happen when ASP.NET renders a page are the initialization and loading of each node of the tree. The next thing that happens is the loading of state into each node of the tree so that the tree correctly represents any user input.

State is stored in a hidden form field named __VIEWSTATE and its contents are used to rehydrate a page between postbacks. The loading of ViewState works only if ASP.NET is able to match each node in the current rendering with the previous version—the one with which the user interacted and submitted input.

Consider the following code snippet:

 

If you ran this code in ASP.NET 2.0, perhaps on a WSS 3.0 or MOSS 2007 site, the Web Part would render a button 50 pixels wide without error. However, the event handler will not fire when a user clicks the button because the MyWebPart class creates a new instance of the Button class each time it initializes. The myButton variable then references a new button.

When the ViewState loads to indicate that the user clicked a button, the new button has replaced the original button in the tree and the event doesn’t fire.

Here’s the correct way to write this code:

 

In this example, you are still creating a new instance each time—ASP.NET is stateless after all, but the timing of the operation allows the page rendering infrastructure to correctly associate the button with its state when it adds the button to the Controls collection.

When working with the page rendering life cycle, timing is everything. ASP.NET 3.5, the basis of SharePoint Foundation, is more forgiving in this regard. However, unless you know that your custom Web Part will never run in an older version of ASP.NET, it is a best practice to follow the simple rule—create your child controls inside CreateChildControls.
doug (frame 367 of smile clip)This post is an excerpt from the online courseware for our Microsoft SharePoint 2010 for Developers course written by expert Doug Ware.

Doug Ware is a SharePoint expert and an instructor for many of our SharePoint 2007 and SharePoint 2010 courses. A Microsoft MVP several times over, Doug is the leader of the Atlanta .NET User Group, one of the largest user groups in the Southeast U.S., and is a frequent speaker at code camps and other events. In addition to teaching and writing about SharePoint, Doug stays active as a consultant and has helped numerous organizations implement and customize SharePoint.

What is a Model? – MVC 4.0: Views and Models

The model in the model-view-controller pattern is the representation of the domain in an MVC application. The domain of an application is the problem area the application deals with, usually classes that represent business objects. For example, an online banking application might have a domain that consists of checking accounts, transfers, and bills. An application to manage a pet store’s inventory might have a domain that includes cats, dogs, and pet food. The model of your application consists of the classes that represent this domain.

To be consistent with the principle of separation of concerns, views and controllers should have no knowledge of the business rules in your domain or where the data for your domain is stored—if there is even a persistent storage for the data. Instead, views and controllers interact with the model and other application layers to handle those details.

Most real-world MVC applications will typically make use of some sort of data that is stored somewhere, usually in a relational database such as SQL Server or Oracle, or, at the very least, XML files stored on a server somewhere. No matter what the storage is, the application will contain some kind of data access layer to read and write data. Similarly, all non-trivial applications always have some kind of business rules, ranging from simple requirements that a customer’s last name be provided and that an email address must comply with Internet standards, to rules like all customers who did more than a million dollars’ worth of business with us last year get an automatic 20% discount on all purchases. These business rules may be handled in other layers of the application, but the rules that govern a specific object are present in the model.

Unlike a controller or view, in an ASP.NET MVC application a model is not defined by implementing a specific interface or inheriting from some framework class, or even because the class definition file is in the Models folder in Solution Explorer. Instead, one or more classes are models because of the role they play in the application.

This gives you enormous flexibility in how you implement a model. A model could be a simple class that represents data generated during a single session of the application, destroying the data when a user signs off. It could be a complex set of classes generated by Entity Framework to provide an objectrelational mapping to a relational database with hundreds of tables. Or just about anything in between. You’ll see variations of these options in this chapter. But at its core, a model is just a class that lets the controller interact with your domain and that provides data in that domain to a view.

TIP: A model is domain specific. This means that although you can implement a model just about any way you want, you generally will not want generic ADO.NET objects, such as DataSets, to serve as models. Instead, you’ll normally build a model for a specific application (or set of related applications) that serve specific data and business rule needs.

If a model you build is specific to a single application, you should create the model classes in the Models folder within Solution Explorer. This convention makes it simpler to work with the model classes and makes them easily discoverable when another developer comes along six months from now and tries to figure out what you did. But you can place a model class anywhere within an application. Remember that it is how a model is used that makes it a model, not where it is located or what it implements or inherits from.

If you use a model in several related applications, you can put one or more models in a class library and compile it into a standalone DLL, which you then reference from the applications that use the model.

A best practice in MVC applications is to maintain the separation of concerns between the components of the application. For models, this means that you’ll want to instantiate (or retrieve) the model in the controller’s action methods, using the methods and properties of the model to tell the model what actions to take relative to the data, and then send the data to a view for display to the user.

This chapter explores the use of models in an ASP.NET MVC application, how you can create them, and how you can implement validation rules. You’ll also explore how to interact with models from views and controllers, since none of these components exists in a vacuum. Models, views, and controllers interact in specific ways, so it is impossible to consider models without considering the other components as well.
ldn-pledgerwoodThis post is an excerpt from the online courseware for our MVC 4.0: Views and Models course written by expert Phil Ledgerwood.

Phil Ledgerwood has been a software developer for fifteen years. He currently works primarily in .NET technologies producing custom software for organizations of all sizes. He has also done extensive training for those same organizations in both technical and business process topics.

The Role of the View – ASP.NET

The views in your ASP.NET MVC application are what a user sees. Views are the window into your application, and so is one of the most important parts of the application…along with all the rest of it!

Views provide one of the biggest reasons to use MVC instead of Web Forms. Unlike Web Forms, you have complete control over the HTML that the application generates. There are no server controls as there are in Web Forms that spew HTML, which you have little control over or that are hard to use with CSS and client-side JavaScript.

Having complete control over HTML sounds great in theory, but it could also mean that you’d have to write a lot more HTML by hand. One of the big selling points of Web Forms is that you can do drag and drop development, using server controls that generate massive amounts of HTML based on the properties you set and the data you bind to the controls.

But MVC has a lot of features built in that make the job of writing HTML and other code simpler and more manageable, while letting you retain control over most of the generated HTML. And when you need complete control, you can bypass the MVC features and write all the beautiful HTML you care to write.

The trick to writing good views in MVC is to keep the view focused on the user interface only. This means that there should be no code that directly reads or writes to a data store, no business rule implementations, nothing that isn’t directly related to interacting with the user. The ideal view should consist of a lot of HTML, maybe some client-side JavaScript (perhaps including Ajax), and a little code that reads data from the model or ViewData for the purpose of displaying data to the user. It might be appropriate to put some logic in a view, but it should only be presentation logic needed to dynamically interact with the
user. Anything else you should rip out and put in the controller or model. Make that your solemn goal.

The purest way to think about views is that the controller hands a model to the view, and the view converts it into something that is presented to the user. We’ve found this way of thinking to be a helpful context for understanding what views do and how to create them, as well as where to implement different kinds of logic.

In this chapter, you’ll learn about how views work, how you can add dynamic data to the view, how you can bundle and minify files, a little bit about the view engine that makes it all work, and ways to adhere to MVC’s DRY— Don’t Repeat Yourself—principle by creating reusable controls that you can use in multiple views.

Figure below shows a graphic view of the interactions of the components of an MVC application. In order to handle a user request, the controller interacts with the model in whatever way is necessary to respond to the request. The controller then selects a view and passes it whatever data the view requires to generate a page. The view engine then reads the view template and dynamically generates the HTML that is sent to the user.

theroleofview1

In this chapter, you’ll learn some of the many features you can use to build views that provide a robust user interface for your applications. The MVC framework has a rich infrastructure for creating responsive and attractive web sites for your users.
ldn-pledgerwoodThis post is an excerpt from the online courseware for our Introduction to ASP.NET MVC 4.0 course written by expert Phil Ledgerwood.

Phil Ledgerwood has been a software developer for fifteen years. He currently works primarily in .NET technologies producing custom software for organizations of all sizes. He has also done extensive training for those same organizations in both technical and business process topics.

Choosing the Right Action – Microsoft SQL Server 2012

The job of the action invoker to select the appropriate action method is more complicated than may appear on the surface. There could be multiple overloaded methods with the same name in a controller, they may be decorated with different attributes that make their selection appropriate in some scenarios and not others, their action method name may be different from their class method name, and other complications. Designing an effective controller requires that you understand how the selection process works.

The first thing that the action invoker does is to look for the action portion of the route definition for the request. Using the default route defined in a new MVC application shown below, it is the name at the second position.

 

Even if the current URL doesn’t include the action portion of the route, the default route definition defines it to be the “Index” action.

Once the action invoker has the name of the action, it needs to map that action name to a method of the controller. The simplest case occurs when there is a single method in the controller class with a name that matches the action name. For example, in a new MVC application the Index action of the Home controller maps to the single Index method in that controller.

But what qualifies as an action method? Is every method defined in the controller a potential action method? Not at all. There are a few requirements that a method must meet for the action invoker to consider it to be an action method candidate:

  •  It must be a public method and not marked as static.
  •  It cannot be a method defined on System.Object or the Controller base class. In other words, it must be defined within your custom controller object, not inherited from another object. So ToString could not be an action method because it is defined on System.Object.
  •  It cannot be a special method, such as a constructor, property accessor, or event accessor.
  •  It cannot have the NonActionAttribute decoration. This attribute is handy if you want to include a public method in a controller but don’t want to use it as an action method.

Taking all these restrictions into consideration, the action invoker uses reflection to find all methods in the controller with the same action name as the action name specified in the URL and meet the previous requirements.

But here is where things get a bit murky. Through the use of attributes on the controller’s methods, there could be multiple methods with the same name, the action name could be different from the method name, and there may be a selector attribute that restricts which requests an action method can respond to. This can create a bit of a gauntlet that the action invoker must navigate in order to find the correct action method, so let’s explore these action method features.

WARNING! By default, anyone anywhere could invoke any public method you create in a controller, unless you decorate the method with the NonAction attribute. This sounds scary, but most of the time the only public methods you have in a controller class will be action methods, so this is a non-issue.

ldn-expertdkielyThis post is an excerpt from the online courseware for our Microsoft SQL Server 2012 Developer course written by expert Don Kiely. 

Don Kiely is a featured instructor on many of our SQL Server and Visual Studio courses. He is a nationally recognized author, instructor and consultant who travels the country sharing his expertise in SQL Server and security.

ASP.NET Web API: Self-Hosting

aspnet tutorial1

Building a service-oriented architecture with the ASP.NET Web API does not restrict you to IIS deployment. This may come as a surprise to those who have worked with Microsoft technologies for a long time. Many Microsoft technologies for the web are designed to be deployed on IIS and become erratic or completely non-functional if deployed in some other way. The Web API, however, does not need to be deployed in IIS, or even deployed to a web server. Microsoft has put the tools in the framework necessary to host Web API services out of any application you write.

Hosting Web API services in your own process is called self-hosting. You might think that self-hosting is an intensely involved process that has to manage sockets, multiple threads, etc. However, the framework has two objects that wrap up most of this complexity for you: HttpSelfHostConfiguration and HttpSelfHostServer.

The HttpSelfHostConfiguration object provides information to the framework on how you want the host to work. At the very least, this includes specifying the root URL that the host will use for HTTP requests and the routing rule(s) used. If all you intend to host are Web API services, then you can simply copy and paste the routing rule from the Global.asax of a Web API application.

WARNING! Make sure the application that you’re writing has adequate permissions to commandeer ports. Also, make sure that the machine running your application can receive HTTP requests from other machines on your network or outside your network depending on your needs. If your application can process requests made on that machine but not from any others, that could be a sign that the machine can’t be accessed from the outside. Finally, make sure your application’s build is targeted for the .NET 4 Framework and not the .NET 4 Framework Client Profile.

The HttpSelfHostServer takes in the second object: an HttpSelfHostConfiguration object. In your code, simply use the OpenAsync and Wait methods of this object for it to start listening for HTTP requests. Any HTTP requests that hit the URL defined in the HttpSelfHostConfiguration will run through the routing rules also defined in that configuration and get routed accordingly. From that point, everything works just like a normal Web API application. It’s almost as if you’ve written your own miniature web server as part of some other program. This code is quite simple considering the complexity of what you’re actually doing. Self-hosting can be useful in situations where IIS is not an option, where you have a very tightly-focused application that needs to handle everything internally, or you have various applications that need to communicate with each other across HTTP.

TIP: In order to use these objects, it is important that you have the MVC4 and selfhosting DLLs available to your code. The easiest way to get them is from the NuGet package Microsoft.AspNet.WebApi.SelfHost.


ldn-pledgerwoodThis post is an excerpt from the online courseware for our
ASP.NET Web API Hosting and Dependency Resolution course written by expert Philip Ledgerwood.

Philip Ledgerwood has been a software developer for fifteen years. He currently works primarily in .NET technologies producing custom software for organizations of all sizes. He has also done extensive training for those same organizations in both technical and business process topics.

What are the Most In-Demand IT Skills in 2013?

StartLearningButton

This recent article in ZDNet is a must-read for any IT professional looking for work or to beef up their resume. It lists the top “in-demand” skills for 2013, and some of the findings may surprise you.

That’s because despite the rise of big data and mobile computing, many traditional “evergreen” IT skills are still in demand. These skills include C#, ASP.NET, and PHP, which goes to show that there will continue to be a market for basic programming competencies.

That said, big data, mobile computing, and cloud computing are creating a demand for a set of newer skills, which in include virtualization and html5.

Of course, there inevitably will be some victims of this progress, and they include Flash and PHP, which while still in-demand, will quickly wane beyond 2013, according to the IT Job Board.

So if you seek to strengthen your traditional IT skills, check out our C# video course. If it’s next-generation skills you’re after, try our HTML5 tutorial.


 

(function(){
var s=’hubspotutk’,r,c=((r=new RegExp(‘(^|; )’+s+’=([^;]*)’).exec(document.cookie))?r[2]:”),w=window;w[s]=w[s]||c,
hsjs=document.createElement(“script”),el=document.getElementById(“hs-cta-c6aa8857-3e7e-4761-a672-02016ac3851d”);
hsjs.type = “text/javascript”;hsjs.async = true;
hsjs.src = “//cta-service-cms2.hubspot.com/cs/loader.js?pg=c6aa8857-3e7e-4761-a672-02016ac3851d&pid=153597&hsutk=” + encodeURIComponent(c);
(document.getElementsByTagName(“head”)[0]||document.getElementsByTagName(“body”)[0]).appendChild(hsjs);
try{el.style.visibility=”hidden”;}catch(err){}
setTimeout(function() {try{el.style.visibility=”visible”;}catch(err){}}, 2500);
})();

 

4 Benefits of Object-Relational Mapping (ORM)

ldn-bbluetry

Object-relational mapping, in the purest sense, is a programming technique that supports the conversion of incompatible types in object-oriented programming languages, specifically between a data store and programming objects. You can use an ORM framework to persist model objects to a relational database and retrieve them, and the ORM framework will take care of converting the data between the two otherwise incompatible states. Most ORM tools rely heavily on metadata about both the database and objects, so that the objects need to know nothing about the database and the database doesn’t need to know anything about how the data is structured in the application. ORM provides a clean separation of concerns in a well-designed data application, and the database and application can each work with data in its native form.

TIP: Nicknames and acronyms used for “object-relational mapping” include ORM, OR/M, and O/R mapping. Although ORM seems to be the term most commonly used in the .NET world, you’ll often see the others in books and articles. We’ll stick with ORM, mostly because it is the easiest to type!

The key feature of ORM is the mapping it uses to bind an object to its data in the database. Mapping expresses how an object and its properties and behaviors are related to one or more tables and their fields in the database. An ORM uses this mapping information to manage the process of converting data between its database and object forms, and generating the SQL for a relational database to insert, update, and delete data in response to changes the application makes to data objects.

ORM performs the rather amazing task of managing the application’s interactions with the database. Once you’ve used an ORM’s tools to create mappings and objects for use in an application, those objects completely manage the application’s data access needs. You won’t have to write any other low-level data access code. Strictly speaking, you could still write low-level data access code to supplement the ORM data objects, but this adds a significant layer of complexity to an application that we’ve rarely found necessary when using a robust ORM tool. It is better to stick to one or the other and keep the application simpler and more maintainable.

There are a number of benefits to using an ORM for development of databased applications and here’s four:

  1. Productivity: The data access code is usually a significant portion of a typical application, and the time needed to write that code can be a significant portion of the overall development schedule. When using an ORM tool, the amount of code is unlikely to be reduced—in fact, it might even go up—but the ORM tool generates 100% of the data access code automatically based on the data model you define, in mere moments.
  2. Application design: A good ORM tool designed by very experienced software architects will implement effective design patterns that almost force you to use good programming practices in an application. This can help support a clean separation of concerns and independent development that allows parallel, simultaneous development of application layers.
  3. Code Reuse: If you create a class library to generate a separate DLL for the ORM-generated data access code, you can easily reuse the data objects in a variety of applications. This way, each of the applications that use the class library need have no data access code at all.
  4. Application Maintainability: All of the code generated by the ORM is presumably well-tested, so you usually don’t need to worry about testing it extensively. Obviously you need to make sure that the code does what you need, but a widely used ORM is likely to have code banged on by many developers at all skill levels. Over the long term, you can refactor the database schema or the model definition without affecting how the application uses the data objects.

One potential downside to using an ORM is performance. It is very likely that the data access code generated by the ORM is more complex than you’d typically write for an application. This is because most ORMs are designed to handle a wide variety of data-use scenarios, far more than any single application is ever likely to use. Complex code generally means slower performance, but a well-designed ORM is likely to generate well-tuned code that minimizes the performance impact. Besides, in all but the most data-intensive applications the time spent interacting with the database is a relatively small portion of the time the user spends using the application. Nevertheless, we’ve never found a case where the small performance hit wasn’t worth the other benefits of using an ORM. You should certainly test it for your data and applications to make sure that the performance is acceptable.

There are a number of ORM tools available for .NET applications (see the “List of object-relational mapping software” topic in Wikipedia in the .NET section for an exhaustive list). Before Microsoft introduced Entity Framework, the open source NHibernate was probably the dominant ORM tool. NHibernate is ported from Hibernate, a Java ORM tool that has been available for years. But because Microsoft now bundles Entity Framework with the .NET Framework and incorporates extensive support for it in Visual Studio, Entity Framework has become the dominant ORM in the Microsoft development world.

Start training on .NET!

See, Learn, Develop

uva_online-525x335

 

Out of the four learning styles that we cover in our online training courses – visual, aural, read/write and kinesthetic – this blog will look at visual learning, or learning by seeing.

As a dominant learning style, there’s a good chance that many developers looking to further their training and education are visual learners. Hence, they should look to visual learning methods when going about learning a new development technology.

Due to its visual makeup, online learning courses and tutorials are extremely well suited to the visual learner. From simple graphics to animated graphics, rollovers and videos, the visuals used in online learning courses help emphasize important pieces of information.

The process of integrating images into instructional strategies can benefit all developer students, including those who might not otherwise be classified as visual learners. For example, images aid in retention by delivering new information to students through both verbal and visual communication. Images that reference previous material can also aid comprehension by linking a new concept to one already mastered. Diagrams and graphs can help individuals to understand mathematical data and statistics. Images can also help to reveal previously unrealized relationships or patterns within data sets.

The online video courses at LearnNowOnline, completely visual in their makeup, are a great learning tool for the developer that learns by seeing!

In the following video, you can see many aspects of visual learning! This snippet is part of our course on “ASP.NET Using Knockout.js: Getting Started and Observables.”

Food for thought:

  • Are you a visual learner?
  • Do you use tools to help you learn efficiently and effectively?