Monthly Archives: February 2013

Creating a Learning Culture

url-11

 

The better informed the people who work in your business are, the better they will be able to do their jobs effectively and efficiently. This is true in almost all work environments, but is especially true when it comes to IT departments, who are constantly having to master and learn new technologies before they have totally figured out an older program or system they are working with. Due to the speed at which technology moves these days, those within IT departments often find themselves overwhelmed by the amount of new information they have to digest in a short amount of time. This can often slow down the department and, in many cases, the business as a whole.

One great way to keep this from happening is to create a learning culture, one in which the employees of the IT department are interested and used to learning new programs and systems on a regular basis, as part of their jobs. Regular tutorial sessions may be one of the best ways to accomplish this. Video tutorials are incredibly effective, as employees can watch these on their own time or as a group. These can range from Visual Studio 2010 tutorial videos to video tutorials for C#. Courses can also be offered to employees free of charge as part of work requirements! In fact, tutorials are offered for just about every IT department program out there, so theoretically a business could create an easily accessible library of this information for their employees to access on their own, whenever they need it.

The information you make available and the more employees are encouraged and even paid to learn more about their trade, the stronger the learning culture will be at your company. When this is the case, everyone will be educated for just about any challenge work throws at them and will be easily able to overcome it.

Thumbnail for 637

So HTML5 is the Future of Programming. But Do Developers Even Like It?

html5Across the past few weeks, we’ve been talking about how HTML5 is the programming language of the future. But what do developers think of it? And why do they like it? These are very important questions that we’d like to address today.

CMS Wireinterviewed current HTML5 developers and asked them what was so appealing about the language. The number one benefit, cited by 72 percent of respondents, was the familiarity of languages, meaning that if you’re fluent in HTML (naturally), JavaScript, or CSS, picking up HTML5 should be a breeze. (For a great primer, check out our HTML5 tutorial.)

The number two, three, and four benefits were “Reach/cross-platform support” (62 percent), “Performance” (34%), and “Availability of tools/libraries” (28%), respectively.

Notice the sharp drop-off between benefits number two and three, indicating that while HTML shows a great deal of promise, its performance needs to catch up with the hype.

Thumbnail for 637

ASP.NET Web APIs: Alternative Routing Conventions

aspnet tutorial1

 

Like ASP.NET MVC framework routing, you can change the default route mappings to a different pattern. This is rarely necessary, however. What is more common is the need to change the default way the Web API identifies a controller action, and Web API routing gives you several options to do this.

HTTP Method Attributes

You can explicitly bind HTTP methods to actions in the controller. This is handy if you feel the default naming conventions force you to write action methods that aren’t very self-descriptive. For instance, having a controller method named “Put” doesn’t explicitly tell you what it’s doing. Even a name like “PutBook” doesn’t really imply that a Book is being edited. Perhaps you’d rather use a name like “EditBook” or “UpdateBook.” All you have to do is explicitly bind the PUT method to that action by using an HttpMethod attribute.

This forces the routing to use the EditBook method for a PUT request that comes in for that controller.

AcceptVerbs Attribute

The AcceptVerbs attribute is used similarly to the HTTP method attributes. It is useful when you want to specify a list of methods tied to the action and/or HTTP methods besides the usual four (GET, POST, PUT, DELETE).

Action Names in the URL

Much like the ASP.NET MVC framework, you can set up Web API routing to look for an action name in the URL and use that action to process the request. This is not generally recommended as it is a step away from a truly RESTful service. You want URLs to describe a resource, not an action to perform on the resource.

However, if your routing becomes unduly complicated or you want to keep to the same patterns your developers are used to from ASP.NET MVC, you can set up a routing table to look for action names in the URL. First change the routing table in Global.asax to the following:

Then use the HTTP method attributes on your actions:

This action would fire in response to a URL such as:


ldn-pledgerwoodThis post is an excerpt from the online courseware for our ASP.NET Web API Basics 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.

ASP.NET Web API’s: Default Mapping

Web API Routing

If you have used the MVC pattern in your web applications, you are already familiar with the concept of URL routing. The ASP.NET MVC framework, for instance, knows which controller action to call by looking at pieces of the URL and using those pieces to identify the controller and the controller action.

Web API routing works in a similar way, except that the action is not specified in the URL. Instead, the action is selected based on the HTTP method used in the request.

Default Mapping

Like the ASP.NET MVC framework, you can find the default routing table for the Web API in Global.asax.

Contrast this with the default routing table for ASP.NET MVC controllers:

The differences in the properties that are set and the URL mapping pattern may seem subtle, but they are important. Not only do the two mapping schemes they also capture the primary differences between a RESTful API and something that maps to method names in a URL.

The first difference is the MapHttpRoute method. This method is used to map API routes as opposed to the MapRoute method, which is used for ASP.NET MVC routing tables.

