Tag Archives: Visual Studio

May the Webinars Be With You

May seems to be webinar month here at LearnNowOnline. With three exciting events on the calendar, it’s a great time to explore some of the most buzzed-about new and updated technologies including Visual Studio 2015, Windows 10, and Swift. We hope you’ll join us for these upcoming events:


joemayoWhat’s New in Visual Studio 2015
| Register now
On May 13th Joe Mayo will once again present “What’s New in Visual Studio 2015.” In this live session, you will get a great overview of the changes from the previous versions of Visual Studio. You will also learn about some of the updates that were released at Build, including the newest version called Visual Studio Code. Code is a free version of Visual Studio 2015 that is really a very powerful editor that runs on multiple platforms. You’ll also learn of any new updates that may come from Microsoft before the 13th.


benkovich-bwBuilding Apps for Windows 10 with Visual Studio
 | Register now
On May 27th Mike Benkovich will continue the Visual Studio conversation when he presents “Building Apps for Windows 10 using Visual Studio.” Windows 10 is expected to bring the best of Windows 7 and Windows 8 plus some new advancements. Mike will cover this exciting update, including related information recently released at Build.

Introduction to Swift  | Watch recording
In this webinar recorded earlier this month, Jordan Hudgens covers Swift, the newest programming language from Apple. Swift is designed for Cocoa and Cocoa Touch, and is meant to be easier, faster, and safer than Objective-C.  You can use Swift to replace or work in conjunction with Objective-C. Watch the replay now:

This webinar coincides with the release of two new Swift courses from LearnNowOnline: Swift for iOS: Basics and Swift for iOS: Creating an Application. These two courses will give you an overview of Swift and its basic commands, plus you will learn how to create a simple application.

To register for any of these webinars, or to view recordings of previous webinars, check out http://www.learnnowonline.com/webinars.

About the Author


brianblogpic-150x150

Brian Ewoldt is the Project Manager for LearnNowOnline. Brian joined the team in 2008 after 13 years of working for the computer gaming industry as a producer/project manager. Brian is responsible for all production of courses published by LearnNowOnline. In his spare time, Brian enjoys being with his family, watching many forms of racing, racing online, and racing Go-Karts.

 

Windows Presentation Foundation Using Visual C# 2010: Introducing Binding

As you write applications, you often need to update the value of one element with information from another element. Often, you need to display information coming from a collection of objects in a list, or combo box. Or, perhaps you need to work with data coming from a data source, such as a database. In all these cases, the simplest solution is to bind data from a data source to a target element; in other words, you need binding capabilities.

Data binding makes it simple for applications to display and interact with data. You use a connection, or binding, between the data source and the target; this binding object allows data to flow between the source and the target objects. Once you have created a binding, and you change data in the data source, the changes appear in the target. If you have enabled two-way data binding, you can also make changes in the target and have those changes appear back in the original data source.

When might you use binding? You might use binding to:

  • Display the number of characters in a text box, in a TextBlock control.
  • Display the value of a Slider control in a TextBlock control.
  • Display a list of customers in a ListBox control.
  • Display a customer’s photo in an Image control.
  • Display and edit a customer’s name in a TextBox control.

Obviously, there are infinite reasons to use binding, and XAML makes it easy.

Connecting Sources and Targets

Every time you use binding, you must supply a source for the data, and a target (normally, a dependency property of some user interface element). Figure 1 demonstrates the basic concepts of binding in XAML. As you can see, the binding source can be any property of any CLR object. The binding object connects this source to the binding target, which must be a dependency property of some object that inherits from FrameworkElement (all the standard
controls inherit from this base class, and just about every property of these controls is a DependencyProperty object.)

introbinding

Figure 1. The Binding object connects the binding source and target.

Although you can generally work blissfully unaware of this fact, when you use a binding in XAML you’re actually creating an instance of the Binding class, setting various properties. XAML provides a markup extension that hides this fact, as you’ll see, but all the same, you’re working with a Binding class instance.

TIP: If you want to create a binding in code, you’ll always need to create an
instance of the Binding class, and set its various properties to match the
properties you would otherwise set in XAML markup.

The flow shown in Figure 1 indicates that binding can work in multiple directions. By setting the Mode property of the Binding instance, you can indicate whether you want the data to move in one direction whenever changes are made to the source, in one direction only once, in two directions, or not at all.

Value Converters

