Hello everybody, it’s been a while since I’ve last posted anything here. As usual, I have multiple reasons – the most important is the lack of time. My company has moved into its first office and it took quite a lot of time to set up everything running smooth, and we’ve a lot of work to do (which is certainly a good thing). Also, I’m currently visiting two universities which take my weekends. But don’t worry, I hadn’t given up my plans on certifications, there will be posts.
As the title says, I have passed the 70-523 exam, which transitions my ASP.NET 3.5 MCPD to Web Developer 4 MCPD. It means a nice WCF cert too (I have passed the exams 70-515 and 70-516, so I don’t receive MCTSs for those).
OK, let’s talk about the exam itself; I know that everyone clicked here is interested on that. So it had four parts for the four respective exams it includes: one for WCF, ASP.NET 4.0, ADO.NET 4.0 and the Web Developer MCPD exam. The time was more than enough, and the questions were moderately hard – but because I passed the ASP.NET and the ADO.NET part before, I knew what to expect on those parts. Read my posts on the 70-561 and 70-562 exams, see what’s new in .NET 4.0 (particularly the Entity Framework) and you are half way on passing this one.
The WCF part was tricky, I have little experience on that subject, but after reading the questions a few times and eliminating the two obviously bad answers, you could catch the logic behind the concept.
The last part was the MCPD exam which I expected to be a little bit harder. There were questions I didn’t know of course, but I could find out the answer for most of them with little more than two years of ASP.NET experience. Of course, you had to go deeper than just ASP.NET – you should know the .NET Framework in general, and a great deal of SQL Server. There were questions about Silverlight, security, application deployment. From the syllabus, I expected some architectural questions, too, but there wasn’t that many (although you better know some architectural patterns, too but they weren’t referenced by their names).
Anyway, this exam wasn’t that bad, but you should have a wider range of knowledge than it was required for its predecessor. I really don’t know what the next one will be – maybe the MCTS on Windows development, but nowadays I did a great deal of Windows 7 client configuration, so it is possible to have a try on 70-680, too. Whichever one I chose, you’ll have your deal of preparation posts for them.
Welcome back everybody, and sorry for the slight delay in posts, I just have a lot of work nowadays, and can rarely find enough time to write. The apropos of this one is that I recently passed the 70-516 exam: Accessing Data with Microsoft.NET Framework 4.
It was an interesting exam, and with a little effort to concentrate on the questions (I got bored really soon after the nth one about how would you to this and that in the shiny new Entity Framework) it is easy. I really did nothing to prepare, except that I embraced the EF 4 in my everyday works – I built some production web apps with that nowadays – and read the title Pro Entity Framework 4.0 from Appress. I think MeasureUp and the rest provides little help if you are experienced with the given technology, or if you have seen more than two Microsoft exams – but you are free to try, it certainly doesn’t hurt.
My next goal is the WCF 4.0 exam, and the MCPD in ASP.NET 4, so I will wait for the 70-523 to come out. They say it will be available quite soon – possibly in late October.
The other area which interests me is architecture (software, of course). I read Dino Esposito’s book on .NET architecture, and it acted (at least for me) as a phonebook for other important books on the topic, so I bought Martin Fowler’s Patterns of Enterprise Application Architecture, and digesting that now. I plan to post some of the material here, too because I used to learn by writing down what I read – and it just works.
Some quick info for those who are still tuned: I started a Bsc on economy informatics, which takes my weekends, continuing sociology (only one year left), building up my company (we’re spending our days interviewing wannabe salesmen, and trying to find a suitable office in town), and working on a bunch of web applications and CMS systems. In the spare time, I’m learning architecture. Oh, and I bought a Kindle for the purpose – much faster delivery than waiting one-two weeks for a book to arrive in Hungary…
So be prepared for some posts to come along.
Today, I’ve passed the exam 70-561, ADO.NET Application Development, which completes my second MCTS certification. I must confess that this one was the most difficult so far, and took the most time to fulfill. I expected simple questions, but found monstrous ones, and found myself trying to figure out a single question for minutes.
However, I’ve only studied for a week (and have two years of experience building data-driven apps), so I might have been lucky to pass. As you could read it in the syllabus, the exam focused mostly on data modifying and querying, with a large percentage of synchronization-related questions. The Training Kit was useful for preparing, but you definitely need to dig through some MSDN articles, because there are serious white spots in the book.
All in all, the exam was though, and you should prepare for it more than a week, it won’t hurt your performance on it!
The next goal is the WCF exam, 70-503. I’ll start publishing posts as I review the topics, but first I’ll need to complete my university exams (you know, sociology), so there will be a slight delay, but I’ll take that one before the second shot offer expires (30th June).
And finally, some bad news: there won’t be any posts published about the Entity Framework. It’s a very useful feature, but I’m tired of trying to understand it wholly, sorry.
I must apologize, but the two objectives related to LINQ will not get published on this blog. These objectives are: Query data sources by using LINQ, and Transform data by using LINQ. The reason is very simple: LINQ is something huge, and there are so many information about it out there, thanks for the hype, that I really don’t want to bother with it.
The other reason is that I’m not seeing myself as someone who can teach other people about LINQ. I have two many white spots about it. Maybe in the close future (I’ve started reading Pro Linq from Joseph Ratz, but lack the time to get to the end of it) I’ll publish something about it, but for now, I’m not prepared enough.
When you are working with the Sync Framework (a topic of a coming soon post), you will inevitably run into issues related to data modified both on the client and the server, more clearly: update conflicts. There are five types of update conflicts, defined in the ConflictType enumeration:
- ClientInsertServerInsert: both the client and the server insert a row with the same primary key.
- ClientUpdateServerUpdate: the client and server changes the same row (this is the most common conflict type).
- ClientUpdateServerDelete: the client updates a row, which have been deleted on the server earlier.
- ClientDeleteServerUpdate: the client deletes a row, which have been updated on the server.
- ErrorsOccurred: an error prevents the change from being applied.
To detect errors during synchronization, you should use the ApplyChangeFailed event of your provider class. This returns an ApplyChangeFailedEventArgs object, which exposes information about the rows in conflict, the error, and lets you specify the Action to take. The Action can be a member of the ApplyAction enumeration, which defines the following set of them:
There might be times when you’d wish to receive a notification about a change in the returned results of a command. In these times, you would use the SqlDependency class, living in System.Data.SqlClient. For it to work, you should enable SQL Service Broker for your database, because raising notifications requires you to do so.
As I stated, SqlDependency can be used to query whether or not a given SqlCommand’s result changed (or any related changes have occurred in the database, such as a failure). There are two ways to get notified about changes: query the HasChanges property of the current SqlDependency instance, which is a Boolean value informing you about changes in the database. The other, more robust approach is to use the OnChange event of it. It returns an instance of SqlNotificationEventArgs, which exposes the following properties:
- Info: gets the reason of the notification.
- Source: gets the source of the notification.
- Type: the SqlNotificationType of the notification. Can be Change, Subscribe or Unknown.
Now that you know the basics, here’s an example:
In this post, we’ll examine two ways of how to cache data in a .NET Framework application. For ASP.NET web apps, we’ll use SqlCacheDependency, and for desktop applications, we’ll consider using the Local Data Cache.
When dealing with ASP.NET applications, you have multiple choices to cache data, by using one of the state management techniques (I have written multiple posts about them, so search for them), but for now, we’ll consider using the Cache class. Before you’d write any data caching code, you should start in the web.config, as usual. Take a look at the following block:
<sqlCacheDependency pollTime=”1000” enabled=”true”>
<add connectionStringName=”aString” name=”databasename”/>
After this, you should place something similar to your data access class: