Thursday, February 18, 2010

Google URL shortener for everyone

The above-mentioned Google service is definitely useful, especially for long URLs, but it has one big disadvantage, at least for those who prefer any browser other than Google Chrome and don’t want Google toolbar to be installed. Not a nice strategy for such web service-oriented company, I suppose.

Luckily, there is an alternative way to get your URLs shortened with the Google URL shortener. It doesn’t require any software to be installed, it is no more than a simple web page:

Note, that the project is not affiliated with Google.

Wednesday, February 17, 2010

Microsoft Sql Server CE 3.5 provider for DataObjects.Net 4

The first version of Microsoft Sql Server CE 3.5 provider for DataObjects.Net 4 is going to be officially shipped in the upcoming DataObjects.Net 4.2 release.

Let me shortly introduce Sql server CE’s limitations. So it doesn’t support:

Feature Where is used Workaround, if any
Temporary tables Local collections support Regular tables are created and dropped automatically
Full-text search Full-text queries -
Batches Batch database operations -
CROSS APPLY SQL operator “First”, “Single”, “ElementAt”, etc. LINQ methods inside sub queries;
”SelectMany” LINQ method without “DefaultIfEmpty” specifying
-
UPDATE FROM [Table] Upgrade procedure Another, but analogous SQL statement is used
INSERT DEFAULT VALUES Insert operation Default values are explicitly specified
Savepoints Nested transactions -
ROW NUMBER SQL operator “Skip” LINQ methods -
INTERSECT, EXCEPT SQL operators “Except”, “Intersect” LINQ methods -
nvarchar(max), varchar(max), varbinary(max) datatypes   text, ntext, image are used instead
COUNT_BIG function “Count” LINQ method Result of “Count” is explicitly casted to bigint type

But despite of all these limitations there is one huge advantage of CE usage: it doesn’t require separate installation. This is significant feature for developers who works on desktop applications for personal use, for example. Just ship, install and it works. No more problems with database server installation, connections, firewalls, network configurations, etc. Another case is running tests on your business model. Actually, you don’t need big database server for this.

In order to use DataObjects.Net 4 with Sql Server CE instead of his big brother, use the following connection url:

<domain connectionUrl="sqlserverce://user:password@localhost/<Path to your database file>"/>

Another option is to use native connection string:

<domain provider="sqlserverce"
        connectionString="Data Source=<Path to your database file>"/>

Sql Server CE 3.5 provider for DataObjects.Net 4 is already available in DataObjects.Net 4.2 RC.

Tuesday, February 16, 2010

File sync problem and possible solutions

It is well-known fact that an overwhelming majority of people are quite lazy, especially programmers. The latter invented functions and subroutines, classes and components in order not to code things twice. In this very case it seems that a sort of creative laziness can bring huge benefits to the world we are living in. But what if a person is not lazy enough to invent a brilliant idea or use an existing one? I was that person for last several years.

My problem was connected to my work. Not to the work itself but to the fact that I usually work at the office as well as at home and I want to get the whole working environment with me wherever I go. By the environment I mean not only projects that I’m working on (this case is handled rather well with the help of hg or subversion) but the entire set of files, documents, may be some music, electronic books, etc.

I tried a number of ways. The most long-lived one was an approach with a flash drive usage. I had to plug-in it every time I came to the office and upload the updated files onto my computer. Before I left the office I had to do the reverse operation – copy updated files back to the flash drive. The same routine was waiting for me at home. If I forget any of these operations – I get out of sync and simply can’t continue my normal working process.

The other options that I tried:

  • Working from home via VPN + Remote desktop. This is not very useful especially when your ISP is not stable. It requires that both computers are on, network speed is rather high.
  • Using a FTP server in order to  sync 2 computers. Not convenient, counts on your manual actions. But doesn’t require that both computers are on.
  • Using one of Opera unite applications such as File Sharing, or Document Sync + Document Courier bundle. The latter one is very promising though. Opera-based solutions don’t require external ftp server although the maximum size of synchronizable directory in case of DS+DC must not exceed 350 Mb.
  • Microsoft FolderShare – the same as the previous one but from Microsoft. Requires a specified application to be installed. Files are stored on your computer but the application provide access to it from the other ones. So again, both computers must be on in order to access shared files.

During those unsuccessful attempts to get a bit of happiness with all that stuff I suddenly realized what I actually wanted. It was simple and genius at the same time: all I wanted is to have on both computers a folder that can automatically synchronizes with some external internet storage. No more.

So my next step was to find an internet service of such kind. But no luck. Actually, there are tons of internet services which provides you with backup capabilities of any sort but not with auto synchronization. Moreover, I started to think that there is no such service and I had to invent my own one. 
Finally, after fruitless searches I found one, but it was worth hours of googling. In fact, even google couldn’t help me as I found the answer in Wikipedia =).

So the solution is – Dropbox! It does exactly what I want, simply syncs a folder in you computer with a cloud, so there is no any necessity to keep your computer working after the sync procedure is completed. It listens to the file system events and uploads updated files immediately. You don’t have to do anything special, just install, configure and that’s it! I really loved the service. It helps to forget about sync problem and concentrate on something really important. It provides free of charge account with 2 Gb limit and it seems that it is enough for me, at least for now. There is a small video presentation on the main page, so I suppose that it is worth watching.

Don’t get me wrong, this is not an advertisement of any kind.  I decided to write the post just because I really, really impressed by the finding. Hope you’ll like it too. They say – “Happy dropboxing!” =).

Sunday, February 7, 2010

A code quality assessment concept

Alex Ilyin shares an interesting concept of code quality assessment. Don’t miss it. The idea is quite fresh and promising.
The only minus that I can see is that the actual realization might be a bit time consuming.

Saturday, January 23, 2010

Ayende on Dependency Injection

Here is another post from Ayende, this time on rejecting Dependency Injection inversion. It is worth reading and highly recommended for those, who don’t like the very idea of IoC usage. For example, Alex Ilyin is from that camp. Recently we had quite interesting conversation on this topic in comments to this post.

Updates on the development process

The beginning of 2010 year was quite busy for the entire DataObjects.Net 4 team. One part of it headed with Alex Yakunin, has been busy with the late DataObjects.Net 4.1 release (which in fact still haven’t been shipped), the other has been working hard on the upcoming DataObjects.Net 4.2 release.

While other developers from the latter part have been working on full-text search, object-to-object mapper and other features from 4.2, personally I was working on highly demanded by customers SQL Server Compact Edition 3.5 support. The work is already done, CE support related code was committed and is being tested by our CI server during the last 2 days. The feature is going to be included into 4.2 release. As for Sql Server CE, it has a huge number of restrictions and I’m going to list all of them in one of the future posts. To sum up, it can replace its big brother (Sql Server 2005/2008) only partially.

Speaking about the upcoming DO.Net 4.2 release, we are planning to make a stable Release Candidate at the end of the January (at the beginning of the February) and deliver DO.Net 4.2 final in the middle of the February, so stay tuned.

As for me, I’ve finished working on 4.2 branch and there is a high possibility that I’ll be busy during the next 2 or 3 months with another project, not connected with DataObjects.Net development at all. The project is going to be very complicated and, as it usually happens, has very limited time-frame, but I hope that my participation will help a lot/a bit. My role will be mainly as business analyst/system architecture. I’m preparing myself for working on endless Word documents, requirements, UML diagrams, precedents, etc. So wish me good luck. =)

However, if I have enough time I’ll keep on posting some regular notes on DO.Net development process.

Monday, January 18, 2010

A frank confession

Alex Ilyin lifts the curtain on terrifying details of DataObjects.Net 4 development process.