The Value Converter block in Figure 1 represents an instance of a class that implements the System.Windows.Data.IValueConverter interface. You’ll often need to use a value converter, especially if you want to do all of your binding declaratively, in the XAML markup. Imagine scenarios like these, in which value converters become necessary:

  •  You want to select a customer from a ListBox, and display the combined FirstName and LastName fields in a TextBlock.
  •  You want to select a number value, and use that value to set the BorderThickness of a Border control. You can’t simply bind the number to the property, because the BorderThickness property of a Border is a Thickness object.

There are, obviously, infinite reasons to use a value converter, but unless you perform data binding declaratively (in the XAML markup, that is) there’s no reason to use one. But if you would like to simplify your applications and reduce the amount of code you must maintain, using declarative binding is a truly useful tool, and it requires value converters in order to be fully useful.

This post is an excerpt from the online courseware Presentation Foundation Using Visual C# 2010 course written by expert Ken Getz and Robert Green.

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.

  Robert Greenis is a Visual Studio expert and a featured instructor for several of our Visual Basic and Visual C# courses. He is currently a Technical Evangelist in the Developer Platform and Evangelism (DPE) group at Microsoft. He has also worked for Microsoft on the Developer Tools marketing team and as Community Lead on the Visual Basic team. Robert also has several years of consulting experience focused on developer training, and is a frequent speaker at technology conferences including TechEd, VSLive, VSConnections and Advisor Live.

Windows Presentation Foundation Using Visual C# 2010: The Resources Dictionary

Every element in your application provides a Resources property (this includes every control and container), which is actually a Dictionary in which the key is a string, and the value is a resource. In other words, every element contains a collection of resources, indexed by a string key name.

Although every element can contain its own defined resources, most of the time it’s easiest to place resources at the window level. Doing that makes the available to all the controls in the window. Every element always has access to all its resources, and the resources of its parents (all the way back up to the application level), so if you want to share resources between elements, the higher you place the resources, the easier it will be to do so.

Imagine that you want to create a LinearGradientBrush instance that you will use as the background for several controls on a page. Rather than defining it in the content of each individual element, you can extract the gradient in the resources collection for the container (in this example, a user control) instead. The sample user control, IntroResource.xaml, includes a very simple resource. The syntax in the sample (displayed in Figure 1) looks like the following:

gradient_figure1Figure 1. The sample gradient.

TIP: Although the examples here are all based on user controls for the purposes of making the demonstration easier to navigate, you can also define resources at any level. Often, in WPF applications, you’ll define resources at the window level, in the Window.Resources element.

The differences between this definition and what you would see if you had defined the gradient brush for each individual element are:

  • The resource appears inside the UserControl.Resources element.
  • The resource includes an x:Key attribute, defining the key for the resource. Remember that the collection of resources is actually a Dictionary, and every item in a dictionary must contain a unique key that identifies it.

NOTE The x: prefix on the Key attribute indicates that it’s in the XAML  namespace, rather than the WPF namespace. You’ll use this key to refer to the resource, whenever you want to use it. It doesn’t matter what you call the resource, as long as you use this Key attribute value to refer to the resource.

TIP: Name your resources based on their functionality, not their contents. The uses won’t change as often as the particular implementation details, and it will be easier to select resources if you name them based on their usage.

To use the resource, you must be able to refer to it. To do this, use a markup extension, delimited with curly braces:

You may have seen the markup extension syntax used when performing property binding, or in other contexts. In general, XAML uses markup extensions whenever it needs to be able to set a property in a non-standard way. In this case, the StaticResource keyword indicates that when XAML needs to retrieve and set the Background property of the Border element, it
should look for a resource whose x:Key attribute is BackgroundBrush, and use
the definition it finds there.

Would you use a resource in a case like this, in which you only consume the resource once? It certainly doesn’t make the XAML any more efficient, or more compact. On the other hand, it does make it easier to isolate the layout details—by placing all the formatting information in one place, it’s easier to keep track of, and maintain, the look of your application.

You may be wondering about the word “Static” in the markup extension. Why Static? Is there a Dynamic resource, as well? WPF provides both static resources, which are applied only once, when you first create the window, and dynamic resources, which are reapplied if the resource changes. Dynamic resources (using the DynamicResource markup extension) use slightly more overhead, but allow you to change the content of the resource at runtime. Static resources are simpler, and provide much of the functionality you’ll need.

NOTE If you programmatically change a feature of an existing static resource at runtime (for example, if you change a color, or some other property of the existing resource), WPF automatically updates the display to match. Dynamic resources allow you to replace the entire resource with another at runtime. In general, static resources provide the functionality you’ll need for most applications.

WARNING! It’s important that you define the static resources before you attempt to use them in the markup. Unlike most modern programming languages, the order of appearance within the source file is a concern—you cannot use a resource before it has been declared. The XAML parser reads content from start to finish, and expects to find the definition for a resource at the time the XAML attempts to use the resource. This isn’t true for dynamic resources, however. You can define dynamic resources after they’re used, and the XAML parse can still find them.

