newtelligence poweredRSS 2.0
# Thursday, January 22, 2009

By way of Scott on twitter, I discovered the Google Ajax APIs today (thanks to Douglas Purdy for the original tweet). The playground area allows you to see all of the APIs in action. Taking a step back, you can view all of the APIs that google provides by visiting this URL: http://code.google.com/more/.

 

All you need to get started, is to sign up for a free API key, which you can do here. Then just add a script src tag to your page referencing your API key (http://www.google.com/jsapi?key=ABCDEFG) and you are good to go. I would recommend reading at least the Getting Started guide under documentation. In addition to the stuff you would expect, like search and maps, they also have language translation and visualization (charts and graphs) to name a few. They also provide up to date versions of common APIs like JQuery, relieving you of the burden of managing these resources on your own.

 

While I would certainly use the Google APIs for accessing Google content, I am a little concerned over some of the other offerings. I would prefer to control when I update my JQuery library for example (how do I know if there are any breaking changes)?

Thursday, January 22, 2009 8:51:24 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Review For Future Projects
# Tuesday, October 14, 2008

Scott just blogged about T4, the Text Template Transformation Toolkit. It’s a full blown template driven code generation tool that uses the same syntax as Asp.Net. It’s lacking things such as syntax highlighting and intellisense, but it’s free, and part of Visual Studio.

I feel with the recent press this tool is getting, it will become even more popular, and some of the missing features added by the community. Scott has a whole list of links on his post that provide good samples, as well as a link to a company that provides a free and pay version of a plug-in to add some of the “missing” functionality.

Tuesday, October 14, 2008 9:33:04 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
Programming | Review For Future Projects
# Tuesday, October 07, 2008

Rob Conery, creator of SubSonic, and the ASP.Net MVC Store Front video series has released an early prototype of a Visual Studio 2008 add-in called the SubSonic MVC Scaffold Addin. Let me point out right away that there is no dependency on SubSonic itself, rather this add-in uses Linq2Sql, although Rob says a SubSonic plug-in is on the drawing board.

Not to rehash his announcement, but basically this add-in takes a Linq2Sql class, and generates some views (view, edit, list), and a controller based on the class. This is meant as a quick start kind of thing, not a full fledged commercial web site generator.

I encourage you to visit his blog post and watch the video he has prepared, it does an excellent job of showing you what the Scaffold does. Here are some of my take-away's:

  • Uses pre-existing Linq2Sql generated classes
  • Creates wrapper objects around Linq2Sql classes
  • Creates MVC views (you can create your own template to use in this process)
  • Creates MVC controller
  • If you re-run the scaffold on a class you previously generated, no files are updated (overwritten). You can delete individual files, and scaffold will generate them again.
  • Not everything works perfectly, you will/may need to go in and change some code. This is to get you started with something quickly.
  • RESTful style URL
Tuesday, October 07, 2008 10:37:11 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
Programming | Review For Future Projects
# Tuesday, August 26, 2008

Today, Jeff Atwood posted about a deadlock issue he was having. He had a couple of ideas as to how to solve his issue, including the nolock statement. What I found most interesting were the comments that followed. Here is a summary:

  • SQL Server sucks
  • NoLock is ok
  • NoLock is a hack
  • I can’t believe you don’t/didn’t know how to fix a dead lock

I can’t believe how critical people were of Jeff. I guess I was a little surprised that the author of the great Coding Horror didn’t know the answer to something, but that’s no reason to be critical of the guy.

A couple of the more decent links included:

We have a couple of deadlock issues in our current database that I’d like to sit down and fix, so these might come in handy.

Update: Someone who knows allot more about SQL posted a blog entry in response to Jeff’s original post. The author believes that using nolock is never a good idea and goes on to give some advice on how to start solving deadlock issues.

Tuesday, August 26, 2008 4:08:25 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
Review For Future Projects | Sql
# Saturday, August 23, 2008

I’ve been looking at a couple of the new technologies that were released with .Net 3.5 SP1, mainly the Entity Framework (EF), and ADO.Net Data Services ADNS). I happen to look at ADO.Net Data Services first, and it seemed to look pretty good on paper. There was a reference to the Entity Framework in that Data Services uses the Entity Model (EM) from EF to provide the data access layer.

Last night I started searching for more information on the Entity Framework, and instead of finding examples, best practices, etc, I found a battle waging between the Creators/Supports of the Entity Framework and people practicing what I have come to know as Alt.Net.

I am using the term Alt.Net to refer to ideas and concepts such as Domain Driven Design (DDD), Test Driven Development (TDD), Agile, Plain Old CLR Objects (POCO), Persistence Ignorance (PI), and nHibernate (as there is allot of comparison made to the EF). I should also note that the ideas and concepts listed are not entirely specific to .Net, nor is this a complete list. Furthermore, you could be a practitioner of Alt.Net and completely support EF.

To get an idea of where the Alt.Net crowd is coming from you should start off by reading the Vote of No Confidence on WuFoo. Then simply Google for Entity Framework and you will see all sorts of competing opinions. Frans Bouma, creator of LLBLGen Pro, has a couple of posts (here, and here) that I think show he is against the EF, but for slightly difference reasons then the Alt.Net crowd. Here are some of the top Pros and Cons I’ve found.

Pros:

  1. It’s support by Microsoft, and as such, will gather much momentum and community support
  2. It’s good enough for X% (usually stated as greater then 50%) of software projects out there.
  3. GUI editor/mapper makes it easier to use then other ORM tools like nHibernate
  4. EF is part of a larger push by Microsoft to provide technologies that focus on an Entity Model (See Ado.Net Data Services)

Cons:

  1. No support for POCO’s and Persistent Ignorance
  2. Hard (or impossible) to develop using a Domain Driven Design, or Test Driven Design methodology
  3. Single model/mapping file introduces merge conflicts in a source control environment
  4. No additional functionality of products like nHibernate

I kind of see Pro #1 being the cornerstone to the argument. I feel that the Alt.Net crowd knows that EF has a good chance to become the defacto standard, and that they will be forced by their clients and employers to use it. As such, they are trying to point out some of it’s short comings to Microsoft in hopes that if it does become the defacto standard, that it won’t suck (to them) as much.

The EF team has been very open with the community, and reading posts leading up to the release of the EF, you can already see that the team was listening to the community. They introduced something called IPOCO, which removed the requirement that Entity classes implement a base class, and instead implement interfaces. This pleased some, while it annoyed others, since it still breaks true Persistent Ignorance.  I feel it’s a step in the right direction.

There are other indications that V2 of the EF will introduce true Persistant Ignorance, although the EF team usually talks about a performance hit (and it sounds like it could be a big performance hit) if you want to go the POCO route. The reason for this is the lack of the EntityKey field in a POCO object, which is used in subsequent operations after an entity is retrieved from the framework.

Overall, I find myself smack dab in the middle of the two camps. I’ve been trying to explore and learn more about Alt.Net, while at the same time keeping up on the latest from Microsoft. I’ve come up with the following guidelines for myself.

  1. Since EF is not support in Compact Framework, and I need to write business entities for the Compact Framework, or one’s that can be used in both the Full and Compact Frameworks, EF is out (so is nHibernate for that matter).
  2. If I need to work on a new back end application that is going to be using SQL server exclusively (there is support for other data stores in EF), then EF might not be a bad way to go.
  3. If I need to work on an existing back end application, I don’t think it’s worth the time to switch to EF yet, as it’s still a V1 product.

In the near term, I see my self doing some CF programming, as well as some one-off programming against our backend, which gives me a nice blend I guess. I’ll get to play around with EF some, and keep exploring the ideas of Alt.Net.

One final item I’d like to point out is the Entity Framework Contrib Project on CodePlex. While it hasn’t had a release since before RTM of the EF, it does provide some very interesting additions to the EF. The one that interests me the most, might just in fact be the bridge between the EF and POCO that everyone is looking for. Using PostSharp, the IPOCO interfaces are implemented at compile time, thus keeping your entities persistent Ignorant. The trade off is that you have to add some attributes to your code, but at least you could add these conditionally, which would help with the CF/FF issues I have.

Unfortunately the main contributor has taken a job and Microsoft on the SilverLight team, and in response to the EF’s team to add POCO support, has lost some of his interest in the project. I really like the post compile time option that the contrib project uses, as it seems to address the performance hit that the EF team says their POCO solution will have.

Saturday, August 23, 2008 8:51:13 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
Programming | Review For Future Projects
# Sunday, July 20, 2008

Just found a blog post by the Microsoft SQL Server Development Customer Advisory Team  entitled How can SQL Server 2005 help me evaluate and manage indexes?. This post goes over 5 ways to analyze your index usage in SQL 2005. There looks to be some good technical information on this blog, worthy of any DBA in training.

Sunday, July 20, 2008 12:48:03 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
Review For Future Projects | Sql
# Tuesday, June 17, 2008

Found some new (and updated) remote help and IT tools today. The first tool, is a new one (to me at least), which I found from an article on Tech Republic, and is called CrossLoop. Cross Loop is a remote desktop/vnc clone that allows you to view the desktop of another PC. It is designed for remote helpdesk scenarios, as it requires a user at the remote computer to initiate a connection.

The second and third tools are Team Viewer and Ultra VNC, both of which I have heard of before, but have been updated. Team Viewer’s free offering has been expanded for non-commercial use, while Ultra VNC has several plug-ins and add-ons which make it suitable for a variety of scenarios.

The add-ons for Ultra VNC that interest me the most are the Repeater and Nat2Nat, both of which allow for connections to be made across firewalls. Digging thru the Ultra VNC forums, I came across several posts talking about a solution (Ultra VNC with various add-ons) that enables remote connections to be made using SSL on port 443 without the need to configure firewalls. The Ultra VNC repeater is licensed under the BSD license, but I’m not sure on the other add-ons. The NatHelper server that is used for the Nat2Nat looks like it might be hosted by Ultra VNC, as I didn’t see any download links for it.

The final tool I came across today, was Spice Works, which was an add displayed on the Ultra VNC sight. SpiceWorks is a free (supported by ads, and not open source) tool for IT professionals looking to manager their network. Here is a review from PC Magazine (which also drops the names of a couple of open source network monitoring tools).

Tuesday, June 17, 2008 4:23:18 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
Review For Future Projects | Tools
# Sunday, April 27, 2008

Over the last couple of weeks I've been in the process of rebuilding my primary workstation at home, installing server 2008, hyper-v, creating VM's, etc. I finally got around to importing my RSS feed list and found plenty to catch up on. This post is basically just a series of links to posts that I've missed over the past couple of weeks.

  • Asp.Net MVC Source Refresh posted by ScottGu - The latest source code for the upcoming MVC addition to Asp.Net has been posted on CodePlex. The official preview 3 release is due in a couple of weeks and will provide a "hassle-free" installation. Scott points out that the unit tests for the MVC project have been released, and that they are using MSTest (no surprise there) and Moq, an open source mocking framework.
  • Hanselminutes 109 Dynamic Data - Scott interviews Scott Hunter, Sr Program Manager @ Microsoft about the Asp.Net dynamic data project. The most important thing I took away from this pod cast was that Dynamic Data is not a tool to create prototype web sites or scafolding. This was just the first demo, and unfortunately it has left some negative impressions.
  • Building a HTPC posted by Jeff - This is an amazing post showing how cheap you can build a kick ass HTPC using the new AMD 780G platform. The 780G has a ATI HD3200 chipset which supports HDCP and decoding of blu-ray. I may just look to sell my old AMD Operton 165 parts to finance a HTPC running on the 780G platform. I decided to order the Kill-A-Watt power meter recommended by Jeff as well to see how much it's costing me to run 3 folding instances on my new box ;)
  • NET Micro Framework vs. Microsoft Robotics Studio, Introduction to Port-Based Asynchronous Messaging, Phidgets Robotics Programming in C# posted by Dan Vanderboom - That's three posts from Dan, all of which hit close to home. I've been working with the Phidgets RFID reader for almost a year now and taking advantage of Robotics Studio on the Compact Framework sounds vary promising. 
