Friday, March 4, 2011

Mockup builder : Yet another awesome mockup building tool for your software.

In one of my last post I have discussed about an interesting web based tool to design and manage project the creately project to be precise. In this post I want to share another tool, I really find this tool useful, there is a whole lot of tools and controls set to build any kind of mockup. And I found this a perfect replacement of visio. but I must mention one point here before the continuation of the post, its Free!, its still in beta state though, hope this will be free in the release version also.

image

This tool is written entirely in Silverlight, and must say this is an state of art example what Silverlight can do, this project has also has out of browser experience so you can also install this in your local machine for offline browsing. you guys can checkout this tool from http://mockupbuilder.com/.

image

Some very interesting feature is that you can create project and design multi-screen mockups. I hope this tool will be free for use as long as it remains.

Friday, February 11, 2011

Use Creately to manage your software artifacts

This is a interesting tool, a full web based UML, and other diagrams designer tool, just like mockupbuilder. you can checkout this tool at http://creately.com/.

You would be surprised to see the client list of this tool. And some surprising integration with your existing collaboration tool.

image

But for uses we have a simple problem, that’s money proportional to extendibility. This tool has some basic free service but for advanced services you have to use the commercial stuff. Why we don’t have free stuff? its because the world will not give us the basic needs for free so some one have to do business to make money.

Did I mention that you can build your software mockup as well, in this tool apart from doing awesome collaboration. And not to mention it has a desktop version as well, incase you want to replace MS Visio with Creately.

“I dream of a all free software world.”

Thursday, January 27, 2011

Using Linq To SQL with SQL Server Compact 3.5

In my previous post we have discussed how we can use SQL server compact 4.0 with Entity Framework, and turned out its pretty easy, and no challenge what so ever. In this section we are going to see how we can use Linq To SQL with SQL Server Compact 4.0. Lets see if we can find some challenge this time.

We are going to use same NorthWind.sdf database example what we have discussed in previous section. Normal Procedure of using Linq To SQL Data Classes is simple, you got to add a “Linq To SQL Data classes” Template in Project and then drag and drop the data tables from Data connection to the surface of design view of Linq to sql data classes. If you try to do this with SQL Server Compact 4.0 you would have a error like the following screen shot. The main concern is that you can’t add it. And then there is no point of using it.

image

It appeared you can’t use SQL Server Compact 4.0 with Linq To SQL anymore. So only way to use Microsoft ORM is Ado.net Entity Framework. But you can use SQL Server Compact 3.5 with Linq To SQL. So lets forget about version 4.0 for now, and try using it with 3.5 sp2. Still you have the same problem, that is no default provider. But this time we have few workarounds.

Workaround

Alright so we failed to created data classes for linq to sql normally, lets try some other way now in others words every thing have a workaround. There are couple of solutions to our problem but we are going to use one of the most easy one, a tool that will generate the dbml file for us, http://sqlmetalosui.codeplex.com/ this is a UI tool build to support sqlmetal.exe.

We will download and install this tool as an external tool in visual studio, I am not going to explain every detail how to install and add it in visual studio as external tool, and assuming you some how know it, After adding it with correct name and location you can get a tool like the bello screen shot.

image

Select Third option, that is “by Input File (.sdf)” So here you can just browse for the database and then select destinations file in the next step, and click and then browse for dbml, last of of all click ok to generate the file.

image

Since this GUI tool is just a wrapper for SqlMetal.exe you can also use it via commandline argument, and generate the dbml file.

image

The Command : SqlMetal /dbml:northwind.dbml northwind.sdf

Copy and pest the generated northwind.dbml file in your project, vs will generate the other two file for you. and then use right connection string when calling the functions.

Northwind northwind = new Northwind(@"Data Source=|DataDirectory|\Northwind.sdf");
List<Employees> employeeses = northwind.Employees.ToList();





On top we have put down two line of sample code for demo. That’s it. Well till next post , best of luck and happy programming.

Friday, December 3, 2010

Limitations of SQLite version 3

Found a good source of Limitations of SQLite embedded database. And I am quite impressed about the numbers that have as a limit in any category. I my opinion those are not limitations Open-mouthed smile. Rather those are supports. You can take a look at this http://www.sqlite.org/limits.html where all the max stuff is listed. Here are few examples, and all are taken from the original site.