The second difference is that “api” is a hard-coded value in the Web API map for URLs. This prevents mapping conflicts with the ASP.NET MVC framework. It’s quite possible for both your MVC controllers and your Web API controllers to have the same names, so having “api” as part of all Web API URLs makes sure your routing table uses the right controller for a request.

The third difference is that the routeTemplate does not have an action parameter like the ASP.NET MVC framework routes do. In ASP.NET MVC, the URL specifies the action that should be called. In the Web API, the API decides which action should be called based on the HTTP method handled bythe controller.

In order to map a request to a controller action, Web API routing goes through the following steps:

  1. Checks for an “api” in the beginning. If there isn’t one, it is handled by MVC routing, instead.
  2. Adds the word “Controller” to the value found in the {controller} parameter of the URL and uses this to find the appropriate Web API controller
  3. Looks for an action with a name that begins with the HTTP method used in the request. For instance, if a GET method is used, Web API will look for an action name that starts with the word “Get,” a POST method willtrigger an action that starts with the word “Post,” and so on.
  4. Maps any additional parameters to action parameters.

Table 1 shows how the HTTP method and the URL pattern will map to actions by default. Once again, remember that the action name only has to begin with the HTTP method name; everything else is irrelevant and can be whatever you want.

HTTP Method URL Matching Action
GET api/books GetAllBooks()
GET api/books/2 GetBook(int id)
POST api/books PostNewBook()
PUT api/books/2 DeleteBook(int id)
DELETE api/books/2 DeleteBook(int id)

Table 1. Example HTTP requests mapping to controller actions.

This post is an excerpt from the online courseware for our ASP.NET Web API Basics course written by expert Philip Ledgerwood.

ldn-pledgerwoodPhilip 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.

Importance of Training Consistency for Developers & IT Professionals

One of the most challenging aspects of working with a team of talented, diverse people is the possible divergent working methods that each person can bring to the table. While diversity in itself can be a very good thing in many areas, when it comes to working on a group project, differing or conflicting development methodologies can be a problem. Miscommunication and misunderstandings can result in project delays, wasted time and missed deadlines. To put it plainly, the quality of the work suffers.

That’s where developer training can be really helpful. Consistency for your developers and IT professionals is possible through online IT training. Developer tutorials and video tutorials can be easily undertaken by an entire team, as well as new team members who might join the project later. This puts everyone on the same page and speaking the same language right out of the gate.

Working through a self-paced e-Learning program can ensure that all of your remote team members learn the same development methodologies as your in-house staff. With online developer training such as a Java tutorial, C# tutorial, Visual Basic tutorial or SQL tutorial, there’s no need to worry about an instructor in one area teaching a different method than another. Through user-friendly online classes and video tutorials, the end result of online developer training is consistency in methods from your staff. You’ll experience more streamlined development performance from all of your team members, fewer mistakes, fewer bugs, faster completion of projects and a higher quality of work overall.

Interested in learning more about online IT training? Visit www.learnnowonline.com for deep, thorough and consistent training.


 

 

 

Windows 8 using XAML: BeginTime Animation Property

If your storyboard contains more than one simultaneous animation, you may need to delay the start of one or more of the animations. To add this behavior,you can set the BeginTime property so that specific animations delay.

Taking the previous examples, imagine that you want the circle to move fromleft to right and back again, and on the second pass, increase the height, and later, the width of the circle as well. Although all three animations exist within the same storyboard, only one of the animations starts immediately—the other two delay for a fixed period of time.

The following markup the BeginTime property to modify the start time for specific animations within the storyboard:>/p>

TIP: If you create a storyboard that contains multiple animations for a single object, you can save some typing by “factoring out” the TargetName property, and applying it to the storyboard rather than to each individual animation.

You may find it worthwhile to investigate the rest of the animation properties, as well—they all play a part in creating interesting and useful animations.

This post is an excerpt from the online courseware for our Windows 8 Using XAML: Bindings, Shapes, and Animation course written by expert Ken Getz.

Thumbnail for 557Ken Getz is a Visual Studio expert with over 25 years of experience as a successful developer and consultant. He is a nationally recognized author and speaker, as well as a featured instructor for LearnNowOnline.

When Apps Need to Be Delivered Better, Faster & Cheaper, Visual Studio Can Help

StartLearningButton

Application development is the foundation of any successful business. And the prevailing mantra among developers is to bring a product to market “better, faster, and cheaper” than the competition.

In many ways, the company lives and dies by how they roll out applications. If an application is delayed or goes over-budget, the firm misses out on lucrative opportunities. Yet if the application is rushed, the business runs the risk of encountering high-profile bugs or security failures.

The trick, therefore, is to drive business value through a systematic project management process that is built on strong governance principles and tools to support collaboration and efficiency. That latter piece is where tools like Visual Studio 2010 can be extremely valuable in optimizing the application lifecycle.

Our Visual Studio tutorial videos are a great first step for mastering this important technology that can, over time, help you directly deliver value to your team.


 

(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);
})();

 