Sunday, April 27, 2008 10:25:16 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
Review For Future Projects
# Saturday, April 26, 2008

Scott blogged about mutli-core builds using MSBuild from the command line, as well as a "hack" from within Visual Studio. I followed the instructions as outlined in the 2nd post and it seems to work for the most part. The solution I was trying it on was fairly small and contained a mix of Compact (CF) and Full (FF) framework projects which seem to cause some issues.

As pointed out in the 2nd post, you are not going to see much advantage to multi-core builds for small projects. I will probably revisit this when my project gets allot larger, as well as look into build configurations and targets (custom MSBuild Files) for my CF/FF project mix.

Saturday, April 26, 2008 8:49:19 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
Review For Future Projects
# Monday, April 14, 2008

Terminal services gateway is a new feature included in Windows Server 2008 under the Terminal Services server role. It allows external client computers to connect to internal resources, such as RDP clients without having to configure port forwarding at the firewall.

A simple example of how I would RDP into a computer located behind a firewall without using TS Gateway:

Open up port 3389 on my firewall and forward it to a computer on my LAN. Then from an external client, I would connect to the computer that I am port forwarding to, and from there I could RDP into other computers as needed.

If I wanted direct access to more then one computer on my LAN, I would have to configure RDP on the "server" computer to listen on a port other then 3389, open that port on my firewall, and port forward.

With TS Gateway, all I need to do is specify the resource and the TS Gateway address, and I can connect (assuming you have setup TS Gateway, authorization lists for computers and users, etc). The connection using RDP over HTTPS and the more common port 443.

So far the only downside to TS Gateway the extra overhead required in setting it up. You must have a server running Windows Server 2008, a certificate for the HTTPS (TLS 1.0), as well as the following roles, RPC over HTTP, IIS 7.0, and Network Policy and Access Services. If you don't have an externally trusted certification, you can create your own, but then the public CA certificate used to sign your cert must be installed on all client computers. If you have a domain, and only domain computers will be connecting, this isn't too much of a problem.

Monday, April 14, 2008 7:32:59 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
Review For Future Projects
# Saturday, March 22, 2008

Both ScottGu and Scott have blogged about the IIS 7 Bit Throttling module for IIS, and it is available for download on iis.net (see this announcement by Vishal Sood). I had been looking past these announcements this past week and while looking for Scott's article on Twitter, decided to read thru his write-up of bit throttling.

The bit throttling module for IIS is just one of the first of many (assumed) modules to be released as add-ons for IIS. I think that you will also start to see community (they are probably already out there) and commercial modules for IIS. The modularity of IIS 7 is just starting to show off what it can do.

So what can you do with the Bit Throttling module? In Scott's post he shows off two demos. The first, shows what you get out of the box, and is similar to ScottGu's post. You can select a file type and set two options, fast start and throttle rate, and they differ slightly based on if you choose the Media or Data option.

Media

  • Fast Start (in seconds) - Download at full speed for the specified number of seconds
  • Throttle rate (as a percentage) - Download as a percentage of encoded bit rate

Data

  • Fast Start (in kBytes) - Download at full speed for the specified number of kBytes
  • Throttle rate (in kbps) - download the remaining data at the specified speed

So you get allot of functionality out of the box. This is extremely useful if you are streaming allot of video thru IIS, and want to manage your bandwidth better. The real power of this module can be shown (very simply) in Scott's second example.

Scott's second example extends the bit rate throttling thru custom code by implementing an IHttpModule. Scott notes that he wrote this in notepad and just dropped the .cs file into a App_Code folder where his media files were stored, how simple is that?

The demo shows how you can simply look at a query string value and toggle bit rate throttling. While simple, Scott goes on to explain how you could do a more complex handler in which registered users, or paid subscribers could get faster downloads.

Saturday, March 22, 2008 6:33:25 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Review For Future Projects
# Wednesday, February 13, 2008

Three items were the focus of my attention today. Well, rather 2, and the 3rd I just saw over on daily tech and it got me very excited.

MSF for CMMI

I have been reviewing the process guidance for MSF for CMMI version 4.2 which ships with TFS 2008. I plan on using this process as the foundation on my next software development project. While out of the box it is a bit of an overkill for my team, project and company, I prefer to start with more (process) and remove what I don't need. I also feel that CMMI is a great compromise between management, who is used too, and wants a more traditional software development approach, and the developers, such as my self who are advocating a more agile process.

The great thing about MSF for CMMI is that it is written around agile concepts, yet still has processes in place for oversight. The process guidance, is written in HTML, making it very easy to edit and customize it after the project is created to meet your needs. There is a way to edit the template so that it generates the new project to meet your needs, but I figure this way is easier for the first go around.

My plan is to make changes to the HTML as needed, and then create a new template. In addition to tracking my changes, you can use a tool like WinMerge to compare your modified document library with a default one. You can access a document library via windows explorer by going to the document library and choosing open in explorer from the actions menu. This creates a UNC path in the form of \\SharepointServer\Sites\SiteName\Process Guidance, which you can supply to WinMerge.

I have spent some time going over the default tasks that are created with a new CMMI based project to see what workstreams and activities they relate to, and I think I have a pretty good handle on the first two tracks. I plan on documenting this in a future post.

Requirements

Oil and Water, Superman and Kryponite, Me and Requirements. I am having some difficulties in creating a formal software requirements specification, using this book as a guide. It's not the books fault (although I wish it hand an end to end case study of a project), but rather a differing of opinion on some of the definitions (which that end to end case study might help with).

  • Where is the line between Use Cases and Functional Requirements? Use cases look a lot like test plans to some people, and have a tendency to add test plan like information to them, which I feel is incorrect.
  • Where is the line between systems and users in the use cases?
  • How much detail is the right amount of detail?

