Saturday, July 31, 2010
Software Architecture: Where do you start?
I watched this interesting presentation by Simon Brown that answers some of the key questions about Software Architecture and the role of Software Architect including the following and clears some misconceptions about SA.
What is a Software Architecture?
What is the role of a Software Architect?
How do you go from a blank sheet of paper to software delivery.
Click the following to watch the presentation on SkillsMatter.com
Tuesday, July 13, 2010
Dubai Tech Nights
Today I attended a session of Dubai Tech Nights, it was announced today that it’s been running successfully for 6 months now,but it was my first and definitely not the last, here’s why.
The most notable part of the whole session was the great audience, it was great to see so many professional under one roof dedicating their time to make it happen.
I cant remember the gentleman’s name,but he represented RIT University Dubai and shared with the audience the expansion plans and how his university is doing in general despite the unfavorable conditions.
Then a Emirati Phd student told his about his thesis on Small and Medium Business that he wants to hear from the CXO of 1000 companies in Dubai so then he can take their concerns and opinions to propose them to the Government.
Another fellow Emirati who happens to be a writer showed a book that he has written which basically tells the story of 6 Emiratis that he interviewed and how they made it big, one of them is Saeed Harib of Freej. The idea of writing a book came to his mind when he reached people to take an initiative and how he was given ready excuses by those that he approached.
Another interesting thing to hear was about the startup Nahel.com that offers online shopping in the UAE, the gentlemen talked about his company, what are their strengths, why they decided to launch it, what’s the business model, the target audience,what are the challenges they are facing, how he manages delivery etc, it was interesting to hear it and a lot of great questions were asked during his talk.
Then there was a presentation by Matt Glen from DLA Piper on Legal protections as an agent for fueling technology innovation, the gentleman explained the difference between a invention and a innovation, what’s an NDA from a legal perspective, the procedure for filing a patent if you are an inventor, what are limitations and your rights as an inventor. How do you define Intellectual property etc. He said that an Invention is something that converts money to an Idea and Innovation is something that takes an idea and converts it to money :)
Then there was the networking session over pizza and cold drinks, I met some interesting fellow DTN members and missed a lot others that I’m hopefully going to catch next time.
Saturday, July 10, 2010
PLINQO or LINQ to SQL “Supercharged”: Getting Started
By the end of this post you should know how to get a working Visual Studio project containing a single DBML file, Entity classes for your database tables & helpful Query Extensions generated using CodeSmith Studio and PLINQO.
Let’s get started..
When we fire up CodeSmith Studio we get the Template Explorer window,expand Framework and see PLINQO installed out of the box.
I have expanded the CSharp folder and notice that it contains a bunch of .cst template files,PLINQO uses them to generate our objects.
We look at them in just a moment, first click the … button on SourceDatabase property, for the demo I am using a Northwind database, so let’s select it.
We can see that rest of the properties fill automagically,now lets take a look at each of them.
After the source database info, PLINQO needs to know the target language to generate the entities,location where the files will be generated and so on.
Now lets talk about the not so obvious ones.
- By default PLINQO generates 3 projects, a DAL project, a Dynamic Data website or web application project and a Test project.
The Data Project group tells the namespace for the data project,do we need to copy the template files to the target folder and type of queries it should generate,this has 2 options QueryExtensions and ManagerClasses, we will look them in a future post.
The Interface Project needs to know whether or not generate a Data web service file, type of project (Web application or Website) and the project name.
The Test project properties tell whether or not include a Test project in the solution and the name of the test project.
Let’s leave the default selected,specify the target Location and hit Generate,
This launches Visual Studio with a solution that contains our 3 projects.
To generate Entities and Queries we need to do one last step before we’re on our way.
Before we do that let’s go behind the scenes to see how PLINQO will generate the classes for us,so
Right click on Northwind.Data.csp file and select Manage Outputs.
For instance double-click on DBML will bring up a dialog where one of the things I can do is change the Ignore Pattern to exclude tables with a matching name that I don’t want or change the name of the base class for all my entities.
In Entities I can change the default location of the Entities output directory for instance, similarly in Queries I can change the default name of the Datacontext object that PLINQO generates.
Let’s leave them unchanged, Cancel the dialog and go back to the Solution Explorer.
Right-click the Northwind.Data.csp file again and this time select Generate Outputs.
PLINQO will then build the solution,generate Entities and Queries required to query the database.
The final output looks like.
Let’s open the generated Northwind.dbml.
Perfect, now let’s go to Northwind.UI project and fire up Default.aspx in the browser.
Nice so we got a fully working ASP.NET Dynamic Data web application project generated using PLINQO from a Northwind database.
In a future post we’ll see how PLINQO simplifies querying data with the help of some useful extension methods and few other tricks.
- Download this VS2010 Solution with Northwind database script (does not require CodeSmith Studio)
Thursday, July 08, 2010
Fun with VS2010 Ultimate: Comparing SQL Data
Update: Its an honor to have ScottGu and Scott Hanselman retweet this post and link from the "Gu" blog and also big thanks to Alvin Ashcraft & Chris Alcock for links to this post and offcourse thanks everyone else for RT-ing it on twitter. If you like this post then please visit back & dont forget to follow me on twitter @zubairdotnet
While playing with Visual Studio 2010 I discovered that the Ultimate (and Premium) edition ship with SQL Data and Schema Compare tools out of the box, so I decided to give a whirl.
I made two databases, SourceDB & TargetDB with only one table Customer. Here’s how the data looked like.
Next I selected the Compare Data options on the source table from Server Explorer
This brought up the interface where I chose the target database and hit Next, I decided to leave the other options checked.
Next screen showed the tables and views that I wanted to compare, in my case the only table Customer.
Now the interesting part,
In addition to the above ones that need to be updated, notice that there is only 1 record in the source table that the target needs to add and 1 identical that will remain unchanged,let’s look at them.
but this doesn’t end here, off course I could update my target database right from VS, for that I had two options, I could generate the script or have VS2010 do it for me.
Since I was playing, I thought let’s see both so I right-clicked and selected,
That brought up the generated Sql script in the editor that I could then use to update my target database,that looked like.
Let’s look a bit deeper,hmm VS disables FK constraints,performs the operation and then restores it back, pretty good.
Since I was a bit lazy so thought I will have VS do it for me, all I had to do was…right-click and select..
VS 2010 then presented a confirm dialog, I knew what I was doing so I hit OK and the changes were pushed to the target table.