This post is an excerpt from the online courseware Presentation Foundation Using Visual C# 2010 course written by expert Ken Getz and Robert Green.

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.

Robert Green is a Visual Studio expert and a featured instructor for several of our Visual Basic and Visual C# courses. He is currently a Technical Evangelist in the Developer Platform and Evangelism (DPE) group at Microsoft. He has also worked for Microsoft on the Developer Tools marketing team and as Community Lead on the Visual Basic team. Robert also has several years of consulting experience focused on developer training, and is a frequent speaker at technology conferences including TechEd, VSLive, VSConnections and Advisor Live.

Review of DataSets

VisualStudio2010ADO.NET provides the ability to retrieve data from any number of data sources and to work with that data in memory. The DataSet object represents a local cache of data that is disconnected from the original source. The DataSet object can provide a relational view of data: It can contain tables, columns, rows, constraints, and relationships. The DataTable object represents one table of in-memory data. It supports rows and columns with schema information, much like an array, but it’s far more powerful. You can retrieve a DataTable by retrieving data from a data source, or you can create and fill the DataTable manually. The DataTable class exposes collections of rows and columns, where a row represents a reference to an actual row of data, and a column contains information about the schema for one of the columns of data. A DataTable’s Rows property contains a collection of DataRow objects, and its Columns property contains a collection of DataColumn objects. You can access and manipulate data in a DataTable’s rows by using a DataRow object. When you work with the Rows property of the DataTable, you can:

  • Access a DataRow object within the Rows collection by index, enumerator, or lookup.
  • Iterate through all rows, using a DataRow object as the iterator.
  • Iterate through all the rows, using an integer as the indexer.
  • Use the NewRow method of the Rows collection to add a new row, which returns a new DataRow object.

DataSets can be untyped or typed. When you directly instantiate the DataSet class, as shown in the following code, you will have an untyped DataSet.

A typed DataSet inherits from the DataSet class. It contains strongly typed properties for each DataTable. This means you can refer to tables and columns by names. If you are using an untyped DataSet, you can refer to the Products table by using myDataSet.Tables(“Products”). You can refer to the ProductID column in the Products table by using myDataSet.Tables(“Products”).Columns(“ProductID”). If you are working with a typed DataSet, you can use myDataSet.Products to refer to the table and myDataSet.Products.ProductID to refer to the column. When you create a data source via the Data Source Configuration Wizard, Visual Studio creates a typed DataSet that includes the tables you specify.

ldn-expertkgetzThis post is an excerpt from the online courseware for our Microsoft LINQ Using Visual C# 2010 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.

Roots of SQL Server Data Tools

Thumbnail for 580Microsoft has long supported application database development with features built into Visual Studio, ranging from support for data access to the ability to create a connection to a database and manipulate database objects and data in simple ways. Various add-ons over the years have expanded those basic abilities, but even developers were constantly having to bounce between Visual Studio and either Enterprise Manager (in earlier versions of SQL Server) or Management Studio (in more recent versions, including SQL Server 2012) to perform data-related tasks, such as to create database tables, set security features, or execute stored procedures. Neither Visual Studio nor the SQL Server tools fully supported database development.

Then several years ago, Microsoft released its first version of the Team System Edition of Visual Studio 2008. This was a huge package of group software collaboration tools, including a long overdue successor to its Visual Source Safe source code control product. Over time, Team System spawned Architecture, Testing, and Development editions. But for a long time, one piece was missing: a database edition.

Microsoft soon rectified that, and released the product code named Data Dude. Officially, it is Visual Studio 2008 Team System Database Edition. Definitely a case where the code name was way cooler than the official name!

Data Dude, er, Database Edition, was a set of tools for managing the full database development lifecycle. Software developers were intimately familiar with the process, since it mirrors the code, build, deploy, rinse, repeat cycle common in software development. (And it can handle agile development methodologies as well.) Database administrators had to get used to some things, but could most certainly be part of the process.

Microsoft had several important high-level goals for the product:

  • Provide integrated change management, just like source control systems. This lets you go back in time to earlier versions of the database project and also provides controlled access to the project components to various developers for collaborative, simultaneous development.
  •  Manage database projects by allowing you to monitor progress and perform code reviews.
  •  Find and understand differences between versions. This way you can easily find the differences that cause problems in order to resolve them quickly.
  •  Make changes and see their effectiveness, without necessarily needing to build an entire project.
  • Support isolated development environments, so that each developer can work on their part of the project and test the changes before checking them in and distributing them to the rest of the team.
  • Test solutions to validate the design and code. You can use Team System’s support for unit tests to make sure that the design, code, and data doesn’t introduce any breaking changes.
  • Simplify deployment, of both the entire database and changes. This supports a variety of deployment scenarios during development and after the database goes into production, including finding the changes made to a test version of the database relative to a production version of the database.
  • Facilitate collaborative development of databases, so that team
    members can work together productively.