Maximum Number Of Rows In A Table

The theoretical maximum number of rows in a table is 264 (18446744073709551616 or about 1.8e+19). This limit is unreachable since the maximum database size of 14 terabytes will be reached first. A 14 terabytes database can hold no more than approximately 1e+13 rows, and then only if there are no indices and if each row contains very little data.

Maximum length of a string or BLOB

The maximum number of bytes in a string or BLOB in SQLite is defined by the preprocessor macro SQLITE_MAX_LENGTH. The default value of this macro is 1 billion (1 thousand million or 1,000,000,000). You can raise or lower this value at compile-time using a command-line option like this:

-DSQLITE_MAX_LENGTH=123456789

The current implementation will only support a string or BLOB length up to 231-1 or 2147483647. And some built-in functions such as hex() might fail well before that point. In security-sensitive applications it is best not to try to increase the maximum string and blob length. In fact, you might do well to lower the maximum string and blob length to something more in the range of a few million if that is possible.

During part of SQLite's INSERT and SELECT processing, the complete content of each row in the database is encoded as a single BLOB. So the SQLITE_MAX_LENGTH parameter also determines the maximum number of bytes in a row.

The maximum string or BLOB length can be lowered at run-time using the sqlite3_limit(db,SQLITE_LIMIT_LENGTH,size) interface.

Maximum Number Of Columns

The default setting for SQLITE_MAX_COLUMN is 2000. You can change it at compile time to values as large as 32767. On the other hand, many experienced database designers will argue that a well-normalized database will never need more than 100 columns in a table.

In most applications, the number of columns is small - a few dozen. There are places in the SQLite code generator that use algorithms that are O(N²) where N is the number of columns. So if you redefine SQLITE_MAX_COLUMN to be a really huge number and you generate SQL that uses a large number of columns, you may find that sqlite3_prepare_v2() runs slowly.

The maximum number of columns can be lowered at run-time using the sqlite3_limit(db,SQLITE_LIMIT_COLUMN,size) interface.

Maximum Number Of Tables In A Join

SQLite does not support joins containing more than 64 tables. This limit arises from the fact that the SQLite code generator uses bitmaps with one bit per join-table in the query optimizer.

SQLite uses a very efficient O(N²) greedy algorithm for determining the order of tables in a join and so a large join can be prepared quickly. Hence, there is no mechanism to raise or lower the limit on the number of tables in a join.

Note: I am sure those are pretty good numbers as far as an embedded database can offer.

Friday, November 12, 2010

Prevent WPF Tree View nodes from getting selected.

By default all the nodes of the WPF tree view is selectable. If some how we had a requirement that the roots nodes can not be selected rather only the child nodes will be selectable we need to customize one single property “focusable”. If we set the focusable property of any node to false then the node will not be selectable. pretty small thing but worth sharing because in MSDN forum one developer asked for this.

Bello a simple code sample is given

        <TreeView Height="251" HorizontalAlignment="Left" Margin="45,30,0,0" 
Name="treeView1" VerticalAlignment="Top" Width="197">
<TreeViewItem Header="Yahoo" IsManipulationEnabled="False" Focusable="False">
<TreeViewItem Header="d" />
<TreeViewItem Header="c" />
<TreeViewItem Header="b" />
<TreeViewItem Header="A" />
</TreeViewItem>
</TreeView>






Hope this will help, Note that if you have some binding with the tree grid and you want to achieve the same as above you might need to use triggers.

Friday, October 8, 2010

Most widely used WPF client application development frameworks

I done some research on WPF client application development frameworks and eventually found out three most used framework and one yet to be mature framework. I thought its worth sharing the research result

1. Prism

http://compositewpf.codeplex.com/

Impression : Most advance framework

2. Caliburn

http://caliburn.codeplex.com/

Impression : Advanced  framework

3. Cinch

http://cinch.codeplex.com/

Impression : Solved particular set of problems and can be used along with other framework

4. WPF Application Framework (WAF)

http://waf.codeplex.com/

Impression: Primitive and useful framework to develop MVVM pattern based application

All the application framework used MVVM pattern to develop the applications, I am sure this frameworks are worth learning and will definitely help us in career.