Similar to my quest to gain a better understanding in the use of TFS and the MSF for CMMI, I'm going to have to put some time into researching (primarily looking for examples) software requirements. In addition to the book, which we now have 6 copies of at work, I found this website with some additional templates, as well as fairly detailed article on writing requirements from the perspective of a technical writer. There appear to be some good articles over at wikipedia as well, such as Requirements Analysis and Use Cases, and Use Case Diagrams. Someone today asked the question about how do all the use cases get related, and I believe the answer is the use case diagram (at least one use for a use case diagram), as illustrated in the example on Wikipedia.

I hope to be able to report back with some answers to my questions sometime in the future.

NVidia Application Processor

Daily Tech had an article on the NVidia APX 2500 application processor which is designed to add hi-def capabilities to mobile devices. The article states that NVidia has been working with Microsoft, so once can assume (as does the author of the article), that this is destined for a Windows Mobile application.

I've really been giving my HTC Mogul a work out and have always wanted a all in one device (video, mp3, phone, PDA, etc), so I am very excited about this. Since I have a bias against Apple, I am not a fan of the iPhone, although I can appreciate and respect what it is. This gives me some hope that my next Windows Mobile phone will be a force to be rekon with.

In addition to smart phones, I can also see this making it's way to other embedded systems, especially something like a mall kiosk. This brings me to the second reason that I am excited, and that is, my current software project is all about embedded systems running Windows CE. I have some future customer requirements that could take advantage of the functionality provided by this chip.

Wednesday, February 13, 2008 5:14:14 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Programming | Review For Future Projects
# Friday, February 08, 2008

Scott Hanselman today announced the Asp.Net Wiki (Beta).

"The idea is that folks spend a lot of time trolling the blogs, googling live-searching for answers to common "How To" questions. There's piles of fantastic community-created and MSFT-created content out there, but if it's not found by a search engine and the right combination of keywords, it's often lost."

I think it's a great idea and I hope to see other product groups at Microsoft follow suit. Since it's linked off http://www.asp.net, and a Microsoft entity, I see it quickly becoming the one stop shop for Asp.Net information.

If you jump on and contribute to the wiki right now, you could be a top contributor, at least for a couple of days.

Friday, February 08, 2008 11:34:45 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Technology | Programming | Review For Future Projects
# Saturday, January 12, 2008

Let this be my first post in my new Windows CE category. I have a feeling I will be writing more stuff about WinCE in the coming months. I wanted to jot down some notes from a couple of articles I read over at OpenNetCF for future review. Most of the high level concepts I already knew, but it's nice to get some details once in a while.

Data Caching

  • No performance gain in keeping the data connection open for the life of an application.
  • Cache reads are two orders of magnitude faster then a database read. As the article points out, this is interesting due to the fact that the database, and cached data were both stored in RAM.
  • Several of the reader comments were interesting
    • The first time a SqlCE Connection is opened, the database is loaded into shared memory
    • One option is to have a connection opened for the life of the application, but not to use it, this is just to keep the engine loaded. Then open/close connections in your DAL as you normally would. This was recommended by Steve Lasker, a member of the SQL CE dev team. Steve also points out that reusing a command object and changing the text code hurt more then help, as you can't take advantage of query plans. Reusing a command object can sometimes help with the garbage collector.
    • Another reader provided a example where it looks like he is doing an index scan and getting faster results then directly querying the database. It's hard to tell without running the sample code.

Garbage Collector

  • GC suspends all threads while it performs necessary actions, such as freeing and moving memory. Frequent GC's can have an adverse affect on performance.
  • Remote performance monitor, which I blogged about before, is a valuable tool. This article provides a good example of how to interpret some of the numbers.
  • Don't fear the GC, and take the time to understand what the numbers in remote performance monitor mean.

I'm also in search of a decent MVC and IoC framework for Windows CE. I'll probably be posting more on this later.

Saturday, January 12, 2008 9:25:34 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Review For Future Projects | WinCE
# Tuesday, January 01, 2008

Today's task, a somewhat detailed code analysis of one of our Windows CE projects. In addition to reviewing from a lead architect point of view (design and implementation), I also needed to take a look at general coding practices. For this I turned to the Code Analysis tool in Visual Studio, and NDepend.

I had remembered reading about NDepend on Scott's blog, and went back there to re-read his post. I highly recommend it, as it's a great quick start and introduction to NDepend. Scott also has a pod cast available, and the the NDepend web site has links to several video tutorials showing how to use it.

