DCSIMG
December 2008 - Posts - David Sackstein's Blog

December 2008 - Posts

8
Comments

MSXML in C++ but as elegant as in C# (Part 6) by David Sackstein

OK, this is the last post on the subject. You can find the first post here and the previous one here . In this post, I want to show you how the tips and tricks we have been discussing make our C++ code quite elegant for the three projects we haven’t reviewed yet: XMLBuilder, XSDValidator and XSLTTransformer. As usual, my benchmark for elegance is a comparison with equivalent C# code, however in the last two projects, the code is not identical in the two languages due to differences in the COM and...
תגים:,
1
Comments

MSXML in C++ but as elegant as in C# (Part 5) by David Sackstein

Part 1 is the first post in this series. In Part 4 I described the first of the 5 project pairs provided with this article, DOMAndXPath. In this post I will review the second project – SAXReader. The SAX programming model is very different to the DOM model: SAX models the parser, whereas DOM models the XML document. SAX provides a forward only push model, where as DOM provides random access to nodes in the document. The SAXReader project is based on the MSDN example you can find here . It defines...
תגים:,
1
Comments

MSXML in C++ but as elegant as in C# (Part 4) by David Sackstein

Part 1 is the first post in this series. In Part 3 I described 3 simple steps that will help simplify your MSXML enabled C++ project. With those in place we are ready to examine each of the 5 project pairs provided with this article in more detail. Each project demonstrates how to implement a set of basic XML functions using MSXML in C++. In this post I will review the first of the five - DOMAndXPath. This project loads an XML file into a DOM, recursively traverses its nodes and displays them. It...
תגים:,
14
Comments

MSXML in C++ but as elegant as in C# (Part 3) by David Sackstein

See the previous posts for this article here: Part 1 , Part 2 . Before I review the projects for this article , I would like to describe the basics: a few simple steps that will give you a C# experience while programming MSXML with C++. Step 1: Import MSXML There are a number of ways to import com libraries in a C++ project. I think the simplest way is to add the following line in a common header (best precompiled). #import <msxml6.dll> named_guids This will create the headers (with extensions...
תגים:,
1
Comments

MSXML in C++ but as elegant as in C# (Part 2) by David Sackstein

So, in my opening post on this subject ( Part 1 ), I promised to show you some useful sample code using MSXML, written in C++ yet as elegant as C#. Well. Here is an example of what can be achieved. C++ C# #include "stdafx.h" inline void IndentedPrint ( int indent, char * format, ...) {     char m_Message[512];     va_list args;     va_start(args, format);     vsprintf_s(m_Message, format, args);     va_end(args);...
תגים:,
3
Comments

MSXML in C++ but as elegant as in C# (Part 1) by David Sackstein

Well, I did say that I would change subjects from time to time : ) This week I taught a class of C++ Programmers how to use MSXML and I sat down to write samples and demos for the lesson. Well, I love C++, but C# has spoiled me. Programming COM directly can get ugly and working with MSXML in C++ is no exception: all those AddRefs and Releases you need to call, HRESULTS you need to handle, and CLSIDs you need to find. Code that accesses COM directly is often error prone, difficult to understand and...
תגים:,
0
Comments

Streaming from Developer Academy 3! by David Sackstein

Hi everyone, Developer Academy 3 was a great success. The convention center was packed ... and all my demos worked :) You can now view all the lectures online on the DevAcademy3 website . If you scroll down to DEV305 you can view my presentation, “Leverage SQL Server 2008 in your .Net Code with Visual Studio 2008 SP1”. You can also download the code for the demos. In the fourth demo you will see how FILESTREAM allowed me to stream high quality HD videos directly from the server. Following is a description...
11
Comments

MCTS and MCPD Certifications Made Simple by David Sackstein

Hi again, Recently I have been making progress towards my MCPD certification (one more exam to go :). Like me, you may have been a little overwhelmed, at first, by the large number of exams and the detailed information on Microsoft’s MCP site . But I assure you, its really quite simple. I have prepared the attached document to describe the exams, the certifications, and the relations between them. The document is in Hebrew, but the conclusions are posted below in English. John Bryce Training is offering...
תגים:
2
Comments

SQL Server 2008 Test Ride (Part 2) by David Sackstein

This is my second post about some of the performance improvements you will experience when upgrading to SQL Server 2008 and Visual Studio 2008 SP1. In this one we will be taking FILESTREAM for a test ride. During my session at Developer Academy 3 I will be describing how this new feature in SQL Server 2008 can be leveraged from Visual Studio 2008 (SP1) to provide the data integrity and manageability of SQL Server with the access speed of an NTFS file. In preparation, I decided to measure the performance...
תגים:
1
Comments

SQL Server 2008 Test Ride (Part 1) by David Sackstein

This is my first post of two (maybe more, we’ll see :) about some of the performance improvements you will experience when upgrading to SQL Server 2008 and Visual Studio 2008 SP1. In this one we will be taking TVP (Table Valued Parameters) for a test ride. Let’s compare the time it takes to insert a large number of rows into a table using the following methods: SqlDataAdapter (with different values of the UpdateBatchSize property) Multiple Inserts (delimited by semicolons) Packaging the rows to insert...
0
Comments

Developer Academy 3 by David Sackstein

Hi everyone I am sure you have all heard about Developer Academy 3 (15th December at the ‘Avenue’ at Airport City). I will be there (at 09:00 on Floor -1) giving a session about some of the exciting new features of SQL Server 2008 and how Visual Studio 2008 SP1 helps us utilize them in .Net applications. In the next post or so I will be taking those two for a test ride with some performance testing that you can try out for yourselves. See you there!
1
Comments

Hello World by David Sackstein

Hello world, This is my first post, and here is a short description of what you will find here. I try to keep up to date with the latest and greatest in .Net, but, there is so much going on - this is a near impossible task. I therefore enjoy reading blogs that give me a short description of what’s new and that provide a succinct yet complete sample project I can run and learn from. So, I would like to provide you with exactly that. You will find short descriptions, and clearly written code that you...
תגים:
Powered by Community Server (Commercial Edition), by Telligent Systems