Database Edition was a huge step forward to make the process of creating database projects similar to creating application projects, particularly with its collaboration tools, support for source control, and test integration. But even with this step, things just weren’t as deeply integrated as they could be, in three primary ways:

Developer Edition wasn’t fully integrated with the database server. It enabled developers to perform more database-specific actions than earlier tools, but you still had to pop over to Management Studio too often.

  • Database developers had one tool to create database objects, and another tool—the Business Intelligence Development Studio
  • (BIDS)—for BI projects, adding a significant third tool to the mix in addition to Visual Studio and Management Studio.
  • Developer Edition made many simple things very easy, but once you went past simple stuff things got very hard. This is a rather subjectiv assessment, we realize, but there just seemed to be too many work arounds for what should have been easy.

The Database Edition was a great set of tools, particularly relative to what came before it. But with SQL Server 2012, Microsoft introduced what has so far proven to be the best set of tools yet, truly integrating database development tools into Visual Studio 2010 and 2012.

ldn-expertdkielyThis post is an excerpt from the online courseware for our SQL Server 2012: Advanced SQL CLR 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.

Get Ahead with Visual Studio

url3

 

Being able to use a foreign language well, is not only useful in your personal life, it is also incredibly attractive to employers. Foreign languages are not just those that are spoken every day around the world, however. Foreign languages also include computer languages. This is why a working knowledge of Visual Studio can put you out ahead of your job competition in a big way.

Visual Studio supports a wide range of programming languages, making it extremely flexible with regards to programming networks and setting up inter-office systems. An online Visual Studio tutorial video can help you become familiar with the program quickly, so that you can begin to put your knowledge to use immediately. Additionally, a C# video course will help you familiarize yourself with one of the languages supported by Visual Studio. Your newly acquired skills and knowledge will make you more attractive to potential employers, and increase your worth in your current position. So, take the time to learn a computer-based foreign language. You never know where it might take you.

Thumbnail for 624

 

Thousands of developers worldwide use LearnNowOnline to gain the technical skills they need to succeed on the job and advance their career.

 

More Evidence that C# is Poised to Become the Mobile Development Language of Choice

c video course

If you need further proof that C# is poised to become the mobile application programming language of the future, ZDNet is reporting that Xamarin, the Boston-based software company, will now start allowing iOS coders to use Microsoft’s Visual Studio.

This is important news because according to Xamarin, it is the first time any software company has enabled developers to build iOS applications using Visual Studio. That’s because the company – along with other development experts – believe that C# is the optimal language for mobile development.

Developers looking for a job or to switch careers should take note. After all, the future of the Internet is increasingly mobile, and C# is poised to take center stage. Just take a cursory look at any job board and you’ll see disproportionate amount of C# openings. Fortunately, our C# tutorial video library enables you to learn the language in the comfort of your home and at your own pace.

The mobile future is coming, whether you like it or not. Make sure you’re ready.

learnc

 

Thousands of developers worldwide use LearnNowOnline to gain the technical skills they need to succeed on the job and advance their career.

Job Seekers Should Take Note: Microsoft to Phase Out Expression

StartLearningButton

In most industries, the job market generally responds to consumer demand. To use a very simple analogy, think of the auto industry. Let’s say GM rolls out a brand new car and customers respond enthusiastically. As a result, GM will likely direct more resources towards building more of that type of car. And more resources mean more jobs.

The same can’t necessarily be said for the IT industry, and that’s because oftentimes a programming language is so far removed from the end-user customer. After all, consumers don’t wait in line to buy Java code. They wait in line to buy iPods, laptops, and PCs.

So when a major player like Microsoft announces news to consolidate languages and platforms, IT job seekers should pay attention.

Case in point: Microsoft announced it would end its support for some of its Expression design tools in a larger effort to consolidate elements of Expression with Visual Studio. In other words, Microsoft is placing their money on Visual Studio, and job seekers should take note. A good first step would be to check out our Visual Studio 2010 tutorial video.

With these new developments, Microsoft is essentially dictating demand, and in turn, the quantity and quality of jobs associated with this demand.

 


 

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

 

SQL Server Data Tools (SSDT): A Great Set of Tools for Database Dev

Thumbnail for 578

Microsoft introduced a new set of database development-oriented tools in SQL Server 2012, called SQL Server Data Tools. These tools are the latest in a long line of attempts to make creating database and database objects like creating software. Microsoft’s earlier attempts were credible and usable, but always seemed to fall short in one or more significant ways. We’re happy to report that with SSDT Microsoft nailed it, and both developers and administrators have a great set of tools for database development work.

Here is Microsoft’s description of the Data Tools:

SQL Server Data Tools (SSDT) transforms database development by introducing an ubiquitous, declarative model that spans all the phases of database development and maintenance/update inside Visual Studio. You can use SSDT TSQL design capabilities to build, debug, maintain and refactor databases whether working with a database project, or directly with a connected database instance located on or off-premise.

Every word of that description is true, but it certainly isn’t a good 60-second elevator talk about what the Data Tools are! What the Data Tools really does is to put database development into the context of writing software in VisualStudio, in every sense.

DBAs are probably going to want to stick to Management Studio for their daily work with databases and SQL servers, but developers, particularly seasoned Visual Studio developers, will be able to completely live in the Data Tools, except when they put on their DBA hats for smaller clients that don’t have full-time DBAs.

The crux of the matter is that for simple admin tasks, you can use the new dedicated SQL Server Object Explorer in the Data Tools and do most of what you need to do—from a developer’s perspective—instead of using Management Studio. And when you create a new database project, you can act as though it were a new software project, a nifty abstraction from one context to another.

The best part of Data Tools is that if you have experience with Visual Studio, you’ll feel right at home with the Data Tools. They have support for code navigation, IntelliSense, language support for T-SQL that is similar to C# and VB, platform-specific validation, debugging and declarative editing in the TSQL Editor, and plenty more. You can save database object definitions in source control, and when you’re ready to deploy the database you can publish the project like you do for a Web site, to any version of SQL Server from 2005 on and including SQL Azure.

Another use for the Data Tools is the replacement for the Business Intelligence Development Studio (BIDS) of earlier versions of SQL Server. BIDS was built using Visual Studio 2008, and provided templates for creating various Business Intelligence projects. Data Tools replaces BIDS and provides a much better development environment than BIDS did.

Installing SQL Server Data Tools

SQL Server data ToolsThe system requirements for Data Tools are the same as for Visual Studio 2010 SP1, so if you have that version of Visual Studio installed you’re good to go. There are four ways to install the Data Tools:

  • As part of a SQL Server 2012 installation
  • When creating a Visual Studio 2010 project
  • Platform Web installer
  • Administrative installation point

Data Tools doesn’t require prior installation of VS 2010. If you do not have Visual Studio 2010 Professional Edition or above installed, installing SSDT will automatically install the Visual Studio 2010 Integrated Shell, apply SP1, and install the SSDT components. The Integrated Shell will only contain SSDT tools, and does not include Visual Studio programming languages and the features that support their respective project systems.

If you do have VS 2010 Professional or better installed, Data Tools integrates into that installation and you’ll find that Visual Studio has new features and project templates.

When you install Data Tools as part of SQL Server 2012, and you don’t have Visual Studio pro installed, you won’t actually end up with Data Tools fully installed. Instead, you’ll have the Visual Studio shell installed with a project in the SQL Server node of Templates with a “SQL Server Data Tools (Web install)” item. When you create a project using that template, it will download and install the actual tools. This is kind of a funky way of doing things (and potentially VERY confusing), but we’re sure Microsoft had a great reason for doing it that way!

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

Don’t Waste your Time on Training

How many times have you heard people say, “I am definitely not going to waste my time going to that instructor led class” or “that self study training is a waste of time, not for me”? People learn in different ways and therefore there is never only one way to learn.

Since I am in the IT learning business and have been for a long time, I have heard many companies talk about how they are the best, their video training is the best, they come out with cutting edge content the quickest, they have the best experts, yata, yata , yata.

Make sure you assess what you need before buying developer training, or it may be a complete waste of your time.

There are many questions you need to answer, and the best way to address them is to prioritize them and then select based upon that. In the end, I suggest you select training material that covers most, if not all, of your needs. At LearnNowOnline we address all of the learning styles with our video tutorials for developers, sample code, complete and thorough books and hands-on labs. No matter what your budget, you will find our material is an unbelievable value. If you are interested in certification, you can check out our certification library.

You will learn technologies such as Visual Studio, Sharepoint, SQL Server, Java, and Mobile development with our video tutorials . . . Guaranteed.

1e723e30-168f-450f-9f8d-9445c49dd3ed