Windows 8 Using XAML: Using the PointAnimation Class

xamllogo_3

Much like the animation class we discussed in a previous article, the PointAnimation class allows you to animate a property that represents a point. For this example, AnimatePoint.xaml, uses a Path element whose Path.Data element contains an EllipseGeometry element. But using this technique, ratherthan using an Ellipse object, the markup can specify a Center property for the path which is a point:

The parent Canvas.Resources element contains the following markup:

This animation moves the shape from its start location (100, 100) to its endinglocation (300, 300) over the course of three seconds. The Figure below shows the moving ball, diagonally bouncing back and forth across the application’s window. Note that the animation goes back and forth, and repeats forever—those are artifacts of the AutoReverse and RepeatBehavior properties of the animation, which you’ll learn about soon.

Figure 1. It’s hard to tell, but the circle is moving!

learnnowonline expert Ken GetzThis post is an excerpt from the online courseware for our Windows 8 Using XAML: Bindings, Shapes, and Animation course written by expert Ken Getz.

Ken Getz is a Visual Studio expert with over 25 years of experience as a successful developer and consultant. He is a nationally recognized author and speaker, as well as a featured instructor for LearnNowOnline.

Understanding the Robust Integration Capabilities of SharePoint

en-us

Rolling out an out-of-the-box IT solution can be difficult and costly. But it has one thing going for it: generally speaking, this plug and play approach minimizes the need for complex back-end integration. That’s why many companies “rip out” their old systems and install a new one from scratch.

That said, other companies find this approach too disruptive. For starters, their employees are acclimated to a certain platform and to “change horses mid-stream” would only cause more trouble. As a result, integration skills are increasingly in demand.

One of the benefits of SharePoint is its ability to integrate with existing Microsoft applications. For example, many users will post deadlines and events in SharePoint which can then be integrated into Microsoft Outlook. Obviously, a user’s life is easier when they’re tracking events on an all-in-one calendar versus one on SharePoint and one on Outlook.

Of course, this type of integration is far simpler than having disparate applications “talk to each other” across multiple platforms. Nonetheless, it’s another example where IT workers well-versed in SharePoint can add value for business users.

Check Out a SharePoint Tutorial Video Today!

Windows 8 using XAML: Animation Class and Enabling Animation

url2

In Windows 8, animations are an integral part of the user experience. As you work with various Windows Store applications (or the built in user interface), you’ll find animations at every turn: From the log-in screen, to the Start menu, to any application, animated transitions are everywhere.

Although you’re better off using the built-in theme transitions, there are many reasons why you might want to create your own custom animations. If at all possible, you’ll want to avoid using any more dependent animations than you must (that is, animations that run on the UI thread), but in some cases, that’s the only way to create the necessary

XAML animation revolves around changing the value of a single dependency property over time. You might change the width of a button from 30 to 100 pixels over a period of 10 seconds. Perhaps you might change the position of a gradient stop from 0 to 1 over 5 seconds. It’s all about finding the right property to change, and the correct length of time over which to

The Animation Class

Within the following markup, locate the DoubleAnimation element:

As you might infer from the attributes, this animation element indicates that the animation should take some property from a value of 100 to 200, over a duration of 5 seconds.

This element creates an instance of the DoubleAnimation class, one of theseveral different classes that animate different types of properties. You can choose from multiple types of animation classes:

  • Linear interpolation: The changing property value varies smoothlyand continuously for the duration of the animation. Silverlight includes three such classes, while WPF includes the following commonly usedclasses, plus several others: DoubleAnimation, PointAnimation, andColorAnimation.
  • Key-frame animation: Values can change abruptly and/or they can change using linear interpolation. Silverlight includes four such classes, while WPF includes the following commonly used classes,plus several others: DoubleAnimationUsingKeyFrames, PointAnimationUsingKeyFrames, ColorAnimationUsingKeyFrames,and ObjectAnimationUsingKeyFrames.

The DoubleAnimation instance you’ve seen smoothly and continuously varies the value of a property from 100 to 200 over the course of five seconds. But the markup doesn’t indicate what property to change! That requires another >element—the Storyboard element.

Enabling the Animation

In Windows Store applications, not all animations are allowed to run, by default. If your animation might have an impact on your application (specifically, animations that affect the layout), you must specifically enable the animations—they won’t run, otherwise. To enable the animation, set the Animation.EnableDependentAnimation property to True. Animating some properties, such as Opacity, don’t require setting this property to True, as this animation wouldn’t affect the layout of the application—in general, animating any property that causes an element to move or adjust the layout of the page requires this property to be set to True.

ldn-expertkgetzThis post is an excerpt from the online courseware for our Windows 8 Using XAML: Bindings, Shapes, and Animation course written by expert Ken Getz.

Ken Getz is a Visual Studio expert with over 25 years of experience as a successful developer and consultant. He is a nationally recognized author and speaker, as well as a featured instructor for LearnNowOnline.