One thing I found lacking, was there were no support forums on the NDepend web site. I had a couple of issues getting my Compact Framework application to be property recognized by NDepend. The main issue, was NDepend was trying to use the full framework version of System.Data instead of the Compact Framework version. I noticed that there was an option when selecting assemblies to resolved missing ones (well, some it let me, others it didn't), and figured the resolved location was stored in the project configuration file. So I opened it up in note pad and sure enough, there were all the directory paths.

I removed all of the paths that were added by default, and added my own paths to my project. I also added paths to the SQL CE 3.5 directory, as well as the location of the compact framework dlls (See update below). Unfortunately I still had issues with NDpend detecting multiple dlls (System.Data and System.Windows.Forms) with the same name. I decided to remove the path statements for everything except my project. This resulted in warning about not being able to resolve dependencies, but the analysis completed.

There is allot of information presented, almost to the point of information overload. I highly recommend printing out and reviewing the NDepend placemat as a quick reference. I concentrated primarily on the metrics, which use NDepend's Code Query Language to identify possible problems. I found myself viewing all of the queries to figure out what they were looking at. The documentation of the queries is excellent, and each one includes a link to the NDepend web site which defines the metric is pretty good detail.

I am quite impressed with the amount of information that NDepend gave me about my project. There were/are a few usability issues, but they can be overcome. I hope that I can continue to find time to make use of this excellent tool. I spent some time watching the video tutorials, and they were very helpful. I've been trying to get a side project started at home to try out all the tools, techniques, patterns, etc that I don't have time for at work, and this will definitely find it's way onto my to do list. I think it will be very interesting to use this from the beginning and see how the different metrics change as I build out my project.

Update:

  • 1/2/2008 - After watching the videos, I discovered that when you are setting up your project in VisualNDepend, there is a screen that lest you add/remove directories in the application. This is much easier then editing the project file manually like I was initially doing.

Other Links:

Tuesday, January 01, 2008 6:01:14 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Programming | Review For Future Projects | Tools
# Saturday, December 29, 2007

Yesterday, a co-worker of mine passed on a link for the Microsoft Sync Runtime, suggesting that we may be able to leverage it in the future in order to meet some requirements we have on our project.

Microsoft Sync Framework is a comprehensive synchronization platform that enables collaboration and offline access for applications, services and devices. It features technologies and tools that enable roaming, sharing, and taking data offline. Using Microsoft Sync Framework, developers can build sync ecosystems that integrate any application, with any data from any store using any protocol over any network. 

 

Reading thru the initial article, I was quite impressed, but it left out a key piece of information, how does the sync runtime work over the Internet. Not just the internet, but also any decent corporate network were clients do not have direct database access.

I made my way to an overview of the Sync Services for ADO.Net, which is what I would be most interested in (although syncing file systems has an interesting appeal as well), and they clearly showed the Internet cloud, but not really how the sync framework worked with it. I actually had to dig into the documentation, and finally found some details on how to get this to work on the Internet. If you read towards the bottom of the documentation, you can see that you implement a proxy on a middle tier.

On the middle tier, the service inherits from and exposes the same methods as ServerSyncProvider (the abstract class from which DbServerSyncProvider inherits). The methods are then executed by the application code over a direct connection to the server database. The results are routed through the middle tier and back to the client.

 

Basically the middle tier exposes the same interface that the client application would normally use if it could connect directly to the database. There was a link which gives a specific example of setting up a n-Tier environment and provides a good start. However, I could not find exactly what I was looking for, which was an example of using WCF as the transport mechanism. With WCF I could have 1 middle tier service with multiple end points configured, such as a Basic Http for Internet, and TCP for intranet. WCF also adds support for encryption and authentication, which I didn't see called out specifically in the sync runtime.

Other items of interest include, how to setup a database for different sync scenarios, and peer to peer synchronization.

All in all, the Sync runtime looks like a very promising framework for building disconnected applications. It will require some re-architecting for existing solutions, specifically the data store, but it might be worth it in the long run. I will be sure to post updates if I get a chance to play around with it at all. It is defiantly something that would save me some time on a side project I am hoping to start working on soon.

Saturday, December 29, 2007 7:59:47 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Review For Future Projects
# Monday, December 17, 2007

Stumbled across Volta by accident today. Volta is a prototype developer tool developed by Microsoft Labs.

What I got from the FAQ was that You to develop an entire application from the perspective of the client, as a single Tier, using out of the box tools like Visual Studio 2008. You then add declarations to your code which Volta will use to refractor your code (as a 2nd phase of compilation) into multiple tiers, targeting java script enabled browsers (IE and Fire Fox are supported), and traditional Windows Forms. Volta actually takes the default compiled MSIL, scans for the Volta declarations you added, and generates new MSIL which will run on your various Tiers.

I think it sounds like pretty exciting stuff (or I wouldn't have blogged it). However, I have a few questions/comments/thoughts.

  1. Volta is currently a CTP, and is referred to at least once as experimental. I would not want to develop any production code unless Volta was going to be actively developed.
  2. What options exist for tweaking the generated application, specifically on the client pieces. You always need to tweak something on the generated stuff, and then those tweaks are usually lost when you re-generate.
  3. How would Volta work with something like CSLA, which I use allot. CSLA provides a mechanism for running as 2 or 3 tier with a configuration file change.
  4. You can still do more with a WinForms application then a Web Application, even with things like java script and Ajax and Silver Light. Technologies like WPF add another layer of complexity as well. As with other things in the land of programming, it sounds like you would have to give up some performance and features you get with targeting a specific client environment, in exchange for a single code base.

If everyone else is using existing programming methodologies, targeting specific environments, reusing code where possible, they are going to have a better looking and performing application IMO. In the end, the customer doesn't care if you don't have to do as much work, they only care how the application looks and performs. You would have to save enough money by using Volta, that you could pass that savings onto the customer. I'm not sure how you could justify this for internal customers.

I have a backlog of technologies to take a look at, so I probably won't get to Volta any time soon. That might be a good thing, as by waiting, I will either give it more time to develop, or get dropped.

Monday, December 17, 2007 3:14:58 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Review For Future Projects
# Tuesday, December 04, 2007

In a recent email from MSDN Flash, I first learned of the new Parallel Extensions to the .Net Framework 3.5. This is an out of band release that is currently available as a CTP on Microsoft Downloads.

The description in the MSDN Flash newsletter has me pretty excited about what this offers.

[Parallel Extensions] is a managed programming model for data parallelism, task parallelism, and coordination on parallel hardware unified by a common work scheduler.

...

Parallel Extensions provides library-based support for introducing concurrency into applications written in with any .NET language, including but not limited to C# and Visual Basic.

It is specifically designed to take advantage of multi-core processors (among other things), which is important due to the recent (last 2 years) shift in the industry from raw clock speed to multi-core.

The computational power of multi-core processors, new programming models and platforms, and advanced research in usability all promise to change the way people interact with computers.

While excited, I do have some reservations. Encapsulating the lower level knowledge needed to take advantage of multiple cores will speed up development, but it will reduce the number of programmers who know how that lower level stuff needs to be written. The concepts used to take advantage of multi-cores, should be very similar to those required to take advantage of multi-threading, which is more "widely available" on the compact framework (although I am seeing more and more embedded computers with Core 2 Duo's). If this framework is only available for the full framework, the pool of skilled workers available for the compact framework could diminish (even more so).

I actually have more of a need to take advantage of multi-threading, and parallel processing in compact framework applications. As far as asp.net applications, I would like to see if this is something that would be recommended for them. Long running processes that would take advantage of this new framework, are usually best left outside the asp.net application. Speaking of long running processes, that is the 3rd area I work in, and in a traditional environment, would love to take advantage of this. However, the applications I am writing are all running on VMWare ESX, and IT has it set so that each VM only has a single CPU, and puts the burden of scheduling the 8 physical cores on ESX itself.

This will probably end up being something I try to work into personal projects. Unfortunately, I do not have the time to play with the CTP at this moment, but it is something I defiantly want to look into in the future.

Additional Information:

Tuesday, December 04, 2007 4:12:27 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Programming | Review For Future Projects
# Saturday, October 20, 2007

While looking to download BizTalk 2006 R2 off MSDN, I came across Software Licensing and Protection Online Server (SLP Services), and an offer for MSDN subscribers for free use for 1 year. This was the first time I've heard of SLP Services, so I wanted to check it out, the home page is here: http://www.microsoft.com/SLPS/Default.aspx.

Key features include:

  • Code Protection (Advanced Obfuscation?)
  • License Enforcement thru activation and client side enforcement.
  • 1 code base, "unlimited" configurations. Create trial software, add-on packages, timed demos, etc.

SLP Services is either a Microsoft hosted, or server based product that can be used to protect, license and distribute your software. In the hosted model, Microsoft runs the service, and you pay them a fee. In the server model, you install the server onto your network and host it yourself. It might also be possible to resell SLP services, but I have not read the licensing to know that for sure. This blog post indicates that reselling the SLP Service is an intened use. In addition to the traditional use for licensing, the SLP Services web site also talks about benefits of using the technology in the enterprise, for in house applications, which include monitoring application use, and controller who can use a specific application, or feature. The Downloads page, for information on downloading a trial version of the code protection tool and documentation for online and offline products.

The basic version you get thru MSDN allows you to do the following

  • 1 licensed product
  • 100 Commercial Activations (i.e. Customers who purchase a license)
  • 1000 non-commercial activations (activations that were not purchased)
  • 1 basic permutation, which allows you to "create" 5 products from a single code base.

The more expensive licenses of SLP Services allow for more activations, permutations and you get statistics and an API for license creation. Check out the How to Buy page for details. Regular retail pricing for the basic hosted version (after your free year and for non MSDN subscribers) is $500/yr, which as I already mention, includes 100 commercial activations. Additional activations cost $1000 for 1000.

I really, really like the concept, but once again feel like Microsoft could be doing a better job at making this more accessible to smaller ISV's and independent contractors (in the same way I disagree with some of the pricing for VSTS and TFS). Granted these are retail prices, but but the point of entry for someone hoping to make $9.95 on a product, and who could really benefit from something like this, is a little high. I'd like to see a starter edition that gives you the 1000 non-commercial activations but includes no commercial activations, however, you could purchase them at $1/each. This way you could develop your code using the technology and then once you start selling, start paying for the service. I think that Microsoft is trying to avoid giving away the code protection for free so that they do not directly compete with other companies offering a similar product, which if that is the case, should offer a limited functionality version with the starter edition, again to get people started.

Software Cost Number of Copies to Break Even to cover $500/yr
$9.95 51
$19.95 26
$29.95 17
$39.95 13
$49.95 11
$59.95 9
$69.95 8
$79.95 7
$89.95 6
$99.95 5
   

 

UPDATE: Someone from MS responded to a post I made on the MSDN forums, confirming that, as a MSDN subscriber, as long as you renew each year, you have access to the basic version. This does make this a little more attractive, as a MSDN professional subscription is a good deal IMO.

I fully expect to see new hosted solutions start to popup that are based on SLP Services, that include e-commerce capabilities, and charge per copy based on purchase price.

In addition to the price, which may or may not be a detractor to you, there is one other issue. Since this is a Microsoft product, you are going to have allot of talented individuals looking to crack it. It will be interesting to see if a "universal" crack could be developed, and how MS will respond.

Saturday, October 20, 2007 5:21:58 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
Programming | Review For Future Projects | Tools
# Sunday, October 07, 2007

I'm not even sure what led me to start playing around with the new Linq to SQL (formerly called DLinq) DAL in VS2008B2, but I'm glad I did. I discovered some very fascinating functionality that I believe will really shake up the way most developers approach the DAL. I see some similarities  between Linq to SQL and other OR/M plugins (tools, methodologies) out there, but since this is Microsoft's approach, I anticipate it will catch on en mass. I don't believe Microsoft is trying to make the other methods obsolete, but that they are delivering a product demanded by their customers. One of the problems with the current OR/M scene, is that there are so many options to choose from, that you never know if you've made the right choice. While Linq to SQL, may have some deficiencies, it will give developers, and their managers a little piece of mind when breaking from the traditional DAL mold. I can only hope that Linq to SQL does not disappoint, even after taking into consideration it's a Gen 1 product. Issues such as performance, extendibility, and plugability (into one's code or way of doing things) are some things that I want to explore (as with any tool such as Linq to SQL).

I used this article to help jump start my foray into Linq to SQL (let's just call it L2S from here on). Being away from WinForms for so long, I've missed out on some of the data binding features available, and was surprised to see how easy it was to get up and going with a grid and details form. I remember seeing the videos when VS 2005 was coming out, but never had a need to play around with it until now. I've also never had good luck with drag and drop data binding, as it assumes to much, I'm hoping that there are plenty of hooks available to help customize the data binding experience, but any fault with data binding should not be confused with L2S as they are 2 separate features (actually data binding is a feature, and L2S is a feature of VS 2008, and part of the .Net Framework 3.5).

In a couple of minutes, I was able to generate a data class using the new visual OR/M tool in VS2008, create a binding source, drag/drop elements from the binding source onto my form, and create a functional application. Functional should not be confused with enterprise level, nor was I expecting it to be. If I could create something like that in 2 minutes using drag and drop, my value ($$$$) as a developer would be on the decline. Allow me to recap some of my steps I took to create a functional application.

  1. Create a new Winforms 3.5
  2. Right click on the new project and select add new item, choose Linq To SQL Classses.
    1. This will create a new .dbml file. It will open a design surface where you can drag/drop tables, views and stored procedures. This creates a DataContext class.
  3. Create a new database connection, or open an existing connection on your Server Explorer Window
  4. Drag tables from the database from the Server Explorer to the design surface of your DataContext class.
  5. From the top menu bar, choose Data/Add new data source, or, show the data sources window, and choose the add new data source option
    1. Create a project data source
    2. Here is where it starts to get tricky. Select an object to make a data source for. It will depend on what you are trying to accomplish and your database schema. The schema I was using, relies heavily on extended tables, and it took me a couple of tries to pick the object that made the most sense. It's possible that I will have to go back and create a different object down the road as I get more into this.
  6. If you haven't already opened the Data Source window, do so now. Select some elements from your data source, and drag/drop them onto the default Form1. I chose a grid to list a collection of objects, and then their details below. A BindingNavigator was added for me automatically. If you didn't get one, or need to add one later, just drag one onto the form from the tool box, and set it's BindingSource property to the bind source you created in step 5.
  7. Open the code view of Form1
  8. Add a private member variable: DataClasses1DataContext test;
  9. Under the form's constructor, do the following
  10.    1: public Form1()
       2: {
       3:  InitializeComponent();
       4:  test = new DataClasses1DataContext();
       5:  if(test.DatabaseExists() == false) //Not required, just testing feature found thru intellisense
       6:   test.CreateDatabase();
       7:  x_t_personBindingSource.DataSource = test.x_t_persons;
       8: }
  11. Jump back to the Form, and add a button to your binding navigator for saving. Double click on the new button to have the event handler code generated and add the following:
  12.    1: private void saveToolStripButton_Click(object sender, EventArgs e)
       2: {
       3:  test.SubmitChanges(); //Need to add exception handling and pre-save validation
       4: }
  13. Build and Debug.

A connection string is automatically added to your App.Config file for you. You can test out the CreateDatabase feature by changing the connection string to a non-existent database. You should be able to add/edit/delete records in your database, using this simple application we just created. The DataContext class, is the top level class in the hierarchy used to work with your database. It controls the connection to the database, and, as you've seen, has support for creating and deleting the database. The create database feature reminds me of a similar feature in the Castle's Active Record project. Just take a look via object explorer or intelli-sense, all of the methods available to you. I've listed the ones that caught my attention below. 

  • Create/Delete Database
  • Deferred Loading Enabled: Implies that L2S uses deferred loading for many to one relationships
  • ExecuteCommand: Direct execution of a command.
  • ExecuteQuerey: Returns IEnumerable or <T> based on a provided query.
  • GetChangeSet: Returns changes tracked by the DataContext
  • Transaction: Set a transaction object to support transactions

Validation - Check out ScottGu's part 4 on L2S

  • Schema Validation - Linq is supposed to check for obvious schema issues, such as null values. However, the exception I got when I tried to insert a null value, came from SQL, not Linq. Also I was adding items on a grid, and added 2 items in a row. Their Id fields were both set to 0, and when I went to save, I got a Linq exception saying I couldn't have duplicate keys. Setting the ID values to something different, allowed me to get to the database at least, so I need to look into this more.
  • Property and Submit Validation - Create a partial class, then a partial method that implements validation when a property is changed. If you type partial in the code view window, you will get a list of partial methods you can implement. You have access to 2 methods for each property, OnChanging and OnChanged. You also get access to a OnValidate method. If there is an error, you throw an exception. This works OK, but doesn't provide the nicest feedback available. However, for anything less then an enterprise application, this may be OK, especially in a proof of concept, or highly iterative application, where you can add better a better user experience later. 
  • Insert/Update/Delete Validation - Same scheme as property and submit validation, but you can have validation in response to an Insert, Update or Delete.
  • ChangeSet: Starting with Beta2, you can get access to all of the changes in the DataContext. One possible use, is to inherit the DataContextClass, and override the SubmitChanges method, checking the ChangeSet and performing validation.
  • My Take on validation:
    • There is some work that needs to be done with validation. I could see an edition to the Enterprise Library designed specifically for L2S.
    • My own idea would be to create a class to track validation errors.
      • New custom exception called validation error.
      • A collection of validation errors, including error text, and the property that is invalid
      • Starting to sound allot like CSLA

Other things I noticed

    • You can manually create classes in the Design Surface, as well as edit the auto generated ones
      • Control nullable, access modifier, and inheritance modifier.
    • There is an inheritance property you can set on the design surface, allowing you to indicate which objects inherit from another. This looks very promising for some of the schemas I work with.  

What's Next?

I'm going to read over ScottGu's 7 part series on L2S to get some good ideas on what I can do with L2S, and see how it can fit into future and existing projects. I am really excited to see how people start to integrate L2S with their existing projects and frameworks. Of particular interest would be using CSLA and L2S.

Additional Resources

Note: First post where I've had formatted HTML for source code. I'm using the Code Snippet Plugin for Windows Live Writer.

Sunday, October 07, 2007 11:02:14 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
Programming | Review For Future Projects
# Saturday, October 06, 2007

PolyMon is an open source agentless monitoring application written in the .Net Framework, and available, with source on CodePlex. It is designed as a client/service/server architecture, consisting of a WinForms management application, Windows Service monitoring engine, and uses SQL 2005 for it's data store. I have written about Polymon before in my post about Network Monitoring, so you should check that out for some more details. I will re-iterate the available monitors here.

  • CPU
  • Disk
  • File (Age and Counts)
  • Windows Performance Counters
  • Ping
  • PowerShell Scripting
  • SQL Monitor via Stored Procedures
  • SNMP
  • TCP Port
  • URL
  • Windows Service Monitor
  • WMI Monitor

I set this up at home, with limited success, and at work (to monitor dev and test instances) with better success. The only difference between the 2 installs is I'm using integrated authentication at home, and SQL authentication at work. I've noticed some other issues with domain authentication at home, so I feel that it's an AD issue at this point, and not a problem with Polymon, although there may be the opportunity for more robust error logging in Polymon if this turns out to be the case.

I setup Ping and SQL monitors based on our production monitoring system at work, and only had to monitor the SQL monitors slightly to support Polymon, which requires two output parameters defined in the stored procedures. I wanted to setup the WMI and Powershell monitors in place of some of the custom SQL monitors, but didn't have the time. I've added some links at the bottom to BizTalk Powershell resources for future reference.

Pros:

  • Free and Open Source
  • Actively Developed with a road map that makes sense
  • Extensible without modifying the core application
  • Little need to extend given the excellent coverage provided by the default monitors, especially PowerShell
  • Runs on SQL 2005, so you get all of the benefits of SQL 2005, plus you could write custom reports in Reporting Services and have those emailed.
  • Monitor not just uptime, but other stats as well. For example, response times are logged, and the SQL monitor supports returning

Cons: 

  • Monitoring Engine is not multi-threaded - If you had 61 monitors set to run every minute, and they all took 1 second, you would start to see lag. This is a know limitation and can be worked around by not having that many monitors set to run that often. It is on the development roadmap for the project, and is going to be addressed in two ways. The first is to multi-thread the monitor engine, which will allow scale-up. However, any good developer would know that just multi-threading is not the end all solution, and you could run into additional limitations as a result of running multiple threads. Therefore, the second part is to allow monitoring engines installed on separate computers, to run off the same database, effectively adding scale-out capabilities. Another possible benefit to this, is it would allow you to install the service on the servers you want to monitor and not have to deal with as much security. However, this would be the same as a monitoring application that requires an agent.
  • Database can grow large very quickly, which can also slow performance. You need to use some common sense, set appropriate retention policy, and possibly re-index to meet your individual needs.
  • No web interface. I actually like the WinForm application, but can also see were a web app would have it's advantages. There is a plan to replace the WinForm application with a Web Application. I'd like to see both, but can understand limited resources.
  • No Operator Groups - Operators are defined individually. However, if you have a distribution list setup, it makes it a little easier.
  • Only Email Alerts
  • No email of reports that I can see, however, this could be considered a Pro, as you could use SQL Reporting Services to make your own reports
  • Remote connections for monitors represent administrative and security considerations. For example, you need port 1433 open to make remote sql connections, WMI does not look very administrator friendly for remote connections, and the same would apply to WMI thru power shell. This is a limitation of the technologies themselves, and not Polymon, but worth pointing out.

Links

Saturday, October 06, 2007 11:12:22 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
Review For Future Projects | Tools
# Thursday, October 04, 2007

Just a quick post about a project called Rifidi, an open source project developed by Pramari and the University of Arkansas. Rifidi allows you to simulate how RFID would affect your processes using a graphical interface. I've only had the chance to do a quick once over of the web site, but it defiantly looks interesting. While I don't know if it will have an immediate impact on my current project, it may in the future.

Almost more interesting, is in the programming behind the simulation, and the fact that it is open source. Pramari is characterized as a "world leader in open source RFID software" in the press release, so I will defiantly be checking out their web site to see what they offer.

Thursday, October 04, 2007 8:12:38 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
Review For Future Projects
# Tuesday, October 02, 2007

In an email from "Microsoft For Partners" today, I was alerted to a new site called PhizzPop. From the email "We created Phizzpop.com to support Web and Design Agencies with training and resources, facilitate collaboration, and showcase great work." A quick look at the site shows that it has samples of work that other people have done, as well as articles on designing web sites for Web 2.0.

I would like to go back and review the site more thoroughly, but for now, I'm just adding to a list of potential Silverlight and Web 2.0 design resources. It will be interesting to see how much the site grows in the next 4-6 months, especially with respect to independent contractors and designers posting portfolios. As technologies like Silverlight and flash (UI portion of Web 2.0) start to infiltrate the enterprise web application space, the need for hiring or contracting a designer will become a reality.  

Tuesday, October 02, 2007 5:43:32 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
Review For Future Projects
# Wednesday, September 19, 2007

When markup won't do, why not markdown? [Scott] recently wrote about JottIt and MarkDown. JottIt is a simple way to create a web page. The content is rendered using Markdown, and feels allot like a Wiki. Upon creation of your first site (just go to JottIt and type something in the big empty text box), you are redirected to a URL like http://jottit.com/d4b8y/. You do have the ability to create a sub domain with a more meaningful URL.

Markdown is a way to support rich text, without using a rich text editor, which is how allot of Wiki's work, I just never knew there was a formal definition. The markdown that I have linked to, is a .Net port, and compiled into a .net assembly. Not requiring a cumbersome rich text control, and removing HTML formatting from user controlled text are two big reasons to consider MarkDown. The syntax as extremely easy, and rates high on Scott's WAF.

Wednesday, September 19, 2007 7:15:48 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] -
Programming | Review For Future Projects
Archive
<September 2010>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Copyright 2010
Adam Salvo
Sign In
Statistics
Total Posts: 251
This Year: 26
This Month: 0
This Week: 2
Comments: 34
Themes
Pick a theme:
All Content 2010, Adam Salvo
DasBlog theme 'Business' created by Christoph De Baene (delarou)